The about:support fluent migration (bug 1507595) caused a "Missing translations in en-US" error

RESOLVED FIXED in Firefox 67

Status

()

defect
P1
normal
RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: Kwan, Assigned: Gijs)

Tracking

({regression})

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox65 unaffected, firefox66 wontfix, firefox67 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

4 months ago

During one of the patch updates [0] in bug 1507595 an inexplicable change [1] slipped in that started trying to translate a function value explicitly annotated as not for translating. Most of the time it skips actually trying since usually the value is an array (of nodes) and it explicitly ignores arrays. But sometimes it's a plain text string which it'll try and treat as a fluent ID. When this is a long complex string like

wheel input enabled; scrollbar drag enabled; keyboard enabled; autoscroll enabled

it'll fail since toFluentID() will reject it, but when it's the simple none it'll try and retrieve a fluent string with the id "none" and log a missing strings error.

(Note: I haven't been able to reproduce this after writing up this bug, it's possible some since-hg shelveed local changes to about:support were affecting timings in a way that caused it to manifest, but filing since the code still seems seems bogus anyway)

[0] https://phabricator.services.mozilla.com/D14905?vs=45908&id=46920#inline-80951
just below this comment, look for "Not localized"

[1] https://searchfox.org/mozilla-central/diff/4f86678a714d38ea1035828dcbac8d78f36da81a/toolkit/content/aboutSupport.js#268-269

Assignee

Updated

4 months ago
Component: Internationalization → General
Keywords: regression
Product: Core → Toolkit
Assignee

Comment 1

3 months ago

(In reply to Ian Moody [:Kwan] (UTC+0) from comment #0)

During one of the patch updates [0] in bug 1507595 an inexplicable change [1] slipped in that started trying to translate a function value explicitly annotated as not for translating.

This was a result of now actually passing localizable values; the mistake was not updating the comment. E.g.:

https://searchfox.org/mozilla-central/rev/89414a1df52d06cfc35529afb9a5a8542a6e4270/toolkit/content/aboutSupport.js#524

A lot of callers (to addRow) are now passing [new Text("some string")] for exactly this reason.

And, confusingly, I think the "none" case you're looking at is https://searchfox.org/mozilla-central/source/toolkit/content/aboutSupport.js#451 , which already has a fluent ID, so it can just pass that...

Assignee

Updated

3 months ago
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED

Updated

3 months ago
Priority: -- → P1

Comment 3

3 months ago
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/956e0ebc41ad
pass fluent IDs directly and pass text nodes in cases where we pass literal strings, r=jaws

Comment 4

3 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.