We translate midPoint on Transifex.
Table of Contents:
Press Enter on Transifex instance and then supply Transifex's username + password.
Transifex configuration is in the .tx subdirectory of the root source code directory. It was created like this:
Transifex and midPoint Git
There is a dedicated repository for localization and translations:
midpoint-localization. Main midpoint repository depends on this one.
From transifex to midPoint git
This needs to be done if there are new tranlations on transifex.
After that, translations are pulled from transifex into master branch in git, and then pushed back.
There is no exact rule when this should happen, so until we automate this, it is recommended to pull new translations regularly or after frequent translations.
From midPoint git to transifex
This needs to be done if source files (
midpoint.properties/schmea.properties) changes, e.g. if there are new translation keys.
There is no manual steps, transifex is configured (how-to) to pull sources automatically from raw properties files (
schema.properties). This happens once a day, typically around 12:00 UTC.
- New keys and values for translations are added
- Changed keys and/or values are added as new one, translations of old strings are lost.
- But with transifex "suggestions" based on previous translations, this is not big issue.
- This works even when only values are changed, which is needed in time when the terminology has changed.
Manual step for pulling translations is the main drawback of this solution.
Other options are:
- a script, that does transifex-to-github part (reverse is maintained by Transifex alone)
- txgh project, now deprecated
- official Transifex push mechanism for Github
A scheduled script
This is current practice. The script is scheduled to run on noon CEST every day, on computer of volunteer Petr Gašparík, until better solution is in place.
There is a project called txgh, written in Ruby, that solves both-directional sync between Github and Transifex.
- It needs to be run somewhere on a server, instructions are given for Ubuntu and Amazon AWS EC2.
- It was once recommended by Transifex, but now, it is deprecated.
This project works using webhooks on github and Transifex. Default behaviour is:
- It checks changes on github and pushes source to transifex
- Once translation is 100% done, it is pulled back.
- It operates over one specified branch in git (we need two branches right now, master and transifex)
Transifex sync to Github
This is official way how to push translations from Transifex to Github.
- It is brain-dead easy.
- It is recommended by Transifex.
Unfortunately, it has nain drawback:
- This solution synchronize only fully translated files.
- Because only 4 out of 17 languages are fully translated now, it means, that midPoint languages would be reduceds to only 4 with updates.