From 5525a167566d5de569292f67857ec2454c8f5cd1 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 3 Feb 2010 16:18:03 +0100 Subject: some l18n stuff --- module/web/locale/de/LC_MESSAGES/django.mo | Bin 0 -> 449 bytes module/web/locale/de/LC_MESSAGES/django.po | 186 ++++++++++++++++++++++++++++ module/web/locale/en/LC_MESSAGES/django.mo | Bin 0 -> 367 bytes module/web/locale/en/LC_MESSAGES/django.po | 186 ++++++++++++++++++++++++++++ module/web/pyload/views.py | 7 +- module/web/settings.py | 5 +- module/web/templates/default/add.html | 12 -- module/web/templates/default/base.html | 37 +++--- module/web/templates/default/downloads.html | 5 +- module/web/templates/default/home.html | 13 +- module/web/templates/default/login.html | 9 +- module/web/templates/default/logout.html | 3 +- module/web/templates/default/logs.html | 3 +- module/web/templates/default/queue.html | 13 +- module/web/templates/default/window.html | 21 ++-- 15 files changed, 435 insertions(+), 65 deletions(-) create mode 100644 module/web/locale/de/LC_MESSAGES/django.mo create mode 100644 module/web/locale/de/LC_MESSAGES/django.po create mode 100644 module/web/locale/en/LC_MESSAGES/django.mo create mode 100644 module/web/locale/en/LC_MESSAGES/django.po delete mode 100644 module/web/templates/default/add.html (limited to 'module') diff --git a/module/web/locale/de/LC_MESSAGES/django.mo b/module/web/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 000000000..5136d5503 Binary files /dev/null and b/module/web/locale/de/LC_MESSAGES/django.mo differ diff --git a/module/web/locale/de/LC_MESSAGES/django.po b/module/web/locale/de/LC_MESSAGES/django.po new file mode 100644 index 000000000..4a262d5ac --- /dev/null +++ b/module/web/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,186 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-03 15:16+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pyload/views.py:26 +msgid "" +"Can't connect to pyLoad. Please check your configuration and make sure " +"pyLoad is running." +msgstr "" + +#: pyload/views.py:47 +msgid "You don't have permission to view this page." +msgstr "" + +#: pyload/views.py:88 +msgid "Download directory not found." +msgstr "" + +#: templates/default/base.html:21 templates/default/base.html.py:184 +msgid "Webinterface" +msgstr "" + +#: templates/default/base.html:126 +msgid "Logout" +msgstr "" + +#: templates/default/base.html:128 +msgid "Administrate" +msgstr "" + +#: templates/default/base.html:134 +msgid "Please Login!" +msgstr "" + +#: templates/default/base.html:146 templates/default/queue.html:78 +msgid "Home" +msgstr "" + +#: templates/default/base.html:149 templates/default/queue.html:75 +#: templates/default/queue.html.py:79 +msgid "Queue" +msgstr "" + +#: templates/default/base.html:151 templates/default/downloads.html:20 +#: templates/default/queue.html:80 +msgid "Downloads" +msgstr "" + +#: templates/default/base.html:153 templates/default/logs.html:4 +#: templates/default/queue.html:81 +msgid "Logs" +msgstr "" + +#: templates/default/base.html:165 +msgid "Play" +msgstr "" + +#: templates/default/base.html:166 +msgid "Cancel" +msgstr "" + +#: templates/default/base.html:167 +msgid "Stop" +msgstr "" + +#: templates/default/base.html:168 +msgid "Add" +msgstr "" + +#: templates/default/base.html:174 +msgid "Speed:" +msgstr "" + +#: templates/default/base.html:175 +msgid "Active:" +msgstr "" + +#: templates/default/base.html:176 +msgid "Reload page" +msgstr "" + +#: templates/default/base.html:204 +msgid "© 2008-2010 the pyLoad Team" +msgstr "© 2008-2010 das pyLoad Team" + +#: templates/default/base.html:206 +msgid "Back to top" +msgstr "" + +#: templates/default/downloads.html:25 +msgid "It's recommend not to download Files bigger than ~10MB from here." +msgstr "" + +#: templates/default/home.html:198 +msgid "Active Downloads" +msgstr "" + +#: templates/default/home.html:205 templates/default/window.html:11 +msgid "Name" +msgstr "" + +#: templates/default/home.html:206 +msgid "Status" +msgstr "" + +#: templates/default/home.html:207 +msgid "Infos" +msgstr "" + +#: templates/default/home.html:208 +msgid "Size" +msgstr "" + +#: templates/default/home.html:209 +msgid "Progress" +msgstr "" + +#: templates/default/login.html:4 +msgid "Login" +msgstr "" + +#: templates/default/login.html:15 +msgid "Username" +msgstr "" + +#: templates/default/login.html:20 +msgid "Password" +msgstr "" + +#: templates/default/login.html:30 +msgid "Your username and password didn't match. Please try again." +msgstr "" + +#: templates/default/logout.html:9 +msgid "You were successfully logged out." +msgstr "" + +#: templates/default/queue.html:105 +msgid "Folder:" +msgstr "" + +#: templates/default/window.html:9 templates/default/window.html.py:26 +msgid "Add Package" +msgstr "" + +#: templates/default/window.html:10 +msgid "Paste your links or upload a container." +msgstr "" + +#: templates/default/window.html:12 +msgid "The name of the new package." +msgstr "" + +#: templates/default/window.html:16 +msgid "Links" +msgstr "" + +#: templates/default/window.html:17 +msgid "Paste your links here" +msgstr "" + +#: templates/default/window.html:21 +msgid "File" +msgstr "" + +#: templates/default/window.html:22 +msgid "Upload a container." +msgstr "" + +#: templates/default/window.html:27 +msgid "Reset" +msgstr "" diff --git a/module/web/locale/en/LC_MESSAGES/django.mo b/module/web/locale/en/LC_MESSAGES/django.mo new file mode 100644 index 000000000..3fb287c3d Binary files /dev/null and b/module/web/locale/en/LC_MESSAGES/django.mo differ diff --git a/module/web/locale/en/LC_MESSAGES/django.po b/module/web/locale/en/LC_MESSAGES/django.po new file mode 100644 index 000000000..4f7f93de7 --- /dev/null +++ b/module/web/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,186 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-03 15:16+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pyload/views.py:26 +msgid "" +"Can't connect to pyLoad. Please check your configuration and make sure " +"pyLoad is running." +msgstr "" + +#: pyload/views.py:47 +msgid "You don't have permission to view this page." +msgstr "" + +#: pyload/views.py:88 +msgid "Download directory not found." +msgstr "" + +#: templates/default/base.html:21 templates/default/base.html.py:184 +msgid "Webinterface" +msgstr "" + +#: templates/default/base.html:126 +msgid "Logout" +msgstr "" + +#: templates/default/base.html:128 +msgid "Administrate" +msgstr "" + +#: templates/default/base.html:134 +msgid "Please Login!" +msgstr "" + +#: templates/default/base.html:146 templates/default/queue.html:78 +msgid "Home" +msgstr "" + +#: templates/default/base.html:149 templates/default/queue.html:75 +#: templates/default/queue.html.py:79 +msgid "Queue" +msgstr "" + +#: templates/default/base.html:151 templates/default/downloads.html:20 +#: templates/default/queue.html:80 +msgid "Downloads" +msgstr "" + +#: templates/default/base.html:153 templates/default/logs.html:4 +#: templates/default/queue.html:81 +msgid "Logs" +msgstr "" + +#: templates/default/base.html:165 +msgid "Play" +msgstr "" + +#: templates/default/base.html:166 +msgid "Cancel" +msgstr "" + +#: templates/default/base.html:167 +msgid "Stop" +msgstr "" + +#: templates/default/base.html:168 +msgid "Add" +msgstr "" + +#: templates/default/base.html:174 +msgid "Speed:" +msgstr "" + +#: templates/default/base.html:175 +msgid "Active:" +msgstr "" + +#: templates/default/base.html:176 +msgid "Reload page" +msgstr "" + +#: templates/default/base.html:204 +msgid "© 2008-2010 the pyLoad Team" +msgstr "" + +#: templates/default/base.html:206 +msgid "Back to top" +msgstr "" + +#: templates/default/downloads.html:25 +msgid "It's recommend not to download Files bigger than ~10MB from here." +msgstr "" + +#: templates/default/home.html:198 +msgid "Active Downloads" +msgstr "" + +#: templates/default/home.html:205 templates/default/window.html:11 +msgid "Name" +msgstr "" + +#: templates/default/home.html:206 +msgid "Status" +msgstr "" + +#: templates/default/home.html:207 +msgid "Infos" +msgstr "" + +#: templates/default/home.html:208 +msgid "Size" +msgstr "" + +#: templates/default/home.html:209 +msgid "Progress" +msgstr "" + +#: templates/default/login.html:4 +msgid "Login" +msgstr "" + +#: templates/default/login.html:15 +msgid "Username" +msgstr "" + +#: templates/default/login.html:20 +msgid "Password" +msgstr "" + +#: templates/default/login.html:30 +msgid "Your username and password didn't match. Please try again." +msgstr "" + +#: templates/default/logout.html:9 +msgid "You were successfully logged out." +msgstr "" + +#: templates/default/queue.html:105 +msgid "Folder:" +msgstr "" + +#: templates/default/window.html:9 templates/default/window.html.py:26 +msgid "Add Package" +msgstr "" + +#: templates/default/window.html:10 +msgid "Paste your links or upload a container." +msgstr "" + +#: templates/default/window.html:12 +msgid "The name of the new package." +msgstr "" + +#: templates/default/window.html:16 +msgid "Links" +msgstr "" + +#: templates/default/window.html:17 +msgid "Paste your links here" +msgstr "" + +#: templates/default/window.html:21 +msgid "File" +msgstr "" + +#: templates/default/window.html:22 +msgid "Upload a container." +msgstr "" + +#: templates/default/window.html:27 +msgid "Reset" +msgstr "" diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index ea9d5f1be..37470c98f 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -14,6 +14,7 @@ from django.http import HttpResponse from django.http import HttpResponseNotFound from django.shortcuts import render_to_response from django.template import RequestContext +from django.utils.translation import ugettext as _ def check_server(function): @@ -22,7 +23,7 @@ def check_server(function): try: version = settings.PYLOAD.get_server_version() except Exception, e: - return base(request, messages=['Can\'t connect to pyLoad. Please check your configuration and make sure pyLoad is running.', str(e)]) + return base(request, messages=[_('Can\'t connect to pyLoad. Please check your configuration and make sure pyLoad is running.'), str(e)]) return view_func(request, * args, ** kwargs) _view.__name__ = view_func.__name__ @@ -43,7 +44,7 @@ def permission(perm): if request.user.has_perm(perm) and request.user.is_authenticated(): return view_func(request, * args, ** kwargs) else: - return base(request, messages=['You don\'t have permission to view this page.']) + return base(request, messages=[_('You don\'t have permission to view this page.')]) _view.__name__ = view_func.__name__ _view.__dict__ = view_func.__dict__ @@ -84,7 +85,7 @@ def queue(request): @check_server def downloads(request): if not isdir(settings.DL_ROOT): - return base(request, ['Download directory not found.']) + return base(request, [_('Download directory not found.')]) data = { 'folder': [], 'files': [] diff --git a/module/web/settings.py b/module/web/settings.py index dff1dc29d..2199ab221 100644 --- a/module/web/settings.py +++ b/module/web/settings.py @@ -64,7 +64,7 @@ TIME_ZONE = 'Europe' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'en' SITE_ID = 1 @@ -106,8 +106,9 @@ TEMPLATE_LOADERS = ( MIDDLEWARE_CLASSES = ( 'django.middleware.gzip.GZipMiddleware', 'django.middleware.http.ConditionalGetMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ) diff --git a/module/web/templates/default/add.html b/module/web/templates/default/add.html deleted file mode 100644 index 525cb99bd..000000000 --- a/module/web/templates/default/add.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'default/base.html' %} - -{% block subtitle %} -Add Links / Container -{% endblock %} - - - -{% block content %} - - -{% endblock %} \ No newline at end of file diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index 2a2490088..720453a30 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -1,3 +1,4 @@ +{% load i18n %} @@ -17,7 +18,7 @@ -{% block title %}pyLoad Webinterface{% endblock %} +{% block title %}pyLoad {% trans "Webinterface" %}{% endblock %} {% endblock %} -{% block title %}Queue - {{block.super}} {% endblock %} +{% block title %}{% trans "Queue" %} - {{block.super}} {% endblock %} {% block menu %} -
  • Home
  • -
  • Queue
  • -
  • Downloads
  • -
  • Logs
  • +
  • {% trans "Home" %}
  • +
  • {% trans "Queue" %}
  • +
  • {% trans "Downloads" %}
  • +
  • {% trans "Logs" %}
  • {% endblock %} {% block content %} @@ -101,7 +102,7 @@ document.addEvent("domready", function(){ {{ child.status_type }}{{child.status_error}}  {{ child.size }} KB {{ child.plugin }} - Folder: {{child.folder}} + {% trans "Folder:" %} {{child.folder}}       diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html index 7e5c249e6..11ac8056c 100644 --- a/module/web/templates/default/window.html +++ b/module/web/templates/default/window.html @@ -1,3 +1,4 @@ +{% load i18n %} @@ -5,25 +6,25 @@
    -

    Add Package

    -

    Paste your links or upload a container.

    -