diff --git a/SABnzbd.py b/SABnzbd.py index def4cd1..a22152b 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -1144,7 +1144,7 @@ def main(): # Find external programs sabnzbd.newsunpack.find_programs(sabnzbd.DIR_PROG) - if not sabnzbd.WIN_SERVICE and not sabnzbd.DARWIN: + if not sabnzbd.WIN_SERVICE and not getattr(sys, 'frozen', None) == 'macosx_app': signal.signal(signal.SIGINT, sabnzbd.sig_handler) signal.signal(signal.SIGTERM, sabnzbd.sig_handler) diff --git a/po/main/SABnzbd.pot b/po/main/SABnzbd.pot index 30f2710..a519319 100644 --- a/po/main/SABnzbd.pot +++ b/po/main/SABnzbd.pot @@ -12,7 +12,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ASCII\n" "Content-Transfer-Encoding: 7bit\n" -"POT-Creation-Date: 2010-10-09 11:41+West-Europa (zomertijd)\n" +"POT-Creation-Date: 2010-10-17 22:26+CEST\n" "Generated-By: pygettext.py 1.5\n" @@ -20,35 +20,35 @@ msgstr "" msgid "Failed to start web-interface" msgstr "" -#: SABnzbd.py:325 +#: SABnzbd.py:327 msgid "Cannot find web template: %s, trying standard template" msgstr "" -#: SABnzbd.py:446 +#: SABnzbd.py:448 msgid "_yenc module... NOT found!" msgstr "" -#: SABnzbd.py:453 +#: SABnzbd.py:455 msgid "par2 binary... NOT found!" msgstr "" -#: SABnzbd.py:461 +#: SABnzbd.py:463 msgid "unrar binary... NOT found" msgstr "" -#: SABnzbd.py:466 +#: SABnzbd.py:468 msgid "unzip binary... NOT found!" msgstr "" -#: SABnzbd.py:570 +#: SABnzbd.py:572 msgid "Please be aware the 0.0.0.0 hostname will need an IPv6 address for external access" msgstr "" -#: SABnzbd.py:1234 +#: SABnzbd.py:1221 msgid "Disabled HTTPS because of missing CERT and KEY files" msgstr "" -#: SABnzbd.py:1409 SABnzbdDelegate.py:730 +#: SABnzbd.py:1416 SABnzbdDelegate.py:730 msgid "SABnzbd shutdown finished" msgstr "" @@ -157,50 +157,6 @@ msgstr "" msgid "Stopping..." msgstr "" -#: sabnzbd/utils/servertests.py:35 -msgid "The hostname is not set." -msgstr "" - -#: sabnzbd/utils/servertests.py:40 -msgid "There are no connections set. Please set at least one connection." -msgstr "" - -#: sabnzbd/utils/servertests.py:67 -msgid "Password masked in ******, please re-enter" -msgstr "" - -#: sabnzbd/utils/servertests.py:71 -msgid "Invalid server details" -msgstr "" - -#: sabnzbd/utils/servertests.py:83 -msgid "Timed out: Try enabling SSL or connecting on a different port." -msgstr "" - -#: sabnzbd/utils/servertests.py:85 -msgid "Timed out" -msgstr "" - -#: sabnzbd/utils/servertests.py:105 -msgid "Server requires username and password." -msgstr "" - -#: sabnzbd/utils/servertests.py:108 -msgid "Connection Successful!" -msgstr "" - -#: sabnzbd/utils/servertests.py:111 -msgid "Authentication failed, check username/password." -msgstr "" - -#: sabnzbd/utils/servertests.py:114 -msgid "Too many connections, please pause downloading or try again later" -msgstr "" - -#: sabnzbd/utils/servertests.py:117 -msgid "Could not determine connection result (%s)" -msgstr "" - #: sabnzbd/__init__.py:155 msgid "Signal %s caught, saving and exiting..." msgstr "" @@ -333,15 +289,15 @@ msgstr "" msgid "%s => missing from all servers, discarding" msgstr "" -#: sabnzbd/dirscanner.py:121 sabnzbd/dirscanner.py:184 +#: sabnzbd/dirscanner.py:120 sabnzbd/dirscanner.py:183 msgid "Error removing %s" msgstr "" -#: sabnzbd/dirscanner.py:156 +#: sabnzbd/dirscanner.py:155 msgid "Cannot read %s" msgstr "" -#: sabnzbd/dirscanner.py:280 sabnzbd/dirscanner.py:364 +#: sabnzbd/dirscanner.py:279 sabnzbd/dirscanner.py:363 msgid "Cannot read Watched Folder %s" msgstr "" @@ -570,71 +526,222 @@ msgstr "" msgid "Incorrect value for %s: %s" msgstr "" -#: sabnzbd/misc.py:319 +#: sabnzbd/misc.py:320 msgid "Cannot create directory %s" msgstr "" -#: sabnzbd/misc.py:325 +#: sabnzbd/misc.py:326 msgid "%s directory: %s error accessing" msgstr "" -#: sabnzbd/misc.py:345 +#: sabnzbd/misc.py:346 msgid "Cannot connect to registry hive HKEY_CURRENT_USER." msgstr "" -#: sabnzbd/misc.py:352 +#: sabnzbd/misc.py:353 msgid "Cannot open registry key \"%s\"." msgstr "" -#: sabnzbd/misc.py:379 +#: sabnzbd/misc.py:380 msgid "Failed to read registry keys for special folders" msgstr "" -#: sabnzbd/misc.py:612 +#: sabnzbd/misc.py:465 +msgid "" +"\n" +" \n" +"
\n" +"\n" +"
\n"
+" \n"
+" %s\n"
+"
\n"
+"
%s
\n"
+" \n"
+"\n"
+msgstr ""
+
+#: sabnzbd/misc.py:483
+msgid ""
+"\n"
+" SABnzbd is not compatible with some software firewalls.
\n"
+" %s
\n"
+" Sorry, but we cannot solve this incompatibility right now.
\n"
+" Please file a complaint at your firewall supplier.
\n"
+"
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:492
+msgid ""
+"\n"
+" SABnzbd needs a free tcp/ip port for its internal web server.
\n"
+" Port %s on %s was tried , but it is not available.
\n"
+" Some other software uses the port or SABnzbd is already running.
\n"
+"
\n"
+" Please restart SABnzbd with a different port number.
\n"
+"
\n"
+" %s
\n"
+" %s --server %s:%s
\n"
+"
\n"
+" If you get this error message again, please try a different number.
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:506
+msgid ""
+"\n"
+" SABnzbd needs a free tcp/ip port for its internal web server.
\n"
+" Port %s on %s was tried , but the account used for SABnzbd has no permission to use it.
\n"
+" On OSX and Linux systems, normal users must use ports above 1023.
\n"
+"
\n"
+" Please restart SABnzbd with a different port number.
\n"
+"
\n"
+" %s
\n"
+" %s --server %s:%s
\n"
+"
\n"
+" If you get this error message again, please try a different number.
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:520
+msgid ""
+"\n"
+" SABnzbd needs a valid host address for its internal web server.
\n"
+" You have specified an invalid address.
\n"
+" Safe values are localhost and 0.0.0.0
\n"
+"
\n"
+" Please restart SABnzbd with a proper host address.
\n"
+"
\n"
+" %s
\n"
+" %s --server %s:%s
\n"
+"
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:533
+msgid ""
+"\n"
+" SABnzbd detected saved data from an other SABnzbd version
\n"
+" but cannot re-use the data of the other program.
\n"
+" You may want to finish your queue first with the other program.
\n"
+" After that, start this program with the \"--clean\" option.
\n"
+" This will erase the current queue and history!
\n"
+" SABnzbd read the file \"%s\".
\n"
+"
\n"
+" %s
\n"
+" %s --clean
\n"
+"
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:547
+msgid ""
+"\n"
+" SABnzbd cannot find its web interface files in %s.
\n"
+" Please install the program again.
\n"
+"
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:554
+msgid ""
+"\n"
+" SABnzbd detected a fatal error:
\n"
+" %s
\n"
+" %s
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:561
+msgid ""
+"\n"
+" SABnzbd detected a Queue and History from an older (0.4.x) release.
\n"
+" Both queue and history will be ignored and may get lost!
\n"
+" You may choose to stop SABnzbd and finish the queue with the older program.
\n"
+" Click OK to continue to SABnzbd
\n"
+" \n"
+msgstr ""
+
+#: sabnzbd/misc.py:570
+msgid ""
+"\n"
+" SABnzbd detected that the file sqlite3.dll is missing.
\n"
+" Some poorly designed virus-scanners remove this file.
\n"
+" Please check your virus-scanner, try to re-install SABnzbd and complain to your virus-scanner vendor.
\n"
+"
\n"
+msgstr ""
+
+#: sabnzbd/misc.py:581
+msgid "Press Startkey+R and type the line (example):"
+msgstr ""
+
+#: sabnzbd/misc.py:584
+msgid "Open a Terminal window and type the line (example):"
+msgstr ""
+
+#: sabnzbd/misc.py:604
+msgid "It is likely that you are using ZoneAlarm on Vista.
"
+msgstr ""
+
+#: sabnzbd/misc.py:615
+msgid "Program did not start!"
+msgstr ""
+
+#: sabnzbd/misc.py:640
msgid "You have no permisson to use port %s"
msgstr ""
-#: sabnzbd/misc.py:646
+#: sabnzbd/misc.py:656
+msgid "Fatal error"
+msgstr ""
+
+#: sabnzbd/misc.py:674
msgid "Cannot launch the browser, probably not found"
msgstr ""
-#: sabnzbd/misc.py:921
+#: sabnzbd/misc.py:680
+msgid "Access denied"
+msgstr ""
+
+#: sabnzbd/misc.py:681
+msgid "Error %s: You need to provide a valid username and password."
+msgstr ""
+
+#: sabnzbd/misc.py:951
msgid "Failed making (%s)"
msgstr ""
-#: sabnzbd/misc.py:946
+#: sabnzbd/misc.py:976
msgid "Failed moving %s to %s"
msgstr ""
-#: sabnzbd/misc.py:1058
+#: sabnzbd/misc.py:1088
msgid "Unusable NZB file"
msgstr ""
-#: sabnzbd/misc.py:1069
+#: sabnzbd/misc.py:1099
msgid "Try again"
msgstr ""
-#: sabnzbd/misc.py:1069
+#: sabnzbd/misc.py:1099
msgid "URL Fetching failed; %s"
msgstr ""
-#: sabnzbd/misc.py:1199
+#: sabnzbd/misc.py:1229
msgid "pyopenssl module missing, please install for https access"
msgstr ""
-#: sabnzbd/misc.py:1218
+#: sabnzbd/misc.py:1248
msgid "Error creating SSL key and certificate"
msgstr ""
-#: sabnzbd/misc.py:1288
+#: sabnzbd/misc.py:1318
msgid "Failed to hibernate system"
msgstr ""
-#: sabnzbd/misc.py:1297 sabnzbd/misc.py:1334
+#: sabnzbd/misc.py:1327 sabnzbd/misc.py:1364
msgid "Failed to standby system"
msgstr ""
-#: sabnzbd/misc.py:1324
+#: sabnzbd/misc.py:1354
msgid "Error while shutting down system"
msgstr ""
@@ -1008,19 +1115,19 @@ msgstr ""
msgid "Could not compile regex: %s"
msgstr ""
-#: sabnzbd/rss.py:201 sabnzbd/rss.py:203
+#: sabnzbd/rss.py:200 sabnzbd/rss.py:202
msgid "Incorrect RSS feed description \"%s\""
msgstr ""
-#: sabnzbd/rss.py:252 sabnzbd/rss.py:253
+#: sabnzbd/rss.py:251 sabnzbd/rss.py:252
msgid "Failed to retrieve RSS from %s"
msgstr ""
-#: sabnzbd/rss.py:257 sabnzbd/rss.py:258
+#: sabnzbd/rss.py:256 sabnzbd/rss.py:257
msgid "Failed to retrieve RSS from %s: %s"
msgstr ""
-#: sabnzbd/rss.py:547
+#: sabnzbd/rss.py:543
msgid "Empty RSS entry found (%s)"
msgstr ""
@@ -1685,7 +1792,7 @@ msgid "HTTPS Port"
msgstr ""
#: sabnzbd/skintext.py:246
-msgid "Port SABnzbd should listen on for HTTPS communication."
+msgid "If empty, the standard port will only listen to HTTPS."
msgstr ""
#: sabnzbd/skintext.py:247
@@ -2911,7 +3018,7 @@ msgid "Pause for..."
msgstr ""
#: sabnzbd/skintext.py:629
-msgid "Toggle Multi-Operations"
+msgid "Multi-Operations"
msgstr ""
#: sabnzbd/skintext.py:630
@@ -3306,3 +3413,47 @@ msgstr ""
msgid "Invalid nzbmatrix report number %s"
msgstr ""
+#: sabnzbd/utils/servertests.py:35
+msgid "The hostname is not set."
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:40
+msgid "There are no connections set. Please set at least one connection."
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:67
+msgid "Password masked in ******, please re-enter"
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:71
+msgid "Invalid server details"
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:83
+msgid "Timed out: Try enabling SSL or connecting on a different port."
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:85
+msgid "Timed out"
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:105
+msgid "Server requires username and password."
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:108
+msgid "Connection Successful!"
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:111
+msgid "Authentication failed, check username/password."
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:114
+msgid "Too many connections, please pause downloading or try again later"
+msgstr ""
+
+#: sabnzbd/utils/servertests.py:117
+msgid "Could not determine connection result (%s)"
+msgstr ""
+
diff --git a/sabnzbd/misc.py b/sabnzbd/misc.py
index caad7a8..4f81f16 100644
--- a/sabnzbd/misc.py
+++ b/sabnzbd/misc.py
@@ -461,7 +461,8 @@ def set_serv_parms(service, args):
# including panic messages
#
################################################################################
-MSG_BAD_NEWS = r'''
+def MSG_BAD_NEWS():
+ return Ta(r'''
%s
-'''
+''')
-MSG_BAD_FWALL = r'''
+def MSG_BAD_FWALL():
+ return Ta(r'''
SABnzbd is not compatible with some software firewalls.
%s
Sorry, but we cannot solve this incompatibility right now.
Please file a complaint at your firewall supplier.
-'''
+''')
-MSG_BAD_PORT = r'''
+def MSG_BAD_PORT():
+ return Ta(r'''
SABnzbd needs a free tcp/ip port for its internal web server.
Port %s on %s was tried , but it is not available.
Some other software uses the port or SABnzbd is already running.
@@ -497,9 +500,10 @@ MSG_BAD_PORT = r'''
%s --server %s:%s
If you get this error message again, please try a different number.
-'''
+''')
-MSG_ILL_PORT = r'''
+def MSG_ILL_PORT():
+ return Ta(r'''
SABnzbd needs a free tcp/ip port for its internal web server.
Port %s on %s was tried , but the account used for SABnzbd has no permission to use it.
On OSX and Linux systems, normal users must use ports above 1023.
@@ -510,9 +514,10 @@ MSG_ILL_PORT = r'''
%s --server %s:%s
If you get this error message again, please try a different number.
-'''
+''')
-MSG_BAD_HOST = r'''
+def MSG_BAD_HOST():
+ return Ta(r'''
SABnzbd needs a valid host address for its internal web server.
You have specified an invalid address.
Safe values are localhost and 0.0.0.0
@@ -522,9 +527,10 @@ MSG_BAD_HOST = r'''
%s
%s --server %s:%s
-'''
+''')
-MSG_BAD_QUEUE = r'''
+def MSG_BAD_QUEUE():
+ return Ta(r'''
SABnzbd detected saved data from an other SABnzbd version
but cannot re-use the data of the other program.
You may want to finish your queue first with the other program.
@@ -535,74 +541,78 @@ MSG_BAD_QUEUE = r'''
%s
%s --clean
-'''
+''')
-MSG_BAD_TEMPL = r'''
+def MSG_BAD_TEMPL():
+ return Ta(r'''
SABnzbd cannot find its web interface files in %s.
Please install the program again.
-'''
+''')
-MSG_OTHER = r'''
+def MSG_OTHER():
+ return Ta(r'''
SABnzbd detected a fatal error:
%s
%s
-'''
+''')
-MSG_OLD_QUEUE = r'''
+def MSG_OLD_QUEUE():
+ return Ta(r'''
SABnzbd detected a Queue and History from an older (0.4.x) release.
Both queue and history will be ignored and may get lost!
You may choose to stop SABnzbd and finish the queue with the older program.
Click OK to continue to SABnzbd
-'''
+''')
-MSG_SQLITE = r'''
+def MSG_SQLITE():
+ return Ta(r'''
SABnzbd detected that the file sqlite3.dll is missing.
Some poorly designed virus-scanners remove this file.
Please check your virus-scanner, try to re-install SABnzbd and complain to your virus-scanner vendor.
-'''
+''')
def panic_message(panic, a=None, b=None):
"""Create the panic message from templates
"""
if sabnzbd.WIN32:
- os_str = 'Press Startkey+R and type the line (example):'
+ os_str = Ta('Press Startkey+R and type the line (example):')
prog_path = '"%s"' % sabnzbd.MY_FULLNAME
else:
- os_str = 'Open a Terminal window and type the line (example):'
+ os_str = Ta('Open a Terminal window and type the line (example):')
prog_path = sabnzbd.MY_FULLNAME
if panic == PANIC_PORT:
newport = int(b) + 1
newport = "%s" % newport
- msg = MSG_BAD_PORT % (b, a, os_str, prog_path, a, newport)
+ msg = MSG_BAD_PORT() % (b, a, os_str, prog_path, a, newport)
elif panic == PANIC_XPORT:
if int(b) < 1023:
newport = 1024
else:
newport = int(b) + 1
newport = "%s" % newport
- msg = MSG_ILL_PORT % (b, a, os_str, prog_path, a, newport)
+ msg = MSG_ILL_PORT() % (b, a, os_str, prog_path, a, newport)
elif panic == PANIC_TEMPL:
- msg = MSG_BAD_TEMPL % a
+ msg = MSG_BAD_TEMPL() % a
elif panic == PANIC_QUEUE:
- msg = MSG_BAD_QUEUE % (a, os_str, prog_path)
+ msg = MSG_BAD_QUEUE() % (a, os_str, prog_path)
elif panic == PANIC_FWALL:
if a:
- msg = MSG_BAD_FWALL % "It is likely that you are using ZoneAlarm on Vista.
"
+ msg = MSG_BAD_FWALL() % Ta('It is likely that you are using ZoneAlarm on Vista.
')
else:
- msg = MSG_BAD_FWALL % "
"
+ msg = MSG_BAD_FWALL() % "
"
elif panic == PANIC_SQLITE:
- msg = MSG_SQLITE
+ msg = MSG_SQLITE()
elif panic == PANIC_HOST:
- msg = MSG_BAD_HOST % (os_str, prog_path, 'localhost', b)
+ msg = MSG_BAD_HOST() % (os_str, prog_path, 'localhost', b)
else:
- msg = MSG_OTHER % (a, b)
+ msg = MSG_OTHER() % (a, b)
- msg = MSG_BAD_NEWS % (sabnzbd.MY_NAME, sabnzbd.__version__, sabnzbd.MY_NAME, sabnzbd.__version__,
- msg, 'Program did not start!')
+ msg = MSG_BAD_NEWS() % (sabnzbd.MY_NAME, sabnzbd.__version__, sabnzbd.MY_NAME, sabnzbd.__version__,
+ msg, Ta('Program did not start!'))
if sabnzbd.WIN_SERVICE:
sabnzbd.WIN_SERVICE.ErrLogger('Panic exit', msg)
@@ -643,7 +653,7 @@ def panic_old_queue():
return MSG_BAD_NEWS % (sabnzbd.MY_NAME, sabnzbd.__version__, sabnzbd.MY_NAME, sabnzbd.__version__, msg, '')
def panic(reason, remedy=""):
- print "\nFatal error:\n %s\n%s" % (reason, remedy)
+ print "\n%s:\n %s\n%s" % (Ta('Fatal error'), reason, remedy)
launch_a_browser(panic_message(PANIC_OTHER, reason, remedy))
@@ -667,17 +677,19 @@ def launch_a_browser(url, force=False):
def error_page_401(status, message, traceback, version):
""" Custom handler for 401 error """
+ title = T('Access denied')
+ body = T('Error %s: You need to provide a valid username and password.') % status
return r'''
-
- Error %s: You need to provide a valid username and password.
+ %s
-''' % status
+''' % (title, body)