ZenMagick in its current form supports both yaml files and pomo files to store language strings. While I think this is good it also creates problems that are, right now, unsolved.
The main issue is that you can’t mix both. With admin using pomo and storefront yaml this causes serious issues for plugins that have to work in both environments.
I’ve created a few tasks for 0.9.13 to track progress for these issues, but since then have come to the conclusion that concentrating on a single system would be much better. With that in mind I had a look at the symfony2 locale component. symfony also uses yaml, albeit in a more sophisticated form. Although that would possibly be all that is needed to get a single codebase for language strings going it leaves the issue of compatibility and the option to host/manage translations in an open shared environment (for example something like transiflex).
For that reason I think it would be best to concentrate on pomo. The code is all there, lots of resources exist to deal with .po and .mo files (poEdit, etc.). The only bit missing would be something that makes it easy for store owners to manage strings without the need to download and learn new tools. Raine pointed out a great looking WordPress plugin that does pretty much what we need.
So, rather than writing more code to try to support inferior formats it might be a lot more fun to try to port this plugin to ZenMagick and have the best of both worlds.
Comments Off
As it turned out, .po and .pot file generation based on the current string scraper code wasn’t too hard. In fact, the hardest bit was perhaps to validate the created files.
It’s not so easy to find usable gettext binaries for Windows.. I ended up using a package from CubicWeb. It does crash, but only after having done the bits I want it to do
So, now there is a new translation project ZenMagick with a component admin UI on trasiflex. So far I’ve created a (default) en_NZ and de_DE locale. Since ZenMagick uses default strings in the code the default locale is at a 100% – yay. German is at 0% :[
If you are keen to work on a different language, let me know and I’ll add it to the repository.
I should add that the code is still using the .yaml files that are also located in the locale folders. As long as there isn’t a useful translation I can’t really see any reason to switch yet.
Comments Off
I’ve started a German translation of the admin UI that will be included ni the next release. It has become quite obvious that I am not a great translator. In fact, the german translation sounds a lot mor wodden and artifical to me than the english original. Go figure…
Anyway, it’s a start. Right now the strings are in a .yaml file, but in the long run I’d love to move to a web based translation tool and also move to the gettext based pomo code. If anyone is interested in helping with translations let me know.
In any case it will be good to have a second language to test switching and making sure all strings are covered.