Strings not found by WindowXMLDialog
#1
Sad 
I'm relativly new to XBMC, so sorry if this is a stupid question. I have a custom WindowXMLDialog with the following markup:

Code:
<window id="5000" type="dialog">
    <zorder>9999</zorder>
    <coordinates>
        <posx>780</posx>
        <posy>0</posy>
    </coordinates>
    <controls>
        <control type="label" id="5002">
            <description>heading</description>
            <width>550</width>
            <height>20</height>
            <label>$LOCALIZE[30001] :</label>
        </control>
    </controls>
</window>

And my English strings.xml file looks as follows:

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
    <string id="30000">Local Path</string>
    <string id="30001">Caching files</string>
</strings>

The problem is that the string is never retirieved. In my GUI only the : is shown on the label. I also tried:

Code:
<label>30001</label>

without success. I checked and my XBMC language is set to English, my strings.xml is in the correct directory (resources/language/English/strings.xml). I'm running XBMC 11.0 on Ubuntu 12.04.

I've managed to use the default XBMC strings, eg:

Code:
<label>154</label>

and it works, but my own IDs don't. Does anyone have an idea why?
Reply
#2
use $ADDON[30001] and smile.
Reply
#3
If I do that, my dialog doesn't even show. And there is nothing in the debug log file that points to an error.
Reply
#4
$LOCALIZE[SCRIPT30001]
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
Nope ronie, that also returns an empty string.
Reply
#6
Are you sure you don't have a strings.po file in the same directory ? In that case xbmc uses the po file not the xml file, therefore your string in the xml file will never show up.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
(2012-09-24, 15:51)goocreations Wrote: Nope ronie, that also returns an empty string.

it should work, though it could be you can't use certain string id's that way.
give it a shot with $LOCALIZE[SCRIPT650]
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
Somehow I didn't get email notifications on your reply, so sorry for my late response.

No, I don't have any .po files
Yes, $LOCALIZE[SCRIPT650] works. So seems like you can't use any IDs. The development doc stated that one should use IDs 30000 and onwards. So is this not true? Any range I should use without breaking XBMCs strings?
Adding to this, in your settings file, you have something like this:

<setting id="batchmode" type="enum" label="30005" values="Value1|Value2" />

Now then label is replace by the language string. Is there any way the value itself (eg: Value1 and Value2) can be replaced by language strings?
Reply
#9
On my script cdART Manager I use the following in my XML file
Code:
<label>$ADDON[script.cdartmanager 32000]</label>

Never had an issue.

And yes you can use string ids for the values
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Strings not found by WindowXMLDialog00