Browse Source

add django-rosetta to make translators' lives easier:

A Django application that eases the translation process of your Django projects
   <http://code.google.com/p/django-rosetta/>
Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
ff90422d0d
  1. 37
      COPYRIGHT
  2. 36
      pyweb/rosetta/__init__.py
  3. 24
      pyweb/rosetta/conf/__init__.py
  4. 61
      pyweb/rosetta/conf/settings.py
  5. BIN
      pyweb/rosetta/locale/de/LC_MESSAGES/django.mo
  6. 174
      pyweb/rosetta/locale/de/LC_MESSAGES/django.po
  7. BIN
      pyweb/rosetta/locale/es/LC_MESSAGES/django.mo
  8. 171
      pyweb/rosetta/locale/es/LC_MESSAGES/django.po
  9. BIN
      pyweb/rosetta/locale/fr/LC_MESSAGES/django.mo
  10. 172
      pyweb/rosetta/locale/fr/LC_MESSAGES/django.po
  11. BIN
      pyweb/rosetta/locale/hu/LC_MESSAGES/django.mo
  12. 165
      pyweb/rosetta/locale/hu/LC_MESSAGES/django.po
  13. BIN
      pyweb/rosetta/locale/it/LC_MESSAGES/django.mo
  14. 168
      pyweb/rosetta/locale/it/LC_MESSAGES/django.po
  15. BIN
      pyweb/rosetta/locale/nl/LC_MESSAGES/django.mo
  16. 171
      pyweb/rosetta/locale/nl/LC_MESSAGES/django.po
  17. BIN
      pyweb/rosetta/locale/pl/LC_MESSAGES/django.mo
  18. 170
      pyweb/rosetta/locale/pl/LC_MESSAGES/django.po
  19. BIN
      pyweb/rosetta/locale/ru/LC_MESSAGES/django.mo
  20. 163
      pyweb/rosetta/locale/ru/LC_MESSAGES/django.po
  21. BIN
      pyweb/rosetta/locale/uk/LC_MESSAGES/django.mo
  22. 162
      pyweb/rosetta/locale/uk/LC_MESSAGES/django.po
  23. 26
      pyweb/rosetta/models.py
  24. 1443
      pyweb/rosetta/polib.py
  25. 114
      pyweb/rosetta/poutil.py
  26. 41
      pyweb/rosetta/templates/rosetta/base.html
  27. 28
      pyweb/rosetta/templates/rosetta/css/rosetta.css
  28. 57
      pyweb/rosetta/templates/rosetta/js/rosetta.js
  29. 45
      pyweb/rosetta/templates/rosetta/languages.html
  30. 125
      pyweb/rosetta/templates/rosetta/pofile.html
  31. 24
      pyweb/rosetta/templatetags/__init__.py
  32. 77
      pyweb/rosetta/templatetags/rosetta.py
  33. 32
      pyweb/rosetta/urls.py
  34. 322
      pyweb/rosetta/views.py
  35. 1
      pyweb/settings.py

37
COPYRIGHT

@ -132,3 +132,40 @@ License of Mumble (valid for both the images and Murmur*.ice):
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===============================================================================
The directory pyweb/rosetta provides the rosetta Django application that allows
easy editing of Django's translation files. The app is published on Google Code
under the MIT license: <http://code.google.com/p/django-rosetta/>
Upstream Author:
mbonetti <http://code.google.com/u/mbonetti/>
Copyright:
<Copyright © 2010, mbonetti>
All rights reserved.
License:
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

36
pyweb/rosetta/__init__.py

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""
VERSION = (0, 5, 1)
def get_version(svn=False, limit=3):
"Returns the version as a human-format string."
v = '.'.join([str(i) for i in VERSION[:limit]])
if svn and limit >= 3:
from django.utils.version import get_svn_revision
import os
svn_rev = get_svn_revision(os.path.dirname(__file__))
if svn_rev:
v = '%s.%s' % (v, svn_rev)
return v

24
pyweb/rosetta/conf/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""

61
pyweb/rosetta/conf/settings.py

@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""
from django.conf import settings
# Number of messages to display per page.
MESSAGES_PER_PAGE = getattr(settings,'ROSETTA_MESSAGES_PER_PAGE',10)
# Enable Google translation suggestions
ENABLE_TRANSLATION_SUGGESTIONS = getattr(settings,'ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS',True)
# Displays this language beside the original MSGID in the admin
MAIN_LANGUAGE = getattr(settings,'ROSETTA_MAIN_LANGUAGE', None)
"""
When running WSGI daemon mode, using mod_wsgi 2.0c5 or later, this setting
controls whether the contents of the gettext catalog files should be
automatically reloaded by the WSGI processes each time they are modified.
Notes:
* The WSGI daemon process must have write permissions on the WSGI script file
(as defined by the WSGIScriptAlias directive.)
* WSGIScriptReloading must be set to On (it is by default)
* For performance reasons, this setting should be disabled in production environments
* When a common rosetta installation is shared among different Django projects,
each one running in its own distinct WSGI virtual host, you can activate
auto-reloading in individual projects by enabling this setting in the project's
own configuration file, i.e. in the project's settings.py
Refs:
* http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
* http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIReloadMechanism
"""
WSGI_AUTO_RELOAD = getattr(settings,'ROSETTA_WSGI_AUTO_RELOAD', False)

BIN
pyweb/rosetta/locale/de/LC_MESSAGES/django.mo

174
pyweb/rosetta/locale/de/LC_MESSAGES/django.po

@ -0,0 +1,174 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"PO-Revision-Date: 2008-06-16 10:11+0100\n"
"Last-Translator: Martin Mahner <martin@mahner.org>\n"
"Language-Team: patrick lauber <patrick.lauber@divio.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: SWITZERLAND\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Home"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Sprachwahl"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr ""
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Fortschritt"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Texte"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Übersetzt"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr "Unscharf"
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Veraltet"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Datei"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr "Nichts zu übersetzen!"
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
"Sie haben keine Sprachen in der Einstellungsdatei definiert oder bis jetzt "
"noch keine Übersetzungskataloge generiert."
# python-format
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
"Unter <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</a> finden "
"Sie eine Anleitung, wie sie Internationalisierung in Ihrem Projekt "
"einrichten."
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Wähle eine andere Datei"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Laden sie diesen Katalog herunter"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Fortschritt: %(percent_translated)s%"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr ""
"Datei ist schreibgeschützt: Laden Sie die Datei herunter wenn sie mit dem "
"Editieren fertig sind!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Englisch"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Übersetze in %(rosetta_i18n_lang_name)s"
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Anzeige:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Nur unübersetzte"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Nur übersetzte"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr "Nur unscharfe"
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr "Alle"
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Suchen"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Los"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr "Original"
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Gefunden in"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr "vorschlagen"
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] "%(more_count)s mehr"
msgstr[1] "%(more_count)s mehr"
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Speichern und nächsten Block übersetzen"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Zur Seite:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Anzeigen:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s Text"
msgstr[1] "%(hits)s/%(message_number)s Texte"
#~ msgid "Both"
#~ msgstr "Beide"

