Closed Bug 1692289 Opened 4 years ago Closed 3 years ago

Port bug 1416149: Add linter for checking fluent files

Categories

(Thunderbird :: Testing Infrastructure, task)

Tracking

(thunderbird_esr78 wontfix, thunderbird89 unaffected)

RESOLVED FIXED
90 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird89 --- unaffected

People

(Reporter: rjl, Assigned: rjl)

References

Details

Attachments

(11 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
2.81 KB, patch
rjl
: review+
freaktechnik
: feedback+
Details | Diff | Splinter Review
1.04 KB, patch
rjl
: review+
Details | Diff | Splinter Review

For Thunderbird CI builds.

commlint:lint_wrapper is a hack to get mozlint to apply exclude lists that are
appropriate for Thunderbird to the various lint checks run in CI.
The fluent-lint check allows for more targetted exclusions than mozlint itself
supports, reading exlcusions.yml from tools/lint/fluent-lint.
In order to find the Thunderbird version of that file, lintargs["root"] needs
to be monkeypatched right before calling fluent-lint's lint function.

To test, first run "mach lint -l fluent-lint comm//*.ftl". That will use the
Firefox configurations in tools/lint. Then run
"mach lint -l fluent-lint --config-path=comm/tools/lint comm/
/*.ftl" which
uses the configurations in comm/tools/lint. There should be a drop in the number
of reported problems.

exclusions.yml as included in this patch is incomplete, but is sufficient to
test that it works and for identifying actual problems in the .ftl files so they
can be addressed.

Assignee: nobody → rob
Status: NEW → ASSIGNED

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/eaf09f58ade7
Port bug 1416149: Add support for fluent-lint exclusions to commlint wrapper. r=justdave
https://hg.mozilla.org/comm-central/rev/ab3dbf629b7b
Port bug 1416149: Run fluent-lint in CI. r=justdave

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---
Pushed by thunderbird@calypsoblue.org: https://hg.mozilla.org/comm-central/rev/413ed1843bd1 Follow-up: Set always-target:false on fluent-lint job. rs=bustage-fix DONTBUILD

Depends on D114293

Depends on D114294

Depends on D114296

Depends on D114297

Fix the paths in support-files to reflect what changes will trigger a check
of all ftl files. Usually, only files changed in a push will be checked.

Target Milestone: --- → 90 Branch

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/a3135187f82f
[fluent-lint] Fixes for OTR integration. r=aleca
https://hg.mozilla.org/comm-central/rev/3b7a8ea09f42
[fluent-lint] Fixes for preferences. r=aleca
https://hg.mozilla.org/comm-central/rev/175860eaff5b
[fluent-lint] Fixes for OpenPGP. r=aleca
https://hg.mozilla.org/comm-central/rev/34de6b101433
[fluent-lint] Strings should not be surrounded in quotes. r=aleca
https://hg.mozilla.org/comm-central/rev/fe5793b7dd04
[fluent-lint] Fixes for Calendar. r=aleca
https://hg.mozilla.org/comm-central/rev/edf3de94426d
Enable fluent-lint check in CI. r=justdave
https://hg.mozilla.org/comm-central/rev/86b1c3c731a5
Follow-up: Reference correct support-files in fluent-lint configuration. r=justdave

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED

If you change strings, you should also change the name of the entity, otherwise localizers won't see the change and the localized versions still have the (localized!) quotes. Because the quotes are sometimes localized (e.g. « Arrivée dans la discussion » in French), there's also no easy way to automatically change this in the localized files.

This holds for the entities in file mail/locales/en-US/messenger/chat.ftl

The reference to the entity names should of course also be changed!

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Regressions: 1709809

Comment on attachment 9220607 [details] [diff] [review]
Revert a quote change in a comment

Thanks!

Attachment #9220607 - Flags: review?(rob) → review+

Comment on attachment 9220568 [details] [diff] [review]
Update entity names so that strings without quotes can be localized correctly.

I don't think the commit message is very informative as to what exactly changed. The change itself works fine.

Attachment #9220568 - Attachment is patch: true
Attachment #9220568 - Flags: feedback+
Attachment #9220568 - Flags: review?(justdave) → review+

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/2fd62ed764ae
Update entity names so that strings without quotes can be localized correctly. r=rjl
https://hg.mozilla.org/comm-central/rev/10c3eef8168f
Revert quote in OTR comment. r=rjl

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: