Retrieve strings from Kodi if no string is found for PKC
This commit is contained in:
parent
6e6d6cc110
commit
6957b9a522
3 changed files with 7 additions and 6 deletions
|
@ -472,8 +472,8 @@ class SpecialMonitor(Thread):
|
|||
def run(self):
|
||||
LOG.info("----====# Starting Special Monitor #====----")
|
||||
# "Start from beginning", "Play from beginning"
|
||||
strings = (utils.try_encode(xbmc.getLocalizedString(12021)),
|
||||
utils.try_encode(xbmc.getLocalizedString(12023)))
|
||||
strings = (utils.try_encode(utils.lang(12021)),
|
||||
utils.try_encode(utils.lang(12023)))
|
||||
while not self.stopped():
|
||||
if xbmc.getCondVisibility('Window.IsVisible(DialogContextMenu.xml)'):
|
||||
if xbmc.getInfoLabel('Control.GetLabel(1002)') in strings:
|
||||
|
|
|
@ -115,9 +115,12 @@ def settings(setting, value=None):
|
|||
|
||||
def lang(stringid):
|
||||
"""
|
||||
Central string retrieval from strings.po
|
||||
Central string retrieval from strings.po. If not found within PKC,
|
||||
standard XBMC/Kodi strings are retrieved.
|
||||
Will return unicode
|
||||
"""
|
||||
return ADDON.getLocalizedString(stringid)
|
||||
return (ADDON.getLocalizedString(stringid) or
|
||||
xbmc.getLocalizedString(stringid))
|
||||
|
||||
|
||||
def dialog(typus, *args, **kwargs):
|
||||
|
|
|
@ -226,8 +226,6 @@ class VideoNodes(object):
|
|||
stringid = nodes[node]
|
||||
if node != "1":
|
||||
label = utils.lang(stringid)
|
||||
if not label:
|
||||
label = xbmc.getLocalizedString(stringid)
|
||||
else:
|
||||
label = stringid
|
||||
|
||||
|
|
Loading…
Reference in a new issue