Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Locale descriptions in switching language modal. #3704

Merged
merged 3 commits into from
May 9, 2013
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
14 changes: 12 additions & 2 deletions src/extensions/default/DebugCommands/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,22 @@ define(function (require, exports, module) {
.val(val)
.appendTo($select);
}

// returns the localized label for the given locale
// or the locale, if nothing found
function getLocalizedLabel(locale) {

var key = "LOCALE_" + locale.toUpperCase().replace("-", "_"),
i18n = Strings[key];

return i18n === undefined ? locale : i18n;
}

// add system default
addLocale(Strings.LANGUAGE_SYSTEM_DEFAULT, null);

// add english
addLocale("en", "en");
addLocale(getLocalizedLabel("en"), "en");

// inspect all children of dirEntry
entries.forEach(function (entry) {
Expand All @@ -246,7 +256,7 @@ define(function (require, exports, module) {
label += match[2].toUpperCase();
}

addLocale(label, language);
addLocale(getLocalizedLabel(label), language);
}
}
});
Expand Down
20 changes: 20 additions & 0 deletions src/nls/de/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
/*global define */

define({

/**
* Errors
*/
Expand Down Expand Up @@ -135,6 +136,25 @@ define({
"LANGUAGE_SUBMIT" : "{APP_NAME} neu starten",
"LANGUAGE_CANCEL" : "Abbrechen",
"LANGUAGE_SYSTEM_DEFAULT" : "Systemstandard",

/**
* Locales
*/
"LOCALE_DE" : "Deutsch",
"LOCALE_EN" : "Englisch",
"LOCALE_FR" : "Französisch",
"LOCALE_CS" : "Tschechisch",
"LOCALE_ES" : "Spanisch",
"LOCALE_IT" : "Italienisch",
"LOCALE_JA" : "Japanisch",
"LOCALE_NB" : "Norwegisch",
"LOCALE_PL" : "Polnisch",
"LOCALE_PT_BR" : "Portugiesisch, Brasilien",
"LOCALE_PT_PT" : "Portugiesisch",
"LOCALE_RU" : "Russisch",
"LOCALE_SV" : "Schwedisch",
"LOCALE_TR" : "Türkisch",
"LOCALE_ZH_CN" : "Chinesisch, vereinfacht",

/**
* ProjectManager
Expand Down
20 changes: 20 additions & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
/*global define */

define({

/**
* Errors
*/
Expand Down Expand Up @@ -131,6 +132,25 @@ define({
"LANGUAGE_SUBMIT" : "Reload {APP_NAME}",
"LANGUAGE_CANCEL" : "Cancel",
"LANGUAGE_SYSTEM_DEFAULT" : "System Default",

/**
* Locales
*/
"LOCALE_CS" : "Czech",
"LOCALE_DE" : "German",
"LOCALE_EN" : "English",
"LOCALE_ES" : "Spanish",
"LOCALE_FR" : "French",
"LOCALE_IT" : "Italian",
"LOCALE_JA" : "Japanese",
"LOCALE_NB" : "Norwegian",
"LOCALE_PL" : "Polish",
"LOCALE_PT_BR" : "Portuguese, Brazil",
"LOCALE_PT_PT" : "Portuguese",
"LOCALE_RU" : "Russian",
"LOCALE_SV" : "Swedish",
"LOCALE_TR" : "Turkish",
"LOCALE_ZH_CN" : "Chinese, simplified",

/**
* ProjectManager
Expand Down