Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolved #411 - Remove language names from localization dictionaries #415

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/analytics-localization/arabic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ export var arabicStrings = {
filter: "ترشح",
resetFilter: "إعادة تعيين",
changeLocale: "تغيير اللغة",
en: "اللغة الانجليزية",
fr: "اللغه الفرنسية",
ru: "اللغه الروسية",
de: "اللغه الانجليزية",
clearButton: "مسح",
addElement: "اختر سؤالاً للعرض ...",
defaultOrder: "الترتيب الافتراضي",
Expand Down Expand Up @@ -72,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
Expand Down
10 changes: 1 addition & 9 deletions src/analytics-localization/dutch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -73,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
Expand All @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions src/analytics-localization/english.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 2 additions & 10 deletions src/analytics-localization/farsi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ export var farsiStrings = {
filter: "فیلتر",
resetFilter: "بازنشانی فیلترها",
changeLocale: "تغییر محلی",
en: "انگلیسی",
fr: "فرانسه",
ru: "Русский",
de: "دویچ",
clearButton: "پاک کردن",
addElement: "انتخاب سوال برای نمایش...",
defaultOrder: "ترتیب پیشفرض",
Expand Down Expand Up @@ -72,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
Expand All @@ -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" => "نزولی"
Expand Down Expand Up @@ -125,4 +117,4 @@ localization.localeNames["fa"] = "Farsi(Persian)";
// undefined.answer: "Answer" => "پاسخ"
// undefined.correctAnswer: "Correct answer: " => "پاسخ صحیح: "
// undefined.percent: "Percent" => "درصد"
// undefined.responses: "Responses" => "پاسخ"
// undefined.responses: "Responses" => "پاسخ"
10 changes: 1 addition & 9 deletions src/analytics-localization/french.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
13 changes: 1 addition & 12 deletions src/analytics-localization/german.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
localization.localeNames["de"] = "Deutsch";
6 changes: 1 addition & 5 deletions src/analytics-localization/italian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -72,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
Expand Down
10 changes: 1 addition & 9 deletions src/analytics-localization/norwegian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -72,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
Expand All @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions src/analytics-localization/portuguese.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 1 addition & 5 deletions src/analytics-localization/russian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ export var russianStrings = {
entriesLabel: "записей",
makePrivateButton: "Сделать приватным",
makePublicButton: "Сделать публичным",
en: "English",
fr: "Français",
ru: "Русский",
de: "Deutsch",
showPercentages: "Показать проценты",
hidePercentages: "Скрыть проценты",
pdfDownloadCaption: "PDF",
Expand All @@ -72,4 +68,4 @@ export var russianStrings = {
};

localization.locales["ru"] = russianStrings;
localization.localeNames["ru"] = "Russian";
localization.localeNames["ru"] = "Русский";
10 changes: 1 addition & 9 deletions src/analytics-localization/spanish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -71,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
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/localizationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ export var localization = {

export var surveyStrings = englishStrings;
(<any>localization).locales["en"] = englishStrings;
(<any>localization).localeNames["en"] = "english";
(<any>localization).localeNames["en"] = "English";
2 changes: 1 addition & 1 deletion src/visualizationPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Loading