BIN
pyweb/rosetta/locale/es/LC_MESSAGES/django.mo

171
pyweb/rosetta/locale/es/LC_MESSAGES/django.po

@ -0,0 +1,171 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"PO-Revision-Date: 2008-11-30 12:12\n"
"Last-Translator: <antonio.mele@django.es>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Translated-Using: django-rosetta 0.4.RC2\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Inicio"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Selección de idioma"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr ""
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Progreso"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Mensajes"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Traducido"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr "Velloso"
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Obsoleto"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Archivo"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr "¡Nada que traducir!"
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
"No has especificado ningún idioma en tu archivo de settings o no has "
"generado todavía un batch para traducción de catálogos."
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
"Por favor visita la <a href=\"%(i18n_doc_link)s\">Documentación de Django "
"sobre I18N</a> para obtener una guía sobre cómo añadir internacionalización "
"a tu proyecto."
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Selecciona otro archivo"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Descarga este catálogo"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Progreso: %(percent_translated)s%"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr ""
"El archivo está en modo lectura: ¡Descarga el archivo cuando termines de "
"editarlo!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Inglés"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Traducir al %(rosetta_i18n_lang_name)s "
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Pantalla:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Sin traducir sólo"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Traducidos sólo"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr "Vellosos sólo"
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr ""
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Búsqueda"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Ir"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr ""
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Ocurrencia(s)"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr "sugerir"
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] "%(more_count)s más"
msgstr[1] "%(more_count)s más"
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Guardar y traducir siguiente bloque"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Ir a la página:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Mostrando:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s mensaje"
msgstr[1] "%(hits)s/%(message_number)s mensajes"
#~ msgid "Both"
#~ msgstr "Ambos"

BIN
pyweb/rosetta/locale/fr/LC_MESSAGES/django.mo

172
pyweb/rosetta/locale/fr/LC_MESSAGES/django.po

@ -0,0 +1,172 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"PO-Revision-Date: 2008-09-22 11:02\n"
"Last-Translator: Admin Admin <admin@admin.com>\n"
"Language-Team: French <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Translated-Using: django-rosetta 0.4.RC2\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Accueil"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Sélection de la langue"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr "Application"
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Progression"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Messages"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Traduits"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr "Flous"
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Obsolètes"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Fichier"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr "Rien à Traduire!"
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
"Vous n'avez spécifié aucune langue dans votre fichier de configuration, ou "
"n'avez pas encore généré le catalogue initial de traductions pour votre "
"projet."
# python-format
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
"Veuillez vous référer à la <a href=\"%(i18n_doc_link)s\">documentation sur "
"l'internationalisation de Django</a> pour un guide sur comment activer et "
"configurer la traduction de votre projet."
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Choisir un autre fichier"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Télécharger ce catalogue"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Progression: %(percent_translated)s%"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr ""
"Fichier en seule lecture: télécharger le fichier à la fin de l'édition!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Anglais"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Traduire en %(rosetta_i18n_lang_name)s"
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Afficher:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Non-traduits uniquement"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Traduits uniquement"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr "Flous uniquement"
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr "Tous"
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Recherche"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Go"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr "Original"
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Occurrences(s)"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr "suggérer"
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] "%(more_count)s de plus"
msgstr[1] "%(more_count)s de plus"
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Sauver et traduire le prochain bloc"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Passer à la page:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Affichés:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s message"
msgstr[1] " %(hits)s/%(message_number)s messages"
#~ msgid "Both"
#~ msgstr "Les deux"

BIN
pyweb/rosetta/locale/hu/LC_MESSAGES/django.mo

165
pyweb/rosetta/locale/hu/LC_MESSAGES/django.po

@ -0,0 +1,165 @@
# Copyright (C) 2008
# Gergely Kontra <pihentagy+rosetta@gmail.com>, 2008.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"PO-Revision-Date: 2008-10-09 19:08+0100\n"
"Last-Translator: Gergely Kontra <pihentagy@yahoo.com>\n"
"Language-Team: nomail <hu@example.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Translated-Using: django-rosetta 0.4.RC2\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Főoldal"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Nyelvválasztás"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr ""
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Állapot"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Üzenet"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Lefordítva"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr ""
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Elavult"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Fájl"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr "Nincs mit fordítani!"
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
"Nincs beállítva egyetlen nyelv sem van nem hozott létre egy fordítási "
"katalóguskoteget."
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
"Projekted többnyelvűvé alakításához lásd a <a href=\"%(i18n_doc_link)s"
"\">Django I18N dokumentációt</a>!"
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Másik fájl választása"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Katalógus letöltése"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "%(percent_translated)s% kész"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr "A fájl írásvédett: töltse le a katalógust, ha végzett!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Angol"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Fordítsa %(rosetta_i18n_lang_name)s nyelvre"
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Szűrés:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Fordításra vár"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Lefordított"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr ""
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr ""
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Keresés"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Keress"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr ""
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Előfordulások"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr "ajánl"
#: templates/rosetta/pofile.html:84
#, fuzzy, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] "még %(more_count)s"
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Mentés"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Ugorj erre az oldalra:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Szűrés:"
#: templates/rosetta/pofile.html:115
#, fuzzy, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s üzenet"
#~ msgid "Both"
#~ msgstr "Minden"

BIN
pyweb/rosetta/locale/it/LC_MESSAGES/django.mo

168
pyweb/rosetta/locale/it/LC_MESSAGES/django.po

@ -0,0 +1,168 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"Last-Translator: Marco Bonetti <mbi@mbi.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Inizio"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Selezione della lingua"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr "Applicazione"
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Progressione"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Messaggio"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Tradotto"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr ""
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Obsoleto"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "File"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr "Nulla da tradurre!"
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
"Non avete specificato nessuna lingua nelle vostre impostazioni, o non avete "
"ancore generato un catalogo iniziale da tradurre."
# python-format
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
"Vogliate riferirvi alla <a href=\"%(i18n_doc_link)s\">documentazione "
"sull'internazionalizzazione di Django</a> per una giuda su come impostare le "
"traduzioni per il vostro progetto."
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Scegliere un altro file"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Scaricare il catalogo"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Progressione: %(percent_translated)s%"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr "file in solo lettura: scaricare il file alla fine dell'edizione!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Inglese"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Tradurre verso il %(rosetta_i18n_lang_name)s"
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Mostra:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Solo non tradotti"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Solo tradotti"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr "Solo fuzzy"
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr "Tutti"
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Cercare"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Via"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr "Originale"
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Occorrenze"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr "suggerire"
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] "un altro"
msgstr[1] "ancora %(more_count)s"
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Salvare e tradurre il prossimo blocco"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Passare alla pagina:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Mostrato:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s messaggio"
msgstr[1] "%(hits)s/%(message_number)s messaggi"
#~ msgid "Both"
#~ msgstr "Entrambi"

