Exploring process, challanges, etc using transifex to manage Tiki translations
There are 2 translation resources that contain all translatable Tiki strings:
- 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
Re: .js resource not recognized Mon, 27 Jul 2015 07:50:54 +0000 Transifex Support <email@example.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
- Problem with dowloaded translation files: there is an issue, that in the downloaded translation files all translations are commented out. Contacted transifex about this. The issue is that the language.php file (that was uploaded from lang/en/language.php from trunk) has all lines commented out and this is inherited into the translations. We have to refresh the resource, but this might invalidate the translations.
Hey Nagy, For some reason when I download the source file you have uploaded, it has also all of the strings commented out. Is it possible that you uploaded a draft by mistake? I once again tried to reproduce your problem, without success. I uploaded a good version of the source file and then I did some translation/review and downloaded without any problem. I did also the same with the source file I found on your project and I had the same issues as you had. I believe that you should backup the resources, remove the "//" and upload them again. Regards, Dimos
- 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/
- video: https://www.youtube.com/watch?v=zj2L3zqSt28, more info: http://docs.transifex.com/live/
- similar to interactive translation
- allows in context translation
- could be integrated into Tiki
- examples of integrations:
- problem: it seems like a project is either file based or transifex live based, so they can not coexist (need to read more about this)
Log in to transifex, choose the Tiki release and use transifex's online interface to translate.
How to transfer translation files from Transifex back to Tiki codebase?
- should be automated
- API: http://docs.transifex.com/api/translations/
- client: http://docs.transifex.com/client/pull/
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?
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
The updated resources have to be pushed into/pulled by transifex so that translators can translate the new/changed strings
- Push or pull?
- pull: transifex pulls from Tiki codebase using its resource autoupdate setting
- push: using Transifex API / client
- How others do this
- 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).
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?
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.
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