Fluent linter: warn when a string has placeables but no comments
Categories
(Core :: Internationalization: Localization, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox111 | --- | fixed |
People
(Reporter: flod, Assigned: flod)
References
Details
Attachments
(2 files)
Strings with placeables (e.g. { $somevar }) should have comments explaining what replaces the variables (comment can be either a group-level comment or individual comment).
The linter should warn when that's not the case.
A basic approach would be to just check for comments associated to the string, a more refined one to check for each placeable in the comment. The former is probably not as effective, as there might be even a file-level comment with no information.
| Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
Depends on D167787
Comment 4•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/3de1dd005c43
https://hg.mozilla.org/mozilla-central/rev/4a016b402eff
| Assignee | ||
Comment 5•3 years ago
|
||
@rob
Heads up, I assume this will impact Thunderbird (I haven't looked at the FTL files though).
This expects any Fluent string with a variable to have a comment referencing the variable. Ideally, it should be in the form of
# Variables:
# $somevar (type) - Description
So far, type has been something in: string, number, boolean, date.
Description
•