Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display numbers are not correct in popup menu (NL) #2364

Closed
5 tasks done
JohnyP36 opened this issue Nov 16, 2022 · 21 comments
Closed
5 tasks done

Display numbers are not correct in popup menu (NL) #2364

JohnyP36 opened this issue Nov 16, 2022 · 21 comments
Labels
external issue involving an external factor invalid not a uBlock issue

Comments

@JohnyP36
Copy link

JohnyP36 commented Nov 16, 2022

Prerequisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • using a new, unmodified browser profile.

Description

I am using Firefox version 107.0

In the settings of FF I set the language of my browser to Dutch.
Also I downloaded the Dutch version of uBlock.

As you can see in the screenshot below, the text of the popup is in Dutch.
However, the number counting (blocked since installation) does not follow the Dutch system, but the English/American.
This should not be the case.

Screenshots

afbeelding

afbeelding

afbeelding

A specific URL where the issue occurs.

popup menu

Steps to Reproduce

  1. Install Firefox and set the language in about:preferences to Dutch -- remove alternatives if there are any.
  2. Click on Choosing your preferred languages to display web pages and
    check the box Request English-language versions of web pages for enhanced privacy / Engelstalige versies van webpagina’s opvragen voor verbeterde privacy.
  3. Go to https://addons.mozilla.org/nl/firefox/addon/ublock-origin/ (the Dutch version of FF Add-ons)
    and download uBlock.
  4. Make sure you have more than a million blocked applications. For example, 1,234,000 (1.234 million).
  5. You will notice that uBlock displays this number as 1.234M instead of 1,234 milj.

Expected behavior

I expect the counting and display of numbers in the popup follows the language of the downloaded uBlock version.
So, if I install the uBlock from the Dutch version of Firefox Add-ons / AMO not only the language should be Dutch but also the way numbers are displayed in the popup.

Actual behavior

Language of popup is Dutch, but the way the numbers are displayed is in the English/American style (and not the Dutch system).

Configuration

uBlock Origin: 1.45.2
Firefox: 107
filterset (summary): 
  network: 76573
  cosmetic: 40477
  scriptlet: 16535
  html: 785
listset (total-discarded, last-updated): 
  removed: 
    ublock-badware: null
    ublock-privacy: null
    ublock-abuse: null
    ublock-quick-fixes: null
    urlhaus-1: null
    plowe-0: null
    NLD-0: null
  added: 
    https://fanboy.co.nz/enhancedstats.txt: 2989-10, 4m
    https://raw.githubusercontent.com/JohnyP36/Personal-List/main/Personal List (uBo).txt: 2271-0, 4m
  default: 
    user-filters: 1229-0, never
    ublock-filters: 32020-79, 4m
    ublock-unbreak: 1909-9, 4m
    easylist: 64686-188, 4m
    easyprivacy: 30848-1219, 4m
filterset (user): [array of 1173 redacted]
trustedset: 
  added: [array of 5 redacted]
  removed: 
    about-scheme
hostRuleset: 
  added: [array of 7 redacted]
urlRuleset: 
  added: [array of 9 redacted]
modifiedUserSettings: 
  advancedUserEnabled: true
  contextMenuEnabled: false
  suspendUntilListsAreLoaded: false
modifiedHiddenSettings: 
  autoCommentFilterTemplate: -
  cacheStorageAPI: indexedDB
  filterAuthorMode: true
  popupFontSize: 11px
  popupPanelLockedSections: 35
  popupPanelHeightMode: 1
  uiStyles: --popup-main-min-width: 168px; --popup-gap: 0.5em; --popup-gap-thin: calc(var(--popup-gap)/9); --popup-power-ink: rgb(0,110,254); --popup-ruleset-tool-surface: rgb(240,190,64); --popup-ruleset-tool-surface-hover: rgb(240,190,64); --popup-toolbar-surface: rgb(226,226,229); --popup-toolbar-surface-hover: rgb(32 18 58 / 40%); --popup-icon-x-ink: rgb(226,40,80);
  updateAssetBypassBrowserCache: true
supportStats: 
  allReadyAfter: 4183 ms (selfie)
  maxAssetCacheWait: 1517 ms
  unsuspendAfter: 2000 ms
