2012-01-31, 00:30
Ok, I've been working with the "hosted" transifex at
https://www.transifex.net/projects/p/mytest55/
It's now looking quite good, I could add all translations with the api but I only did a few just to show what's possible.
The translations strings in that test project are not from current git, but from some old version I had on my hard disk.
The tool to convert XBMC strings.xml to "transifex compilant" xliff is at https://github.com/viljoviitanen/Simple-...texliff.py
The "catch" was to realise transifex uses internally a hash of source string and "context". To see how that works, search e.g. for "programs" at any translation.
Updating/uploading a translation can be easily done with curl, here I uploaded swedish core translation:
This could be bound to a github webhook that checks if a translation has been updated there and push the change immediately to transifex. Here we'll need a mapping of all possible xbmc languages to transifex language codes, e.g. Swedish->sv.
Also, a change in transifex can be detected via a webhook and then the updated file could be pushed immediately to git (we'll need a reverse of the previous map).
I still don't know how the translation memory thing in transifex works... and the also should support for a "glossary" where xbmc specific terms can be collected from core translation to benefit addon translations.
http://help.transifex.net/intro/translat...ion-memory
https://www.transifex.net/projects/p/mytest55/
It's now looking quite good, I could add all translations with the api but I only did a few just to show what's possible.
The translations strings in that test project are not from current git, but from some old version I had on my hard disk.
The tool to convert XBMC strings.xml to "transifex compilant" xliff is at https://github.com/viljoviitanen/Simple-...texliff.py
The "catch" was to realise transifex uses internally a hash of source string and "context". To see how that works, search e.g. for "programs" at any translation.
Updating/uploading a translation can be easily done with curl, here I uploaded swedish core translation:
Code:
curl -F [email protected] -i -L --user username:password -X PUT https://www.transifex.net/api/2/project/mytest55/resource/core_3/translation/sv/
Also, a change in transifex can be detected via a webhook and then the updated file could be pushed immediately to git (we'll need a reverse of the previous map).
I still don't know how the translation memory thing in transifex works... and the also should support for a "glossary" where xbmc specific terms can be collected from core translation to benefit addon translations.
http://help.transifex.net/intro/translat...ion-memory