Skip to content

Commit f8e3a2b

Browse files
tsl143alver-cliqz
authored andcommitted
DB-2342: bring back preferred language box (#1394)
1 parent a973991 commit f8e3a2b

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

mozilla-release/browser/components/preferences/in-content/main.inc.xul

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,36 +291,35 @@
291291
</groupbox>
292292

293293
<!-- Languages -->
294-
<!-- CLIQZ-SPECIAL, DB-2146: temporarily hide Language section
295-
until we know how to run the browser with different locales (>= 2) -->
296-
<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true" data-hidden-from-search="true">
294+
<groupbox id="languagesGroup" data-category="paneGeneral">
297295
<label><html:h2 data-l10n-id="language-header"/></label>
298296

297+
<!-- CLIQZ-SPECIAL, DB-2146: temporarily hide Language section
298+
until we know how to run the browser with different locales (>= 2)
299299
<vbox id="browserLanguagesBox" align="start" hidden="true">
300300
<description flex="1" controls="chooseBrowserLanguage" data-l10n-id="choose-browser-language-description"/>
301301
<hbox>
302302
<menulist id="defaultBrowserLanguage">
303303
<menupopup/>
304304
</menulist>
305-
<!-- CLIQZ-SPECIAL, DB-2015: Remove option to download language packs from AMO
306305
<button id="manageBrowserLanguagesButton"
307306
is="highlightable-button"
308307
class="accessory-button"
309308
data-l10n-id="manage-browser-languages-button"
310309
oncommand="gMainPane.showBrowserLanguages({search: false})"/>
311-
-->
312310
</hbox>
313311
</vbox>
314312
<hbox id="confirmBrowserLanguage" class="message-bar" align="center" hidden="true">
315313
<image class="message-bar-icon"/>
316314
<vbox class="message-bar-content-container" align="stretch" flex="1"/>
317315
</hbox>
318-
<!-- CLIQZ-SPECIAL, DB-2015: Remove option to choose language packs from AMO
316+
-->
317+
319318
<hbox id="languagesBox" align="center">
320319
<description flex="1" control="chooseLanguage" data-l10n-id="choose-language-description"/>
321-
-->
320+
322321
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
323-
<!--
322+
324323
<hbox>
325324
<button id="chooseLanguage"
326325
is="highlightable-button"
@@ -337,7 +336,6 @@
337336
" />
338337
</hbox>
339338
</hbox>
340-
-->
341339

342340
<hbox id="translationBox" hidden="true">
343341
<hbox align="center" flex="1">

mozilla-release/browser/components/preferences/in-content/main.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,7 @@ var gMainPane = {
482482
"command",
483483
makeDisableControllingExtension(PREF_SETTING_TYPE, CONTAINERS_KEY)
484484
);
485-
// CLIQZ-SPECIAL: DB-2015, Remove option to choose language packs from AMO
486-
#if 0
487485
setEventListener("chooseLanguage", "command", gMainPane.showLanguages);
488-
#endif
489486
setEventListener(
490487
"translationAttributionImage",
491488
"click",
@@ -1130,12 +1127,14 @@ var gMainPane = {
11301127
true
11311128
);
11321129

1130+
#if 0
1131+
// CLIQZ-SPECIAL, DB-2146: temporarily hide Language section
11331132
// This will register the "command" listener.
11341133
let menulist = document.getElementById("defaultBrowserLanguage");
11351134
new SelectionChangedMenulist(menulist, event => {
11361135
gMainPane.onBrowserLanguageChange(event);
11371136
});
1138-
1137+
#endif
11391138
gMainPane.setBrowserLocales(Services.locale.appLocaleAsBCP47);
11401139
},
11411140

@@ -1159,6 +1158,7 @@ var gMainPane = {
11591158
}
11601159

11611160
#if 0
1161+
// CLIQZ-SPECIAL: DB-2146: temporarily hide Language section
11621162
// Add an option to search for more languages if downloading is supported.
11631163
if (Services.prefs.getBoolPref("intl.multilingual.downloadEnabled")) {
11641164
let menuitem = document.createXULElement("menuitem");
@@ -1170,7 +1170,6 @@ var gMainPane = {
11701170
menuitem.setAttribute("value", "search");
11711171
fragment.appendChild(menuitem);
11721172
}
1173-
#endif
11741173

11751174
let menulist = document.getElementById("defaultBrowserLanguage");
11761175
let menupopup = menulist.querySelector("menupopup");
@@ -1179,6 +1178,8 @@ var gMainPane = {
11791178
menulist.value = selected;
11801179

11811180
document.getElementById("browserLanguagesBox").hidden = false;
1181+
1182+
#endif
11821183
},
11831184

11841185
/* Show the confirmation message bar to allow a restart into the new locales. */

0 commit comments

Comments
 (0)