@gwarser
Copy link

gwarser commented Nov 16, 2022

https://en.wikipedia.org/wiki/Mega- ?


Should be handled by browser, but maybe it's not? #1027 (comment)

@JohnyP36
Copy link
Author

JohnyP36 commented Nov 16, 2022

In Microsoft Edge browser this is not a problem.


I found the problem.

In the issue tracker I wrote that you have to check the box Request English-language versions of web pages for enhanced privacy / Engelstalige versies van webpagina’s opvragen voor verbeterde privacy. in about:preferences.

I unchecked this box and added "Nederlands" (Dutch) to the list.

afbeelding

After I did this the handling of the number was correct (3,592 milj. instead of the 3.592M)

For me this is really strange as uBlock should not look for the language set at Choosing your preferred languages to display web pages but for the language FF uses to display menu's, notifications, etc.

Although it would be better if it did not look at the browser language, but at the language version one installed of uBlock. This, as other text (such as "blocked since installation") do not change - to another language - even if I changed the browser language.
See #2364 (comment): this is not possible?

@krystian3w
Copy link

krystian3w commented Nov 16, 2022

This will require "you" to generate several XPI files and generate several new URLs due addons store no offer division due to language, but only a separate XPI for Android (The Dutch description uses same XPI as in the English/US version).

Maybe exist short JavaScript workaround to update read preferences from only browser instead from webpages.

Chromium maybe allow spy system language so pointless is change this into browser.

Chrome Web Store also not offer different crx if use ?hl=nl (translated description are additional fields of the website form). If new Edge store is truly copy of CWS/Whale Store also are similar limited.

@gwarser
Copy link

gwarser commented Nov 16, 2022

Can be related: w3c/webextensions#258

@gorhill
Copy link
Member

gorhill commented Nov 16, 2022

remove alternatives if there are any

I am unable to remove the English US entry, the browser does not allow me to do so.

check the box Request English-language versions of web pages for enhanced privacy / Engelstalige versies van webpagina’s opvragen voor verbeterde privacy.

I don't see a checkbox got this.


Ok I can now reproduce, I replaced the step "check the box ..." with just promoting (moving up) English as the language to use to download webpages. Now I have Dutch text but English number format.

@JohnyP36
Copy link
Author

check the box Request English-language versions of web pages for enhanced privacy / Engelstalige versies van webpagina’s opvragen voor verbeterde privacy.

I don't see a checkbox got this.

Maybe because your browser language is already set to English this checkbox does not appear.

Ok I can now reproduce, I replaced the step "check the box ..." with just promoting (moving up) English as the language to use to download webpages. Now I have Dutch text but English number format.

👍

@gorhill
Copy link
Member

gorhill commented Nov 16, 2022

Actually I can't reproduce. It looks like I would have to download and install the Dutch package of Firefox.

@JohnyP36
Copy link
Author

JohnyP36 commented Nov 16, 2022

Actually I can't reproduce. It looks like I would have to download and install the Dutch package of Firefox.

I have the Dutch package.

  1. Go to about:preferences
  2. Add Nederlands as Language to display menu's, etc. by clicking on search for more language

afbeelding

  1. Make sure Nederlands is on top of the list if you click on Set Alternatives...
  2. After done this add Dutch to the list - and move it to the top - by clicking on Choose your preferred language for displaying pages (or: as it will be in Dutch Talen van uw voorkeur kiezen voor het weergeven van webpagina’s)

afbeelding

  1. When you open the popup menu of uBlock it will show you something like 3,602 mln.
  2. Then repeat step 4. But instead of moving Dutch to the top promote (move up) English
  3. If you open the popup again you will notice that is shows you something like 3.602M

2 screenshots

afbeelding

afbeelding

Edit:

It is noteworthy that this problem does NOT occur if the English Language Package is installed.
With the English Pack enabled it does NOT matter if you set Choose your preferred language for displaying pages to Dutch or leave it on English. The display of numbers will always be according to the English/American system.

This means, that this issue - as far as I know - only occurs when the Dutch Language Package is installed in FF, but your Choose your preferred language for displaying pages is set to English.

