2017-01-14, 01:43
I just converted my ancient plugin from using strings.xml to strings.po, and I got pretty darn confused.
* http://kodi.wiki/view/language_support says to put the files at resources/language/resource.language_$code/strings.po, but every addon I've looked at in the master repo has resources/language/$language/strings.po
* The syntax of the file seems totally mad and this merits explanation msg*id* = the text, msgctxt (message comment text?) = the id, msgtxt = empty string. What on earth happened?
* Translated examples I've seen look something like this:
msgctxt "30000"
msgid "Text in English"
msgstr "Text in die Auslaendische Sprache"
Why do we replicate the English text across every translation in msgid? Is this is supposed to be an id in any meaningful way? If it is, what happens if the word is the same in English but not other languages, e.g. (cricket) bat vs (animal/man) bat?
* Perhaps I'm the only addon who was still using strings.xml but a conversion script would have been useful:
* http://kodi.wiki/view/language_support says to put the files at resources/language/resource.language_$code/strings.po, but every addon I've looked at in the master repo has resources/language/$language/strings.po
* The syntax of the file seems totally mad and this merits explanation msg*id* = the text, msgctxt (message comment text?) = the id, msgtxt = empty string. What on earth happened?
* Translated examples I've seen look something like this:
msgctxt "30000"
msgid "Text in English"
msgstr "Text in die Auslaendische Sprache"
Why do we replicate the English text across every translation in msgid? Is this is supposed to be an id in any meaningful way? If it is, what happens if the word is the same in English but not other languages, e.g. (cricket) bat vs (animal/man) bat?
* Perhaps I'm the only addon who was still using strings.xml but a conversion script would have been useful:
Code:
code deleted as it was broken :(