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

Add i18n support #16

Closed
9 tasks done
hugolpz opened this issue Jul 30, 2022 · 3 comments
Closed
9 tasks done

Add i18n support #16

hugolpz opened this issue Jul 30, 2022 · 3 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@hugolpz
Copy link
Member

hugolpz commented Jul 30, 2022

Add i18nsupport on the model of https://github.com/lingua-libre/RecordWizard/tree/master/i18n .

  • Create /i18n/
  • Add qqq.json
  • Add en.json
  • Add fr.json
  • Add language UI in settings
  • Load translation file
  • Use translation file
  • Works, need to clean the mess.
  • Restore wpintegration and overlay

See also #29

@hugolpz
Copy link
Member Author

hugolpz commented Jul 30, 2022

@amire80, I moved what I could but I may use your help. I need your experience in translations.
I'm adding a /i18n/ fold to this websapp. I added en.json, fr.json, and qqq.json.

Ok but now...

  1. I assume qqq.json is some sort of template, is that right ?
  2. how do I activate translate wiki on this repository ?
  3. can I rename my files into js files ? Should I ?
  4. If you have the ability and free time to help this js effort (externalizing message strings), feel free to jump in.

@amire80
Copy link
Contributor

amire80 commented Jul 31, 2022

Hi! Thanks for the question :)

  1. qqq.json must have the same keys as en.json, but the content must be different. Every value of the key must not repeat the English message, but explain it for the translators. This is necessary for correct translation. For example, the message si-popup-history-noHistory says "It's empty". What is empty? "It" may be translated differently into many languages, depending on the thing to which it refers, for example because of grammatical gender. And the same must be done with all the keys.
  2. Ask at https://translatewiki.net/wiki/Support . Also, see https://translatewiki.net/wiki/Translating:New_project for more technical details.
  3. You shouldn't change to JS. JS is for code, JSON is for data. Strings and translations are data. Also, JSON is easily compatible with translatewiki.

About "Load translation file": I have neither tried running the app nor read its code deeply. Do you already have a way to load the files? If not, consider https://github.com/wikimedia/jquery.i18n or https://github.com/wikimedia/banana-i18n .

About "Add language UI in settings": Consider https://github.com/wikimedia/jquery.uls .

@hugolpz
Copy link
Member Author

hugolpz commented Aug 2, 2022

Okay ! 1.0.9 released (install). 90% of the app texts can now be localized. See also #17 .

For limitations, see #19.

@hugolpz hugolpz closed this as completed Aug 3, 2022
@hugolpz hugolpz added the feature New feature or request label Aug 3, 2022
@hugolpz hugolpz added this to the 2022 milestone Aug 3, 2022
@hugolpz hugolpz self-assigned this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants