Kodi Community Forum

Full Version: New feature from TeamXBMC: string syntax check logs are available from now on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Translators !

YouTube addon developer HenrikDK noted that there are a lot of syntax problems during translations.
Most frequently the %s, %i etc. strings gets translated into %s%, %i%, etc format. That is not correct of course and causes to appear the string wrong.

So I coded a syntax check function into my sync utility. From now on, it will always create a syntax check log at every sync, to note any differences we have between the original English and the translated string syntax.

Please note that if one string entry is on the list, it does NOT necessarily mean that the string is wrong. For example if you wrote "%" instead of the English "percent", the string gets on the list, because the number of "%" characters are not the same.
So please review this list regularly to check if there are problematic entries. I see several completely mismatched string entries. They could come from the XML era when the translated-English strings were only linked with the id number. So for languages when you see complete mismatched entries, please for at least once, do a full review for all the strings if possible.

Current syntax checks done (more suggestions are welcome):
  • Verify the number of '%' characters
  • Verify the number of '\n' (LineFeed) characters

The syntax check logs will be always hosted at these links:
Thanks, cheers,
Hi Attila,
Maybe it's better to split to syntax logs in sections (or even files) per language as translaters would like to check per language.
Hi !

It is a good idea, but I have higher priorities at the moment which I don't find time for.
Until I got the time for this, please filter or search the file with a text editor.

Cheers, Attila
Can we add something like https://github.com/uNiversaI/kodi/blob/1...s.po#L1-L7 to here and wherever it would fit in transifex? Is there any value for your guild?

Please discuss those contents with Martinjn, and lets keep discussion in forums.
Sorry to say it again, but it really seems to be broken for addons https://github.com/xbmc/translations/blo...syntax.log
Otherwise ther wouldn't have been an error for like almost two month. I want to believe that, but really I can't.
If someone tells me what needs to be checked exactly then I can add it to my SublimeText plugin (my parser already checks for valid .po files)
Well from the log https://github.com/xbmc/translations/blo...syntax.log I can see the following:

- Empty msgid
- Empty msgstr
- Malformed comments

These might be problematic:
- Check the english string vs every other translation. Do they have the same count of placeholders? (%)
- Check the english string vs every other translation. Do they have the same count of breaks? (\n)