Closed
Bug 1479377
Opened 7 years ago
Closed 7 years ago
Notification message when switching language in Preferences is empy
Categories
(Firefox :: Settings UI, defect, P1)
Firefox
Settings UI
Tracking
()
VERIFIED
FIXED
Firefox 63
People
(Reporter: flod, Assigned: mstriemer)
References
Details
Attachments
(3 files)
Installed French language pack on 63.0a1 (2018-07-29) (64 bit) (Italian), the language shows up in the list. When I try to switch, the restart message shows up empty, with "undefined" as button label.
If I restart and try to switch back to Italian, I see the message in Italian.
Reporter | ||
Updated•7 years ago
|
Summary: Notification message when switching language is empy → Notification message when switching language in Preferences is empy
Updated•7 years ago
|
tracking-firefox63:
--- → +
Comment 1•7 years ago
|
||
Tracking for 63, so marking P1. Looks like an issue with the feature added in bug 1469684. Mark, can you take a look?
Assignee | ||
Comment 2•7 years ago
|
||
I believe this is because the target language doesn't have a translation for the string. We could put a fallback in place so that it will appear in English, or the current language, if the other language doesn't have a translation, I'm not sure what the correct route is here though.
Flags: needinfo?(mstriemer) → needinfo?(francesco.lodolo)
Reporter | ||
Comment 3•7 years ago
|
||
(In reply to Mark Striemer [:mstriemer] from comment #2)
> I believe this is because the target language doesn't have a translation for
> the string. We could put a fallback in place so that it will appear in
> English, or the current language, if the other language doesn't have a
> translation, I'm not sure what the correct route is here though.
That's likely the case, those strings are currently translated only in Italian and Dutch.
I think falling back to the current language would be OK in this case.
Flags: needinfo?(francesco.lodolo)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → mstriemer
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
This will now fallback to the current locale, then the last fallback locale.
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8996081 [details]
Bug 1479377 - Provide fallbacks for switch language in Prefs message
https://reviewboard.mozilla.org/r/260324/#review267402
Yeah!
::: browser/components/preferences/in-content/main.js:243
(Diff revision 1)
> -// Load the preferences string bundle for a given locale.
> +// Load the preferences string bundle for a given locale with fallbacks.
> function getBundleForLocale(locale) {
> + let locales = [locale, Services.locale.getRequestedLocale()];
> + if (locales[1] != Services.locale.lastFallbackLocale) {
> + locales.push(Services.locale.lastFallbackLocale);
> + }
I'd go for:
```
L10nRegistry.generateContexts(Array.from(new Set([
locale,
...Services.locale.getRequestedLocales(),
Services.locale.lastFallbackLocale
])), resourceIds);
```
Attachment #8996081 -
Flags: review?(gandalf) → review+
Comment hidden (mozreview-request) |
Pushed by mstriemer@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ef564f7ffe2
Provide fallbacks for switch language in Prefs message r=gandalf
Comment 9•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Reporter | ||
Comment 10•7 years ago
|
||
Verified on 63.0a1 (2018-07-31) (64 bit)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•