From 11bb0221803c4c1b10a978246b12657232608906 Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Sat, 11 Nov 2023 09:34:17 +0100 Subject: [PATCH 1/4] feat(multilingual): reload page on language switch --- .../src/lib/language-switcher/language-switcher.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts index 2799a0fb06..aa631a93ec 100644 --- a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts +++ b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts @@ -42,6 +42,7 @@ export class LanguageSwitcherComponent implements OnInit { changeLanguage(value) { try { localStorage.setItem(LANGUAGE_STORAGE_KEY, value) + location.reload() } catch (error) { console.warn(`Language choice could not be persisted`, error) } From a540c829be3a7e00c6c950b5b1b3f87f043eb3ac Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Sat, 11 Nov 2023 09:42:30 +0100 Subject: [PATCH 2/4] feat(i18n): translate language list in its own language done by chatgpt --- translations/de.json | 28 ++++++++++++++-------------- translations/en.json | 28 ++++++++++++++-------------- translations/es.json | 26 +++++++++++++------------- translations/fr.json | 28 ++++++++++++++-------------- translations/it.json | 28 ++++++++++++++-------------- translations/nl.json | 28 ++++++++++++++-------------- translations/pt.json | 26 +++++++++++++------------- 7 files changed, 96 insertions(+), 96 deletions(-) diff --git a/translations/de.json b/translations/de.json index d4da8d0e2c..3904045a2e 100644 --- a/translations/de.json +++ b/translations/de.json @@ -144,21 +144,21 @@ "facets.block.title.tag.default": "Stichwort", "facets.block.title.th_regions_tree.default": "Regionen", "favorite.not.authenticated.tooltip": "
Anmelden, um auf diese Funktion zuzugreifen
", - "language.ca": "Katalanisch", - "language.cs": "Tschechisch", + "language.ca": "Català", + "language.cs": "Čeština", "language.de": "Deutsch", - "language.en": "Englisch", - "language.es": "Spanisch", - "language.fi": "Finnisch", - "language.fr": "Französisch", - "language.is": "Isländisch", - "language.it": "Italienisch", - "language.ko": "Koreanisch", - "language.nl": "Niederländisch", - "language.pt": "Portugiesisch", - "language.ru": "Russisch", - "language.sk": "Slowakisch", - "language.zh": "Chinesisch", + "language.en": "English", + "language.es": "Español", + "language.fi": "Suomi", + "language.fr": "Français", + "language.is": "Íslenska", + "language.it": "Italiano", + "language.ko": "한국어", + "language.nl": "Nederlands", + "language.pt": "Português", + "language.ru": "Русский", + "language.sk": "Slovenčina", + "language.zh": "中文", "map.add.layer": "Eine Ebene hinzufügen", "map.add.layer.catalog": "Aus dem Katalog", "map.add.layer.file": "Aus einer Datei", diff --git a/translations/en.json b/translations/en.json index 092c5b1583..d6ffaac7ed 100644 --- a/translations/en.json +++ b/translations/en.json @@ -144,21 +144,21 @@ "facets.block.title.tag.default": "Tag", "facets.block.title.th_regions_tree.default": "Regions", "favorite.not.authenticated.tooltip": "
Login to access this feature
", - "language.ca": "Catalan", - "language.cs": "Czech", - "language.de": "German", + "language.ca": "Català", + "language.cs": "Čeština", + "language.de": "Deutsch", "language.en": "English", - "language.es": "Spanish", - "language.fi": "Finnish", - "language.fr": "French", - "language.is": "Icelandic", - "language.it": "Italian", - "language.ko": "Korean", - "language.nl": "Dutch", - "language.pt": "Portuguese", - "language.ru": "Russian", - "language.sk": "Slovak", - "language.zh": "Chinese", + "language.es": "Español", + "language.fi": "Suomi", + "language.fr": "Français", + "language.is": "Íslenska", + "language.it": "Italiano", + "language.ko": "한국어", + "language.nl": "Nederlands", + "language.pt": "Português", + "language.ru": "Русский", + "language.sk": "Slovenčina", + "language.zh": "中文", "map.add.layer": "Add a layer", "map.add.layer.catalog": "From the catalog", "map.add.layer.file": "From a file", diff --git a/translations/es.json b/translations/es.json index 6cf5eefc40..1444afe3d8 100644 --- a/translations/es.json +++ b/translations/es.json @@ -144,21 +144,21 @@ "facets.block.title.tag.default": "", "facets.block.title.th_regions_tree.default": "", "favorite.not.authenticated.tooltip": "", - "language.ca": "Catalán", - "language.cs": "Checo", - "language.de": "Alemán", - "language.en": "Inglés", + "language.ca": "Català", + "language.cs": "Čeština", + "language.de": "Deutsch", + "language.en": "English", "language.es": "Español", - "language.fi": "Finlandés", - "language.fr": "Francés", - "language.is": "Islandés", + "language.fi": "Suomi", + "language.fr": "Français", + "language.is": "Íslenska", "language.it": "Italiano", - "language.ko": "Coreano", - "language.nl": "Neerlandés", - "language.pt": "Portugués", - "language.ru": "Ruso", - "language.sk": "Eslovaco", - "language.zh": "Chino", + "language.ko": "한국어", + "language.nl": "Nederlands", + "language.pt": "Português", + "language.ru": "Русский", + "language.sk": "Slovenčina", + "language.zh": "中文", "map.add.layer": "", "map.add.layer.catalog": "", "map.add.layer.file": "", diff --git a/translations/fr.json b/translations/fr.json index 22d8ae5069..152348a25e 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -144,21 +144,21 @@ "facets.block.title.tag.default": "Tag", "facets.block.title.th_regions_tree.default": "Régions", "favorite.not.authenticated.tooltip": "
Connectez-vous pour avoir accès à cette fonctionnalité
", - "language.ca": "Catalan", - "language.cs": "Tchèque", - "language.de": "Allemand", - "language.en": "Anglais", - "language.es": "Espagnol", - "language.fi": "Finnois", + "language.ca": "Català", + "language.cs": "Čeština", + "language.de": "Deutsch", + "language.en": "English", + "language.es": "Español", + "language.fi": "Suomi", "language.fr": "Français", - "language.is": "Islandais", - "language.it": "Italien", - "language.ko": "Coréen", - "language.nl": "Néerlandais", - "language.pt": "Portugais", - "language.ru": "Russe", - "language.sk": "Slovaque", - "language.zh": "Chinois", + "language.is": "Íslenska", + "language.it": "Italiano", + "language.ko": "한국어", + "language.nl": "Nederlands", + "language.pt": "Português", + "language.ru": "Русский", + "language.sk": "Slovenčina", + "language.zh": "中文", "map.add.layer": "", "map.add.layer.catalog": "", "map.add.layer.file": "", diff --git a/translations/it.json b/translations/it.json index 4afca57dd2..1444afe3d8 100644 --- a/translations/it.json +++ b/translations/it.json @@ -144,21 +144,21 @@ "facets.block.title.tag.default": "", "facets.block.title.th_regions_tree.default": "", "favorite.not.authenticated.tooltip": "", - "language.ca": "Catalano", - "language.cs": "Ceco", - "language.de": "Tedesco", - "language.en": "Inglese", - "language.es": "Spagnolo", - "language.fi": "Finlandese", - "language.fr": "Francese", - "language.is": "Islandese", + "language.ca": "Català", + "language.cs": "Čeština", + "language.de": "Deutsch", + "language.en": "English", + "language.es": "Español", + "language.fi": "Suomi", + "language.fr": "Français", + "language.is": "Íslenska", "language.it": "Italiano", - "language.ko": "Coreano", - "language.nl": "Olandese", - "language.pt": "Portoghese", - "language.ru": "Russo", - "language.sk": "Slovacco", - "language.zh": "Cinese", + "language.ko": "한국어", + "language.nl": "Nederlands", + "language.pt": "Português", + "language.ru": "Русский", + "language.sk": "Slovenčina", + "language.zh": "中文", "map.add.layer": "", "map.add.layer.catalog": "", "map.add.layer.file": "", diff --git a/translations/nl.json b/translations/nl.json index 4ce7f6cac9..1444afe3d8 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -144,21 +144,21 @@ "facets.block.title.tag.default": "", "facets.block.title.th_regions_tree.default": "", "favorite.not.authenticated.tooltip": "", - "language.ca": "Catalaans", - "language.cs": "Tsjechisch", - "language.de": "Duits", - "language.en": "Engels", - "language.es": "Spaans", - "language.fi": "Fins", - "language.fr": "Frans", - "language.is": "IJslands", - "language.it": "Italiaans", - "language.ko": "Koreaans", + "language.ca": "Català", + "language.cs": "Čeština", + "language.de": "Deutsch", + "language.en": "English", + "language.es": "Español", + "language.fi": "Suomi", + "language.fr": "Français", + "language.is": "Íslenska", + "language.it": "Italiano", + "language.ko": "한국어", "language.nl": "Nederlands", - "language.pt": "Portugees", - "language.ru": "Russisch", - "language.sk": "Slowaaks", - "language.zh": "Chinees", + "language.pt": "Português", + "language.ru": "Русский", + "language.sk": "Slovenčina", + "language.zh": "中文", "map.add.layer": "", "map.add.layer.catalog": "", "map.add.layer.file": "", diff --git a/translations/pt.json b/translations/pt.json index a7f20c0585..1444afe3d8 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -144,21 +144,21 @@ "facets.block.title.tag.default": "", "facets.block.title.th_regions_tree.default": "", "favorite.not.authenticated.tooltip": "", - "language.ca": "Catalão", - "language.cs": "Tcheco", - "language.de": "Alemão", - "language.en": "Inglês", - "language.es": "Espanhol", - "language.fi": "Finlandês", - "language.fr": "Francês", - "language.is": "Islandês", + "language.ca": "Català", + "language.cs": "Čeština", + "language.de": "Deutsch", + "language.en": "English", + "language.es": "Español", + "language.fi": "Suomi", + "language.fr": "Français", + "language.is": "Íslenska", "language.it": "Italiano", - "language.ko": "Coreano", - "language.nl": "Holandês", + "language.ko": "한국어", + "language.nl": "Nederlands", "language.pt": "Português", - "language.ru": "Russo", - "language.sk": "Eslovaco", - "language.zh": "Chinês", + "language.ru": "Русский", + "language.sk": "Slovenčina", + "language.zh": "中文", "map.add.layer": "", "map.add.layer.catalog": "", "map.add.layer.file": "", From fceb82e333b50cab6de406dffbfc8fda1f4ef980 Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Sat, 11 Nov 2023 10:10:11 +0100 Subject: [PATCH 3/4] chore(i18n): add translations from missing languages from chatGPT --- conf/default.toml | 4 ++-- translations/es.json | 48 ++++++++++++++++++++++---------------------- translations/it.json | 48 ++++++++++++++++++++++---------------------- translations/nl.json | 48 ++++++++++++++++++++++---------------------- translations/pt.json | 48 ++++++++++++++++++++++---------------------- 5 files changed, 98 insertions(+), 98 deletions(-) diff --git a/conf/default.toml b/conf/default.toml index e704ab5878..049e203a68 100644 --- a/conf/default.toml +++ b/conf/default.toml @@ -14,7 +14,7 @@ proxy_path = "" # Use ISO 639-2/B (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format to indicate the language of the metadata. # Setting to "current" will use the current language of the User Interface. # If not indicated, a wildcard is used and no language preference is applied for the search. -# metadata_language = "current" +metadata_language = "current" # This optional URL should point to the login page that allows authentication to the datahub. # If not indicated, the default geonetwork login page is used. # The following three placeholders can be part of this URL: @@ -31,7 +31,7 @@ proxy_path = "" # This optional parameter defines the languages that will be provided in a dropdown for the user to translate the UI. # Available languages are listed here: (https://github.com/geonetwork/geonetwork-ui/blob/main/libs/util/i18n/src/lib/i18n.constants.ts). # More information about the translation can be found in the docs (https://geonetwork.github.io/geonetwork-ui/main/docs/reference/i18n.html) -# languages = ['en', 'fr', 'de'] +languages = ['en', 'fr', 'de'] ### VISUAL THEME diff --git a/translations/es.json b/translations/es.json index 1444afe3d8..11cd18edb8 100644 --- a/translations/es.json +++ b/translations/es.json @@ -1,28 +1,28 @@ { - "catalog.figures.datasets": "", - "catalog.figures.organisations": "", - "chart.aggregation.average": "", - "chart.aggregation.count": "", - "chart.aggregation.max": "", - "chart.aggregation.min": "", - "chart.aggregation.sum": "", - "chart.dropdown.aggregation": "", - "chart.dropdown.type": "", - "chart.dropdown.xProperty": "", - "chart.dropdown.yProperty": "", - "chart.loading.data": "", - "chart.type.bar": "", - "chart.type.barHorizontal": "", - "chart.type.line": "", - "chart.type.lineSmooth": "", - "chart.type.pie": "", - "dashboard.labels.mySpace": "", - "dashboard.records.all": "", - "dashboard.records.myDraft": "", - "dashboard.records.myLibrary": "", - "dashboard.records.myOrg": "", - "dashboard.records.myRecords": "", - "dashboard.records.search": "", + "catalog.figures.datasets": "conjuntos de datos", + "catalog.figures.organisations": "organizaciones", + "chart.aggregation.average": "promedio", + "chart.aggregation.count": "conteo", + "chart.aggregation.max": "máximo", + "chart.aggregation.min": "mínimo", + "chart.aggregation.sum": "suma", + "chart.dropdown.aggregation": "Agregación", + "chart.dropdown.type": "Tipo", + "chart.dropdown.xProperty": "Eje X", + "chart.dropdown.yProperty": "Eje Y", + "chart.loading.data": "Cargando datos...", + "chart.type.bar": "gráfico de barras", + "chart.type.barHorizontal": "gráfico de barras horizontal", + "chart.type.line": "gráfico de líneas", + "chart.type.lineSmooth": "gráfico de líneas suave", + "chart.type.pie": "gráfico circular", + "dashboard.labels.mySpace": "Mi espacio", + "dashboard.records.all": "Catálogo", + "dashboard.records.myDraft": "Mis borradores", + "dashboard.records.myLibrary": "Mi biblioteca", + "dashboard.records.myOrg": "Organización", + "dashboard.records.myRecords": "Mis Registros", + "dashboard.records.search": "Buscar \"{searchText}\"", "datafeeder.analysisProgressBar.illustration.fileFormatDetection": "", "datafeeder.analysisProgressBar.illustration.gatheringDatasetInformation": "", "datafeeder.analysisProgressBar.illustration.samplingData": "", diff --git a/translations/it.json b/translations/it.json index 1444afe3d8..1ae8d84447 100644 --- a/translations/it.json +++ b/translations/it.json @@ -1,28 +1,28 @@ { - "catalog.figures.datasets": "", - "catalog.figures.organisations": "", - "chart.aggregation.average": "", - "chart.aggregation.count": "", - "chart.aggregation.max": "", - "chart.aggregation.min": "", - "chart.aggregation.sum": "", - "chart.dropdown.aggregation": "", - "chart.dropdown.type": "", - "chart.dropdown.xProperty": "", - "chart.dropdown.yProperty": "", - "chart.loading.data": "", - "chart.type.bar": "", - "chart.type.barHorizontal": "", - "chart.type.line": "", - "chart.type.lineSmooth": "", - "chart.type.pie": "", - "dashboard.labels.mySpace": "", - "dashboard.records.all": "", - "dashboard.records.myDraft": "", - "dashboard.records.myLibrary": "", - "dashboard.records.myOrg": "", - "dashboard.records.myRecords": "", - "dashboard.records.search": "", + "catalog.figures.datasets": "dataset", + "catalog.figures.organisations": "organizzazioni", + "chart.aggregation.average": "media", + "chart.aggregation.count": "conteggio", + "chart.aggregation.max": "massimo", + "chart.aggregation.min": "minimo", + "chart.aggregation.sum": "somma", + "chart.dropdown.aggregation": "Aggregazione", + "chart.dropdown.type": "Tipo", + "chart.dropdown.xProperty": "Asse X", + "chart.dropdown.yProperty": "Asse Y", + "chart.loading.data": "Caricamento dati...", + "chart.type.bar": "grafico a barre", + "chart.type.barHorizontal": "grafico a barre orizzontale", + "chart.type.line": "grafico a linee", + "chart.type.lineSmooth": "grafico a linee morbide", + "chart.type.pie": "grafico a torta", + "dashboard.labels.mySpace": "Il mio spazio", + "dashboard.records.all": "Catalogo", + "dashboard.records.myDraft": "Le mie bozze", + "dashboard.records.myLibrary": "La mia biblioteca", + "dashboard.records.myOrg": "Organizzazione", + "dashboard.records.myRecords": "I miei record", + "dashboard.records.search": "Cerca \"{searchText}\"", "datafeeder.analysisProgressBar.illustration.fileFormatDetection": "", "datafeeder.analysisProgressBar.illustration.gatheringDatasetInformation": "", "datafeeder.analysisProgressBar.illustration.samplingData": "", diff --git a/translations/nl.json b/translations/nl.json index 1444afe3d8..30732c3b9a 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -1,28 +1,28 @@ { - "catalog.figures.datasets": "", - "catalog.figures.organisations": "", - "chart.aggregation.average": "", - "chart.aggregation.count": "", - "chart.aggregation.max": "", - "chart.aggregation.min": "", - "chart.aggregation.sum": "", - "chart.dropdown.aggregation": "", - "chart.dropdown.type": "", - "chart.dropdown.xProperty": "", - "chart.dropdown.yProperty": "", - "chart.loading.data": "", - "chart.type.bar": "", - "chart.type.barHorizontal": "", - "chart.type.line": "", - "chart.type.lineSmooth": "", - "chart.type.pie": "", - "dashboard.labels.mySpace": "", - "dashboard.records.all": "", - "dashboard.records.myDraft": "", - "dashboard.records.myLibrary": "", - "dashboard.records.myOrg": "", - "dashboard.records.myRecords": "", - "dashboard.records.search": "", + "catalog.figures.datasets": "datasets", + "catalog.figures.organisations": "organisaties", + "chart.aggregation.average": "gemiddelde", + "chart.aggregation.count": "aantal", + "chart.aggregation.max": "max", + "chart.aggregation.min": "min", + "chart.aggregation.sum": "som", + "chart.dropdown.aggregation": "Aggregatie", + "chart.dropdown.type": "Type", + "chart.dropdown.xProperty": "X-as", + "chart.dropdown.yProperty": "Y-as", + "chart.loading.data": "Gegevens laden...", + "chart.type.bar": "staafdiagram", + "chart.type.barHorizontal": "horizontaal staafdiagram", + "chart.type.line": "lijndiagram", + "chart.type.lineSmooth": "glad lijndiagram", + "chart.type.pie": "cirkeldiagram", + "dashboard.labels.mySpace": "Mijn ruimte", + "dashboard.records.all": "Catalogus", + "dashboard.records.myDraft": "Mijn concepten", + "dashboard.records.myLibrary": "Mijn bibliotheek", + "dashboard.records.myOrg": "Organisatie", + "dashboard.records.myRecords": "Mijn Records", + "dashboard.records.search": "Zoeken naar \"{searchText}\"", "datafeeder.analysisProgressBar.illustration.fileFormatDetection": "", "datafeeder.analysisProgressBar.illustration.gatheringDatasetInformation": "", "datafeeder.analysisProgressBar.illustration.samplingData": "", diff --git a/translations/pt.json b/translations/pt.json index 1444afe3d8..7b3c51e899 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -1,28 +1,28 @@ { - "catalog.figures.datasets": "", - "catalog.figures.organisations": "", - "chart.aggregation.average": "", - "chart.aggregation.count": "", - "chart.aggregation.max": "", - "chart.aggregation.min": "", - "chart.aggregation.sum": "", - "chart.dropdown.aggregation": "", - "chart.dropdown.type": "", - "chart.dropdown.xProperty": "", - "chart.dropdown.yProperty": "", - "chart.loading.data": "", - "chart.type.bar": "", - "chart.type.barHorizontal": "", - "chart.type.line": "", - "chart.type.lineSmooth": "", - "chart.type.pie": "", - "dashboard.labels.mySpace": "", - "dashboard.records.all": "", - "dashboard.records.myDraft": "", - "dashboard.records.myLibrary": "", - "dashboard.records.myOrg": "", - "dashboard.records.myRecords": "", - "dashboard.records.search": "", + "catalog.figures.datasets": "conjuntos de dados", + "catalog.figures.organisations": "organizações", + "chart.aggregation.average": "média", + "chart.aggregation.count": "contagem", + "chart.aggregation.max": "máximo", + "chart.aggregation.min": "mínimo", + "chart.aggregation.sum": "soma", + "chart.dropdown.aggregation": "Agregação", + "chart.dropdown.type": "Tipo", + "chart.dropdown.xProperty": "Eixo X", + "chart.dropdown.yProperty": "Eixo Y", + "chart.loading.data": "Carregando dados...", + "chart.type.bar": "gráfico de barras", + "chart.type.barHorizontal": "gráfico de barras horizontal", + "chart.type.line": "gráfico de linha", + "chart.type.lineSmooth": "gráfico de linha suave", + "chart.type.pie": "gráfico de pizza", + "dashboard.labels.mySpace": "Meu espaço", + "dashboard.records.all": "Catálogo", + "dashboard.records.myDraft": "Meus rascunhos", + "dashboard.records.myLibrary": "Minha biblioteca", + "dashboard.records.myOrg": "Organização", + "dashboard.records.myRecords": "Meus Registros", + "dashboard.records.search": "Buscar por \"{searchText}\"", "datafeeder.analysisProgressBar.illustration.fileFormatDetection": "", "datafeeder.analysisProgressBar.illustration.gatheringDatasetInformation": "", "datafeeder.analysisProgressBar.illustration.samplingData": "", From ad9fbe91982ea824716a560588a872f56f605b6f Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Sat, 11 Nov 2023 14:01:42 +0100 Subject: [PATCH 4/4] fix: revert configuration change --- conf/default.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/default.toml b/conf/default.toml index 049e203a68..e704ab5878 100644 --- a/conf/default.toml +++ b/conf/default.toml @@ -14,7 +14,7 @@ proxy_path = "" # Use ISO 639-2/B (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format to indicate the language of the metadata. # Setting to "current" will use the current language of the User Interface. # If not indicated, a wildcard is used and no language preference is applied for the search. -metadata_language = "current" +# metadata_language = "current" # This optional URL should point to the login page that allows authentication to the datahub. # If not indicated, the default geonetwork login page is used. # The following three placeholders can be part of this URL: @@ -31,7 +31,7 @@ metadata_language = "current" # This optional parameter defines the languages that will be provided in a dropdown for the user to translate the UI. # Available languages are listed here: (https://github.com/geonetwork/geonetwork-ui/blob/main/libs/util/i18n/src/lib/i18n.constants.ts). # More information about the translation can be found in the docs (https://geonetwork.github.io/geonetwork-ui/main/docs/reference/i18n.html) -languages = ['en', 'fr', 'de'] +# languages = ['en', 'fr', 'de'] ### VISUAL THEME