Notification message when switching language in Preferences is empy

VERIFIED FIXED in Firefox 63

Status

()

defect
P1
normal
VERIFIED FIXED
11 months ago
11 months ago

People

(Reporter: flod, Assigned: mstriemer)

Tracking

Trunk
Firefox 63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63+ fixed)

Details

Attachments

(3 attachments)

Posted 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

Comment 1

11 months ago
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
Assignee

Comment 2

11 months 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)
(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

11 months ago
Assignee: nobody → mstriemer
Comment hidden (mozreview-request)
Assignee

Comment 5

11 months ago
This will now fallback to the current locale, then the last fallback locale.

Comment 6

11 months 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)

Comment 8

11 months ago
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

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4ef564f7ffe2
Status: NEW → RESOLVED
Closed: 11 months 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.