Strings not found by WindowXMLDialog

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
goocreations Offline
Junior Member
Posts: 9
Joined: Sep 2012
Reputation: 0
Sad  Strings not found by WindowXMLDialog Post: #1
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?
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,174
Joined: Nov 2003
Reputation: 82
Post: #2
use $ADDON[30001] and smile.

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.
find quote
goocreations Offline
Junior Member
Posts: 9
Joined: Sep 2012
Reputation: 0
Post: #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.
find quote
ronie Offline
Team-XBMC Member
Posts: 8,247
Joined: Jan 2009
Reputation: 108
Post: #4
$LOCALIZE[SCRIPT30001]

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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.
find quote
goocreations Offline
Junior Member
Posts: 9
Joined: Sep 2012
Reputation: 0
Post: #5
Nope ronie, that also returns an empty string.
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #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.
(This post was last modified: 2012-09-24 16:26 by alanwww1.)
find quote
ronie Offline
Team-XBMC Member
Posts: 8,247
Joined: Jan 2009
Reputation: 108
Post: #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]

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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.
find quote
goocreations Offline
Junior Member
Posts: 9
Joined: Sep 2012
Reputation: 0
Post: #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?
(This post was last modified: 2012-09-27 21:38 by goocreations.)
find quote
giftie Online
Skilled Python Coder
Posts: 2,033
Joined: Mar 2010
Reputation: 35
Post: #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

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote