Browse Source

Fix locale handling, don't default to German any more

Helmut Pozimski 11 years ago
parent
commit
f962c5b59d

+ 2 - 0
CHANGELOG

@@ -3,6 +3,8 @@
 
 * Added title checking to filter unrelated results from subscriptions with search strings
 * Python 3 is now also supported
+* Fixed localization so stov doesn't default to German any more
+* SIGINT and SIGTERM are now catched and are correctly processed internally
 
 0.3
 ----

+ 2 - 3
TODO

@@ -1,5 +1,4 @@
-TODOs for 0.4:
+TODOs for 0.5:
 
 *Rework and correct strings
-*Make the whole help screen translateable
-*Fix localization so that German translation is not preferred
+*Add proper installation and packaging options

BIN
locale/C/LC_MESSAGES/stov.mo


+ 314 - 0
locale/C/LC_MESSAGES/stov.po

@@ -0,0 +1,314 @@
+# GNU gettext file for stov, English language
+# Helmut Pozimski <helmut@pozimski.eu>, 2012-2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.3\n"
+"POT-Creation-Date: 2012-12-27 22:18+CET\n"
+"PO-Revision-Date: 2012-12-27 22:27+CET\n"
+"Last-Translator: Helmut Pozimski <helmut@pozimski.eu>\n"
+"Language-Team: None\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+
+#: configuration.py:59
+msgid "the name of your database file"
+msgstr ""
+
+#: configuration.py:60
+msgid "the directory where downloaded videos are saved"
+msgstr ""
+
+#: configuration.py:61
+msgid "the maximum number of videos to retrieve for each subscription"
+msgstr ""
+
+#: configuration.py:63
+msgid "the host of your mail server"
+msgstr ""
+
+#: configuration.py:64
+msgid "the address used for notifications"
+msgstr ""
+
+#: configuration.py:65
+msgid "the sender address of notification e-mails"
+msgstr ""
+
+#: configuration.py:66
+msgid "the port to use on your mail server"
+msgstr ""
+
+#: configuration.py:67
+msgid "if your mail server requires authentication"
+msgstr ""
+
+#: configuration.py:68
+msgid "the user name used to authenticate to your mail server"
+msgstr ""
+
+#: configuration.py:69
+msgid "the password used to authenticate to your mail server"
+msgstr ""
+
+#: configuration.py:70
+msgid "the path to your youtube-dl installation"
+msgstr ""
+
+#: configuration.py:71
+msgid "if you want to be notified via e-mail about new videos"
+msgstr ""
+
+#: configuration.py:72
+msgid "which video codec you prefer (h264, webm or flv)"
+msgstr ""
+
+#: configuration.py:73
+msgid "which resolution you prefer (360p, 480p, 720p or 1080p)"
+msgstr ""
+
+#: configuration.py:75
+msgid "if you want to compare the title of a video with the subscription search string"
+msgstr ""
+
+#: configuration.py:88
+msgid "Opening configuration file"
+msgstr ""
+
+#: configuration.py:92
+msgid "Configuration could not be written, please check that the configuration directory exists and is writable"
+msgstr ""
+
+#: configuration.py:97
+msgid "Writing value for %s"
+msgstr ""
+
+#: configuration.py:107
+msgid "The database could not be created, please check that the configuration directory exists and is writable"
+msgstr ""
+
+#: configuration.py:112
+msgid "Creating table subscriptions"
+msgstr ""
+
+#: configuration.py:122
+msgid "Creating table videos"
+msgstr ""
+
+#: configuration.py:142
+msgid "Creating hidden directory in home for configuration and database"
+msgstr ""
+
+#: configuration.py:147
+msgid "Configuration directory could not be created, please check that your home directory exists and is writable"
+msgstr ""
+
+#: configuration.py:151
+msgid "Looking for youtube-dl file"
+msgstr ""
+
+#: configuration.py:164
+msgid "Opening config file for reading"
+msgstr ""
+
+#: configuration.py:168
+msgid "Configuration could not be read, please check that the configuration file exists and is readable"
+msgstr ""
+
+#: configuration.py:172
+msgid "Reading line %s"
+msgstr ""
+
+#: configuration.py:185
+msgid "Checking current and running configuration version"
+msgstr ""
+
+#: configuration.py:190
+msgid "Invalid config version read"
+msgstr ""
+
+#: configuration.py:195
+msgid "Found running version: "
+msgstr ""
+
+#: configuration.py:196 configuration.py:220
+msgid "Current version: "
+msgstr ""
+
+#: configuration.py:215
+msgid "Checking current and running database version."
+msgstr ""
+
+#: configuration.py:219
+msgid "Found running database version: "
+msgstr ""
+
+#: configuration.py:237
+msgid "The database could not be updated, please check that the configuration directory exists and is writable"
+msgstr ""
+
+#: configuration.py:257
+msgid "Trying to determine the itag value for youtube-dl from your quality and codec settings"
+msgstr ""
+
+#: configuration.py:288
+msgid "Found value: %s"
+msgstr ""
+
+#: configuration.py:295
+msgid ""
+"This assistant will help you to perform the initial configuration of stov. \n"
+"The default value will be displayed in brackets.\n"
+"Please specify now :\n"
+msgstr ""
+
+#: configuration.py:308
+msgid "Writing initial configuration according to your input, have fun!"
+msgstr ""
+
+#: subscription.py:64
+msgid "Could not write to database, subscription was NOT deleted. Please check permissions and try again."
+msgstr ""
+
+#: subscription.py:72
+msgid "The subscription could not be found and was therefore not deleted"
+msgstr ""
+
+#: subscription.py:84
+msgid "Subscription deleted successfully!"
+msgstr ""
+
+#: subscription.py:99
+msgid "Could not write to database, new video was NOT added! Please check permissions and try again."
+msgstr ""
+
+#: subscription.py:104
+msgid "Checking if video \"%s\" exists in the database"
+msgstr ""
+
+#: subscription.py:109
+msgid "You have requested title checking and the title of the video does not match with the search string, ignoring it"
+msgstr ""
+
+#: subscription.py:118
+msgid "Video %s not found in database, inserting..."
+msgstr ""
+
+#: subscription.py:139
+msgid "Could not access database. Please check permissions and try again."
+msgstr ""
+
+#: subscription.py:143
+msgid "Getting all videos for subscription %s from database"
+msgstr ""
+
+#: subscription.py:151
+msgid "Got video %s"
+msgstr ""
+
+#: subscription.py:174
+msgid "Videos in subscription "
+msgstr ""
+
+#: subscription.py:178
+msgid "   (pending)"
+msgstr ""
+
+#: subscription.py:181
+msgid "   (downloaded)"
+msgstr ""
+
+#: subscription.py:184
+msgid "   (failed)"
+msgstr ""
+
+#: subscription.py:193
+msgid "Could not write to database, new subscription was NOT added! Please check permissions and try again."
+msgstr ""
+
+#: subscription.py:199
+msgid "Found subscription title %s"
+msgstr ""
+
+#: subscription.py:202
+msgid "Directory: %s"
+msgstr ""
+
+#: subscription.py:208
+msgid "Writing subscription info into database..."
+msgstr ""
+
+#: subscription.py:218
+msgid "Subscription got internal ID %s"
+msgstr ""
+
+#: subscription.py:228
+msgid "Connectiong to youtube API."
+msgstr ""
+
+#: subscription.py:231
+msgid "Connection established, reading data."
+msgstr ""
+
+#: subscription.py:236
+msgid "Could not get API data, maybe the API is down or you have given wrong parameters, please check and try again!"
+msgstr ""
+
+#: subscription.py:242
+msgid "Parsing youtube API response."
+msgstr ""
+
+#: subscription.py:265
+msgid "None or invalid subscription type given, please check the type option and try again"
+msgstr ""
+
+#: subscription.py:268
+msgid "Constructed the following API URL: %s"
+msgstr ""
+
+#: subscription.py:284
+msgid "Video %s deleted from the database!"
+msgstr ""
+
+#: subscription.py:288
+msgid "Videos %s could not be deleted from the database"
+msgstr ""
+
+#: youtube.py:46
+msgid "Creating directory %s"
+msgstr ""
+
+#: youtube.py:50
+msgid "Download directory does not exist and can't be created. Please check your configuration and try again"
+msgstr ""
+
+#: youtube.py:57
+msgid "Downloading video \"%s\""
+msgstr ""
+
+#: youtube.py:74
+msgid "The Video \"%s\" has been downloaded but the status could not be updated in the database. Please check what went wrong and correct it"
+msgstr ""
+
+#: youtube.py:81
+msgid "Downloaded video \"%s\", updating database accordingly."
+msgstr ""
+
+#: youtube.py:90
+msgid "The video %s could not be downloaded due to some problem with youtube-dl. If this happens to more than one video, please check your youtube-dl version"
+msgstr ""
+
+#: youtube.py:97
+msgid "The Video \"%s\" has failed downloading but the status could not be updated in the database. Please check what went wrong and correct it"
+msgstr ""
+
+#: youtube.py:106
+msgid "The video \"%s\" has failed downloading too often, marking as failed"
+msgstr ""
+
+#: youtube.py:126
+msgid "Could not connect to the database, please check settings and permissions and try again"
+msgstr ""
+