BIN
pyweb/rosetta/locale/nl/LC_MESSAGES/django.mo

171
pyweb/rosetta/locale/nl/LC_MESSAGES/django.po

@ -0,0 +1,171 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2008 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the rosetta package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"PO-Revision-Date: 2008-06-05 17:06+0200\n"
"Last-Translator: Joost Cassee <cassee@gmail.com>\n"
"Language-Team: Joost Cassee <cassee@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Voorpagina"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Taalselectie"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr ""
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Voortgang"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Berichten"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Vertaald"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr ""
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Niet meer gebruikt"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Bestand"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr "Niets te vertalen!"
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
"U heeft geen talen gespecificeerd in het bestand settings.py of nog geen "
"catalogus gegenereerd."
# python-format
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
"Zie <a href=\"%(i18n_doc_link)s\">Django's I18N documentatie</a> (Engels) "
"voor meer informatie over internationalisatie."
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Selecteer een ander bestand"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Download deze catalogus"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Voortgang: %(percent_translated)s%"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr ""
"Dit is bestand is alleen-lezen; download dit bestand wanneer u klaar bent "
"met bewerken!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Engels"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Vertalen in het %(rosetta_i18n_lang_name)s"
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Beeld:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Alleen onvertaald"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Alleen vertaald"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr ""
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr ""
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Zoeken"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Ga"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr ""
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Gevonden in"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr ""
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] ""
msgstr[1] ""
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Opslaan en volgende blok vertalen"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Snel naar pagina:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Tonen:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s bericht"
msgstr[1] "%(hits)s/%(message_number)s berichten"
#~ msgid "Both"
#~ msgstr "Beide"

BIN
pyweb/rosetta/locale/pl/LC_MESSAGES/django.mo

170
pyweb/rosetta/locale/pl/LC_MESSAGES/django.po

@ -0,0 +1,170 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"PO-Revision-Date: 2008-09-12 12:16\n"
"Last-Translator: <tomasz@napierala.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Translated-Using: django-rosetta 0.4.RC2\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Początek"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Wybór języka"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr ""
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Postęp"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Komunikaty"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Przetłumaczone"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr ""
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Przestarzałe"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Plik"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr "Nie ma nic do przetłumaczenia!"
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
"Nie podałeś żadnych języków w plikach ustawień, lub nie wygenerowałeś "
"jeszcze katalogów do tłumaczeń."
# python-format
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
"Sprawdź pomoc dotyczącą <a href=\"%(i18n_doc_link)s\">internacjonalizacji "
"Django I18N </a>, aby znaleźć dokumentację na temat internacjonalizacji "
"twojego projektu."
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Wybierz inny plik"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Pobierz ten katalog"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Postęp: %(percent_translated)s %"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr "Plik jest tylko do odczytu: pobierz go kiedy skończysz edytować"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Angielski"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Przetłumacz na %(rosetta_i18n_lang_name)s "
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Wyświetl:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Tylko nieprzetłumaczone"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Tylko przetłumaczone"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr ""
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr ""
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Szukaj"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Idź"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr ""
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Wystąpienie(a)"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr "sugeruj"
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] "%(more_count)s więcej"
msgstr[1] "%(more_count)s więcej"
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Zapisz i tłumacz następny blok"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Przejdź do strony:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Wyświetlanie:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s komunikat"
msgstr[1] "%(hits)s/%(message_number)s komunikatów"
#~ msgid "Both"
#~ msgstr "Oba"

BIN
pyweb/rosetta/locale/ru/LC_MESSAGES/django.mo

163
pyweb/rosetta/locale/ru/LC_MESSAGES/django.po

@ -0,0 +1,163 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"Last-Translator: Nazar Leush <nazar@pleso.net>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Начало"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Выбор языка"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr ""
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Обработано"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Сообщений"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "С переводом"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr ""
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Устаревших"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Файл"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr ""
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Выбрать другой файл"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Скачать этот каталог"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Обработано: %(percent_translated)s%"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr ""
"Файл только для чтения: загрузите файл после завершения редактирования!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Английский"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Перевод на %(rosetta_i18n_lang_name)s"
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Отображать:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Только без перевода"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Только с переводом"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr ""
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr ""
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Поиск"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Вперёд"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr ""
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Встречается в"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr ""
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] ""
msgstr[1] ""
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Сохранить и перевести следующий блок"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Перейти к странице:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Отображение:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s сообщение"
msgstr[1] "%(hits)s/%(message_number)s сообщений"
#~ msgid "Both"
#~ msgstr "Все"

BIN
pyweb/rosetta/locale/uk/LC_MESSAGES/django.mo

162
pyweb/rosetta/locale/uk/LC_MESSAGES/django.po

