Script's setting page
#1
Hello,

I'm new here and for my first post, I have a question regarding script's setting page and "automatic" translation (sorry, I'm not a native English speaker and also all new Python developer so I might be wrong when doing things).

So, I wrote a plugin for Gomiso (still no reply to my email asking for direct integration in XBMC repository Sad ) which works but I have a problem regarding the script's setting page (you know, you go on the program page and right click on your module to get the settings access).

If I hardcode the text, everything is ok.
If I use label="30901" (for example) with English strings.xml file, I have no label at all.
I'm developing under windows but I think the problem appeared after I moved my code to GitHub.

Can someone got the same problem and solved it?
Reply
#2
the pull req will be handled in due time, but if you have hardcoded the strings it will be rejected.

how exactly do you go about it, you need an resources/language/English/strings.xml file.
Reply
#3
Ok, so it will be rejected because I moved to an hard coded version in the meantime ...
<REMOVED AS STUPID COMMENT I MADE>

So far, I do have the resources/language/English/strings.xml and it previously worked as "expected".
The settings page have empy labels and when I try to use hte values from my strings.xml file, I have no error but also empty return from my code:
__settings__ = xbmcaddon.Addon(id='script.gomiso')
__language__ = __settings__.getLocalizedString
..... "Test: " + __language__(30916) + " ***".....

Will display "Test: ***"
Reply
#4
metabaron Wrote:Ok, so it will be rejected because I moved to an hard coded version in the meantime ...
<REMOVED AS STUPID COMMENT I MADE>

So far, I do have the resources/language/English/strings.xml and it previously worked as "expected".
The settings page have empy labels and when I try to use hte values from my strings.xml file, I have no error but also empty return from my code:
__settings__ = xbmcaddon.Addon(id='script.gomiso')
__language__ = __settings__.getLocalizedString
..... "Test: " + __language__(30916) + " ***".....

Will display "Test: ***"


try __language__(600)

and have <string id="600">My Test String</string> in strings.xml
Reply
#5
and please tell me which script has hardcoded values as it might have slipped through
Reply
#6
amet Wrote:and please tell me which script has hardcoded values as it might have slipped through

Forget what I said about it, the hardcode is not in the settings.xml but directly within the code itself.
Reply
#7
amet Wrote:try __language__(600)

and have <string id="600">My Test String</string> in strings.xml

Same results as before: "Test: ***" Sad
Reply
#8
metabaron Wrote:Same results as before: "Test: ***" Sad

test with the strings.xml I sent on ML and let us know
Reply
#9
Ok, as sent to the mailing list, same result ... I'm desperate on this one. Worked one day and ... not anymore and can't really isolate what didn't worked ...
I'm going to have to share my code with you if you are not on the mailing list Smile
Reply
#10
broken xml eh.. firefox is your friend.
Reply
#11
Thanks to all for support and for looking at my code and implement the necessary modification (not encoding but a correct XML code for strings.xml files).

Thank you again
Reply

Logout Mark Read Team Forum Stats Members Help
Script's setting page0