Skip to content

[Proposal] Translation bundle #83

@utnapischtim

Description

@utnapischtim

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)

Metadata

Metadata

Assignees

Labels

Proposal: PendingProposal for new RFC, pending triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions