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

[Proposal] Translation bundle #83

Open
utnapischtim opened this issue Sep 3, 2024 · 1 comment
Open

[Proposal] Translation bundle #83

utnapischtim opened this issue Sep 3, 2024 · 1 comment
Assignees
Labels
Proposal: Pending Proposal for new RFC, pending triage

Comments

@utnapischtim
Copy link

TL;DR

introduce a new translation package so called translation bundle. every language translation will be bundled into one python package. this package contains then the translations for python, javascript and html code, for vocabularies, for static pages, for email templates and so on. every translation team could work independent, which means they can decide how many versions of they will produce in a year. the translation bundle is then for the product InvenioRDM.

This approach would like to improve following points

  • feature implementation, bugfixes and translations are independent
  • every translation team is independent of each other
  • easy to create a customized translation by forking the github python package of the translation bundle
  • the collaboration of the translation teams could be improved
  • encapsulate name spacing away from the developer

Open discussion points

  • discuss the order in which the translation will be used (e.g. take the last possible option of a translation from following list: hardcoded list, package itself, translation bundle, my-site)
  • how to namespace msgid's to python/javascript packages
  • how to make every msgid unique, even if the in-code msgid is not unique (e.g. in different files the same msgid is used but should be translated differently)
  • how to populate the translated vocabularies (email templates, etc) into the right place (e.g. by hand with a cli command described in the README, by a entrypoint, etc)
  • how to collect the to translated strings into one *.pot file

Rough sketch of the implementation

  • define github action which collects the msgid's from the packages (automatically)
  • push to transifex (automatically)
  • pull from tansifex (manually/automatically)
  • create PR (automatically)
  • create new version of the translation (manually/automatically)

every package should/could define what points should be triggered automatically and what not (e.g. if a pull from transifex changes something a new release could be created automatically).

collect msgid's inside of the translation bundle package

this sketch is only for python, javascript, html msgid's.
define github action with following points:

  • do following steps on every package
  • download package
  • extract msgid's
  • (whish step: add namespace to msgid, to translate same msgid over packages differently)
  • (whish step: calculate reproducable number-msgid of msgid to replace string-msgid, to overcome the problem of same msgid not translatable differently)
  • combine all does msgid's together into one pot file
  • push pot file to the used tool (e.g. transifex)

for vocabularies:

  • get the default vocabulary list from the original package (automatically)
  • try to update the list inside of the translation bundle (automatically)
  • translate (manually)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal: Pending Proposal for new RFC, pending triage
Projects
None yet
Development

No branches or pull requests

6 participants