Wiki Table of Contents

MX translations coordinator – refreshing app translations

Most of the time, the MX translation coordinator responds to requests from a developer to have the strings for one app or file translated. And the process is carried out for that single request from beginning to end.

But sometimes, such as before an impending new release of the MX project, we will want to ensure that all the translation work carried out by our translators is incorporated into the release. This means updating every app and file with the current status of the translations from Transifex. The script get_stats can help identify how much translation work has been carried out since a specific date, for example since the last occasion you did a general refresh.

In order to do things more efficiently, there are several tools that help process the translations all together. Here is the procedure to carry out a translation refresh. Note that it only applies to the resources related to QT, shell, and Python apps. The special handling required for text files would still need to be carried using the procedures for them. See the separate wiki article.

Ensure all your repos are in synch with GitHub masters

It’s possible that the developers may have made changes to their apps and neglected to pass them on for translation. It isn’t essential that Transifex be updated with all changes before doing the refresh. (An app can still be refreshed with Transifex translations even when the app has newer strings or even some strings removed. It just means the app will not seen to be competely translated by users.) But it’s a good idea to take the opportunity of the refresh to identify any strings that may been missed. In addition, you need to have your repos in synch with the developers’ GitHub repos in order to be able to successfully push your translation refresh back to them. So we need to get the latest version of the GitHub apps regardless.

This is still a manual process (although it could likely be automated). For each GitHub repo on your PC

  • create a before.ts or before.po file by doing a lupdate or xgettext on the current repo
  • git pull
  • create an after.ts or after.po on the updated repo
  • compare
  • if different in source strings – not just line numbers – upload the after.ts or after.po to Transifex, request translations, and give time for that to happen (of course, carry out the normal checks for spelling errors, and change the charset in the after.po file to UTF-8)

Note as stated above that you don’t have to upload and wait for translations; you could just proceed ahead if time is not available. But the git pull part is essential in order not to have your later git push fail because you are not in synch.

Download all the Transifex translations

Use the getmxtrans script and specify “0” instead of a specific resource number. This will download all applicable resources. You could take a look at the script beforehand to ensure that the selection criteria gives you all the MX-related resources. Note that it may download some resources that are no longer used in the most recent MX releases. That will not cause problems.

Update the QT, shell, and Python app translation files

Use the trans_autoupdate script to refresh each repo with the downloaded .ts and or .po files from Transifex. Read the prerequisites in the script first.

Update the desktop files

Use the desktop_autoupdate script to refresh each repo with one or more updated .desktop files. Read the prerequisites in the script first.


Another manual step. For each repo, do a git status to check everything is as expected. Ensure you are using the correct branch. Then do the usual git add …, git commit -m “Translation refresh date”, and git push.

Handle the special cases

As stated above, the special cases are not covered by the above routine, so handle them using that wiki article.

Leave a Comment

Do NOT follow this link or you will be banned from the site!