Skip to content
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

WE transition: I18n: convert *.properties to message.json files. #876

Closed
myrdd opened this issue Dec 11, 2017 · 3 comments
Closed

WE transition: I18n: convert *.properties to message.json files. #876

myrdd opened this issue Dec 11, 2017 · 3 comments

Comments

@myrdd
Copy link
Member

myrdd commented Dec 11, 2017

Task:
convert all *.properties locale files (src/locale/*/requestpolicy.properties) to the WE message.json files.

Docs:

Details:

  • put the locale json files in src/conditional/webextension/_locales/*/message.json
  • create symlink src/conditional/legacy/content/_locales with target src/conditional/webextension/_locales (relative target!)
  • The .properties files contain many unlocalized strings. They are all duplicated in the non-en-US locale files. (For example, search for the string Learn more about rules. in all properties files.) All those duplicated messages can be removed, except in the en-US locale.
  • keep the *.dtd files as they are! They are used only for the Request Log, which will not be ported for now, see WE transition: Request Log #872.

To be considered

@myrdd
Copy link
Member Author

myrdd commented Dec 11, 2017

I'm not sure if Mozilla implemented message "fallback"

Looks like they've implemented it. (See here, note the highlighted lines: https://dxr.mozilla.org/mozilla-central/rev/a461fe03fdb07218b7f50e92c59dde64b8f8a5b0/toolkit/components/extensions/test/xpcshell/test_ext_i18n.js#31,67,123,129-132)
So all those duplicated messages, that is, all english messages in non-english locale files can be left out in the corresponding message.json.

@myrdd
Copy link
Member Author

myrdd commented Dec 11, 2017

I've created a branch with a first commit containing the symlink:
https://github.com/myrdd/requestpolicy/tree/feature/we-i18n

myrdd pushed a commit to myrdd/requestpolicy that referenced this issue Dec 12, 2017
@myrdd
Copy link
Member Author

myrdd commented Dec 12, 2017

Done. Thank you @beriain :) See myrdd@b97890e and #877

@myrdd myrdd closed this as completed Dec 12, 2017
myrdd pushed a commit that referenced this issue Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant