[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-149.0a1-16.0-2] fixup! BB 41930: Remove the UI to customize accept_languages.



Title: GitLab

henry pushed to branch tor-browser-149.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • 706872af
    by Henry Wilkes at 2026-03-25T16:54:05+00:00
    fixup! BB 41930: Remove the UI to customize accept_languages.
    
    BB 44793: Use settings config for spoof english checkbox.
    

2 changed files:

Changes:

  • browser/components/preferences/main.inc.xhtml
    ... ... @@ -100,9 +100,10 @@
    100 100
                   languages-customize-add.label,
    
    101 101
                 " />
    
    102 102
         -->
    
    103
    -    <checkbox id="spoofEnglish"
    
    104
    -              data-l10n-id="languages-customize-spoof-english"/>
    
    105 103
       </hbox>
    
    104
    +  <!-- TODO: Integrate into the "Languages" setting-group after bugzilla bug
    
    105
    +     - 1972081. -->
    
    106
    +  <html:setting-group groupid="websiteSpoofEnglish"></html:setting-group>
    
    106 107
     
    
    107 108
       <checkbox id="useSystemLocale" hidden="true"
    
    108 109
                 data-l10n-id="use-system-locale"
    

  • browser/components/preferences/main.js
    ... ... @@ -789,9 +789,22 @@ Preferences.addSetting({
    789 789
       },
    
    790 790
     });
    
    791 791
     
    
    792
    +Preferences.addSetting({
    
    793
    +  id: "websiteSpoofEnglish",
    
    794
    +  pref: "privacy.spoof_english",
    
    795
    +  get: val => {
    
    796
    +    return val == 2;
    
    797
    +  },
    
    798
    +  set: val => {
    
    799
    +    return val ? 2 : 1;
    
    800
    +  },
    
    801
    +});
    
    802
    +
    
    792 803
     Preferences.addSetting({
    
    793 804
       id: "websiteLanguageWrapper",
    
    794 805
       deps: ["acceptLanguages"],
    
    806
    +  // Hide website language settings. tor-browser#41930.
    
    807
    +  visible: () => false,
    
    795 808
       onUserReorder(event, deps) {
    
    796 809
         const { draggedIndex, targetIndex } = event.detail;
    
    797 810
     
    
    ... ... @@ -3233,6 +3246,14 @@ SettingGroupManager.registerGroups({
    3233 3246
           },
    
    3234 3247
         ],
    
    3235 3248
       },
    
    3249
    +  websiteSpoofEnglish: {
    
    3250
    +    items: [
    
    3251
    +      {
    
    3252
    +        id: "websiteSpoofEnglish",
    
    3253
    +        l10nId: "languages-customize-spoof-english",
    
    3254
    +      },
    
    3255
    +    ],
    
    3256
    +  },
    
    3236 3257
       applications: {
    
    3237 3258
         id: "applicationsGroup",
    
    3238 3259
         l10nId: "applications-setting",
    
    ... ... @@ -5429,6 +5450,7 @@ var gMainPane = {
    5429 5450
         initSettingGroup("drm");
    
    5430 5451
         initSettingGroup("contrast");
    
    5431 5452
         initSettingGroup("websiteLanguage");
    
    5453
    +    initSettingGroup("websiteSpoofEnglish");
    
    5432 5454
         initSettingGroup("browsing");
    
    5433 5455
         initSettingGroup("zoom");
    
    5434 5456
         initSettingGroup("fonts");
    
    ... ... @@ -5470,22 +5492,6 @@ var gMainPane = {
    5470 5492
         }
    
    5471 5493
     
    
    5472 5494
         // setEventListener("chooseLanguage", "command", gMainPane.showLanguages);
    
    5473
    -    {
    
    5474
    -      const spoofEnglish = document.getElementById("spoofEnglish");
    
    5475
    -      const kPrefSpoofEnglish = "privacy.spoof_english";
    
    5476
    -      const preference = Preferences.add({
    
    5477
    -        id: kPrefSpoofEnglish,
    
    5478
    -        type: "int",
    
    5479
    -      });
    
    5480
    -      const spoofEnglishChanged = () => {
    
    5481
    -        spoofEnglish.checked = preference.value == 2;
    
    5482
    -      };
    
    5483
    -      spoofEnglishChanged();
    
    5484
    -      preference.on("change", spoofEnglishChanged);
    
    5485
    -      setEventListener("spoofEnglish", "command", () => {
    
    5486
    -        preference.value = spoofEnglish.checked ? 2 : 1;
    
    5487
    -      });
    
    5488
    -    }
    
    5489 5495
         // TODO (Bug 1817084) Remove this code when we disable the extension
    
    5490 5496
         setEventListener(
    
    5491 5497
           "fxtranslateButton",
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx