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

Commit e79f51e

Browse files
author
Marcel Gerber
committed
Remove unnecessary locale check
1 parent 713525a commit e79f51e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/extensibility/ExtensionManagerView.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ define(function (require, exports, module) {
230230
context.translated = true;
231231
context.translatedLangs =
232232
info.metadata.i18n.map(function (value) {
233+
if (value === "root") {
234+
value = "en";
235+
}
233236
return { name: LocalizationUtils.getLocalizedLabel(value), locale: value };
234237
})
235238
.sort(function (lang1, lang2) {

src/file/FileUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ define(function (require, exports, module) {
459459
function compareFilenames(filename1, filename2, extFirst) {
460460
var ext1 = getFileExtension(filename1),
461461
ext2 = getFileExtension(filename2),
462-
lang = brackets.getLocale() === "root" ? "en-us" : brackets.getLocale(),
462+
lang = brackets.getLocale(),
463463
cmpExt = ext1.toLocaleLowerCase().localeCompare(ext2.toLocaleLowerCase(), lang, {numeric: true}),
464464
cmpNames;
465465

src/utils/LocalizationUtils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
/**
2828
* Utilities functions related to localization/i18n
29-
*
3029
*/
3130
define(function (require, exports, module) {
3231
"use strict";
@@ -37,7 +36,7 @@ define(function (require, exports, module) {
3736
* Converts a language code to its written name, if possible.
3837
* If not possible, the language code is simply returned.
3938
*
40-
* @param {string} locale The two-char language code
39+
* @param {string} locale The two-char language code
4140
* @return {string} The language's name or the given language code
4241
*/
4342
function getLocalizedLabel(locale) {

0 commit comments

Comments
 (0)