BIN
locale/de/LC_MESSAGES/stov.mo


+ 2 - 2
locale/de/LC_MESSAGES/stov.po

@@ -1,5 +1,5 @@
 # GNU gettext file for stov, German language
-# Helmut Pozimski <helmut@pozimski.eu>, 2012.
+# Helmut Pozimski <helmut@pozimski.eu>, 2012-2013.
 #
 msgid ""
 msgstr ""
@@ -198,7 +198,7 @@ msgstr "ungültige Option %s"
 
 #: stov.py:100
 msgid "Usage: %prog [options]"
-msgstr "Benutzung %prog [Optionen]"
+msgstr "%prog [Optionen]"
 
 #: stov.py:124
 msgid "show this help message and exit"

BIN
locale/en/LC_MESSAGES/stov.mo


+ 9 - 266
messages.pot

@@ -1,20 +1,18 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR ORGANIZATION
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# GNU gettext file for stov, English language
+# Helmut Pozimski <helmut@pozimski.eu>, 2012-2013.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2013-04-12 16:56+CEST\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
+"Project-Id-Version: 0.3\n"
+"POT-Creation-Date: 2012-12-27 22:18+CET\n"
+"PO-Revision-Date: 2012-12-27 22:27+CET\n"
+"Last-Translator: Helmut Pozimski <helmut@pozimski.eu>\n"
+"Language-Team: None\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: ENCODING\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
 "Generated-By: pygettext.py 1.5\n"
 
