Closed
Bug 1494919
Opened 6 years ago
Closed 6 years ago
Inability to produce some singular versions of browser extension permission description strings
Categories
(Toolkit :: Add-ons Manager, enhancement)
Tracking
()
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
firefox64 | --- | affected |
People
(Reporter: stoyan, Unassigned)
Details
This is shortened version of the code found on (https://searchfox.org/mozilla-central/source/toolkit/components/extensions/Extension.jsm#1096)
> // Formats a list of host permissions. If we have 4 or fewer, display
> // them all, otherwise display the first 3 followed by an item that
> // says "...plus N others"
> let format = (list, itemKey, moreKey) => {
> …
> if (list.length < 5) {
> formatItems(list);
> } else {
> formatItems(list.slice(0, 3));
> let remaining = list.length - 3;
> …
> }
> };
The code does what the commend describes. It is the logic that is wrong. Let me explain. If we have 4 or less items all is OK - they all are being displayed, because:
> // If we have 4 or fewer, display them all
Let's have 5 items in the list. 5 is greater than 4 so we go to the second part of the sentence that says
> display the first 3 followed by an item that says "...plus N others"
OK, cut the first 3, show them and add "...plus 2 others"
But there is no way to show "...plus 1 other" despite such strings do exists.
Comment 1•6 years ago
|
||
This is deliberate, these are shown in a list and we don't want the list to have more then 4 items. If we have exactly 4, we can just show them all, its only if there are 5 or more that we need to truncate to 3 to leave room for the "...plus N others" line.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•6 years ago
|
||
But besause of the hackish nature of the singular/plural strings singular part can not be just removed. In a wierd way this makes sence.
It is just plain waste of localizers efforts.
Comment 3•6 years ago
|
||
That's a limitation of the localization tools, feel free to file a bug on those if you like...
Reporter | ||
Comment 4•6 years ago
|
||
No need to bother with those. Fluent is coming…
You need to log in
before you can comment on or make changes to this bug.
Description
•