@ -0,0 +1,162 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Rosetta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 12:21+0200\n"
"Last-Translator: Nazar Leush <nazar@pleso.net>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: templates/rosetta/languages.html:3 templates/rosetta/pofile.html:13
msgid "Home"
msgstr "Домівка"
#: templates/rosetta/languages.html:3 templates/rosetta/languages.html.py:4
msgid "Language selection"
msgstr "Вибір мови"
#: templates/rosetta/languages.html:14
msgid "Application"
msgstr ""
#: templates/rosetta/languages.html:15
msgid "Progress"
msgstr "Завершено"
#: templates/rosetta/languages.html:16
msgid "Messages"
msgstr "Повідомлень"
#: templates/rosetta/languages.html:17
msgid "Translated"
msgstr "Перекладено"
#: templates/rosetta/languages.html:18 templates/rosetta/pofile.html:48
msgid "Fuzzy"
msgstr ""
#: templates/rosetta/languages.html:19
msgid "Obsolete"
msgstr "Застарілих"
#: templates/rosetta/languages.html:20
msgid "File"
msgstr "Файл"
#: templates/rosetta/languages.html:41
msgid "Nothing to translate!"
msgstr ""
#: templates/rosetta/languages.html:42
msgid ""
"You haven't specified any languages in your settings file, or haven't yet "
"generated a batch of translation catalogs."
msgstr ""
#: templates/rosetta/languages.html:43
#, python-format
msgid ""
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
"a> for a guide on how to set up internationalization for your project."
msgstr ""
#: templates/rosetta/pofile.html:7
msgid "Pick another file"
msgstr "Вибрати інший файл"
#: templates/rosetta/pofile.html:8
msgid "Download this catalog"
msgstr "Завантажити цей каталог"
#: templates/rosetta/pofile.html:16
msgid "Progress: %(percent_translated)s%"
msgstr "Завершено: %(percent_translated)s%"
#: templates/rosetta/pofile.html:17
msgid "File is read-only: download the file when done editing!"
msgstr "Файл тільки для читання: завантажте файл після завершення редагування!"
#: templates/rosetta/pofile.html:19
msgid "English"
msgstr "Англійська"
#: templates/rosetta/pofile.html:21
#, python-format
msgid "Translate into %(rosetta_i18n_lang_name)s"
msgstr "Переклад на %(rosetta_i18n_lang_name)s"
#: templates/rosetta/pofile.html:24
msgid "Display:"
msgstr "Відображати:"
#: templates/rosetta/pofile.html:25
msgid "Untranslated only"
msgstr "Тільки неперекладені"
#: templates/rosetta/pofile.html:26
msgid "Translated only"
msgstr "Тільки перекладені"
#: templates/rosetta/pofile.html:27
msgid "Fuzzy only"
msgstr ""
#: templates/rosetta/pofile.html:28
msgid "All"
msgstr ""
#: templates/rosetta/pofile.html:34
msgid "Search"
msgstr "Пошук"
#: templates/rosetta/pofile.html:36
msgid "Go"
msgstr "Вперед"
#: templates/rosetta/pofile.html:45
msgid "Original"
msgstr ""
#: templates/rosetta/pofile.html:49
msgid "Occurrences(s)"
msgstr "Зустрічається в"
#: templates/rosetta/pofile.html:73
msgid "suggest"
msgstr ""
#: templates/rosetta/pofile.html:84
#, python-format
msgid "%(more_count)s more"
msgid_plural "%(more_count)s more"
msgstr[0] ""
msgstr[1] ""
#: templates/rosetta/pofile.html:96
msgid "Save and translate next block"
msgstr "Записати і перекласти наступний блок"
#: templates/rosetta/pofile.html:100
msgid "Skip to page:"
msgstr "Перейти до сторінки:"
#: templates/rosetta/pofile.html:113
msgid "Displaying:"
msgstr "Відображення:"
#: templates/rosetta/pofile.html:115
#, python-format
msgid "%(hits)s/%(message_number)s message"
msgid_plural "%(hits)s/%(message_number)s messages"
msgstr[0] "%(hits)s/%(message_number)s повідомлення"
msgstr[1] "%(hits)s/%(message_number)s повідомлень"
#~ msgid "Both"
#~ msgstr "Всі"

26
pyweb/rosetta/models.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""
from django.db import models
# Create your models here.

1443
pyweb/rosetta/polib.py
File diff suppressed because it is too large
View File

114
pyweb/rosetta/poutil.py

@ -0,0 +1,114 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""
import re, string, sys, os
from django.conf import settings
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
def find_pos(lang, include_djangos = False, include_rosetta = False):
"""
scans a couple possible repositories of gettext catalogs for the given
language code
"""
paths = []
# project/locale
parts = settings.SETTINGS_MODULE.split('.')
project = __import__(parts[0], {}, {}, [])
paths.append(os.path.join(os.path.dirname(project.__file__), 'locale'))
# django/locale
if include_djangos:
paths.append(os.path.join(os.path.dirname(sys.modules[settings.__module__].__file__), 'locale'))
# settings
for localepath in settings.LOCALE_PATHS:
if os.path.isdir(localepath):
paths.append(localepath)
# project/app/locale
for appname in settings.INSTALLED_APPS:
if 'rosetta' == appname and include_rosetta == False:
continue
p = appname.rfind('.')
if p >= 0:
app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:])
else:
app = __import__(appname, {}, {}, [])
apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
if os.path.isdir(apppath):
paths.append(apppath)
ret = set()
rx=re.compile(r'(\w+)/../\1')
langs = (lang,)
if u'-' in lang:
_l,_c = map(lambda x:x.lower(),lang.split(u'-'))
langs += (u'%s_%s' %(_l, _c), u'%s_%s' %(_l, _c.upper()), )
elif u'_' in lang:
_l,_c = map(lambda x:x.lower(),lang.split(u'_'))
langs += (u'%s-%s' %(_l, _c), u'%s-%s' %(_l, _c.upper()), )
for path in paths:
for lang_ in langs:
dirname = rx.sub(r'\1', '%s/%s/LC_MESSAGES/' %(path,lang_))
for fn in ('django.po','djangojs.po',):
if os.path.isfile(dirname+fn):
ret.add(os.path.abspath(dirname+fn))
return list(ret)
def pagination_range(first,last,current):
r = []
r.append(first)
if first + 1 < last: r.append(first+1)
if current -2 > first and current -2 < last: r.append(current-2)
if current -1 > first and current -1 < last: r.append(current-1)
if current > first and current < last: r.append(current)
if current + 1 < last and current+1 > first: r.append(current+1)
if current + 2 < last and current+2 > first: r.append(current+2)
if last-1 > first: r.append(last-1)
r.append(last)
r = list(set(r))
r.sort()
prev = 10000
for e in r[:]:
if prev + 1 < e:
try:
r.insert(r.index(e), '...')
except ValueError:
pass
prev = e
return r

41
pyweb/rosetta/templates/rosetta/base.html

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="{{ADMIN_MEDIA_PREFIX}}css/base.css" type="text/css"/>
<link rel="stylesheet" href="{{ADMIN_MEDIA_PREFIX}}css/forms.css" type="text/css"/>
<link rel="stylesheet" href="{{ADMIN_MEDIA_PREFIX}}css/changelists.css" type="text/css"/>
<style type="text/css" media="screen">
{% include 'rosetta/css/rosetta.css' %}
</style>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
//<!--
google.load("jquery", "1.3");
{% if ENABLE_TRANSLATION_SUGGESTIONS %}google.load("language", "1");{% endif %}
{% include 'rosetta/js/rosetta.js' %}
//-->
</script>
<title>Rosetta - {% block pagetitle %}{% endblock %}</title>
</head>
<body>
<div id="container">
<div id="header">
{% block header %}
<div id="branding">
<h1 id="site-name"><a href="{% url rosetta-pick-file %}">Rosetta</a> </h1>
</div>
{% endblock %}
</div>
<div class="breadcrumbs">{% block breadcumbs %}{% endblock %}</div>
<div id="content" class="flex">
{% block main %}{% endblock %}
</div>
<div id="footer" class="breadcumbs">
<a href="http://code.google.com/p/django-rosetta">Rosetta</a> <span class="version">{{version}}</span>
</div>
</div>
</body>
</html>

28
pyweb/rosetta/templates/rosetta/css/rosetta.css

