Add lint rules for newly added string resources
Categories
(Fenix :: General, task, P3)
Tracking
(firefox131 fixed)
Tracking | Status | |
---|---|---|
firefox131 | --- | fixed |
People
(Reporter: boek, Assigned: gl)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid])
Attachments
(4 files)
From github: https://github.com/mozilla-mobile/fenix/issues/7210.
I know very little of the current technical infrastructure, but I couldn't help noticing that sometimes strings land with the wrong apostrophe, and that's manually caught by Delphine during review.
Would it be possible to automate that kind of checks via tests?
CC @Delphine @Pike
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Since you assigned yourself to to https://github.com/mozilla-mobile/fenix/issues/26645 I thought I would tag you here so you wouldn't lose it :)
Assignee | ||
Comment 2•2 years ago
•
|
||
Thanks! This is very much appreciated.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•2 years ago
|
||
I'm trying to remember why I made this a P1; I think it was because I assumed it was actively in progress.
:gl, is that accurate? Or should we move this to a lower priority? (and drop it from the "up next" column in our kanban board?)
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
(In reply to Joe M [:jmahon] from comment #3)
I'm trying to remember why I made this a P1; I think it was because I assumed it was actively in progress.
:gl, is that accurate? Or should we move this to a lower priority? (and drop it from the "up next" column in our kanban board?)
This should be a much lower priority. I felt like you moved this into the board simply because it was assigned, but beyond that this is not urgent.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
This is the linter I'm currently using in android-l10n.
Checks:
- Typography: warn when
'
,"
, and...
(instead of…
) are used. - Hard-coded brand names (provided in this config).
For other formats, I have checks that force a comment to include references to the variables in the string, to make sure the developer explains what replaces the variables, i.e.
- Parse a string for placeables (
%s
,%1$s
, etc.). - Check the comment for the same placeables.
All these checks require a list of exceptions, to work around actual exceptions (e.g. HTML code with straight quotes) or just legacy strings.
Assignee | ||
Comment 6•1 year ago
|
||
This ticket is about adding a linter to catch all the issues that comes up with adding new string resources.
For the monorepo migration, we will be introducing a bit of a delay before strings are exported to the android-l10n repository. Strings need to make their way to gecko-dev before they are extracted via a GitHub actions to the android-l10n repository. This means that strings need to land in autoland, make their way into central and then synced into the GitHub mirror before they are exported to the android-l10n repo.
As a result, we want to have a linter in place to catch problems earlier to reduce the number of issues that will be caught days later.
Updated•1 year ago
|
Assignee | ||
Comment 7•7 months ago
|
||
Updated•7 months ago
|
Updated•7 months ago
|
Assignee | ||
Comment 8•7 months ago
|
||
- Add string lint ignores to exclude imported l10n paths and static string files in Fenix, Focus and Android Components.
Assignee | ||
Comment 9•7 months ago
|
||
- This fixes some of the incorrect quotation character used in our existing strings.
- Currently, we do have an ignore list in the android-l10n repo for any of the existing exceptions https://github.com/mozilla-l10n/android-l10n/blob/main/.github/scripts/linter_config.json
Assignee | ||
Comment 10•7 months ago
|
||
- Suppresses string lint errors that are already part of the exception list found below.
- These are brand name errors that are hard-coded due to their usage in Nimbus and quotation character errors that are used in HTML tags.
- Currently, we do have an exception list in the android-l10n repo for any of the existing exceptions https://github.com/mozilla-l10n/android-l10n/blob/main/.github/scripts/linter_config.json
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 11•6 months ago
|
||
Comment 12•6 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a87614b564f6
https://hg.mozilla.org/mozilla-central/rev/5dffc3ff5ecb
https://hg.mozilla.org/mozilla-central/rev/ac6fbfd54594
https://hg.mozilla.org/mozilla-central/rev/6b0ece9382f6
Description
•