Use MF2 syntax for webext strings#3848
Conversation
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
mathjazz
left a comment
There was a problem hiding this comment.
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.
What is the reason it is not?
There was a problem hiding this comment.
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.
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.