diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index a20eb6c0..15c0331d 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -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: diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 3bb67ad5..0194605e 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -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): diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index ede2abd0..00b620be 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -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