@ -0,0 +1,28 @@
#user-tools p span { margin-left:2em; }
table{width:100%;}
td.translation label {font-size: 95%;}
td.translation textarea, td.original { font-size:110%;}
td.translation,td.original {width:30%;}
td.original .plural-container { position:relative}
td.translation textarea{ width:98.5%; min-height:25px; margin:2px 0; }
.rtl td.translation textarea { direction: rtl;}
.plural span {display:block; margin:2px 0; position:absolute}
td.location code,td.location a { font-size:95%; display:block;}
td.location code.hide { display:none;}
.submit-row {margin-bottom:0;}
li.nobubble,li.nobubble:hover { background-image:none;}
.object-tools li.active, .object-tools li.active a { color:yellow;}
p.paginator input { float:right;}
p.paginator span.space { margin: 0 0.5em;}
.paginator {text-align:left; border:none; background:transparent; }
.paginator strong { margin-left:1em;}
th.r,td.r {text-align:right;}
th.c,td.c {text-align: center;}
td.original code {font-size:90%; padding: 0 1px; }
tr.row2 td.original code {background-color:#FFB2A5; padding: 0 0.3em;}
tr.row1 td.original code {background-color:#FFB2A5;}
.alert { font-weight:bold;padding:4px 5px 4px 25px; margin-left:1em; color: red; background:transparent url({{ADMIN_MEDIA_PREFIX}}img/admin/icon_alert.gif) 5px .3em no-repeat; }
#footer { clear:both; color:#999; font-size:9px; margin:0 6px; text-align:left;}
#changelist table tbody td:first-child, #changelist table thead th:first-child {text-align: left;}
td.hint {color: #777;}
div.module {margin-bottom: 20px;}

57
pyweb/rosetta/templates/rosetta/js/rosetta.js

@ -0,0 +1,57 @@
google.setOnLoadCallback(function() {
$('.location a').show().toggle(function() {
$('.hide', $(this).parent()).show();
}, function() {
$('.hide', $(this).parent()).hide();
});
{% if ENABLE_TRANSLATION_SUGGESTIONS %}
$('a.suggest').click(function() {
var a=$(this), str=a.html(); orig=$('.original', a.parents('tr')).html(),trans=$('textarea',a.parent());
orig = unescape(orig).replace(/<br\s?\/?>/g,'\n').replace(/<code>/g,'').replace(/<\/code>/g,'').replace(/&gt;/g,'>').replace(/&lt;/g,'<');
a.attr('class','suggesting').html('...');
google.language.translate(orig, "en", '{{rosetta_i18n_lang_code}}', function(result) {
if (!result.error) {
trans.val(unescape(result.translation).replace(/&#39;/g,'\'').replace(/&quot;/g,'"').replace(/%\s+(\([^\)]+\))\s*s/g,' %$1s '));
a.hide();
} else {
a.hide().before($('<span class="alert">'+result.error.message+'</span>'));
}
});
return false;
});
{% endif %}
$('td.plural').each(function(i) {
var td = $(this), trY = parseInt(td.closest('tr').offset().top);
$('textarea', $(this).closest('tr')).each(function(j) {
var textareaY= parseInt($(this).offset().top) - trY;
$($('.part',td).get(j)).css('top',textareaY + 'px');
});
});
$('.translation textarea').blur(function() {
if($(this).val()) {
$('.alert', $(this).parents('tr')).remove();
var RX = /%(?:\([^\s\)]*\))?[sdf]/g,
origs=$('.original', $(this).parents('tr')).html().match(RX),
trads=$(this).val().match(RX),
error = $('<span class="alert">Unmatched variables</span>');
if (origs && trads) {
for (var i = trads.length; i--;){
var key = trads[i];
if (-1 == $.inArray(key, origs)) {
$(this).before(error)
return false;
}
}
return true;
} else {
if (!(origs === null && trads === null)) {
$(this).before(error);
return false;
}
}
return true;
}
});
});

45
pyweb/rosetta/templates/rosetta/languages.html

@ -0,0 +1,45 @@
{% extends "rosetta/base.html" %}
{% load i18n %}
{% block breadcumbs %}<a href="{% url rosetta-pick-file %}">{% trans "Home" %}</a> &rsaquo; {% trans "Language selection" %}{% endblock %}
{% block pagetitle %}{% trans "Language selection" %}{% endblock %}
{% block main %}
{% if has_pos %}
{% for lid,language,pos in languages %}
{% if pos %}
<div class="module">
<h2>{{language}}</h2>
<table cellspacing="0">
<thead>
<tr>
<th>{% trans "Application" %}</th>
<th class="r">{% trans "Progress"%}</th>
<th class="r">{% trans "Messages" %}</th>
<th class="r">{% trans "Translated" %}</th>
<th class="r">{% trans "Fuzzy"%}</th>
<th class="r">{% trans "Obsolete"%}</th>
<th>{% trans "File" %}</th>
</tr>
</thead>
<tbody>
{% for app,path,po in pos %}
<tr class="{% cycle row1,row2 %}">
<td><a href="{% url rosetta-language-selection lid,forloop.counter0 %}{% if do_django %}?django{% endif %}{% if do_rosetta %}?rosetta{% endif %}">{{ app|title }}</a></td>
<td class="r">{{po.percent_translated|floatformat:2}}%</td>
<td class="r">{{po|length}}</td>
<td class="r">{{po.translated_entries|length}}</td>
<td class="r">{{po.fuzzy_entries|length}}</td>
<td class="r">{{po.obsolete_entries|length}}</td>
<td class="hint">{{ path }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endfor %}
{% else %}
<h1>{% trans "Nothing to translate!" %}</h1>
<p>{% trans "You haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs." %}</p>
<p>{% blocktrans with "http://docs.djangoproject.com/en/dev/topics/i18n/#topics-i18n" as i18n_doc_link %}Please refer to <a href="{{i18n_doc_link}}">Django's I18N documentation</a> for a guide on how to set up internationalization for your project.{% endblocktrans %}</p>
{% endif %}
{% endblock %}

125
pyweb/rosetta/templates/rosetta/pofile.html

@ -0,0 +1,125 @@
{% extends "rosetta/base.html" %}
{% load rosetta i18n %}
{% block header %}
{{block.super}}
<div id="user-tools">
<p>
<span><a href="{% url rosetta-pick-file %}">{% trans "Pick another file" %}</a> /
<a href="{% url rosetta-download-file %}">{% trans "Download this catalog" %}</a></span>
</p>
</div>
{% endblock %}
{% block breadcumbs %}
<a href="{% url rosetta-pick-file %}">{% trans "Home" %}</a> &rsaquo;
{{ rosetta_i18n_lang_name }} &rsaquo;
{{ rosetta_i18n_app|title }} &rsaquo;
{% blocktrans with rosetta_i18n_pofile.percent_translated|floatformat:2 as percent_translated %}Progress: {{ percent_translated }}%{% endblocktrans %}
{% if not rosetta_i18n_write %}<span class="alert">{% trans "File is read-only: download the file when done editing!" %}</span>{% endif %}
{% endblock %}
{% block pagetitle %}{% trans "English" %} - {{rosetta_i18n_lang_name}} ({{ rosetta_i18n_pofile.percent_translated|floatformat:0 }}%){% endblock %}
{% block main %}
<h1>{% blocktrans %}Translate into {{rosetta_i18n_lang_name}}{% endblocktrans %}</h1>
<ul class="object-tools">
<li class="nobubble">{% trans "Display:" %}</li>
<li {% ifequal rosetta_i18n_filter 'untranslated' %}class="active"{% endifequal %}><a href="?filter=untranslated">{% trans "Untranslated only" %}</a></li>
<li {% ifequal rosetta_i18n_filter 'translated' %}class="active"{% endifequal %}><a href="?filter=translated">{% trans "Translated only" %}</a></li>
<li {% ifequal rosetta_i18n_filter 'fuzzy' %}class="active"{% endifequal %}><a href="?filter=fuzzy">{% trans "Fuzzy only" %}</a></li>
<li {% ifequal rosetta_i18n_filter 'all' %}class="active"{% endifequal %}><a href="?filter=all">{% trans "All" %}</a></li>
</ul>
<div id="changelist" class="module{% if rosetta_i18n_lang_bidi %} rtl{% endif %}">
<div id="toolbar">
<form id="changelist-search" action="" method="post">
<div><!-- DIV needed for valid HTML -->
{% rosetta_csrf_token %}
<label for="searchbar"><img src="{{ADMIN_MEDIA_PREFIX}}img/admin/icon_searchbox.png" alt="{% trans "Search" %}" /></label>
<input type="text" size="40" name="query" value="{% if query %}{{query}}{% endif %}" id="searchbar" />
<input type="submit" name="search" value="{% trans "Go" %}" />
</div>
</form>
</div>
<form method="post" action="">
<table>
<thead>
<tr>
{% rosetta_csrf_token %}
<th>{% trans "Original" %}</th>
{% if main_language %}<th>{{ main_language }}</th>{% endif %}
<th>{{ rosetta_i18n_lang_name }}</th>
<th class="c">{% trans "Fuzzy" %}</th>
<th>{% trans "Occurrences(s)" %}</th>
</tr>
</thead>
<tbody>
{% for message in messages %}
<tr class="{% cycle row1,row2 %}">
{% if message.msgid_plural %}
<td class="original plural">
<div class="plural-container">
<span class="part">{{message.msgid|format_message|linebreaksbr}}</span>
<span class="part">{{message.msgid_plural|format_message|linebreaksbr}}</span>
</div>
</td>
<td class="translation">
{% for k, msgstr in message.msgstr_plural.items|dictsort:"0" %}
<label for="m_{{message.id}}_{{k}}">{{k}}:</label>
<textarea rows="{{message.msgid|format_message|lines_count}}" cols="40" id="m_{{message.id}}_{{k}}" name="m_{{message.id}}_{{k}}">{{msgstr}}</textarea>
{% endfor %}
</td>
{% else %}
<td class="original">{{ message.msgid|format_message|linebreaksbr }}</td>
{% if main_language %}<td class="original">{{ message.main_lang|format_message|linebreaksbr }}</td>{% endif %}
<td class="translation">
<textarea rows="{{message.msgid|format_message|lines_count}}" cols="40" name="m_{{message.id}}">{{message.msgstr}}</textarea>
{% if ENABLE_TRANSLATION_SUGGESTIONS %}<a href="#" class="suggest">{% trans "suggest" %}</a>{% endif %}
</td>
{% endif %}
<td class="c">
<input type="checkbox" name="f_{{message.id}}" value="1" {% if message|is_fuzzy %}checked="checked"{% endif %} />
</td>
<td class="location">
{% for fn,lineno in message.occurrences %}
<code{% if forloop.counter|gt:"3" %} class="hide"{% endif %}>{{ fn }}:{{lineno}}</code>
{% endfor %}
{% if message.occurrences|length|gt:"3" %}
<a href="#">&hellip; ({% blocktrans count message.occurrences|length|minus:"3" as more_count %}{{more_count}} more{% plural %}{{more_count}} more{% endblocktrans %})</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="submit-row">
<p class="paginator">
{% if query %}
<input type="hidden" name="query" value="{{query}}" />
{% endif %}
<input type="submit" class="default" name="_next" value="{% trans "Save and translate next block" %}"/>
{% if needs_pagination %}
{% trans "Skip to page:" %}
{% for i in page_range %}
{% ifequal i '...' %}
<span class="space">{{ i }}</span>
{% else %}
{% ifequal i page %}
<span class="this-page">{{i}}</span>
{% else %}
<a href="?page={{i}}{% if query %}&amp;query={{query}}{% endif %}">{{i}}</a>
{% endifequal %}
{% endifequal %}
{% endfor %}
{% else %}
{% trans "Displaying:" %}
{% endif %}
<strong>{% blocktrans count rosetta_i18n_pofile|length as message_number and paginator.object_list|length as hits %}{{hits}}/{{message_number}} message{% plural %}{{hits}}/{{message_number}} messages{% endblocktrans %}</strong>
</p>
</div>
</form>
</div>
{% endblock %}

24
pyweb/rosetta/templatetags/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""

77
pyweb/rosetta/templatetags/rosetta.py

@ -0,0 +1,77 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""
from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
import re
from django.template import Node
register = template.Library()
rx = re.compile(r'(%(\([^\s\)]*\))?[sd])')
def format_message(message):
return mark_safe(rx.sub('<code>\\1</code>', escape(message).replace(r'\n','<br />\n')))
format_message=register.filter(format_message)
def lines_count(message):
return 1 + sum([len(line)/50 for line in message.split('\n')])
lines_count=register.filter(lines_count)
def mult(a,b):
return int(a)*int(b)
mult=register.filter(mult)
def minus(a,b):
try:
return int(a) - int(b)
except:
return 0
minus=register.filter(minus)
def gt(a,b):
try:
return int(a) > int(b)
except:
return False
gt=register.filter(gt)
def is_fuzzy(message):
return message and hasattr(message, 'flags') and 'fuzzy' in message.flags
is_fuzzy = register.filter(is_fuzzy)
class RosettaCsrfTokenPlaceholder(Node):
def render(self, context):
return mark_safe(u"<!-- csrf token placeholder -->")
def rosetta_csrf_token(parser, token):
try:
from django.template.defaulttags import csrf_token
return csrf_token(parser,token)
except ImportError:
return RosettaCsrfTokenPlaceholder()
rosetta_csrf_token=register.tag(rosetta_csrf_token)

32
pyweb/rosetta/urls.py

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
urlpatterns = patterns('rosetta.views',
url(r'^$', 'home', name='rosetta-home'),
url(r'^pick/$', 'list_languages', name='rosetta-pick-file'),
url(r'^download/$', 'download_file', name='rosetta-download-file'),
url(r'^select/(?P<langid>[\w\-]+)/(?P<idx>\d+)/$','lang_sel', name='rosetta-language-selection'),
)

322
pyweb/rosetta/views.py

@ -0,0 +1,322 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2010, mbonetti <http://code.google.com/u/mbonetti/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
"""
from django.conf import settings
from django.contrib.auth.decorators import user_passes_test
from django.core.paginator import Paginator, InvalidPage
from django.core.urlresolvers import reverse, resolve, Resolver404
from django.http import Http404, HttpResponseRedirect, HttpResponse
from django.shortcuts import render_to_response
from django.utils.encoding import smart_unicode, force_unicode, iri_to_uri
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.cache import never_cache
from rosetta.polib import pofile
from rosetta.poutil import find_pos, pagination_range
from rosetta.conf import settings as rosetta_settings
import re, os, rosetta, datetime, unicodedata
from django.template import RequestContext
try:
resolve(settings.LOGIN_URL)
except Resolver404:
try:
resolve('/admin/')
except Resolver404:
raise Exception('Rosetta cannot log you in!\nYou must define a LOGIN_URL in your settings if you don\'t run the Django admin site at a standard URL.')
else:
LOGIN_URL = '/admin/'
else:
LOGIN_URL = settings.LOGIN_URL
def home(request):
"""
Displays a list of messages to be translated
"""
def fix_nls(in_,out_):
"""Fixes submitted translations by filtering carriage returns and pairing
newlines at the begging and end of the translated string with the original
"""
if 0 == len(in_) or 0 == len(out_):
return out_
if "\r" in out_ and "\r" not in in_:
out_=out_.replace("\r",'')
if "\n" == in_[0] and "\n" != out_[0]:
out_ = "\n" + out_
elif "\n" != in_[0] and "\n" == out_[0]:
out_ = out_.lstrip()
if "\n" == in_[-1] and "\n" != out_[-1]:
out_ = out_ + "\n"
elif "\n" != in_[-1] and "\n" == out_[-1]:
out_ = out_.rstrip()
return out_
version = rosetta.get_version(True)
if 'rosetta_i18n_fn' in request.session:
rosetta_i18n_fn=request.session.get('rosetta_i18n_fn')
rosetta_i18n_app = get_app_name(rosetta_i18n_fn)
rosetta_i18n_pofile = request.session.get('rosetta_i18n_pofile')
rosetta_i18n_lang_code = request.session['rosetta_i18n_lang_code']
rosetta_i18n_lang_bidi = (rosetta_i18n_lang_code in settings.LANGUAGES_BIDI)
rosetta_i18n_write = request.session.get('rosetta_i18n_write', True)
if 'filter' in request.GET:
if request.GET.get('filter') in ('untranslated', 'translated', 'fuzzy', 'all'):
filter_ = request.GET.get('filter')
request.session['rosetta_i18n_filter'] = filter_
return HttpResponseRedirect(reverse('rosetta-home'))
rosetta_i18n_filter = request.session.get('rosetta_i18n_filter', 'all')
if '_next' in request.POST:
rx=re.compile(r'^m_([0-9]+)')
rx_plural=re.compile(r'^m_([0-9]+)_([0-9]+)')
file_change = False
for k in request.POST.keys():
if rx_plural.match(k):
id=int(rx_plural.match(k).groups()[0])
idx=int(rx_plural.match(k).groups()[1])
rosetta_i18n_pofile[id].msgstr_plural[str(idx)] = fix_nls(rosetta_i18n_pofile[id].msgid_plural[idx], request.POST.get(k))
file_change = True
elif rx.match(k):
id=int(rx.match(k).groups()[0])
rosetta_i18n_pofile[id].msgstr = fix_nls(rosetta_i18n_pofile[id].msgid, request.POST.get(k))
file_change = True
if file_change and 'fuzzy' in rosetta_i18n_pofile[id].flags and not request.POST.get('f_%d' %id, False):
rosetta_i18n_pofile[id].flags.remove('fuzzy')
elif file_change and 'fuzzy' not in rosetta_i18n_pofile[id].flags and request.POST.get('f_%d' %id, False):
rosetta_i18n_pofile[id].flags.append('fuzzy')
if file_change and rosetta_i18n_write:
try:
rosetta_i18n_pofile.metadata['Last-Translator'] = unicodedata.normalize('NFKD', u"%s %s <%s>" %(request.user.first_name,request.user.last_name,request.user.email)).encode('ascii', 'ignore')
rosetta_i18n_pofile.metadata['X-Translated-Using'] = u"django-rosetta %s" % rosetta.get_version(False)
rosetta_i18n_pofile.metadata['PO-Revision-Date'] = datetime.datetime.now().strftime('%Y-%m-%d %H:%M%z')
except UnicodeDecodeError:
pass
try:
rosetta_i18n_pofile.save()
rosetta_i18n_pofile.save_as_mofile(rosetta_i18n_fn.replace('.po','.mo'))
# Try auto-reloading via the WSGI daemon mode reload mechanism
if rosetta_settings.WSGI_AUTO_RELOAD and \
request.environ.has_key('mod_wsgi.process_group') and \
request.environ.get('mod_wsgi.process_group',None) and \
request.environ.has_key('SCRIPT_FILENAME') and \
int(request.environ.get('mod_wsgi.script_reloading', '0')):
try:
os.utime(request.environ.get('SCRIPT_FILENAME'), None)
except OSError:
pass
except:
request.session['rosetta_i18n_write'] = False
request.session['rosetta_i18n_pofile']=rosetta_i18n_pofile
# Retain query arguments
query_arg = ''
if 'query' in request.REQUEST:
query_arg = '?query=%s' %request.REQUEST.get('query')
if 'page' in request.GET:
if query_arg:
query_arg = query_arg + '&'
else:
query_arg = '?'
query_arg = query_arg + 'page=%d' % int(request.GET.get('page'))
return HttpResponseRedirect(reverse('rosetta-home') + iri_to_uri(query_arg))
rosetta_i18n_lang_name = _(request.session.get('rosetta_i18n_lang_name'))
rosetta_i18n_lang_code = request.session.get('rosetta_i18n_lang_code')
if 'query' in request.REQUEST and request.REQUEST.get('query','').strip():
query=request.REQUEST.get('query').strip()
rx=re.compile(query, re.IGNORECASE)
paginator = Paginator([e for e in rosetta_i18n_pofile if rx.search(smart_unicode(e.msgstr)+smart_unicode(e.msgid)+u''.join([o[0] for o in e.occurrences]))], rosetta_settings.MESSAGES_PER_PAGE)
else:
if rosetta_i18n_filter == 'untranslated':
paginator = Paginator(rosetta_i18n_pofile.untranslated_entries(), rosetta_settings.MESSAGES_PER_PAGE)
elif rosetta_i18n_filter == 'translated':
paginator = Paginator(rosetta_i18n_pofile.translated_entries(), rosetta_settings.MESSAGES_PER_PAGE)
elif rosetta_i18n_filter == 'fuzzy':
paginator = Paginator(rosetta_i18n_pofile.fuzzy_entries(), rosetta_settings.MESSAGES_PER_PAGE)
else:
paginator = Paginator([e for e in rosetta_i18n_pofile if not e.obsolete], rosetta_settings.MESSAGES_PER_PAGE)
if 'page' in request.GET and int(request.GET.get('page')) <= paginator.num_pages and int(request.GET.get('page')) > 0:
page = int(request.GET.get('page'))
else:
page = 1
messages = paginator.page(page).object_list
if rosetta_settings.MAIN_LANGUAGE and rosetta_settings.MAIN_LANGUAGE != rosetta_i18n_lang_code:
main_language = None
for language in settings.LANGUAGES:
if language[0] == rosetta_settings.MAIN_LANGUAGE:
main_language = _(language[1])
break
fl = ("/%s/" % rosetta_settings.MAIN_LANGUAGE).join(rosetta_i18n_fn.split("/%s/" % rosetta_i18n_lang_code))
po = pofile(fl)
main_messages = []
for message in messages:
message.main_lang = po.find(message.msgid).msgstr
needs_pagination = paginator.num_pages > 1
if needs_pagination:
if paginator.num_pages >= 10:
page_range = pagination_range(1, paginator.num_pages, page)
else:
page_range = range(1,1+paginator.num_pages)
ADMIN_MEDIA_PREFIX = settings.ADMIN_MEDIA_PREFIX
ENABLE_TRANSLATION_SUGGESTIONS = rosetta_settings.ENABLE_TRANSLATION_SUGGESTIONS
return render_to_response('rosetta/pofile.html', locals(), context_instance=RequestContext(request))
else:
return list_languages(request)
home=user_passes_test(lambda user:can_translate(user),LOGIN_URL)(home)
home=never_cache(home)
def download_file(request):
import zipfile, os
from StringIO import StringIO
# original filename
rosetta_i18n_fn=request.session.get('rosetta_i18n_fn', None)
# in-session modified catalog
rosetta_i18n_pofile = request.session.get('rosetta_i18n_pofile', None)
# language code
rosetta_i18n_lang_code = request.session.get('rosetta_i18n_lang_code', None)
if not rosetta_i18n_lang_code or not rosetta_i18n_pofile or not rosetta_i18n_fn:
return HttpResponseRedirect(reverse('rosetta-home'))
try:
if len(rosetta_i18n_fn.split('/')) >= 5:
offered_fn = '_'.join(rosetta_i18n_fn.split('/')[-5:])
else:
offered_fn = rosetta_i18n_fn.split('/')[-1]
po_fn = str(rosetta_i18n_fn.split('/')[-1])
mo_fn = str(po_fn.replace('.po','.mo')) # not so smart, huh
zipdata = StringIO()
zipf = zipfile.ZipFile(zipdata, mode="w")
zipf.writestr(po_fn, str(rosetta_i18n_pofile))
zipf.writestr(mo_fn, rosetta_i18n_pofile.to_binary())
zipf.close()
zipdata.seek(0)
response = HttpResponse(zipdata.read())
response['Content-Disposition'] = 'attachment; filename=%s.%s.zip' %(offered_fn,rosetta_i18n_lang_code)
response['Content-Type'] = 'application/x-zip'
return response
except Exception, e:
return HttpResponseRedirect(reverse('rosetta-home'))
download_file=user_passes_test(lambda user:can_translate(user),LOGIN_URL)(download_file)
download_file=never_cache(download_file)
def list_languages(request):
"""
Lists the languages for the current project, the gettext catalog files
that can be translated and their translation progress
"""
languages = []
do_django = 'django' in request.GET
do_rosetta = 'rosetta' in request.GET
has_pos = False
for language in settings.LANGUAGES:
pos = find_pos(language[0],include_djangos=do_django,include_rosetta=do_rosetta)
has_pos = has_pos or len(pos)
languages.append(
(language[0],
_(language[1]),
[(get_app_name(l), os.path.realpath(l), pofile(l)) for l in pos],
)
)
ADMIN_MEDIA_PREFIX = settings.ADMIN_MEDIA_PREFIX
version = rosetta.get_version(True)
return render_to_response('rosetta/languages.html', locals(), context_instance=RequestContext(request))
list_languages=user_passes_test(lambda user:can_translate(user),LOGIN_URL)(list_languages)
list_languages=never_cache(list_languages)
def get_app_name(path):
app = path.split("/locale")[0].split("/")[-1]
return app
def lang_sel(request,langid,idx):
"""
Selects a file to be translated
"""
if langid not in [l[0] for l in settings.LANGUAGES]:
raise Http404
else:
do_django = 'django' in request.GET
do_rosetta = 'rosetta' in request.GET
file_ = find_pos(langid,include_djangos=do_django,include_rosetta=do_rosetta)[int(idx)]
request.session['rosetta_i18n_lang_code'] = langid
request.session['rosetta_i18n_lang_name'] = unicode([l[1] for l in settings.LANGUAGES if l[0] == langid][0])
request.session['rosetta_i18n_fn'] = file_
po = pofile(file_)
for i in range(len(po)):
po[i].id = i
request.session['rosetta_i18n_pofile'] = po
try:
os.utime(file_,None)
request.session['rosetta_i18n_write'] = True
except OSError:
request.session['rosetta_i18n_write'] = False
return HttpResponseRedirect(reverse('rosetta-home'))
lang_sel=user_passes_test(lambda user:can_translate(user),LOGIN_URL)(lang_sel)
lang_sel=never_cache(lang_sel)
def can_translate(user):
if not user.is_authenticated():
return False
elif user.is_superuser:
return True
else:
try:
from django.contrib.auth.models import Group
translators = Group.objects.get(name='translators')
return translators in user.groups.all()
except Group.DoesNotExist:
return False

1
pyweb/settings.py

@ -190,4 +190,5 @@ INSTALLED_APPS = (
'django.contrib.sites',
'registration',
'mumble',
'rosetta',
)
Loading…
Cancel
Save