This also applies if you install the French or German Language Package for Firefox, but you leave the Choose your preferred language for displaying pages on English.
From this quick research, my conclusion is that this is a problem for all non-English language users of Firefox who keep the language for displaying webpages on English.

@gorhill
Copy link
Member

gorhill commented Mar 26, 2023

Is it still an issue? I tried reproducing as described above and I can't.

@JohnyP36
Copy link
Author

JohnyP36 commented Mar 27, 2023

Is it still an issue? I tried reproducing as described above and I can't.

Yes, but it has to do with the fact that have my Firefox browser language in Dutch, but also enabled the function that Firefox should sent to every page that my language is English. (As you can see in the images in my issue description.)

@gorhill
Copy link
Member

gorhill commented Mar 27, 2023

After I set Firefox to receive English pages, my popup panel was still respecting the language set for Firefox UI (French), so I guess I just don't get what is the issue.

@JohnyP36
Copy link
Author

After I set Firefox to receive English pages, my popup panel was still respecting the language set for Firefox UI (French), so I guess I just don't get what is the issue.

That's correct.

  • Set your browser language to French and also the language how Firefox should receive pages.
    You will see that the way the numbers are shown in the popup are according to french number notation.
  • Next, go to about:config in FF and change privacy.spoof_english to 2.
    Now you will see that the language in the popup is still French, but the numbers are according to English notation.

Make sure will doing each step to disable and then enable uBlock again to activate the changes in the popup.
Maybe this will help you

@krystian3w
Copy link

As far as French/Canadian notation differs from English.

@gorhill
Copy link
Member

gorhill commented Mar 27, 2023

  • "Choose the languages used to display menus, messages, and notifications from Firefox.": French
  • "Choose your preferred language for displaying pages": English [en]
  • about:config => privacy.spoof_english => 2

Restarted Firefox.

Result: Firefox UI is French, uBO's popup panel respects French notation (thin space separating thousands instead of ,)

@JohnyP36
Copy link
Author

In French the notation is 4,533 M and in English 4.533M. So, when you set the about:config => privacy.spoof_english to 2 it does not stick to French notation.
In Dutch the notation is 4,533 milj. but with the privacy.spoof set to 2 it also will adapt the english notation.

Thus, for me, it will become this:
afbeelding
Instead of:
afbeelding

@gorhill
Copy link
Member

gorhill commented Mar 27, 2023

So, when you set the about:config => privacy.spoof_english to 2 it does not stick to French notation.

It does on my side (yes, the browser was restarted):

Screenshot from 2023-03-27 10-06-01

@JohnyP36
Copy link
Author

Did you also disable and then re-enable ublock?

@gorhill
Copy link
Member

gorhill commented Mar 27, 2023

Did you also disable and then re-enable ublock?

Yes. Tested on Firefox 111.0. Your Firefox looks very different than mine, what version are you using? Maybe try in a new profile, if you modified stuff in about:config.

@JohnyP36
Copy link
Author

JohnyP36 commented Mar 27, 2023

Did you also disable and then re-enable ublock?

Yes. Tested on Firefox 111.0. Your Firefox looks very different than mine, what version are you using? Maybe try in a new profile, if you modified stuff in about:config.

I did change a lot. But that has to do with the looks.
The problem is with the privacy.spoof_english set to 2 even in a new profile. Maybe in combination with privacy.resistFingerprinting set to true.


I'm using https://github.com/BPower0036/UserChrome/tree/main/FireFox.
The user.js file contains changed pref for about:config. The other files are put in the folder chrome within C:\Users\%username%\AppData\Roaming\Mozilla\Firefox\Profiles\x.default-release. If you don't have that folder, create it.

@gwarser gwarser added invalid not a uBlock issue external issue involving an external factor labels Mar 27, 2023
@gwarser gwarser closed this as completed Mar 27, 2023
@krystian3w
Copy link

On GNU/Linux maybe hard be found correct path.

@JohnyP36
Copy link
Author

JohnyP36 commented Jan 3, 2024

Although closed as invalid. I can report now that due to changes in Firefox this problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external issue involving an external factor invalid not a uBlock issue
Projects
None yet
Development

No branches or pull requests

4 participants