-
Notifications
You must be signed in to change notification settings - Fork 575
Use MF2 syntax for webext strings #3848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
mathjazz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good.
I've pushed changes to the old (Heroku) staging server. The following projects use the said format:
https://mozilla-pontoon-staging.herokuapp.com/projects/firefox-relay-add-on/
https://mozilla-pontoon-staging.herokuapp.com/projects/mozilla-vpn-extension/
https://mozilla-pontoon-staging.herokuapp.com/projects/firefox-multi-account-containers/
| original = "Source string" | ||
| translation = "Translation with a $1" | ||
| entity = mock_entity("webext", string=original) | ||
| # This should probably also be caught |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason it is not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no strings using indexed rather than named variables in production, and this will get refactored with the upcoming wider changes to validation/linting, so adding the complexity needed for this isn't worthwhile atm.
mathjazz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we haven't discovered any issues and have limited capacity to test, let's merge this and unblock #3855.
This is effectively a prerequisite for #3802, as it despecializes our handling of webext strings. It follows closely the patterns used in #3790, expanding them to apply to webext in addition to Android strings.
Some additional validation is added, allowing us to catch typos in webext placeholders the same way as we do for Android. The editor highlighting of webext messages is also improved.