From 59a5bdd75014f2100d2238b1cde1a7d9befc212c Mon Sep 17 00:00:00 2001 From: Ralf King Date: Sun, 6 Oct 2024 03:10:17 +0200 Subject: [PATCH] Fix untranslatable tooltips. Signed-off-by: Ralf King --- src/i18n/locales/de.json | 3 +++ src/i18n/locales/en.json | 3 +++ src/i18n/locales/es.json | 3 +++ src/i18n/locales/fr.json | 3 +++ src/i18n/locales/hi.json | 3 +++ src/i18n/locales/it.json | 3 +++ src/i18n/locales/ja.json | 3 +++ src/i18n/locales/pl.json | 3 +++ src/i18n/locales/pt-BR.json | 3 +++ src/i18n/locales/pt.json | 3 +++ src/i18n/locales/ru.json | 3 +++ src/i18n/locales/uk-UA.json | 3 +++ src/i18n/locales/zh.json | 3 +++ src/views/portfolio/projects/Project.vue | 20 +++++++++++--------- src/views/portfolio/projects/ProjectList.vue | 17 ++++++++++++----- 15 files changed, 62 insertions(+), 14 deletions(-) diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index b7bc54605..32cfbc886 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -364,6 +364,9 @@ "code_not_reachable": "Code nicht erreichbar", "collectionLogic": "Projektsammlungslogik", "collection_logic_changed": "Projektsammlungslogik geändert", + "collection_logic_metrics_by_aggregate_direct_children": "Die Metriken des Sammlungsprojekts werden durch die Aggregation der Zahlen aller direkten untergeordneten Elemente berechnet.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Die Metriken des Sammlungsprojekts werden berechnet, indem die Zahlen aller direkten untergeordneten Elemente mit dem Tag „{tag}“ aggregiert werden.", + "collection_logic_metrics_by_aggregate_latest_version": "Die Metriken des Sammlungsprojekts werden durch die Aggregation der Anzahl der neuesten Versionen direkter untergeordneter Elemente berechnet.", "collection_projects": "Projekte in Sammlung", "comment": "Kommentar", "comments": "Kommentare", diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 907e31cf1..3bb7d1f5b 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -364,6 +364,9 @@ "code_not_reachable": "Code not reachable", "collectionLogic": "Project Collection Logic", "collection_logic_changed": "Project Collection Logic Changed", + "collection_logic_metrics_by_aggregate_direct_children": "Metrics of collection project are calculated by aggregating numbers of all direct children.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Metrics of collection project are calculated by aggregating numbers of direct children with tag '{tag}'.", + "collection_logic_metrics_by_aggregate_latest_version": "Metrics of collection project are calculated by aggregating numbers of latest versions of direct children.", "collection_projects": "Collection Projects", "comment": "Comment", "comments": "Comments", diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index cd57ea189..723703056 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -364,6 +364,9 @@ "code_not_reachable": "Código no accesible", "collectionLogic": "Lógica de recopilación de proyectos", "collection_logic_changed": "Lógica de colección de proyectos cambiada", + "collection_logic_metrics_by_aggregate_direct_children": "Las métricas del proyecto de recopilación se calculan sumando los números de todos los hijos directos.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Las métricas del proyecto de recopilación se calculan agregando números de hijos directos con la etiqueta '{tag}'.", + "collection_logic_metrics_by_aggregate_latest_version": "Las métricas del proyecto de recopilación se calculan agregando números de las últimas versiones de los hijos directos.", "collection_projects": "Proyectos de colección", "comment": "Comentario", "comments": "Comentarios", diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 56dfce383..870fe7d6b 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -364,6 +364,9 @@ "code_not_reachable": "Code inaccessible", "collectionLogic": "Logique de collecte de projets", "collection_logic_changed": "La logique de collecte du projet a été modifiée", + "collection_logic_metrics_by_aggregate_direct_children": "Les mesures du projet de collecte sont calculées en agrégeant le nombre de tous les enfants directs.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Les métriques du projet de collection sont calculées en agrégeant le nombre d'enfants directs avec la balise « {tag} ».", + "collection_logic_metrics_by_aggregate_latest_version": "Les mesures du projet de collection sont calculées en agrégeant le nombre des dernières versions des enfants directs.", "collection_projects": "Projets de collecte", "comment": "Commentaire", "comments": "Commentaires", diff --git a/src/i18n/locales/hi.json b/src/i18n/locales/hi.json index 73ce9044b..1cb3e5dec 100644 --- a/src/i18n/locales/hi.json +++ b/src/i18n/locales/hi.json @@ -364,6 +364,9 @@ "code_not_reachable": "कोड उपलब्ध नहीं है", "collectionLogic": "परियोजना संग्रह तर्क", "collection_logic_changed": "प्रोजेक्ट संग्रह तर्क बदल गया", + "collection_logic_metrics_by_aggregate_direct_children": "संग्रह परियोजना के मेट्रिक्स की गणना सभी प्रत्यक्ष बच्चों की कुल संख्या द्वारा की जाती है।", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "संग्रह परियोजना के मेट्रिक्स की गणना '{टैग}' टैग वाले प्रत्यक्ष बच्चों की संख्या को एकत्रित करके की जाती है।", + "collection_logic_metrics_by_aggregate_latest_version": "संग्रह परियोजना के मेट्रिक्स की गणना प्रत्यक्ष बच्चों के नवीनतम संस्करणों की संख्या को एकत्रित करके की जाती है।", "collection_projects": "संग्रह परियोजनाएँ", "comment": "टिप्पणी", "comments": "टिप्पणियाँ", diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index e297a7410..7aba5c5bf 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -364,6 +364,9 @@ "code_not_reachable": "Codice non raggiungibile", "collectionLogic": "Logica della raccolta dei progetti", "collection_logic_changed": "Logica della raccolta progetti modificata", + "collection_logic_metrics_by_aggregate_direct_children": "Le metriche del progetto di raccolta vengono calcolate aggregando i numeri di tutti i figli diretti.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Le metriche del progetto di raccolta vengono calcolate aggregando il numero di figli diretti con tag '{tag}'.", + "collection_logic_metrics_by_aggregate_latest_version": "Le metriche del progetto di raccolta vengono calcolate aggregando i numeri delle ultime versioni dei figli diretti.", "collection_projects": "Progetti di raccolta", "comment": "Commento", "comments": "Commenti", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 7ec5db5ad..fdc938cf9 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -364,6 +364,9 @@ "code_not_reachable": "コードにアクセスできません", "collectionLogic": "プロジェクト収集ロジック", "collection_logic_changed": "プロジェクト収集ロジックの変更", + "collection_logic_metrics_by_aggregate_direct_children": "コレクション プロジェクトのメトリクスは、すべての直接の子の数を集計することによって計算されます。", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "コレクション プロジェクトのメトリクスは、タグ「{tag}」を持つ直接の子の数を集計することによって計算されます。", + "collection_logic_metrics_by_aggregate_latest_version": "コレクション プロジェクトのメトリックは、直接の子の最新バージョンの数を集計することによって計算されます。", "collection_projects": "コレクションプロジェクト", "comment": "コメント", "comments": "コメント", diff --git a/src/i18n/locales/pl.json b/src/i18n/locales/pl.json index 90360119c..6050dd511 100644 --- a/src/i18n/locales/pl.json +++ b/src/i18n/locales/pl.json @@ -364,6 +364,9 @@ "code_not_reachable": "Kod nieosiągalny", "collectionLogic": "Logika kolekcji projektów", "collection_logic_changed": "Zmieniono logikę kolekcji projektów", + "collection_logic_metrics_by_aggregate_direct_children": "Metryki projektu kolekcji są obliczane poprzez agregację liczb wszystkich bezpośrednich elementów podrzędnych.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Metryki projektu kolekcji są obliczane poprzez agregację liczby bezpośrednich elementów podrzędnych ze znacznikiem „{tag}”.", + "collection_logic_metrics_by_aggregate_latest_version": "Metryki projektu kolekcji są obliczane poprzez agregację liczby najnowszych wersji bezpośrednich elementów podrzędnych.", "collection_projects": "Projekty kolekcji", "comment": "Komentarz", "comments": "Uwagi", diff --git a/src/i18n/locales/pt-BR.json b/src/i18n/locales/pt-BR.json index 62d9fc4a4..da1f63822 100644 --- a/src/i18n/locales/pt-BR.json +++ b/src/i18n/locales/pt-BR.json @@ -364,6 +364,9 @@ "code_not_reachable": "Código não acessível", "collectionLogic": "Lógica de coleção de projetos", "collection_logic_changed": "Lógica de coleção de projetos alterada", + "collection_logic_metrics_by_aggregate_direct_children": "As métricas do projeto de coleta são calculadas agregando o número de todos os filhos diretos.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "As métricas do projeto de coleção são calculadas agregando o número de filhos diretos com a tag '{tag}'.", + "collection_logic_metrics_by_aggregate_latest_version": "As métricas do projeto de coleta são calculadas agregando os números das versões mais recentes dos filhos diretos.", "collection_projects": "Projetos de Coleção", "comment": "Comente", "comments": "Comentários", diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 27c12c079..cadff22d8 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -364,6 +364,9 @@ "code_not_reachable": "Código não acessível", "collectionLogic": "Lógica de coleção de projetos", "collection_logic_changed": "Lógica de coleção de projetos alterada", + "collection_logic_metrics_by_aggregate_direct_children": "As métricas do projeto de coleta são calculadas agregando o número de todos os filhos diretos.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "As métricas do projeto de coleção são calculadas agregando o número de filhos diretos com a tag '{tag}'.", + "collection_logic_metrics_by_aggregate_latest_version": "As métricas do projeto de coleta são calculadas agregando os números das versões mais recentes dos filhos diretos.", "collection_projects": "Projetos de Coleção", "comment": "Comente", "comments": "Comentários", diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index 2da30a450..cbccb04fa 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -364,6 +364,9 @@ "code_not_reachable": "Код недоступен", "collectionLogic": "Логика коллекции проектов", "collection_logic_changed": "Изменена логика сбора проектов", + "collection_logic_metrics_by_aggregate_direct_children": "Метрики проекта сбора рассчитываются путем агрегирования количества всех прямых дочерних элементов.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Метрики проекта сбора рассчитываются путем агрегирования количества прямых дочерних элементов с тегом «{tag}».", + "collection_logic_metrics_by_aggregate_latest_version": "Метрики проекта сбора рассчитываются путем агрегирования количества последних версий прямых дочерних элементов.", "collection_projects": "Коллекционные проекты", "comment": "Комментарий", "comments": "Комментарии", diff --git a/src/i18n/locales/uk-UA.json b/src/i18n/locales/uk-UA.json index c438bc6ac..4764c7139 100644 --- a/src/i18n/locales/uk-UA.json +++ b/src/i18n/locales/uk-UA.json @@ -364,6 +364,9 @@ "code_not_reachable": "Код недоступний", "collectionLogic": "Логіка збору проектів", "collection_logic_changed": "Змінено логіку збирання проекту", + "collection_logic_metrics_by_aggregate_direct_children": "Показники проекту колекції обчислюються шляхом агрегування чисел усіх прямих дочірніх елементів.", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "Показники проекту колекції обчислюються шляхом агрегування кількості прямих дочірніх елементів із тегом \"{tag}\".", + "collection_logic_metrics_by_aggregate_latest_version": "Показники проекту колекції обчислюються шляхом агрегування чисел останніх версій прямих дочірніх елементів.", "collection_projects": "Колекція проектів", "comment": "коментар", "comments": "Коментарі", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index 4649ea071..eacfe76b1 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -364,6 +364,9 @@ "code_not_reachable": "代码无法访问", "collectionLogic": "项目集合逻辑", "collection_logic_changed": "项目集合逻辑已更改", + "collection_logic_metrics_by_aggregate_direct_children": "收集项目的指标是通过汇总所有直系子女的数量来计算的。", + "collection_logic_metrics_by_aggregate_direct_children_with_tags": "收集项目的指标是通过聚合带有标签“{tag}”的直接子项的数量来计算的。", + "collection_logic_metrics_by_aggregate_latest_version": "收集项目的指标是通过汇总直接子项的最新版本的数量来计算的。", "collection_projects": "收藏项目", "comment": "评论", "comments": "评论", diff --git a/src/views/portfolio/projects/Project.vue b/src/views/portfolio/projects/Project.vue index c4e067015..243b652c6 100644 --- a/src/views/portfolio/projects/Project.vue +++ b/src/views/portfolio/projects/Project.vue @@ -610,25 +610,27 @@ export default { return this.$refs[tab && tab[1] ? tab[1].toLowerCase() : 'overview']; }, getCollectionLogicText: function (project) { - let title = - 'Metrics of collection project are calculated by aggregating numbers of '; switch (project.collectionLogic) { case 'NONE': return ''; case 'AGGREGATE_DIRECT_CHILDREN': - title += 'all direct children.'; - break; + return this.$t( + 'message.collection_logic_metrics_by_aggregate_direct_children', + ); case 'AGGREGATE_DIRECT_CHILDREN_WITH_TAG': const tag = !project.collectionTag ? '' : xssFilters.inDoubleQuotedAttr(project.collectionTag.name); - title += `direct children with tag '${tag}'.`; - break; + return this.$t( + 'message.collection_logic_metrics_by_aggregate_direct_children_with_tags', + { tag: tag }, + ); case 'AGGREGATE_LATEST_VERSION_CHILDREN': - title += 'latest versions of direct children.'; - break; + return this.$t( + 'message.collection_logic_metrics_by_aggregate_latest_version', + ); } - return title; + return ''; }, isCollectionProject: function () { return this.project.collectionLogic !== 'NONE'; diff --git a/src/views/portfolio/projects/ProjectList.vue b/src/views/portfolio/projects/ProjectList.vue index a15ac8c0b..2addfabda 100644 --- a/src/views/portfolio/projects/ProjectList.vue +++ b/src/views/portfolio/projects/ProjectList.vue @@ -252,6 +252,7 @@ export default { field: 'name', sortable: true, routerFunc: () => this.$router, + $t: (key, values) => this.$t(key, values), formatter(value, row, index) { let url = xssFilters.uriInUnQuotedAttr( this.routerFunc().resolve({ @@ -261,20 +262,26 @@ export default { ); let collectionIcon = ''; if (row.collectionLogic !== 'NONE') { - let title = - 'Metrics of collection project are calculated by aggregating numbers of '; + let title = ''; switch (row.collectionLogic) { case 'AGGREGATE_DIRECT_CHILDREN': - title += 'all direct children.'; + title = this.$t( + 'message.collection_logic_metrics_by_aggregate_direct_children', + ); break; case 'AGGREGATE_DIRECT_CHILDREN_WITH_TAG': const tag = !row.collectionTag ? '' : xssFilters.inDoubleQuotedAttr(row.collectionTag.name); - title += `direct children with tag '${tag}'.`; + title = this.$t( + 'message.collection_logic_metrics_by_aggregate_direct_children_with_tags', + { tag: tag }, + ); break; case 'AGGREGATE_LATEST_VERSION_CHILDREN': - title += 'latest versions of direct children.'; + title = this.$t( + 'message.collection_logic_metrics_by_aggregate_latest_version', + ); break; } collectionIcon = ` `;