$LOCALIZE doesn't work in skin

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
raspi177 Offline
Junior Member
Posts: 5
Joined: Nov 2012
Reputation: 0
Post: #1
Hi!
Skin-file script-...-main.xml of a program should interpret $LOCALIZE[32001] in button <label> tag or like in the example below just <label>32001</label>. It does use localized names of properties in settings window (not included in example below), but not in skin-xml. I dont know why?

here is my addon, mini version: 5 files
/home/ra/.xbmc/addons/script.web.wanderlust177/resources/skins/Default/720p/script-Wanderlust177-main.xml
/home/ra/.xbmc/addons/script.web.wanderlust177/resources/language/English/strings.xml
/home/ra/.xbmc/addons/script.web.wanderlust177/addon.xml
/home/ra/.xbmc/addons/script.web.wanderlust177/lib/__init__.py
/home/ra/.xbmc/addons/script.web.wanderlust177/lib/wanderlust177.py

the code:
http://pastebin.com/3m9uY5zQ

Result is, The button is displayed but without caption.
Log (last lines until window is displayed) has no error and such..:

http://pastebin.com/h89rDbDG

Xbmc is version 11, from the Ubuntu repo. Is it a silly error? Any ideas?
Ahoi, raspii177
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #2
Use $ADDON[addonId 32001]

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
raspi177 Offline
Junior Member
Posts: 5
Joined: Nov 2012
Reputation: 0
Post: #3
Hey cool! It works. I used

<label>$ADDON[script.web.wanderlust177 32001]</label>

and it displays Trains. super. All I need. I've xbmc version 12 beta 2 now, by the way.
Ahoi
find quote
cebik Offline
Junior Member
Posts: 1
Joined: Mar 2014
Reputation: 0
Post: #4
But why LOCALIZE doesn't working?
I need that methode because skin is for example for ADDONExample1 and ADDONExample2
I have also problem with variables in skin I think those are similar problem

Maybe this casue problem?

Code:
class myNewWindow(xbmcgui.WindowXML):
    def __new__(cls):
        return super(mTVGuide, cls).__new__(cls, 'script-main.xml', ADDON.getAddonInfo('path'), ADDON.getSetting('Skin'), "720p")
find quote