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:
tx set --auto-local --type PROPERTIES --source-lang en -r midpoint.admin-gui 'gui/admin-gui/src/main/resources/localization/Midpoint_<lang>.properties' --source-file gui/admin-gui/src/main/resources/localization/Midpoint.properties --execute
tx push -s -t -f
tx pull -a
tx push -s -t
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.
git pull # pull translations from transifex tx pull -fa #since source properties is English, we need to get English translation as en_US #and then, rename en_US to en rm localization\Midpoint_en.properties mv localization\Midpoint_en_US.properties localization\Midpoint_en.properties rm localization\schema_en.properties mv localization\schema_en_US.properties localization\schema_en.properties # check that the pulled translations are roughly OK git diff # make sure to mention all the contributors in the commit message (see transifex timeline) git commit -a git push
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špark, 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.