summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Core.py33
-rw-r--r--config2
-rw-r--r--locale/de/LC_MESSAGES/pyLoad.mobin0 -> 1018 bytes
-rw-r--r--locale/de/de.po60
-rw-r--r--locale/messages.pot61
5 files changed, 142 insertions, 14 deletions
diff --git a/Core.py b/Core.py
index 2969e1c90..04e05ae32 100644
--- a/Core.py
+++ b/Core.py
@@ -19,6 +19,8 @@
###
CURRENT_VERSION = '0.1'
+import gettext
+
#python imports
import ConfigParser
import logging
@@ -43,8 +45,6 @@ class Core(object):
""" pyLoad main
"""
def __init__(self):
- self.check_update()
-
self.config = {}
self.config['plugin_folder'] = "Plugins"
self.config['link_file'] = "links.txt"
@@ -52,13 +52,19 @@ class Core(object):
self.search_updates = False
self.read_config()
- print "Downloadtime:", self.is_dltime() # debug only
+
+ translation = gettext.translation("pyLoad", "locale", ["de"])
+ translation.install(unicode=True)
+
+ print _("Downloadtime:"), self.is_dltime() # debug only
self.thread_list = Thread_List(self)
- self.check_create(self.config['download_folder'], "Ordner für Downloads")
- self.check_create(self.config['log_folder'], "Ordner für Logs")
- self.check_create(self.config['link_file'], "Datei für Links", False)
+ self.check_create(self.config['download_folder'], _("folder for downloads"))
+ self.check_create(self.config['log_folder'], _("folder for logs"))
+ self.check_create(self.config['link_file'], _("file for links"), False)
+
+ self.check_update()
self.init_logger(logging.DEBUG) # logging level
@@ -92,8 +98,8 @@ class Core(object):
plugin_pattern = line.split("r\"")[1].split("\"")[0]
if plugin_pattern != "":
self.plugins_avaible[plugin_file] = plugin_pattern
- self.logger.debug(plugin_file + " hinzugefuegt")
- print "Index der Plugins erstellt"
+ self.logger.debug(plugin_file + _(" added"))
+ print _("created index of plugins")
## def check_needed_plugins(self):
## links = open(self.link_file, 'r').readlines()
@@ -139,11 +145,11 @@ class Core(object):
"""
newst_version = urllib2.urlopen("http://pyload.nady.biz/files/version.txt").readline().strip()
if CURRENT_VERSION < newst_version:
- print "Neues Update " + newst_version + " auf pyload.de.rw" #newer version out
+ print _("new update on pyload.de.rw:"), newst_version #newer version out
elif CURRENT_VERSION == newst_version:
- print "Neuste Version " + CURRENT_VERSION + " in benutzung" #using newst version
+ print _("newst update in use:"), CURRENT_VERSION #using newst version
else:
- print "Beta Version " + CURRENT_VERSION + " in benutzung" #using beta version
+ print _("beta version in use:"), CURRENT_VERSION #using beta version
def check_create(self, check_name, legend, folder=True):
if not exists(check_name):
@@ -152,9 +158,9 @@ class Core(object):
mkdir(check_name)
else:
open(check_name, "w")
- print legend, "erstellt"
+ print legend, _("created")
except:
- print "Konnte", legend, "nicht erstellen"
+ print _("could not create "), legend
exit()
#def addLinks(self, newLinks, atTheBeginning):
@@ -231,6 +237,7 @@ if __name__ == "__main__":
testLoader = Core()
if testLoader.config['remoteactivated']:
+ print "Server Mode"
server = ServerThread(testLoader)
server.start()
diff --git a/config b/config
index 5be068413..b5a790250 100644
--- a/config
+++ b/config
@@ -12,6 +12,6 @@ fullLog = True
start = 0:00
end = 6:00
[remote]
-remoteActivated = True
+remoteActivated = False
port = 7272
remotePassword = pwhere
diff --git a/locale/de/LC_MESSAGES/pyLoad.mo b/locale/de/LC_MESSAGES/pyLoad.mo
new file mode 100644
index 000000000..71cc7015d
--- /dev/null
+++ b/locale/de/LC_MESSAGES/pyLoad.mo
Binary files differ
diff --git a/locale/de/de.po b/locale/de/de.po
new file mode 100644
index 000000000..d0be50647
--- /dev/null
+++ b/locale/de/de.po
@@ -0,0 +1,60 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pyLoad 0.1\n"
+"POT-Creation-Date: 2009-05-29 00:48+CEST\n"
+"PO-Revision-Date: 2009-05-29 15:30+0100\n"
+"Last-Translator: spoob <spoob@gmx.de>\n"
+"Language-Team: pyLoad <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: utf-8\n"
+"Generated-By: pygettext.py 1.5\n"
+
+#: Core.py:59
+msgid "Downloadtime:"
+msgstr "Downloadzeit:"
+
+#: Core.py:63
+msgid "folder for downloads"
+msgstr "Ordner für Downloads"
+
+#: Core.py:64
+msgid "folder for logs"
+msgstr "Ordner für Logs"
+
+#: Core.py:65
+msgid "file for links"
+msgstr "Datei für Link"
+
+#: Core.py:100
+msgid " added"
+msgstr " hinzugefügt"
+
+#: Core.py:101
+msgid "created index of plugins"
+msgstr "Index der Plugins erstellt"
+
+#: Core.py:147
+msgid "new update on pyload.de.rw:"
+msgstr "Neues Update auf pyload.de.rw"
+
+#: Core.py:149
+msgid "newst update in use:"
+msgstr "Neustes Update in Benutzung:"
+
+#: Core.py:151
+msgid "beta version in use:"
+msgstr "Beta Version in Benutzung"
+
+#: Core.py:160
+msgid "created"
+msgstr "erstellt"
+
+#: Core.py:162
+msgid "could not create "
+msgstr "Konnte nicht erstellen "
+
diff --git a/locale/messages.pot b/locale/messages.pot
new file mode 100644
index 000000000..557ea88b7
--- /dev/null
+++ b/locale/messages.pot
@@ -0,0 +1,61 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2009-05-29 00:48+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"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: Core.py:59
+msgid "Downloadtime:"
+msgstr ""
+
+#: Core.py:63
+msgid "folder for downloads"
+msgstr ""
+
+#: Core.py:64
+msgid "folder for logs"
+msgstr ""
+
+#: Core.py:65
+msgid "file for links"
+msgstr ""
+
+#: Core.py:100
+msgid " added"
+msgstr ""
+
+#: Core.py:101
+msgid "created index of plugins"
+msgstr ""
+
+#: Core.py:147
+msgid "new update on pyload.de.rw:"
+msgstr ""
+
+#: Core.py:149
+msgid "newst update in use:"
+msgstr ""
+
+#: Core.py:151
+msgid "beta version in use:"
+msgstr ""
+
+#: Core.py:160
+msgid "created"
+msgstr ""
+
+#: Core.py:162
+msgid "could not create "
+msgstr ""
+