summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-10 14:07:44 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-10 14:07:44 +0100
commit626cea75e122729a76efbbf98011d39d22f72fee (patch)
tree6f4b023a7f35c4684185ece5be039cb78a24d6a3 /module
parentwebif user managment (diff)
downloadpyload-626cea75e122729a76efbbf98011d39d22f72fee.tar.xz
new l18n files
Diffstat (limited to 'module')
-rw-r--r--module/gui/Overview.py4
-rw-r--r--module/gui/connector.py2
-rw-r--r--module/plugins/hoster/BasePlugin.py2
-rw-r--r--module/setup.py19
-rw-r--r--module/web/media/default/js/settings_ui.js7
-rw-r--r--module/web/templates/default/admin.html3
-rw-r--r--module/web/templates/default/settings.html4
7 files changed, 31 insertions, 10 deletions
diff --git a/module/gui/Overview.py b/module/gui/Overview.py
index 72daf2e46..edc2e9ccc 100644
--- a/module/gui/Overview.py
+++ b/module/gui/Overview.py
@@ -176,9 +176,9 @@ class OverviewDelegate(QItemDelegate):
return size
if progress in (0,100):
- sizeline = QString(_("Size: %s") % formatSize(maxSize))
+ sizeline = QString(_("Size:") + "%s" % formatSize(maxSize))
else:
- sizeline = QString(_("Size: %s / %s") % (formatSize(currentSize), formatSize(maxSize)))
+ sizeline = QString(_("Size:") + "%s / %s" % (formatSize(currentSize), formatSize(maxSize)))
f = painter.font()
f.setPointSize(12)
diff --git a/module/gui/connector.py b/module/gui/connector.py
index 594a0c316..634912f64 100644
--- a/module/gui/connector.py
+++ b/module/gui/connector.py
@@ -88,7 +88,7 @@ class Connector(QObject):
self.connectionID = uuid().hex
if not server_version == SERVER_VERSION:
- self.emit(SIGNAL("errorBox"), _("server is version %s client accepts version %s") % (server_version, SERVER_VERSION))
+ self.emit(SIGNAL("errorBox"), _("server is version %(new)s client accepts version %(current)s") % { "new": server_version, "current": SERVER_VERSION})
return False
return True
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index d9ba3c166..0248ca624 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -32,8 +32,6 @@ class BasePlugin(Hoster):
#
# return
- self.decryptCaptcha("http://localhost:9000/captcha")
-
if pyfile.url.startswith("http"):
pyfile.name = re.findall("([^/=]+)", pyfile.url)[-1]
diff --git a/module/setup.py b/module/setup.py
index 9be040b4e..856bd0ea7 100644
--- a/module/setup.py
+++ b/module/setup.py
@@ -234,8 +234,25 @@ class Setup():
self.print_dep("PyQt4", gui)
print ""
+ jinja = True
- web = sqlite
+ try:
+ import jinja2
+ if jinja2.__version__ and not jinja2.__version__.startswith("2.5"): #@TODO: could be to new aswell
+ print _("Your installed jinja2 version %s is too old.") % jinja2.__version__
+ print _("Please upgrade or deinstall it, pyLoad includes a sufficient jinja2 libary.")
+ print
+ jinja = False
+ except :
+ pass
+
+
+ self.print_dep("jinja2", jinja)
+ beaker = self.check_module("beaker")
+ self.print_dep("beaker", beaker)
+
+
+ web = sqlite and jinja and beaker
from module import JsEngine
diff --git a/module/web/media/default/js/settings_ui.js b/module/web/media/default/js/settings_ui.js
index 77b28c39c..338556675 100644
--- a/module/web/media/default/js/settings_ui.js
+++ b/module/web/media/default/js/settings_ui.js
@@ -1,3 +1,4 @@
+var success_msg,failed_msg;
var account_dialog;
function show_account_dialog() {
@@ -82,13 +83,13 @@ var SettingsUI = new Class({
"method": "post",
"url": "/json/save_config/" + category,
"onSuccess" : function() {
- notify.alert('Settings saved', {
+ notify.alert(success_msg, {
'className': 'success'
});
},
"onFailure": function() {
- notify.alert('Error occured', {
+ notify.alert(failed_msg, {
'className': 'error'
});
}
@@ -108,7 +109,7 @@ var SettingsUI = new Class({
window.location.reload()
},
"onFailure": function() {
- notify.alert('Error occured', {
+ notify.alert(failed_msg, {
'className': 'error'
});
}
diff --git a/module/web/templates/default/admin.html b/module/web/templates/default/admin.html
index 5b6be26eb..5be649de7 100644
--- a/module/web/templates/default/admin.html
+++ b/module/web/templates/default/admin.html
@@ -5,7 +5,8 @@
{% block content %}
-{{ _("Note: You can only change permissions for webinterface.") }} {{ _("To add user or change passwords use:") }} <b>python pyLoadCore.py -u</b><br>
+{{ _("Note: You can only change permissions for webinterface.") }}
+{{ _("To add user or change passwords use:") }} <b>python pyLoadCore.py -u</b><br>
{{ _("Important: Admin user have always all permissions! Only Admin user can use other clients like CLI and GUI.") }}
<form action="" method="POST">
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html
index 69ab39292..a62aab99f 100644
--- a/module/web/templates/default/settings.html
+++ b/module/web/templates/default/settings.html
@@ -9,6 +9,10 @@
<script type="text/javascript" src="/media/default/js/settings_ui.js"></script>
<script type="text/javascript">
+
+ success_msg = "{{ _("Settings saved.") }}";
+ failed_msg = "{{ _("Error occured.") }}";
+
window.addEvent('domready', function() {
account_dialog = new Fx.Tween($("account_box"));