$LOCALIZE[] with real text?
#1
Hi,

I'm just wondering why $LOCALIZE takes a message context instead of a message id, and why the contexts are provided as numerical values.

This is much more readable:

<label>$LOCALIZE[Weather]:</label>

than this:

<label>$LOCALIZE[8]:</label>

And if a real context is needed then I'd go for something like this:

<label>$LOCALIZE[Weather, Outlook]</localize>

with strings.po file:
msgctxt "Weather"
msgid "Outlook"
msgstr "Ootloeken"

Just curious,

Paul
Reply
#2
because it's simply not yet added in core code to handle it like that
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
So will it in the future? Is there a reason it was done like this in the first place?
Reply
#4
code legacy like almost anything that now seems non obvious.
xbmc code dates back from 2003 and earlier and since then lot of things have changed. new things have come along and guess most of all lack of time to implement the changes.

alanwww1 added the use of .po files which makes it easier to switch to this however it would still require lots of of changes
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
$LOCALIZE[] with real text?0