Posts: 180
Joined: Aug 2016
(2017-03-08, 18:57)ronie Wrote: 2017-03-05 kodi language file changes
not a python related change, but it can potentially affect your addon..
as of PR#11039 the kodi language file no longer uses '%s' / '%i' string formatting.
in case your addon is using any of the affected strings from the kodi language file, please be aware this will no longer work:
Code:
xbmc.getLocalizedString(20464) % foo
xbmc.getLocalizedString(299) % count
pull request: https://github.com/xbmc/xbmc/pull/11039
Ronie,
Is there an alternative? Removing the ability to have formatted strings in the language kind of goes against the developer rules about having to store text in a string file instead of hard coding it in a py file.
Posts: 180
Joined: Aug 2016
Posts: 1,265
Joined: Oct 2009
Reputation:
29
takoi
Team-Kodi Member
Posts: 1,265
2018-01-28, 15:01
(This post was last modified: 2018-01-28, 15:02 by takoi.)
Well for skins it can be fine if you want it to be exactly the same as estuary. But for random add-ons it's a terrible practice because as I said core string can change to something completely different, even between minor versions. And this change will be silent for add-ons.
In addition, if you are not 100% sure yours and and core string are for the exact same context it will often be wrong in other languages. And this is very hard to know without checking the source code.
The extra translator work is a non-issue imo as transifex have a share 'memory'. It's one click to reuse a string