Convert about:support to Fluent

RESOLVED FIXED in Firefox 66

Status

()

defect
P3
normal
RESOLVED FIXED
7 months ago
2 days ago

People

(Reporter: masterkrombi, Assigned: jaws)

Tracking

(Blocks 1 bug, Regressed 1 bug)

65 Branch
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(3 attachments, 1 obsolete attachment)

Reporter

Description

7 months ago
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Assignee: nobody → masterkrombi
Blocks: 1486917
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Reporter

Comment 1

7 months ago
Comment on attachment 9025531 [details]
Bug 1507595 Convert about:support to Fluent

Things I found during porting to TB:

+            <th data-l10n-id="security-softawre-type"/>

Typo, this should be security-software-type.

-      <h2 class="major-section">
-        &aboutSupport.graphicsTitle;
-      </h2>
+      <h2 class="major-section" data-l10n-name="graphics-title"/>

This should be data-l10n-id.

+            <th colspan="2" class="title-column" data-l10n-id="graphics-crash-guard-title"/>

This should be graphics-crash-guards-title.
Priority: -- → P3
Assignee: masterkrombi → jaws
No longer blocks: 1503253
Attachment #9025531 - Attachment is obsolete: true

Updated

6 months ago
Blocks: 1515103
Depends on: 1516167
No longer depends on: 1516167

Comment 5

6 months ago
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28805dd1b97a
Convert about:support to Fluent. r=Gijs,flod
https://hg.mozilla.org/integration/autoland/rev/485ea25a3b82
Use data-l10n-id instead of formatValue where the change is relatively straightforward. r=Gijs
Flags: needinfo?(m_kato) → needinfo?(jaws)
There are multiple fixes contained in this patch:
- fixes for Android/mobile support
- adding extra strings to the ftl file that were never defined before, and previously the ID was just printed to the page
- update test_l10n.py to not rely on about:support anymore
- changing Troubleshoot.jsm to return and ID and args for the strings that should be displayed, so it is compatible with the Fluent API
- misc. fixes so strings that are not localized don't go through the Fluent codepath
Blocks: 1516617

Comment 9

6 months ago
Should you be checking attributes["data-l10n-args"] before accessing it here:
https://hg.mozilla.org/integration/autoland/rev/28805dd1b97a#l3.809

+    if (attributes["data-l10n-id"]) {
+      document.l10n.setAttributes(elt,
+                                  attributes["data-l10n-id"],
+                                  attributes["data-l10n-args"]);
+      delete attributes["data-l10n-id"];
+      if (attributes["data-l10n-args"]) {
+        delete attributes["data-l10n-args"];
+      }

We're porting this to TB and getting:
ReferenceError: reference to undefined property "data-l10n-args"
That's with dom.report_all_js_exceptions and/or javascript.options.strict set.

Oops, can't set NI since it's already set.
(In reply to Jorg K (GMT+1) (urgent reviews and bustage fix only, Dec 22nd to Jan 1st) from comment #9)
> Should you be checking attributes["data-l10n-args"] before accessing it here:
> https://hg.mozilla.org/integration/autoland/rev/28805dd1b97a#l3.809
> 
> +    if (attributes["data-l10n-id"]) {
> +      document.l10n.setAttributes(elt,
> +                                  attributes["data-l10n-id"],
> +                                  attributes["data-l10n-args"]);
> +      delete attributes["data-l10n-id"];
> +      if (attributes["data-l10n-args"]) {
> +        delete attributes["data-l10n-args"];
> +      }
> 
> We're porting this to TB and getting:
> ReferenceError: reference to undefined property "data-l10n-args"
> That's with dom.report_all_js_exceptions and/or javascript.options.strict
> set.
> 
> Oops, can't set NI since it's already set.

I wasn't testing with javascript.options.strict, and this code works fine with undefined being returned from the getter. I'll make the change to prevent the ReferenceError.
Flags: needinfo?(jaws)

Comment 11

6 months ago
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3f16eb2a8603
Convert about:support to Fluent. r=Gijs,flod
https://hg.mozilla.org/integration/autoland/rev/32fe57d45d1b
Use data-l10n-id instead of formatValue where the change is relatively straightforward. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/c68ba2c62949
Test fixes. r=flod,Gijs

Comment 12

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3f16eb2a8603
https://hg.mozilla.org/mozilla-central/rev/32fe57d45d1b
https://hg.mozilla.org/mozilla-central/rev/c68ba2c62949
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
This broke about:support on Android - all localised text is now missing.

Updated

6 months ago
Depends on: 1517410
Depends on: 1521599
Depends on: 1534336
You need to log in before you can comment on or make changes to this bug.