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

Commit

Permalink
Merge pull request #3704 from tammo/locale-description-675
Browse files Browse the repository at this point in the history
Locale descriptions in switching language modal.
RaymondLim committed May 9, 2013
2 parents 934a1c2 + 5fa0331 commit 649cd60
Showing 3 changed files with 52 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/extensions/default/DebugCommands/main.js
Original file line number Diff line number Diff line change
@@ -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) {
@@ -246,7 +256,7 @@ define(function (require, exports, module) {
label += match[2].toUpperCase();
}

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

define({

/**
* Errors
*/
@@ -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
20 changes: 20 additions & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@
/*global define */

define({

/**
* Errors
*/
@@ -136,6 +137,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

0 comments on commit 649cd60

Please sign in to comment.