diff --git a/resources/Language/English/strings.po b/resources/Language/English/strings.po index 301130e..96295c3 100644 --- a/resources/Language/English/strings.po +++ b/resources/Language/English/strings.po @@ -1,89 +1,89 @@ -# Kodi Media Center language file -# Addon Name: Bravia TV Wakeup -# Addon id: service.tv.wakeup +# Kodi Smart TV Service language file +# Addon Name: Kodi Smart TV Service +# Addon id: service.smarttvservice # Addon Provider: casenjo msgid "" msgstr "" "Project-Id-Version: Bravia TV Wakeup\n" -"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n" "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Kodi Translation Team\n" -"Language-Team: English (US) (http://www.transifex.com/projects/p/xbmc-addons/language/en_US/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en_US\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgctxt "#31000" +msgctxt "#30000" msgid "TV Settings" msgstr "TV Settings" -msgctxt "#31010" +msgctxt "#30001" msgid "TV IP Address" msgstr "TV IP Address" -msgctxt "#31020" +msgctxt "#30002" msgid "TV Mac Address" msgstr "TV Mac Address" -msgctxt "#31030" +msgctxt "#30003" msgid "TV Input" msgstr "TV Input" -msgctxt "#31031" +msgctxt "#30004" msgid "HDMI 1" msgstr "HDMI 1" -msgctxt "#31032" +msgctxt "#30005" msgid "HDMI 2" msgstr "HDMI 2" -msgctxt "#31033" +msgctxt "#30006" msgid "HDMI 3" msgstr "HDMI 3" -msgctxt "#31034" +msgctxt "#30007" msgid "HDMI 4" msgstr "HDMI 4" -msgctxt "#31040" +msgctxt "#30008" +msgid "" +msgstr "" + +msgctxt "#30009" msgid "Time to wait until TV will sleep" msgstr "Time to wait until TV will sleep" -msgctxt "#31050" +msgctxt "#30010" msgid "TV PIN" msgstr "TV PIN" -msgctxt "#32000" +msgctxt "#30011" msgid "Plugin not connected to the TV. Do you want to connect to it?" msgstr "Plugin not connected to the TV. Do you want to connect to it?" -msgctxt "#32001" +msgctxt "#30012" msgid "If yes, be aware that the dialog on the TV might be large and will not let you see the interface to input the PIN." msgstr "If yes, be aware that the dialog on the TV might be large and will not let you see the interface to input the PIN." -msgctxt "#32002" +msgctxt "#30013" msgid "You can use your keyboard to type the code and then press Enter :)" msgstr "You can use your keyboard to type the code and then press Enter :)" -msgctxt "#32003" +msgctxt "#30014" msgid "Enter PIN from TV" msgstr "Enter PIN from TV" -msgctxt "#32004" +msgctxt "#30015" msgid "PIN incorrect, unable to connect" msgstr "PIN incorrect, unable to connect" -msgctxt "#32005" +msgctxt "#30016" msgid "TV IP address not configured" msgstr "TV IP address not configured" -msgctxt "#32006" +msgctxt "#30017" msgid "TV MAC address not configured" msgstr "TV MAC address not configured" -msgctxt "#32007" +msgctxt "#30018" msgid "TV Input must be selected" msgstr "TV Input must be selected" diff --git a/resources/settings.xml b/resources/settings.xml index 088098a..c5219a9 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -1,10 +1,10 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/service.py b/service.py index f34158d..0cfca2d 100644 --- a/service.py +++ b/service.py @@ -35,12 +35,13 @@ def __init__(self): # TODO: This is too specific to Bravia TVs, part of it should be moved to a Bravia specific class and use a generic getTvSource method to get it instead def getTvInputSetting(self): input = utils.getSetting('tvInput') - # 0 => HDMI 1, 1 => HDMI 2, etc + # 0 => '', 1 => HDMI 1, etc return { - '0': 'HDMI 1', - '1': 'HDMI 2', - '2': 'HDMI 3', - '3': 'HDMI 4' + '0': '', + '1': 'HDMI 1', + '2': 'HDMI 2', + '3': 'HDMI 3', + '4': 'HDMI 4' }.get(input, '') # '' is default if input not found def connectToTv(self, pin): @@ -57,7 +58,7 @@ def connectToTv(self, pin): # Configure TV connection def configureTvConnection(self): utils.log("Default PIN detected, starting configuration flow") - userWantsToConnect = utils.yesNoDialog(utils.getString(32000), utils.getString(32001), utils.getString(32002)) + userWantsToConnect = utils.yesNoDialog(utils.getString(30011), utils.getString(30012), utils.getString(30013)) if not userWantsToConnect: utils.log("User denied prompt, exiting") @@ -77,7 +78,7 @@ def configureTvConnection(self): if not self.braviarc.is_connected(): utils.log("PIN incorrect, exiting") - utils.notificationError(utils.getString(32004)) + utils.notificationError(utils.getString(30015)) self.isRunning = False return else: @@ -97,7 +98,7 @@ def getPinFromUserPrompt(self): pinFromTv = '' while not self.validatePin(pinFromTv): - pinFromTv = utils.numberDialog(utils.getString(32003)) + pinFromTv = utils.numberDialog(utils.getString(30014)) if not self.validatePin(pinFromTv): userWantsToTryAgain = utils.yesNoDialog('PIN incorrect, it needs to be exactly 4 digits.', 'Try again?') if not userWantsToTryAgain: @@ -116,15 +117,15 @@ def configIsValid(self): utils.log("Checking configuration") if self.tvIp == '': utils.log("Configuration failed, TV IP is missing") - utils.notificationError(utils.getString(32005)) + utils.notificationError(utils.getString(30016)) return False if self.tvMacAddress == '': utils.log("Configuration failed, TV MAC is missing") - utils.notificationError(utils.getString(32006)) + utils.notificationError(utils.getString(30017)) return False if self.tvInput == '': utils.log("Configuration failed, TV Input must be selected") - utils.notificationError(utils.getString(32007)) + utils.notificationError(utils.getString(30018)) return False utils.log("Configuration validated") return True