Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forumlar / Cotonti / Localization / Transifex translation service

12>>>

Using transifex to manage localization updates

Trustmaster
#1 2013-03-05 20:00

As you might know, localization process is not (yet) automated in Cotonti and it is uncomfortable for some translators. I was recently pointed at Transifex service and also came across it several times and it seems that it's getting more and more popular. The advantages of this service for us are:

  • Online editing of translations only, no need to mess with code.
  • Monitoring of translation progress.
  • Online collaboration.
  • Translation memory database.
  • Automatic suggestions.
  • Tracking changes between releases.

So I decided to give it a try and created a project for us: https://www.transifex.com/projects/p/cotonti/

Our language files are organized in a more advanced way than in most systems, our language files are modular and spread around many folders, so I had to write some helper tools first: https://github.com/trustmaster/cotlang. I used those tools to separate language files from the source tree and to create Transifex configuration.

I have uploaded RU and NL locales so far and found several problems while uploading our language files. Although most language strings were handled fine, here are the problems that I have detected:

  • Formal/informal locales are not supported.
  • Syntax with array() like $L['cfg_adminemail'] = array('Administrator\'s email', 'Required'); is not supported.
  • Syntax with multiple indexes like $themelang['usersprofile']['Emailpassword'] = 'Your current password'; is not supported.
  • Syntax with strings consisting of multiple lines (ending with end-of-line) is not supported.

So if we want our translations to be handled by Transifex, then we need to make changes to our current PHP code and language strings to make all language entries flat.

I have added Russian and Dutch translations so far, let me know if you want to give it a try and send me your username on Transifex and I'll add you to the appropriate team.

Please let me know what you think about the service and the idea of migration to it to handle translations and translation updates.

May the Source be with you!
Twiebie
#2 2013-03-05 21:19

Hmm, looks like it has potential but problems like not supporting formal/informal locales is a bit of an issue for languages like Dutch.

Signed up with the nickname 'Twiebie', so let me know if you can add me to the project.

Added 14 hours later:

Just tried it out a bit and it's looks pretty good.

I really like the way you can easily see which locale is behind and which strings are not up to date. It makes it much easier to keep track of multiple locales.

If we can find solutions to the current problems that Trustmaster detected it looks like a good way forward.


Bu konu Twiebie tarafından düzenlendi(2013-03-06 11:20, 9 yıllar önce)
Trustmaster
#3 2013-03-06 12:13

I've sent them a request for multidimensional arrays support. In the worst case we can make all our arrays flat but this is not very good for us for several reasons.

May the Source be with you!
Twiebie
#4 2013-03-06 14:13
Surely we can't be the only ones needing that! :)
Trustmaster
#5 2013-03-08 16:08

Got this reply today:

Hello there,

Transifex hosts a lot of PHP projects but, having first searched for similar requests, there is no demand for supporting multi-dimensional arrays. Our roadmap is a really loaded one and we occasionally override the next thing to do if and only if there is a massive request for a particular feature. That said, it's not something that will go live soon but it may be implemented in the future, if a critical mass of requests is reached.

Thank you for your understanding,
Themis

--
The Transifex Team

So we needa change our code and langfiles if we want to use Transifex.

May the Source be with you!
Twiebie
#6 2013-03-08 19:57

Hmm, okay.

It does probably make it easier to maintain the locales in the long run if we use a system like Transifex.
Maybe there are some other alternatives around?

Trustmaster
#7 2013-03-09 07:51

I think Transifex is one of the most popular and developed so far. Personally I'm okay with making arrays flat in langfiles, this is easier for newcomers to understand too. But before we move to Transifex, I would like to hear from other translators too.

May the Source be with you!
schulle4u
#8 2013-03-09 10:08

How difficoult or time-consuming would it be to create our own translation system? We already have the i18n plugin for pages, so couldn't this be adapted somehow? An own solution would make as indipendent from 3rd party services and their boundaries.

I personally feel more comfortable doing my translations offline using my favorite editor. Can I still work offline and then upload new and changed files to transifex or does this service only support online editing? Furthermore, as a user of screen-reading software I first have to check the service accessibility. Looks good so far, I'm registered there as schulle4u already. If there's an quick and easy way to modyfy my current files to the new array format, I have no problem with transifex migration.

Steffen

signature://doesnt.exist
Trustmaster
#9 2013-03-09 10:27

It's not just the difficulty of creation of our own translation system, but rather following some standards and attracting more translators who are used to those standards.

Transifex is not a replacement for our traditional file-based translations, it's just a tool to keep them in sync and collaborate. Have a look at their console client tool, I use it to upload/download there our translation files which I edit with my editor offline.

Right, if we decide to use Transifex, I'll make a tool to convert existing langfiles. The changes will affect no more than 10% of all lang strings.

May the Source be with you!
Twiebie
#10 2013-03-09 12:59

Sounds good to me.

Macik
#11 2013-03-10 20:22

The idea to use common collaborate translation service sounds great. 

But a certain limitations of Transifex make me doubt in it. And it would be good to hear mentions of a Cotonti community.

Is there any other services we can use?

I checked these services:

http://weblate.org - completelly free, works with git repository. Supported formats: http://docs.weblate.org/en/latest/formats.html  (uses translate-toolkit).
(should be checked for multidimensional arrays, and array-strings)

http://crowdin.net/ - Free for open source. (Unlimited projects, unlimited strings and collaborators). Supports many formats, zip uploading (with directory structure).
Had convinient interface, can parse multidimensional arrays. Seems do not understand string arrays (but I'm not shure). 

 

 

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
Kort
#12 2013-03-11 06:38

Sacrificing MD arrays is kinda scary. However, these are mostly used in the rarely changed plugin configuration  strings and (which is abit more painful) $Ls variables. The reward, however, looks very promising and surely outweighs the price, imho.

Seditio.by - создание сайтов, разработка плагинов и тем для Котонти
Trustmaster
#13 2013-03-11 06:46

Weblate looks intriguing with its Git support and being open source, so that we could probably add missing features ourselves. But both services need testing first.

Added 3 hours later:

I would prefer a relatively popular service though and in the current situation we can't run a self-hosted solution like Weblate, so it is out.

Added 7 hours later:

Crowdin has the same problems as Transifex and adds some more: files for multiple locales cannot be imported correctly, so it's out.

I've solved most of the problems with Transifex, there's one thing left: associative arrays in $L['cfg_somename_params'].

May the Source be with you!

Bu konu Trustmaster tarafından düzenlendi(2013-03-11 16:49, 9 yıllar önce)
esclkm
#14 2013-03-11 17:58
Dont touch this. Please. Its destroy 2/3 of plugins
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
Trustmaster
#15 2013-03-11 18:45

2 points:

  • Changes in the code a backwards-compatible. All existing plugins work as before.
  • There's a convertor tool for the main package langfiles which automates 95% of changes that need to be made in langfiles.

Added 3 days later:

Now our language files are compatible with Transifex and I've written a small guide how to translate them in bulk here.

Added 3 minutes later:

FYI: all the existing and old language files should work just fine without any problems. And nobody is forced to use Transifex, you can continue maintaining language files in your preferred way without much changes.

May the Source be with you!

Bu konu Trustmaster tarafından düzenlendi(2013-03-14 18:02, 9 yıllar önce)

12>>>