Loading...
 
Skip to main content

History: Translation workflow using transifex

Preview of version: 10

Exploring process, challanges, etc using transifex to manage Tiki translations

Transifex resources

There are 2 translation resources that contain all translatable Tiki strings:

  1. lang/en/language.php
  2. lang/en/language.js


  • These 2 files need to be added as a resource into transifex for each Tiki version (branch).
  • Why not register language.php/js files for each language as a resource? Because it would be confusing to have them all as resources, because you translate one resource to various languages.
  • Problem: transifex can not import language.js due to the file's internal code structure. Probably will need to contact transifex about this. Can we do something about this on Tiki side?
    • contacted transifex about this, they suggested some changes in the file, attached their version
Copy to clipboard
Re: .js resource not recognized Mon, 27 Jul 2015 07:50:54 +0000 Transifex Support <support@transifex.com> Hey Geza, Thank you for trying Transifex. I have found some minor bugs in the sample resource file. I am sending you back the same file, with some changes. I would also recommend using our documentation about Formats. Hope I helped you solve your issue. Feel free to contact us with any further question you might have. Regards, Dimos ----------------------------- Dear Transifex team! The Tiki user community (http://tiki.org) is currently testing transifex (https://www.transifex.com/organization/tiki/dashboard) to be used for translating the software (https://tiki.org/Translation+workflow+using+transifex). We have two resources that we would like to translate, and one of them does not get recognized by transifex. I have attaced a sample file. Do you have any suggestions how to overcome this? Many thanks, Best regards, Geza

Transifex developer tools

  • API (http://docs.transifex.com/api/): "Transifex offers an extensive API (Application Programmable Interface). The API calls are REST compliant and make use of the most common HTTP methods such as GET, POST, PUT and DELETE."
  • Transifex client (http://docs.transifex.com/client/): "The Transifex Client is a command line tool that enables you to easily manage your translation files within a project."


Probalby we would use the API through the client. Other option is to make API calls using for example http://curl.haxx.se/

Transifex Live (JavaScript Snippet)

Translate existing strings

Translate

Log in to transifex, choose the Tiki release and use transifex's online interface to translate.

Deploy translations

How to transfer translation files from Transifex back to Tiki codebase?

How to manage new/changed strings

During development of various Tiki version new translatable strings may arise or existing ones might get changed. How do they get collected, uploaded to transifex and contributed back into the correct Tiki version?

Step1: Update the resources in Tiki

Run get_strings script to update the 2 resources (lang/en/language.php and lang/en/language.js) for the given Tiki version (branch)

  • who runs it and where? Can the Tiki demo site infrastructure be used for this? (SVN-up should be working properly on the servers)
  • how often does it run? (eg: every hour or once a day?)
  • the script needs to be improved (https://dev.tiki.org/Improve+get_strings)
  • the script needs to be adjusted so that only lang/en gets updated

Step2: Update resources in Transifex

The updated resources have to be pushed into/pulled by transifex so that translators can translate the new/changed strings

Step 3: Update the translations in Tiki releases (branches)

  • automated process to deploy the translations back to the correct Tiki release (branch), same as "Deploying translations" above
  • Manual process (maybe temporary)
    • Install and configure the local client (http://docs.transifex.com/client/setup/).
    • Pull / download the language file(s) to your local computer (http://docs.transifex.com/client/pull/).
    • A new directory is created in Tiki's root, with a subdirectory for the resource: "translations/tiki-development.languagephp".
    • The translation files with new translations are pulled to this directory. (Note: all strings were found to be commented out in these pulled files. Is this due to a configuration option? It seems the lines that aren't touched by Transifex translating shouldn't be commented out if they weren't before.
      • confirmed, I contacted transifex about this, will post reply when I get it
    • The newly translated lines can then be merged into the Tiki language file manually (and un-commented).

Tiki releases

how to create/manage translations in different Tiki releases

  • probably we need one project per Tiki release (is this correct?)
  • it can be a headache to create, can we copy a project?

Development ideas

how can we support translation contribution

  • have an "Upload translation" button in Tiki: we can motivate people to do translation using transifex, download the updated translation file using transifex's user interface and immediately upload the file to their Tiki instance. Should not be a big thing to develop, must carefully validate the php file, wrong syntax can break the site
  • users could do interactive translation in Tiki and send strings to transifex using their transifex username and password. promote this somehow. Would need preferences to set transifex username and password, we could provide code using transifex API to send in the translations to transifex. Requires development efforts.

Exit strategy

if transifex does not work out, how can we revert

  • download translations, commit back to Tiki codebase and run get_strings, we should be back as we were

History

Information Version
gezza 13
View
gezza 12
View
gezza info about commented out translations 11
View
luciash d' being 🧙 10
View
gezza confirming commented out strings 9
View
gezza 8
View
gezza some corrections 7
View
gezza development ideas and exit strategy 6
View
Gary Cunningham-Lee Description added of manual pull of translation files. 5
View
gezza transifex comment about language.js 4
View
gezza 3
View
gezza 2
View
gezza 1
View