From 8ad8d2c17d47ee1bbbeed73b7b78e5e89d35bc66 Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Mon, 25 Mar 2024 14:25:31 +0300 Subject: [PATCH 1/3] Resolved #411 - Remove language names from localization dictionaries --- src/analytics-localization/arabic.ts | 4 ---- src/analytics-localization/dutch.ts | 8 -------- src/analytics-localization/english.ts | 4 ---- src/analytics-localization/farsi.ts | 8 -------- src/analytics-localization/french.ts | 10 +--------- src/analytics-localization/german.ts | 13 +------------ src/analytics-localization/italian.ts | 4 ---- src/analytics-localization/norwegian.ts | 8 -------- src/analytics-localization/portuguese.ts | 4 ---- src/analytics-localization/russian.ts | 6 +----- src/analytics-localization/spanish.ts | 8 -------- src/localizationManager.ts | 2 +- src/visualizationPanel.ts | 2 +- 13 files changed, 5 insertions(+), 76 deletions(-) diff --git a/src/analytics-localization/arabic.ts b/src/analytics-localization/arabic.ts index d2dcc800a..9cbc4ea53 100644 --- a/src/analytics-localization/arabic.ts +++ b/src/analytics-localization/arabic.ts @@ -35,10 +35,6 @@ export var arabicStrings = { filter: "ترشح", resetFilter: "إعادة تعيين", changeLocale: "تغيير اللغة", - en: "اللغة الانجليزية", - fr: "اللغه الفرنسية", - ru: "اللغه الروسية", - de: "اللغه الانجليزية", clearButton: "مسح", addElement: "اختر سؤالاً للعرض ...", defaultOrder: "الترتيب الافتراضي", diff --git a/src/analytics-localization/dutch.ts b/src/analytics-localization/dutch.ts index c3ec66010..23381b611 100644 --- a/src/analytics-localization/dutch.ts +++ b/src/analytics-localization/dutch.ts @@ -35,10 +35,6 @@ export var dutchStrings = { filter: "Filter", resetFilter: "Filter resetten", changeLocale: "Wijzig de landinstelling", - en: "Engels", - fr: "Français", - ru: "Русский", - de: "Deutsch", clearButton: "Doorzichtig", addElement: "Kies een vraag om weer te geven ...", defaultOrder: "Standaardvolgorde", @@ -83,10 +79,6 @@ localization.localeNames["nl"] = "Dutch"; // undefined.visualizer_selectBase: "Chart" => "Zeekaart" // undefined.chartType_vbar: "Vertical Bar" => "Verticale balk" // undefined.filter: "Filter" => "Filter" -// undefined.en: "English" => "Engels" -// undefined.fr: "Français" => "Français" -// undefined.ru: "Русский" => "Русский" -// undefined.de: "Deutsch" => "Deutsch" // undefined.hideMissingAnswers: "Hide missing answers" => "Ontbrekende antwoorden verbergen" // undefined.showMissingAnswers: "Show missing answers" => "Ontbrekende antwoorden weergeven" // undefined.missingAnswersLabel: "Missing answers" => "Ontbrekende antwoorden" diff --git a/src/analytics-localization/english.ts b/src/analytics-localization/english.ts index 95e34d180..4b4c229fb 100644 --- a/src/analytics-localization/english.ts +++ b/src/analytics-localization/english.ts @@ -36,10 +36,6 @@ export var englishStrings = { filter: "Filter", resetFilter: "Reset Filter", changeLocale: "Change Locale", - en: "English", - fr: "Français", - ru: "Русский", - de: "Deutsch", clearButton: "Clear", addElement: "Choose question to show...", defaultOrder: "Default Order", diff --git a/src/analytics-localization/farsi.ts b/src/analytics-localization/farsi.ts index 5d556bbea..ec44de46b 100644 --- a/src/analytics-localization/farsi.ts +++ b/src/analytics-localization/farsi.ts @@ -35,10 +35,6 @@ export var farsiStrings = { filter: "فیلتر", resetFilter: "بازنشانی فیلترها", changeLocale: "تغییر محلی", - en: "انگلیسی", - fr: "فرانسه", - ru: "Русский", - de: "دویچ", clearButton: "پاک کردن", addElement: "انتخاب سوال برای نمایش...", defaultOrder: "ترتیب پیشفرض", @@ -94,10 +90,6 @@ localization.localeNames["fa"] = "Farsi(Persian)"; // undefined.showButton: "Show" => "نمایش" // undefined.filter: "Filter" => "فیلتر" // undefined.changeLocale: "Change Locale" => "تغییر محلی" -// undefined.en: "English" => "انگلیسی" -// undefined.fr: "Français" => "فرانسه" -// undefined.ru: "Русский" => "Русский" -// undefined.de: "Deutsch" => "دویچ" // undefined.defaultOrder: "Default Order" => "ترتیب پیشفرض" // undefined.ascOrder: "Ascending" => "صعودی" // undefined.descOrder: "Descending" => "نزولی" diff --git a/src/analytics-localization/french.ts b/src/analytics-localization/french.ts index 24087ee9c..f05b185dd 100644 --- a/src/analytics-localization/french.ts +++ b/src/analytics-localization/french.ts @@ -35,10 +35,6 @@ export var frenchStrings = { filter: "Filtre", resetFilter: "Rafraichir Filtres", changeLocale: "Changer les paramètres régionaux", - en: "Anglais", - fr: "Français", - ru: "Русский", - de: "Deutsch", clearButton: "Rafraichir", addElement: "Choisir la question à afficher...", defaultOrder: "Defaut", @@ -72,7 +68,7 @@ export var frenchStrings = { }; localization.locales["fr"] = frenchStrings; -localization.localeNames["fr"] = "French"; +localization.localeNames["fr"] = "Français"; // The following strings have been translated by a machine translation service // Remove those strings that you have corrected manually @@ -82,10 +78,6 @@ localization.localeNames["fr"] = "French"; // undefined.visualizer_selectBase: "Chart" => "Graphique" // undefined.chartType_vbar: "Vertical Bar" => "Barre verticale" // undefined.changeLocale: "Change Locale" => "Changer les paramètres régionaux" -// undefined.en: "English" => "Anglais" -// undefined.fr: "Français" => "Français" -// undefined.ru: "Русский" => "Русский" -// undefined.de: "Deutsch" => "Deutsch" // undefined.showPercentages: "Show percentages" => "Afficher les pourcentages" // undefined.hidePercentages: "Hide percentages" => "Masquer les pourcentages" // undefined.pdfDownloadCaption: "PDF" => "PDF" diff --git a/src/analytics-localization/german.ts b/src/analytics-localization/german.ts index 9cc7e983f..b2c8d0a80 100644 --- a/src/analytics-localization/german.ts +++ b/src/analytics-localization/german.ts @@ -35,10 +35,6 @@ export var germanStrings = { filter: "Filter", resetFilter: "Filter zurücksetzen", changeLocale: "Lokalisierung ändern", - en: "Englisch", - fr: "Français", - ru: "Русский", - de: "English", clearButton: "Einstellungen löschen", addElement: "Wählen Sie eine Frage, um zu zeigen...", defaultOrder: "Standardreihenfolge", @@ -71,11 +67,4 @@ export var germanStrings = { responses: "Antworten" }; localization.locales["de"] = germanStrings; -localization.localeNames["de"] = "German"; - -// The following strings have been translated by a machine translation service -// Remove those strings that you have corrected manually -// undefined.en: "English" => "Englisch" -// undefined.fr: "Français" => "Français" -// undefined.ru: "Русский" => "Русский" -// undefined.de: "Deutsch" => "English" \ No newline at end of file +localization.localeNames["de"] = "Deutsch"; diff --git a/src/analytics-localization/italian.ts b/src/analytics-localization/italian.ts index ff78062ba..ecf71af5e 100644 --- a/src/analytics-localization/italian.ts +++ b/src/analytics-localization/italian.ts @@ -35,10 +35,6 @@ export var italianStrings = { filter: "Filtro", resetFilter: "Cancella filtro", changeLocale: "Cambia lingua", - en: "Inglese", - fr: "Francese", - ru: "Russo", - de: "Tedesco", clearButton: "Cancella", addElement: "Scegli la domanda da mostrare...", defaultOrder: "Ordine di Default", diff --git a/src/analytics-localization/norwegian.ts b/src/analytics-localization/norwegian.ts index 55a4eee45..532edee77 100644 --- a/src/analytics-localization/norwegian.ts +++ b/src/analytics-localization/norwegian.ts @@ -35,10 +35,6 @@ export var norwegianStrings = { filter: "Filter", resetFilter: "Nullstill filter", changeLocale: "Bytt språk", - en: "Engelsk", - fr: "Français", - ru: "Русский", - de: "Deutsch", clearButton: "Tøm", addElement: "Velg spørsmål...", defaultOrder: "Standard", @@ -82,10 +78,6 @@ localization.localeNames["no"] = "Norwegian"; // undefined.visualizer_selectBase: "Chart" => "Sjøkart" // undefined.chartType_vbar: "Vertical Bar" => "Vertikal stolpe" // undefined.filter: "Filter" => "Filter" -// undefined.en: "English" => "Engelsk" -// undefined.fr: "Français" => "Français" -// undefined.ru: "Русский" => "Русский" -// undefined.de: "Deutsch" => "Deutsch" // undefined.pdfDownloadCaption: "PDF" => "PDF" // undefined.xlsxDownloadCaption: "Excel" => "Overgå" // undefined.csvDownloadCaption: "CSV" => "CSV" diff --git a/src/analytics-localization/portuguese.ts b/src/analytics-localization/portuguese.ts index e9c3f9259..c0b686ae2 100644 --- a/src/analytics-localization/portuguese.ts +++ b/src/analytics-localization/portuguese.ts @@ -35,10 +35,6 @@ export var portugueseStrings = { filter: "Filtrar", resetFilter: "Restaurar Filtro", changeLocale: "Mudar Localização", - en: "Inglês", - fr: "Francês", - ru: "Russo", - de: "Alemão", clearButton: "Limpar", addElement: "Escolher questão para mostrar...", defaultOrder: "Ordenação Padrão", diff --git a/src/analytics-localization/russian.ts b/src/analytics-localization/russian.ts index 697bd932e..8e2c6f171 100644 --- a/src/analytics-localization/russian.ts +++ b/src/analytics-localization/russian.ts @@ -44,10 +44,6 @@ export var russianStrings = { entriesLabel: "записей", makePrivateButton: "Сделать приватным", makePublicButton: "Сделать публичным", - en: "English", - fr: "Français", - ru: "Русский", - de: "Deutsch", showPercentages: "Показать проценты", hidePercentages: "Скрыть проценты", pdfDownloadCaption: "PDF", @@ -72,4 +68,4 @@ export var russianStrings = { }; localization.locales["ru"] = russianStrings; -localization.localeNames["ru"] = "Russian"; +localization.localeNames["ru"] = "Русский"; diff --git a/src/analytics-localization/spanish.ts b/src/analytics-localization/spanish.ts index f82902731..ab20dbe42 100644 --- a/src/analytics-localization/spanish.ts +++ b/src/analytics-localization/spanish.ts @@ -35,10 +35,6 @@ export var spanishStrings = { filter: "Filtro", resetFilter: "Restablecer filtro", changeLocale: "Cambiar configuración regional", - en: "Inglés", - fr: "Français", - ru: "Русский", - de: "Deutsch", clearButton: "Borrar", addElement: "Elija la pregunta para mostrar ...", defaultOrder: "Orden predeterminado", @@ -82,10 +78,6 @@ localization.localeNames["es"] = "Spanish"; // undefined.visualizer_choices: "Table" => "Mesa" // undefined.visualizer_selectBase: "Chart" => "Gráfico" // undefined.chartType_vbar: "Vertical Bar" => "Barra vertical" -// undefined.en: "English" => "Inglés" -// undefined.fr: "Français" => "Français" -// undefined.ru: "Русский" => "Русский" -// undefined.de: "Deutsch" => "Deutsch" // undefined.hideMissingAnswers: "Hide missing answers" => "Ocultar las respuestas que faltan" // undefined.showMissingAnswers: "Show missing answers" => "Mostrar las respuestas que faltan" // undefined.missingAnswersLabel: "Missing answers" => "Respuestas faltantes" diff --git a/src/localizationManager.ts b/src/localizationManager.ts index dd5f28988..5efd5e1b7 100644 --- a/src/localizationManager.ts +++ b/src/localizationManager.ts @@ -50,4 +50,4 @@ export var localization = { export var surveyStrings = englishStrings; (localization).locales["en"] = englishStrings; -(localization).localeNames["en"] = "english"; +(localization).localeNames["en"] = "English"; diff --git a/src/visualizationPanel.ts b/src/visualizationPanel.ts index 3a46fa029..05a662d5f 100644 --- a/src/visualizationPanel.ts +++ b/src/visualizationPanel.ts @@ -374,7 +374,7 @@ export class VisualizationPanel extends VisualizerBase { const localeChoices = this.locales.map((element) => { return { value: element, - text: localization.getString(element) + text: localization.localeNames[element] || localization.getString(element) || element }; }); // localeChoices.unshift({ From 6eb877942ee208336dfae2e6ca3e08c529d04a05 Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Mon, 25 Mar 2024 14:44:02 +0300 Subject: [PATCH 2/3] Fixed locale names --- src/analytics-localization/arabic.ts | 2 +- src/analytics-localization/dutch.ts | 2 +- src/analytics-localization/italian.ts | 2 +- src/analytics-localization/norwegian.ts | 2 +- src/analytics-localization/spanish.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/analytics-localization/arabic.ts b/src/analytics-localization/arabic.ts index 9cbc4ea53..81c7c0b6c 100644 --- a/src/analytics-localization/arabic.ts +++ b/src/analytics-localization/arabic.ts @@ -68,7 +68,7 @@ export var arabicStrings = { }; localization.locales["ar"] = arabicStrings; -localization.localeNames["ar"] = "Arabic"; +localization.localeNames["ar"] = "العربية"; // The following strings have been translated by a machine translation service // Remove those strings that you have corrected manually diff --git a/src/analytics-localization/dutch.ts b/src/analytics-localization/dutch.ts index 23381b611..b29966e67 100644 --- a/src/analytics-localization/dutch.ts +++ b/src/analytics-localization/dutch.ts @@ -69,7 +69,7 @@ export var dutchStrings = { //Uncomment these two lines on creating a translation file. You should replace "en" and enStrings with your locale ("fr", "de" and so on) and your variable. localization.locales["nl"] = dutchStrings; -localization.localeNames["nl"] = "Dutch"; +localization.localeNames["nl"] = "Nederlands"; // The following strings have been translated by a machine translation service // Remove those strings that you have corrected manually diff --git a/src/analytics-localization/italian.ts b/src/analytics-localization/italian.ts index ecf71af5e..4ee083e48 100644 --- a/src/analytics-localization/italian.ts +++ b/src/analytics-localization/italian.ts @@ -68,7 +68,7 @@ export var italianStrings = { }; localization.locales["it"] = italianStrings; -localization.localeNames["it"] = "Italian"; +localization.localeNames["it"] = "Italiano"; // The following strings have been translated by a machine translation service // Remove those strings that you have corrected manually diff --git a/src/analytics-localization/norwegian.ts b/src/analytics-localization/norwegian.ts index 532edee77..917d1e8fa 100644 --- a/src/analytics-localization/norwegian.ts +++ b/src/analytics-localization/norwegian.ts @@ -68,7 +68,7 @@ export var norwegianStrings = { }; localization.locales["no"] = norwegianStrings; -localization.localeNames["no"] = "Norwegian"; +localization.localeNames["no"] = "Norsk"; // The following strings have been translated by a machine translation service // Remove those strings that you have corrected manually diff --git a/src/analytics-localization/spanish.ts b/src/analytics-localization/spanish.ts index ab20dbe42..ca7a5edcc 100644 --- a/src/analytics-localization/spanish.ts +++ b/src/analytics-localization/spanish.ts @@ -67,7 +67,7 @@ export var spanishStrings = { responses: "Respuestas" }; localization.locales["es"] = spanishStrings; -localization.localeNames["es"] = "Spanish"; +localization.localeNames["es"] = "Español"; // The following strings have been translated by a machine translation service // Remove those strings that you have corrected manually From 3eba9c45764240b715e6b46eaaa0ab2a0e9606ef Mon Sep 17 00:00:00 2001 From: RomanTsukanov Date: Mon, 25 Mar 2024 15:47:38 +0400 Subject: [PATCH 3/3] Update farsi.ts --- src/analytics-localization/farsi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analytics-localization/farsi.ts b/src/analytics-localization/farsi.ts index ec44de46b..d181c85d6 100644 --- a/src/analytics-localization/farsi.ts +++ b/src/analytics-localization/farsi.ts @@ -68,7 +68,7 @@ export var farsiStrings = { }; localization.locales["fa"] = farsiStrings; -localization.localeNames["fa"] = "Farsi(Persian)"; +localization.localeNames["fa"] = "فارسی"; // The following strings have been translated by a machine translation service // Remove those strings that you have corrected manually @@ -117,4 +117,4 @@ localization.localeNames["fa"] = "Farsi(Persian)"; // undefined.answer: "Answer" => "پاسخ" // undefined.correctAnswer: "Correct answer: " => "پاسخ صحیح: " // undefined.percent: "Percent" => "درصد" -// undefined.responses: "Responses" => "پاسخ" \ No newline at end of file +// undefined.responses: "Responses" => "پاسخ"