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)

defect

Tracking

()

VERIFIED FIXED
Firefox 63
Tracking Status
firefox63 + fixed

People

(Reporter: flod, Assigned: mstriemer)

References

Details

Attachments

(3 files)

Attached image Empty message
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.
Summary: Notification message when switching language is empy → Notification message when switching language in Preferences is empy
Tracking for 63, so marking P1. Looks like an issue with the feature added in bug 1469684. Mark, can you take a look?
Blocks: 1469684
Flags: needinfo?(mstriemer)
Priority: -- → P1
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)
(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: nobody → mstriemer
This will now fallback to the current locale, then the last fallback locale.
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+
Pushed by mstriemer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4ef564f7ffe2 Provide fallbacks for switch language in Prefs message r=gandalf
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
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.

Attachment

General

Created:
Updated:
Size: