Hi,

I just landed a new linter into mach, and thus into treeherder and phabricator.

It's called `l10n`, and `l1nt` on treeherder. It checks for common errors in localizable files, like duplicate strings and parsing errors, but also runs some more detailed checks.

On phabricator, it also reports warnings, which might be missed string ID changes.

So if a patch doesn't show the strings you're hoping for, a good first step is to run ./mach lint -w now.

Together with l10n jobs on try and pseudo localization [1], this should make your life easier.

On string changes: The rules remain the same, if you change the semantics of a string, you need a new ID. If you just fix a typo or grammar, please don't create a new ID. Anything inbetween, feel free to ask, often the best choice depends on what's actually in the localizations.

Technical detail: The test works by maintaining a local clone of https://hg.mozilla.org/l10n/gecko-strings/ in your ~/.mozbuild, updating it after two days. So if you see something cloning while you mach lint, that's intended. This comes with the benefit that we're only checking against strings we actually expose to localizers. It also checks for string IDs we might not use in central, but in beta or release. Which also makes this test the right thing to check for landings on beta or release branches.

Thanks to Andrew Halberstadt for bearing with me through all the refactors while he was trying to help me land this.

There are a few next steps I already know about: For one, run this more widely across mozilla projects, for example on our newer Android apps [2]. I also have a local branch for ' vs ’, but it's still in its infancy.

If you find issues and/or want enhancements, please file a bug in linting and CC me.

Axel

[1] https://firefox-source-docs.mozilla.org/intl/l10n/l10n/fluent_tutorial.html#pseudolocalization
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1548500
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to