-
 #: configuration.py:59
 msgid "the name of your database file"
 msgstr ""
@@ -170,261 +168,6 @@ msgstr ""
 msgid "Writing initial configuration according to your input, have fun!"
 msgstr ""
 
-#: stov.py:53
-msgid "Translation files could not be found, localization won't be available"
-msgstr ""
-
-#: stov.py:65
-msgid "STRG+C has been pressed, quitting..."
-msgstr ""
-
-#: stov.py:68
-msgid "Received SIGTERM, quitting..."
-msgstr ""
-
-#: stov.py:86
-msgid "option %s requires an integer value"
-msgstr ""
-
-#: stov.py:91
-msgid "option %s requires an argument"
-msgstr ""
-
-#: stov.py:95
-msgid "invalid option %s"
-msgstr ""
-
-#: stov.py:120
-msgid "Usage: %prog [options]"
-msgstr ""
-
-#: stov.py:124
-msgid "show this help message and exit"
-msgstr ""
-
-#: stov.py:126
-msgid "Add a new subscription (requires either --search, --channel or --playlist)"
-msgstr ""
-
-#: stov.py:129
-msgid "Add a new Playlist subscription (requires add)"
-msgstr ""
-
-#: stov.py:131
-msgid "List the currently available subscriptions"
-msgstr ""
-
-#: stov.py:133
-msgid "remove a subscription"
-msgstr ""
-
-#: stov.py:135
-msgid "update the information about the available videos"
-msgstr ""
-
-#: stov.py:137
-msgid "download all available videos which haven't already been downloaded"
-msgstr ""
-
-#: stov.py:139
-msgid "optionally add a search string to a new channel subscription or create a new search subscription (requires --add)"
-msgstr ""
-
-#: stov.py:142
-msgid "Print all videos from a subscription"
-msgstr ""
-
-#: stov.py:144
-msgid "Mark all videos from one channel as read (requires subscription-id as argument)"
-msgstr ""
-
-#: stov.py:147
-msgid "specify a channel for a new subscription (requires --add)"
-msgstr ""
-
-#: stov.py:149
-msgid "show the license of the program"
-msgstr ""
-
-#: stov.py:151
-msgid "show the current running version number"
-msgstr ""
-
-#: stov.py:153
-msgid "Suppress all output"
-msgstr ""
-
-#: stov.py:155
-msgid "Be verbose and print also diagnostical messages"
-msgstr ""
-
-#: stov.py:157
-msgid "Clean the database of entries no longer listed in the current API response"
-msgstr ""
-
-#: stov.py:182
-msgid "--quiet and --verbose can't be defined at the same time, exiting."
-msgstr ""
-
-#: stov.py:202
-msgid "Lock file could not be opened, please check that it exists and is readable, quitting now"
-msgstr ""
-
-#: stov.py:208
-msgid ""
-"The lock file already exists, probably anotherinstance of this program is already running\n"
-"if you are sure this is not the case, delete it manually and try again!"
-msgstr ""
-
-#: stov.py:219
-msgid "Old lock file could not be deleted!"
-msgstr ""
-
-#: stov.py:226
-msgid "Lock file could not be created, please check that /tmp is writable and properly configured, quitting now"
-msgstr ""
-
-#: stov.py:236
-msgid "This seems to be the first time you run the programm, do you want to run the interactive assistant? (yes/no)"
-msgstr ""
-
-#: stov.py:244
-msgid "Writing initial configuration according to default values"
-msgstr ""
-
-#: stov.py:250
-msgid "Your configuration needs to be updated, performing update now."
-msgstr ""
-
-#: stov.py:255
-msgid "Your database needs to be updated, performing update now."
-msgstr ""
-
-#: stov.py:277
-msgid "Found youtube-dl, writing to configuration file."
-msgstr ""
-
-#: stov.py:281
-msgid "Could not find youtube-dl, it either does not exist, is not readable or not executable. Please note that youtube-dl is not needed for the program to run but is needed to use the download option which won't work otherwise. If youtube-dl isn't found automatically, you may also enter the path to it in the configuration file."
-msgstr ""
-
-#: stov.py:306
-msgid "Search_"
-msgstr ""
-
-#: stov.py:309
-msgid "Playlists do not support searching, search option will be ignored!"
-msgstr ""
-
-#: stov.py:315
-msgid "No valid subscription options given, subscription could not be added"
-msgstr ""
-
-#: stov.py:322
-msgid "New subscription "
-msgstr ""
-
-#: stov.py:323
-msgid " successfully added"
-msgstr ""
-
-#: stov.py:330 stov.py:364 stov.py:509 stov.py:533 stov.py:551
-msgid "Could not access the database, please check path and permissions and try again!"
-msgstr ""
-
-#: stov.py:338
-msgid "ID Title"
-msgstr ""
-
-#: stov.py:345
-msgid "No subscriptions added yet, add one!"
-msgstr ""
-
-#: stov.py:354
-msgid "Invalid Option, please use the ID of the subscriptionyou want to delete as parameter for the remove option"
-msgstr ""
-
-#: stov.py:384
-msgid "Could not access the database, please check pathand permissions and try again!"
-msgstr ""
-
-#: stov.py:393
-msgid "Codec and resolution could not be determined, using maximum possible value"
-msgstr ""
-
-#: stov.py:414
-msgid "Downloaded %i new video"
-msgstr ""
-
-#: stov.py:415
-msgid ""
-"The following episode has been downloaded by stov: \n"
-"\n"
-msgstr ""
-
-#: stov.py:417
-msgid "Downloaded %i new videos"
-msgstr ""
-
-#: stov.py:418
-msgid ""
-"The following episodes have been downloaded by stov: \n"
-"\n"
-msgstr ""
-
-#: stov.py:433
-msgid "Could not connect to the smtp server, please check your settings!"
-msgstr ""
-
-#: stov.py:439
-msgid "TLS not available, proceeding unencrypted"
-msgstr ""
-
-#: stov.py:445
-msgid "Authentication failed, please check user nameand password!"
-msgstr ""
-
-#: stov.py:449
-msgid "Could not authenticate, server probably does not support authentication!"
-msgstr ""
-
-#: stov.py:456
-msgid "The server refused the recipient address, please check your settings"
-msgstr ""
-
-#: stov.py:460
-msgid "The server refused the sender address, please check your settings"
-msgstr ""
-
-#: stov.py:466
-msgid "No videos to be downloaded."
-msgstr ""
-
-#: stov.py:470
-msgid ""
-"The following videos have been downloaded:\n"
-msgstr ""
-
-#: stov.py:476
-msgid "Could not determine how you want to be informed about new videos, please check the notify parameter in your configuration"
-msgstr ""
-
-#: stov.py:486
-msgid "Could not access the database, please checkpath and permissions and try again!"
-msgstr ""
-
-#: stov.py:502
-msgid "Invalid subscription, please check the list and try again"
-msgstr ""
-
-#: stov.py:522
-msgid "Subscription could not be updated, please check if the ID given is correct"
-msgstr ""
-
-#: stov.py:587
-msgid "Could not delete the lock file. Please check what went wrong and clean up manually!"
-msgstr ""
-
 #: subscription.py:64
 msgid "Could not write to database, subscription was NOT deleted. Please check permissions and try again."
 msgstr ""

+ 1 - 1
stov.py

@@ -47,7 +47,7 @@ locale_path = sys.path[0] + "/locale"
 """Initialize gettext to support translation of the program"""
 
 try:
-	trans = gettext.translation("stov", locale_path, ["de"])
+	trans = gettext.translation("stov", locale_path)
 except IOError:
 	gettext.install("stov")
 	printf(_("Translation files could not be found, localization "