django-rosetta-0.7.2/0000755000076500000240000000000012141707771014674 5ustar marcostaff00000000000000django-rosetta-0.7.2/django_rosetta.egg-info/0000755000076500000240000000000012141707771021371 5ustar marcostaff00000000000000django-rosetta-0.7.2/django_rosetta.egg-info/dependency_links.txt0000644000076500000240000000000112141707770025436 0ustar marcostaff00000000000000 django-rosetta-0.7.2/django_rosetta.egg-info/not-zip-safe0000644000076500000240000000000112140410715023603 0ustar marcostaff00000000000000 django-rosetta-0.7.2/django_rosetta.egg-info/PKG-INFO0000644000076500000240000000131512141707770022465 0ustar marcostaff00000000000000Metadata-Version: 1.1 Name: django-rosetta Version: 0.7.2 Summary: A Django application that eases the translation of Django projects Home-page: https://github.com/mbi/django-rosetta Author: Marco Bonetti Author-email: mbonetti@gmail.com License: MIT Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Localization Classifier: Topic :: Software Development :: Internationalization Classifier: Framework :: Django django-rosetta-0.7.2/django_rosetta.egg-info/requires.txt0000644000076500000240000000003112141707770023762 0ustar marcostaff00000000000000six >=1.2.0 Django >= 1.3django-rosetta-0.7.2/django_rosetta.egg-info/SOURCES.txt0000644000076500000240000000431312141707771023256 0ustar marcostaff00000000000000LICENSE MANIFEST.in README.rst setup.py django_rosetta.egg-info/PKG-INFO django_rosetta.egg-info/SOURCES.txt django_rosetta.egg-info/dependency_links.txt django_rosetta.egg-info/not-zip-safe django_rosetta.egg-info/requires.txt django_rosetta.egg-info/top_level.txt rosetta/__init__.py rosetta/access.py rosetta/models.py rosetta/polib.py rosetta/poutil.py rosetta/signals.py rosetta/storage.py rosetta/urls.py rosetta/views.py rosetta/conf/__init__.py rosetta/conf/settings.py rosetta/locale/cs/LC_MESSAGES/django.mo rosetta/locale/cs/LC_MESSAGES/django.po rosetta/locale/de/LC_MESSAGES/django.mo rosetta/locale/de/LC_MESSAGES/django.po rosetta/locale/es/LC_MESSAGES/django.mo rosetta/locale/es/LC_MESSAGES/django.po rosetta/locale/fa/LC_MESSAGES/django.mo rosetta/locale/fa/LC_MESSAGES/django.po rosetta/locale/fr/LC_MESSAGES/django.mo rosetta/locale/fr/LC_MESSAGES/django.po rosetta/locale/hu/LC_MESSAGES/django.mo rosetta/locale/hu/LC_MESSAGES/django.po rosetta/locale/it/LC_MESSAGES/django.mo rosetta/locale/it/LC_MESSAGES/django.po rosetta/locale/nl/LC_MESSAGES/django.mo rosetta/locale/nl/LC_MESSAGES/django.po rosetta/locale/pl/LC_MESSAGES/django.mo rosetta/locale/pl/LC_MESSAGES/django.po rosetta/locale/ru/LC_MESSAGES/django.mo rosetta/locale/ru/LC_MESSAGES/django.po rosetta/locale/tr/LC_MESSAGES/django.mo rosetta/locale/tr/LC_MESSAGES/django.po rosetta/locale/uk/LC_MESSAGES/django.mo rosetta/locale/uk/LC_MESSAGES/django.po rosetta/locale/xx/LC_MESSAGES/django.mo rosetta/locale/xx/LC_MESSAGES/django.po rosetta/templates/rosetta/base.html rosetta/templates/rosetta/languages.html rosetta/templates/rosetta/pofile.html rosetta/templates/rosetta/css/rosetta.css rosetta/templates/rosetta/js/rosetta.js rosetta/templatetags/__init__.py rosetta/templatetags/rosetta.py rosetta/tests/__init__.py rosetta/tests/__init__.pyc rosetta/tests/django.po.issue24gh.template rosetta/tests/django.po.issue34gh.template rosetta/tests/django.po.issue38gh.template rosetta/tests/django.po.issue39gh.template rosetta/tests/django.po.issue67.template rosetta/tests/django.po.issue79.template rosetta/tests/django.po.template rosetta/tests/test_unicode_literals.pyc rosetta/tests/urls.py rosetta/tests/urls.pyc rosetta/tests/views.py rosetta/tests/views.pycdjango-rosetta-0.7.2/django_rosetta.egg-info/top_level.txt0000644000076500000240000000002412141707770024116 0ustar marcostaff00000000000000testproject rosetta django-rosetta-0.7.2/LICENSE0000644000076500000240000000207012140410715015664 0ustar marcostaff00000000000000Copyright (c) 2008-2010 Marco Bonetti 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. django-rosetta-0.7.2/MANIFEST.in0000644000076500000240000000033412140410715016416 0ustar marcostaff00000000000000include MANIFEST.in include LICENSE exclude *.pyc exclude *.sh recursive-include rosetta/locale * recursive-include rosetta/tests * recursive-include rosetta/templates * prune testproject prune rosetta/tests/__pycache__ django-rosetta-0.7.2/PKG-INFO0000644000076500000240000000131512141707771015771 0ustar marcostaff00000000000000Metadata-Version: 1.1 Name: django-rosetta Version: 0.7.2 Summary: A Django application that eases the translation of Django projects Home-page: https://github.com/mbi/django-rosetta Author: Marco Bonetti Author-email: mbonetti@gmail.com License: MIT Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Localization Classifier: Topic :: Software Development :: Internationalization Classifier: Framework :: Django django-rosetta-0.7.2/README.rst0000644000076500000240000001733712141706554016374 0ustar marcostaff00000000000000======= Rosetta ======= Rosetta is a `Django `_ application that eases the translation process of your Django projects. Because it doesn't export any models, Rosetta doesn't create any tables in your project's database. Rosetta can be installed and uninstalled by simply adding and removing a single entry in your project's `INSTALLED_APPS` and a single line in your main ``urls.py`` file. ******** Features ******** * Database independent * Reads and writes your project's `gettext` catalogs (po and mo files) * Installed and uninstalled in under a minute * Uses Django's admin interface CSS ************ Requirements ************ Rosetta requires Django 1.3, 1.4 or 1.5. When running with Django 1.5, Python 3.x is supported. ************ Installation ************ To install Rosetta: 1. ``pip install django-rosetta`` 2. Add ``'rosetta'`` to the `INSTALLED_APPS` in your project's ``settings.py`` 3. Add an URL entry to your project's ``urls.py``, for example:: from django.conf import settings if 'rosetta' in settings.INSTALLED_APPS: urlpatterns += patterns('', url(r'^rosetta/', include('rosetta.urls')), ) Note: you can use whatever you wish as the URL prefix. To uninstall Rosetta, simply comment out or remove the ``'rosetta'`` line in your ``INSTALLED_APPS`` ************* Configuration ************* Rosetta can be configured via the following parameters, to be defined in your project settings file: * ``ROSETTA_MESSAGES_PER_PAGE``: Number of messages to display per page. Defaults to ``10``. * ``ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS``: Enable AJAX translation suggestions. Defaults to ``False``. * ``BING_APP_ID``: Translation suggestions used to come from the Google Translation API service, but free service has been discontinued, and the next best thing is Microsoft `Bing's Translation API `_. To use this service you must first `obtain an AppID key `_, then specify the key here. Defaults to ``None``. * ``ROSETTA_MESSAGES_SOURCE_LANGUAGE_CODE`` and ``ROSETTA_MESSAGES_SOURCE_LANGUAGE_NAME``: Change these if the source language in your PO files isn't English. Default to ``'en'`` and ``'English'`` respectively. * ``ROSETTA_WSGI_AUTO_RELOAD`` and ``ROSETTA_UWSGI_AUTO_RELOAD``: 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. For performance reasons, this setting should be disabled in production environments. Default to ``False``. * ``ROSETTA_EXCLUDED_APPLICATIONS``: Exclude applications defined in this list from being translated. Defaults to ``()``. * ``ROSETTA_REQUIRES_AUTH``: Require authentication for all Rosetta views. Defaults to ``True``. * ``ROSETTA_POFILE_WRAP_WIDTH``: Sets the line-length of the edited PO file. Set this to ``0`` to mimic ``makemessage``'s ``--no-wrap`` option. Defaults to ``78``. * ``ROSETTA_STORAGE_CLASS``: See the note below on Storages. Defaults to ``rosetta.storage.CacheRosettaStorage``. * ``ROSETTA_ACCESS_CONTROL_FUNCTION``: An alternative function that determines if a given user can access the translation views. This function receives a ``user`` as its argument, and returns a boolean specifying whether the passed user is allowed to use Rosetta or not. * ``ROSETTA_CACHE_NAME``: When using ``rosetta.storage.CacheRosettaStorage``, you can store the rosetta data in a specific cache. This is particularly useful when your ``default`` cache is a ``django.core.cache.backends.dummy.DummyCache`` (which happens on pre-production environments). If unset, it will default to ``rosetta`` if a cache with this name exists, or ``default`` if not. ******** Storages ******** To prevent re-reading and parsing the PO file catalogs over and over again, Rosetta stores them in a volatile location. This can be either the HTTP session or the Django cache. Django 1.4 has introduced a signed cookie session backend, which stores the whole content of the session in an encrypted cookie. Unfortunately this doesn't work with large PO files, as the limit of 4096 chars that can be stored in a cookie are easily exceeded. In this case the Cache-based backend should be used (by setting ``ROSETTA_STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage'``). Please make sure that a proper CACHES backend is configured in your Django settings. You can specify an alternate cache name in ``ROSETTA_CACHE_NAME`` if for some reasons your don't want Rosetta to populate your ``default`` cache. Alternatively you can switch back to using the Session based storage by setting ``ROSETTA_STORAGE_CLASS = 'rosetta.storage.SessionRosettaStorage`` in your settings. This is perfectly safe on Django 1.3. On Django 1.4 or higher make sure you have DON'T use the `signed_cookies `_ ``SESSION_BACKEND`` with this Rosetta storage backend or funky things might happen. ******** Security ******** Because Rosetta requires write access to some of the files in your Django project, access to the application is restricted to the administrator user only (as defined in your project's Admin interface) If you wish to grant editing access to other users: 1. Create a 'translators' group in your admin interface 2. Add the user you wish to grant translating rights to this group ***** Usage ***** Generate a batch of files to translate -------------------------------------- See `Django's documentation on Internationalization `_ to setup your project to use i18n and create the ``gettext`` catalog files. Translate away! --------------- Start your Django development server and point your browser to the URL prefix you have chosen during the installation process. You will get to the file selection window. .. image:: http://django-rosetta.googlecode.com/files/rosetta-1.png Select a file and translate each untranslated message. Whenever a new batch of messages is processed, Rosetta updates the corresponding `django.po` file and regenerates the corresponding ``mo`` file. This means your project's labels will be translated right away, unfortunately you'll still have to restart the webserver for the changes to take effect. (NEW: if your webserver supports it, you can force auto-reloading of the translated catalog whenever a change was saved. See the note regarding the ``ROSETTA_WSGI_AUTO_RELOAD`` variable in ``conf/settings.py``. If the webserver doesn't have write access on the catalog files (as shown in the screen shot below) an archive of the catalog files can be downloaded. .. image:: http://django-rosetta.googlecode.com/files/rosetta-2.1.png Translating Rosetta itself -------------------------- By default Rosetta hides its own catalog files in the file selection interface (shown above.) If you would like to translate Rosetta to your own language: 1. Create a subdirectory for your locale inside Rosetta's ``locale`` directory, e.g. ``rosetta/locale/XX/LC_MESSAGES`` 2. Instruct Django to create the initial catalog, by running ``django-admin.py makemessages -l XX`` inside Rosetta's directory (refer to `Django's documentation on i18n `_ for details) 3. Instruct Rosetta to look for its own catalogs, by appending `?rosetta` to the language selection page's URL, e.g. ``http://127.0.0.1:8000/rosetta/pick/?rosetta`` 4. Translate as usual 5. Send a pull request if you feel like sharing *************** Acknowledgments *************** * Rosetta uses the excellent `polib `_ library to parse and handle gettext files. django-rosetta-0.7.2/rosetta/0000755000076500000240000000000012141707771016355 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/__init__.py0000644000076500000240000000024612140410715020454 0ustar marcostaff00000000000000VERSION = (0, 7, 2) def get_version(svn=False, limit=3): "Returns the version as a human-format string." return '.'.join([str(i) for i in VERSION[:limit]]) django-rosetta-0.7.2/rosetta/access.py0000644000076500000240000000222212140410716020153 0ustar marcostaff00000000000000from django.conf import settings from django.utils import importlib def can_translate(user): return get_access_control_function()(user) def get_access_control_function(): """ Return a predicate for determining if a user can access the Rosetta views """ fn_path = getattr(settings, 'ROSETTA_ACCESS_CONTROL_FUNCTION', None) if fn_path is None: return is_superuser_staff_or_in_translators_group # Dynamically load a permissions function perm_module, perm_func = fn_path.rsplit('.', 1) perm_module = importlib.import_module(perm_module) return getattr(perm_module, perm_func) # Default access control test def is_superuser_staff_or_in_translators_group(user): if not getattr(settings, 'ROSETTA_REQUIRES_AUTH', True): return True if not user.is_authenticated(): return False elif user.is_superuser and user.is_staff: 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 django-rosetta-0.7.2/rosetta/conf/0000755000076500000240000000000012141707771017302 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/conf/__init__.py0000644000076500000240000000000012140410716021366 0ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/conf/settings.py0000644000076500000240000000510412141706554021512 0ustar marcostaff00000000000000from 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', False) # Can be obtained for free here: https://ssl.bing.com/webmaster/Developers/AppIds/ BING_APP_ID = getattr(settings, 'BING_APP_ID', None) # Displays this language beside the original MSGID in the admin MAIN_LANGUAGE = getattr(settings, 'ROSETTA_MAIN_LANGUAGE', None) # Change these if the source language in your PO files isn't English MESSAGES_SOURCE_LANGUAGE_CODE = getattr(settings, 'ROSETTA_MESSAGES_SOURCE_LANGUAGE_CODE', 'en') MESSAGES_SOURCE_LANGUAGE_NAME = getattr(settings, 'ROSETTA_MESSAGES_SOURCE_LANGUAGE_NAME', 'English') ACCESS_CONTROL_FUNCTION = getattr( settings, 'ROSETTA_ACCESS_CONTROL_FUNCTION', 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) UWSGI_AUTO_RELOAD = getattr(settings, 'ROSETTA_UWSGI_AUTO_RELOAD', False) # Exclude applications defined in this list from being translated EXCLUDED_APPLICATIONS = getattr(settings, 'ROSETTA_EXCLUDED_APPLICATIONS', ()) # Line length of the updated PO file POFILE_WRAP_WIDTH = getattr(settings, 'ROSETTA_POFILE_WRAP_WIDTH', 78) # Storage class to handle temporary data storage STORAGE_CLASS = getattr(settings, 'ROSETTA_STORAGE_CLASS', 'rosetta.storage.CacheRosettaStorage') ROSETTA_CACHE_NAME = getattr(settings, 'ROSETTA_CACHE_NAME', 'default' if settings.CACHES.get('rosetta', None) is None else 'rosetta') django-rosetta-0.7.2/rosetta/locale/0000755000076500000240000000000012141707771017614 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/cs/0000755000076500000240000000000012141707771020221 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/cs/LC_MESSAGES/0000755000076500000240000000000012141707771022006 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/cs/LC_MESSAGES/django.mo0000644000076500000240000000563112140410716023577 0ustar marcostaff00000000000000 +H': >J S_u7z !! ) tmPuC) 49 B LWoIv   *  #   / '   q     %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreAllApplicationDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!Fuzzy onlyGoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)Pick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Some items in your last translation block couldn't be saved: this usually happens when the catalog file changes on disk after you last loaded it.Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 PO-Revision-Date: 2008-09-12 12:16 Last-Translator: Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Translated-Using: django-rosetta 0.4.RC2 %(hits)s/%(message_number)s text%(hits)s/%(message_number)s textů%(more_count)s více%(more_count)s víceVšeAplikaceZobrazit:Zobrazeno:Stáhnout tento katalogSouborSoubor je pouze pro čtení: pro dokončení úprav si soubor stáhněte!Pouze FuzzyHledatDomůVýběr jazykaTextůNic k překladu!ZastaraléVýskyt(y)Vybrat jiný souborPodívejte se prosím do Django dokumentace I18N , kde naleznete podklady pro nastavení Vašeho vícejazyčného projektu.HotovoHotovo: %(percent_translated)s %Uložit a přeložit další částHledatPřejít na stránku:Některé z Vámi přeložených textových položek nebyly uloženy: důvodem je, že Váš kolega Vám provedl pod rukami nějaké úpravy :-).Překlad do %(rosetta_i18n_lang_name)s PřeloženoPouze přeloženéPouze nepřeloženéV souboru settings nejsou specifikovány žádné jazyky nebo ještě nebyl spuštěn proces překladu katalogů.navrhnoutdjango-rosetta-0.7.2/rosetta/locale/cs/LC_MESSAGES/django.po0000644000076500000240000001113412140410716023575 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "PO-Revision-Date: 2008-09-12 12:16\n" "Last-Translator: \n" "Language-Team: LANGUAGE \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:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Výběr jazyka" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Domů" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "Aplikace" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Hotovo" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Textů" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Přeloženo" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Zastaralé" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Soubor" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "Nic k překladu!" #: templates/rosetta/languages.html:45 msgid "" "You haven't specified any languages in your settings file, or haven't yet " "generated a batch of translation catalogs." msgstr "" "V souboru settings nejsou specifikovány žádné jazyky nebo ještě nebyl " "spuštěn proces překladu katalogů." # python-format #: templates/rosetta/languages.html:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Podívejte se prosím do Django dokumentace " "I18N , kde naleznete podklady pro nastavení Vašeho vícejazyčného projektu." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Vybrat jiný soubor" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Stáhnout tento katalog" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Hotovo: %(percent_translated)s %" #: templates/rosetta/pofile.html:23 msgid "File is read-only: download the file when done editing!" msgstr "Soubor je pouze pro čtení: pro dokončení úprav si soubor stáhněte!" #: templates/rosetta/pofile.html:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "Některé z Vámi přeložených textových položek nebyly uloženy: důvodem je" ", že Váš kolega Vám provedl pod rukami nějaké úpravy :-)." #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Překlad do %(rosetta_i18n_lang_name)s " #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Zobrazit:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Pouze nepřeložené" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Pouze přeložené" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "Pouze Fuzzy" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "Vše" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Hledat" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Hledat" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Výskyt(y)" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "navrhnout" #: templates/rosetta/pofile.html:93 #, python-format msgid "%(more_count)s more" msgid_plural "%(more_count)s more" msgstr[0] "%(more_count)s více" msgstr[1] "%(more_count)s více" #: templates/rosetta/pofile.html:105 msgid "Save and translate next block" msgstr "Uložit a přeložit další část" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Přejít na stránku:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Zobrazeno:" #: templates/rosetta/pofile.html:124 #, 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 textů" #~ msgid "English" #~ msgstr "Anglicky" #~ msgid "Both" #~ msgstr "Oba" django-rosetta-0.7.2/rosetta/locale/de/0000755000076500000240000000000012141707771020204 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/de/LC_MESSAGES/0000755000076500000240000000000012141707771021771 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/de/LC_MESSAGES/django.mo0000644000076500000240000000537512140410716023567 0ustar marcostaff00000000000000 +H':> GSi7n  $! ) <GWtiB' !8a>     $ )   ($ M X h vz      %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreAllDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!FuzzyFuzzy onlyGoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)OriginalPick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 PO-Revision-Date: 2008-06-16 10:11+0100 Last-Translator: Martin Mahner Language-Team: patrick lauber MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: German X-Poedit-Country: SWITZERLAND %(hits)s/%(message_number)s Text%(hits)s/%(message_number)s Texte%(more_count)s mehr%(more_count)s mehrAlleAnzeige:Anzeigen:Laden sie diesen Katalog herunterDateiDatei ist schreibgeschützt: Laden Sie die Datei herunter wenn sie mit dem Editieren fertig sind!UnscharfNur unscharfeLosHomeSprachwahlTexteNichts zu übersetzen!VeraltetGefunden inOriginalWähle eine andere DateiUnter Django's I18N documentation finden Sie eine Anleitung, wie sie Internationalisierung in Ihrem Projekt einrichten.FortschrittFortschritt: %(percent_translated)s%Speichern und nächsten Block übersetzenSuchenZur Seite:Übersetze in %(rosetta_i18n_lang_name)sÜbersetztNur übersetzteNur unübersetzteSie haben keine Sprachen in der Einstellungsdatei definiert oder bis jetzt noch keine Übersetzungskataloge generiert.vorschlagendjango-rosetta-0.7.2/rosetta/locale/de/LC_MESSAGES/django.po0000644000076500000240000001113712140410716023563 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "PO-Revision-Date: 2008-06-16 10:11+0100\n" "Last-Translator: Martin Mahner \n" "Language-Team: patrick lauber \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:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Sprachwahl" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Home" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Fortschritt" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Texte" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Übersetzt" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "Unscharf" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Veraltet" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Datei" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "Nichts zu übersetzen!" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Unter Django's I18N documentation finden " "Sie eine Anleitung, wie sie Internationalisierung in Ihrem Projekt " "einrichten." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Wähle eine andere Datei" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Laden sie diesen Katalog herunter" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Fortschritt: %(percent_translated)s%" #: templates/rosetta/pofile.html:23 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:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Übersetze in %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Anzeige:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Nur unübersetzte" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Nur übersetzte" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "Nur unscharfe" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "Alle" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Suchen" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Los" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "Original" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Gefunden in" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "vorschlagen" #: templates/rosetta/pofile.html:93 #, 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:105 msgid "Save and translate next block" msgstr "Speichern und nächsten Block übersetzen" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Zur Seite:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Anzeigen:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Englisch" #~ msgid "Both" #~ msgstr "Beide" django-rosetta-0.7.2/rosetta/locale/es/0000755000076500000240000000000012141707771020223 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/es/LC_MESSAGES/0000755000076500000240000000000012141707771022010 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/es/LC_MESSAGES/django.mo0000644000076500000240000000517312140410716023602 0ustar marcostaff00000000000000 )H' '=7Bz ! ) "t4ZH 'U } T!(=F[ dr2 !; #]  '   s     %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!FuzzyFuzzy onlyGoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)Pick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: PACKAGE VERSION Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 PO-Revision-Date: 2008-11-30 12:12 Last-Translator: Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Translated-Using: django-rosetta 0.4.RC2 %(hits)s/%(message_number)s mensaje%(hits)s/%(message_number)s mensajes%(more_count)s más%(more_count)s másPantalla:Mostrando:Descarga este catálogoArchivoEl archivo está en modo lectura: ¡Descarga el archivo cuando termines de editarlo!RevisarVellosos sóloIrInicioSelección de idiomaMensajes¡Nada que traducir!ObsoletoOcurrencia(s)Selecciona otro archivoPor favor visita la Documentación de Django sobre I18N para obtener una guía sobre cómo añadir internacionalización a tu proyecto.ProgresoProgreso: %(percent_translated)s%Guardar y traducir siguiente bloqueBúsquedaIr a la página:Traducir al %(rosetta_i18n_lang_name)s TraducidoTraducidos sóloSin traducir sóloNo has especificado ningún idioma en tu archivo de settings o no has generado todavía un batch para traducción de catálogos.sugerirdjango-rosetta-0.7.2/rosetta/locale/es/LC_MESSAGES/django.po0000644000076500000240000001077312140410716023607 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "PO-Revision-Date: 2008-11-30 12:12\n" "Last-Translator: \n" "Language-Team: LANGUAGE \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:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Selección de idioma" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Inicio" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Progreso" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Mensajes" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Traducido" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "Revisar" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Obsoleto" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Archivo" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "¡Nada que traducir!" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Por favor visita la Documentación de Django " "sobre I18N para obtener una guía sobre cómo añadir internacionalización " "a tu proyecto." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Selecciona otro archivo" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Descarga este catálogo" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Progreso: %(percent_translated)s%" #: templates/rosetta/pofile.html:23 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:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Traducir al %(rosetta_i18n_lang_name)s " #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Pantalla:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Sin traducir sólo" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Traducidos sólo" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "Vellosos sólo" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Búsqueda" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Ir" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Ocurrencia(s)" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "sugerir" #: templates/rosetta/pofile.html:93 #, 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:105 msgid "Save and translate next block" msgstr "Guardar y traducir siguiente bloque" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Ir a la página:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Mostrando:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Inglés" #~ msgid "Both" #~ msgstr "Ambos" django-rosetta-0.7.2/rosetta/locale/fa/0000755000076500000240000000000012141707771020202 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/fa/LC_MESSAGES/0000755000076500000240000000000012141707771021767 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/fa/LC_MESSAGES/django.mo0000644000076500000240000001054112140410716023554 0ustar marcostaff00000000000000'TH'   '3I7N  "  ) tltSKM    v  " T _ )|     3   / #8 \ `/m 4 6*as!R%(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreAllApplicationContext hintCouldn't load the specified language file. This usually happens when using the Encrypted Cookies Session Storage backend on Django 1.4 or higher.
Setting ROSETTA_STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage' in your settings file should fix this.Display:Displaying:Download this catalogFileFile is read-only: download the file when done editing!FilterFuzzyFuzzy onlyGoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)OriginalPick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%%ProjectSave and translate next blockSearchSkip to page:Some items in your last translation block couldn't be saved: this usually happens when the catalog file changes on disk after you last loaded it.Third partyTranslate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: PACKAGE VERSION Report-Msgid-Bugs-To: POT-Creation-Date: 2013-04-01 18:36+0430 PO-Revision-Date: 2013-04-01 19:03+0430 Last-Translator: Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language: Plural-Forms: nplurals=1; plural=0 X-Translated-Using: django-rosetta 0.7.1 %(hits)s از %(message_number)s پیام%(hits)s از %(message_number)s پیام%(more_count)s مورد بیش‌تر%(more_count)s مورد بیش‌ترهمهکارکردراهنمای محلیبارگزاری کاتالوگ زبان مورد نظر ممکن نبود. این مشکل معمولا به خاطر استفاده از Encrypted Cookies Session Storage backend در جنگو ۱.۴ یا بالاتر رخ می‌دهد.
با افزودن خط زیر به فایل تنظیمات پروژه معمولا این مشکل را حل می‌کند:
ROSETTA_STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage'نمایش:در حال نمایش:دانلود این کاتالوگپروندهفایل ترجمه غیر قابل نوشتن است، پس از اتمام ترجمه فایل حاصل را دانلود نمایید!فیلترنیاز به بازبینیفقط موارد برای بازبینیبروخانهانتخاب زبانپیام‌هاموردی برای ترجمه وجود ندارد!کهنهموارد رخداداصلیانتخاب یک فایل دیگرلطفا به مستندات جهانی‌سازی جنگو documentation برای راهنما در مورد روش راه‌اندازی امکانات جهانی‌سازی برای پروژه‌تان مراجعه کنید.پیشرفتدرصد پیشرفت: %(percent_translated)s%%پروژهذخیره و ترجمه‌ی دسته‌ی بعدیجستجوپرش به صفحه:برخی موارد در آخرین دسته‌ی ترجمه قابل ذخیره نبود: این مشکل معمولا زمانی رخ می‌دهد که فایل کاتالوگ روی دیسک پس از آخرین دفعه‌ی بارگزاری آن، تغییر کرده باشد.شخص ثالثدر حال ترجمه به %(rosetta_i18n_lang_name)sترجمه شدهفقط ترجمه شده‌هافقط ترجمه نشده‌هاشما زبانی را در فایل تنظیمات تعیین نکردید، یا هنوز کاتالوگ‌های ترجمه را ایجاد نکردید.پیشنهادdjango-rosetta-0.7.2/rosetta/locale/fa/LC_MESSAGES/django.po0000644000076500000240000001475512140410716023572 0ustar marcostaff00000000000000# 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: 2013-04-01 18:36+0430\n" "PO-Revision-Date: 2013-04-01 19:03+0430\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: \n" "Plural-Forms: nplurals=1; plural=0\n" "X-Translated-Using: django-rosetta 0.7.1\n" #: templates/rosetta/languages.html:5 templates/rosetta/languages.html.py:8 msgid "Language selection" msgstr "انتخاب زبان" #: templates/rosetta/languages.html:8 templates/rosetta/pofile.html:22 msgid "Home" msgstr "خانه" #: templates/rosetta/languages.html:9 msgid "" "Couldn't load the specified language file. This usually happens when using " "the Encrypted Cookies Session Storage backend on Django 1.4 or " "higher.
Setting ROSETTA_STORAGE_CLASS = " "'rosetta.storage.CacheRosettaStorage' in your settings file should fix this." msgstr "" "بارگزاری کاتالوگ زبان مورد نظر ممکن نبود. این مشکل معمولا به خاطر استفاده از" " Encrypted Cookies Session Storage backend در جنگو ۱.۴ یا بالاتر رخ " "می‌دهد.
با افزودن خط زیر به فایل تنظیمات پروژه معمولا این مشکل را حل " "می‌کند:
ROSETTA_STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage'" #: templates/rosetta/languages.html:15 msgid "Filter" msgstr "فیلتر" #: templates/rosetta/languages.html:16 msgid "Project" msgstr "پروژه" #: templates/rosetta/languages.html:17 msgid "Third party" msgstr "شخص ثالث" #: templates/rosetta/languages.html:19 templates/rosetta/pofile.html:39 msgid "All" msgstr "همه" #: templates/rosetta/languages.html:32 msgid "Application" msgstr "کارکرد" #: templates/rosetta/languages.html:33 msgid "Progress" msgstr "پیشرفت" #: templates/rosetta/languages.html:34 msgid "Messages" msgstr "پیام‌ها" #: templates/rosetta/languages.html:35 msgid "Translated" msgstr "ترجمه شده" #: templates/rosetta/languages.html:36 templates/rosetta/pofile.html:71 msgid "Fuzzy" msgstr "نیاز به بازبینی" #: templates/rosetta/languages.html:37 msgid "Obsolete" msgstr "کهنه" #: templates/rosetta/languages.html:38 msgid "File" msgstr "پرونده" #: templates/rosetta/languages.html:61 msgid "Nothing to translate!" msgstr "موردی برای ترجمه وجود ندارد!" #: templates/rosetta/languages.html:62 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:63 #, python-format msgid "" "Please refer to Django's I18N " "documentation for a guide on how to set up internationalization for your" " project." msgstr "" "لطفا به مستندات جهانی‌سازی جنگو " "documentation برای راهنما در مورد روش راه‌اندازی امکانات جهانی‌سازی برای" " پروژه‌تان مراجعه کنید." #: templates/rosetta/pofile.html:9 msgid "Pick another file" msgstr "انتخاب یک فایل دیگر" #: templates/rosetta/pofile.html:10 msgid "Download this catalog" msgstr "دانلود این کاتالوگ" #: templates/rosetta/pofile.html:25 #, python-format msgid "Progress: %(percent_translated)s%%" msgstr "درصد پیشرفت: %(percent_translated)s%%" #: templates/rosetta/pofile.html:27 msgid "File is read-only: download the file when done editing!" msgstr "" "فایل ترجمه غیر قابل نوشتن است، پس از اتمام ترجمه فایل حاصل را دانلود نمایید!" #: templates/rosetta/pofile.html:28 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" "برخی موارد در آخرین دسته‌ی ترجمه قابل ذخیره نبود: این مشکل معمولا زمانی رخ " "می‌دهد که فایل کاتالوگ روی دیسک پس از آخرین دفعه‌ی بارگزاری آن، تغییر کرده " "باشد." #: templates/rosetta/pofile.html:32 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "در حال ترجمه به %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:35 msgid "Display:" msgstr "نمایش:" #: templates/rosetta/pofile.html:36 msgid "Untranslated only" msgstr "فقط ترجمه نشده‌ها" #: templates/rosetta/pofile.html:37 msgid "Translated only" msgstr "فقط ترجمه شده‌ها" #: templates/rosetta/pofile.html:38 msgid "Fuzzy only" msgstr "فقط موارد برای بازبینی" #: templates/rosetta/pofile.html:46 msgid "Search" msgstr "جستجو" #: templates/rosetta/pofile.html:48 msgid "Go" msgstr "برو" #: templates/rosetta/pofile.html:68 msgid "Original" msgstr "اصلی" #: templates/rosetta/pofile.html:72 msgid "Occurrences(s)" msgstr "موارد رخداد" #: templates/rosetta/pofile.html:86 templates/rosetta/pofile.html.py:89 #: templates/rosetta/pofile.html:104 templates/rosetta/pofile.html.py:107 msgid "Context hint" msgstr "راهنمای محلی" #: templates/rosetta/pofile.html:114 msgid "suggest" msgstr "پیشنهاد" #: templates/rosetta/pofile.html:125 #, python-format msgid "%(more_count)s more" msgid_plural "%(more_count)s more" msgstr[0] "%(more_count)s مورد بیش‌تر" msgstr[1] "%(more_count)s مورد بیش‌تر" #: templates/rosetta/pofile.html:137 msgid "Save and translate next block" msgstr "ذخیره و ترجمه‌ی دسته‌ی بعدی" #: templates/rosetta/pofile.html:141 msgid "Skip to page:" msgstr "پرش به صفحه:" #: templates/rosetta/pofile.html:154 msgid "Displaying:" msgstr "در حال نمایش:" #: templates/rosetta/pofile.html:158 #, 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 پیام" django-rosetta-0.7.2/rosetta/locale/fr/0000755000076500000240000000000012141707771020223 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/fr/LC_MESSAGES/0000755000076500000240000000000012141707771022010 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/fr/LC_MESSAGES/django.mo0000644000076500000240000000573212140410716023603 0ustar marcostaff00000000000000",<<H='  7& ,7:?R[qz4!=_} )$ NYit{YIR-    K_evy  $ #   " &    0 %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreAllApplicationDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!FuzzyFuzzy onlyGoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)OriginalPick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Some items in your last translation block couldn't be saved: this usually happens when the catalog file changes on disk after you last loaded it.Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 PO-Revision-Date: 2012-03-31 02:17 Last-Translator: Anonymous User Language-Team: French MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Translated-Using: django-rosetta 0.6.7 %(hits)s/%(message_number)s message %(hits)s/%(message_number)s messages%(more_count)s de plus%(more_count)s de plusTousApplicationAfficher:Affichés:Télécharger ce catalogueFichierFichier en seule lecture: télécharger le fichier à la fin de l'édition!FlousFlous uniquementGoAccueilSélection de la langueMessagesRien à Traduire!ObsolètesOccurrences(s)OriginalChoisir un autre fichierVeuillez vous référer à la documentation sur l'internationalisation de Django pour un guide sur comment activer et configurer la traduction de votre projet.ProgressionProgression: %(percent_translated)s%Sauver et traduire le prochain blocRecherchePasser à la page:Certains parmi vos derniers éléments n'ont pas pu être sauvés: ceci arrive généralement quand le catalogue de traductions à été modifié après qu'il ait été chargé.Traduire en %(rosetta_i18n_lang_name)sTraduitsTraduits uniquementNon-traduits uniquementVous 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.suggérerdjango-rosetta-0.7.2/rosetta/locale/fr/LC_MESSAGES/django.po0000644000076500000240000001240012140410716023574 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-04-05 15:09+0200\n" "PO-Revision-Date: 2008-09-22 11:02\n" "Last-Translator: Admin Admin \n" "Language-Team: French \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.6.7\n" #: templates/rosetta/languages.html:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Sélection de la langue" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:21 msgid "Home" msgstr "Accueil" #: templates/rosetta/languages.html:11 msgid "Filter" msgstr "Filtrer" #: templates/rosetta/languages.html:12 msgid "Project" msgstr "Projet" #: templates/rosetta/languages.html:13 msgid "Third party" msgstr "Tiers" #: templates/rosetta/languages.html:15 templates/rosetta/pofile.html:38 msgid "All" msgstr "Tous" #: templates/rosetta/languages.html:28 msgid "Application" msgstr "Application" #: templates/rosetta/languages.html:29 msgid "Progress" msgstr "Progression" #: templates/rosetta/languages.html:30 msgid "Messages" msgstr "Messages" #: templates/rosetta/languages.html:31 msgid "Translated" msgstr "Traduits" #: templates/rosetta/languages.html:32 templates/rosetta/pofile.html:70 msgid "Fuzzy" msgstr "Flous" #: templates/rosetta/languages.html:33 msgid "Obsolete" msgstr "Obsolètes" #: templates/rosetta/languages.html:34 msgid "File" msgstr "Fichier" #: templates/rosetta/languages.html:57 msgid "Nothing to translate!" msgstr "Rien à Traduire!" #: templates/rosetta/languages.html:58 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:59 #, python-format msgid "" "Please refer to Django's I18N " "documentation for a guide on how to set up internationalization for your" " project." msgstr "" "Veuillez vous référer à la documentation sur " "l'internationalisation de Django pour un guide sur comment activer et " "configurer la traduction de votre projet." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Choisir un autre fichier" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Télécharger ce catalogue" #: templates/rosetta/pofile.html:24 #, python-format msgid "Progress: %(percent_translated)s%%" msgstr "Progression: %(percent_translated)s%%" #: templates/rosetta/pofile.html:26 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:27 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" "Certains parmi vos derniers éléments n'ont pas pu être sauvés: ceci arrive " "généralement quand le catalogue de traductions à été modifié après qu'il ait" " été chargé." #: templates/rosetta/pofile.html:31 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Traduire en %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:34 msgid "Display:" msgstr "Afficher:" #: templates/rosetta/pofile.html:35 msgid "Untranslated only" msgstr "Non-traduits uniquement" #: templates/rosetta/pofile.html:36 msgid "Translated only" msgstr "Traduits uniquement" #: templates/rosetta/pofile.html:37 msgid "Fuzzy only" msgstr "Flous uniquement" #: templates/rosetta/pofile.html:45 msgid "Search" msgstr "Recherche" #: templates/rosetta/pofile.html:47 msgid "Go" msgstr "Go" #: templates/rosetta/pofile.html:67 msgid "Original" msgstr "Original" #: templates/rosetta/pofile.html:71 msgid "Occurrences(s)" msgstr "Occurrences(s)" #: templates/rosetta/pofile.html:85 templates/rosetta/pofile.html.py:88 #: templates/rosetta/pofile.html:103 templates/rosetta/pofile.html.py:106 msgid "Context hint" msgstr "Indice contextuel" #: templates/rosetta/pofile.html:113 msgid "suggest" msgstr "suggérer" #: templates/rosetta/pofile.html:124 #, 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:136 msgid "Save and translate next block" msgstr "Sauver et traduire le prochain bloc" #: templates/rosetta/pofile.html:140 msgid "Skip to page:" msgstr "Passer à la page:" #: templates/rosetta/pofile.html:153 msgid "Displaying:" msgstr "Affichés:" #: templates/rosetta/pofile.html:157 #, 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 "English" #~ msgstr "Anglais" #~ msgid "Both" #~ msgstr "Les deux" django-rosetta-0.7.2/rosetta/locale/hu/0000755000076500000240000000000012141707771020230 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/hu/LC_MESSAGES/0000755000076500000240000000000012141707771022015 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/hu/LC_MESSAGES/django.mo0000644000076500000240000000430512140410716023603 0ustar marcostaff00000000000000%PQ Zf|7 ! )  5@Ptb j t~= 0nJ, 5 AN]`    Display:Displaying:Download this catalogFileFile is read-only: download the file when done editing!GoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)Pick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 PO-Revision-Date: 2008-10-09 19:08+0100 Last-Translator: Gergely Kontra Language-Team: nomail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Translated-Using: django-rosetta 0.4.RC2 Plural-Forms: nplurals=1; plural=0; Szűrés:Szűrés:Katalógus letöltéseFájlA fájl írásvédett: töltse le a katalógust, ha végzett!KeressFőoldalNyelvválasztásÜzenetNincs mit fordítani!ElavultElőfordulásokMásik fájl választásaProjekted többnyelvűvé alakításához lásd a Django I18N dokumentációt!Állapot%(percent_translated)s% készMentésKeresésUgorj erre az oldalra:Fordítsa %(rosetta_i18n_lang_name)s nyelvreLefordítvaLefordítottFordításra várNincs beállítva egyetlen nyelv sem van nem hozott létre egy fordítási katalóguskoteget.ajánldjango-rosetta-0.7.2/rosetta/locale/hu/LC_MESSAGES/django.po0000644000076500000240000001031612140410716023605 0ustar marcostaff00000000000000# Copyright (C) 2008 # Gergely Kontra , 2008. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "PO-Revision-Date: 2008-10-09 19:08+0100\n" "Last-Translator: Gergely Kontra \n" "Language-Team: nomail \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:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Nyelvválasztás" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Főoldal" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Állapot" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Üzenet" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Lefordítva" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Elavult" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Fájl" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "Nincs mit fordítani!" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Projekted többnyelvűvé alakításához lásd a Django I18N dokumentációt!" #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Másik fájl választása" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Katalógus letöltése" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "%(percent_translated)s% kész" #: templates/rosetta/pofile.html:23 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:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Fordítsa %(rosetta_i18n_lang_name)s nyelvre" #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Szűrés:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Fordításra vár" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Lefordított" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Keresés" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Keress" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Előfordulások" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "ajánl" #: templates/rosetta/pofile.html:93 #, 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:105 msgid "Save and translate next block" msgstr "Mentés" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Ugorj erre az oldalra:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Szűrés:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Angol" #~ msgid "Both" #~ msgstr "Minden" django-rosetta-0.7.2/rosetta/locale/it/0000755000076500000240000000000012141707771020230 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/it/LC_MESSAGES/0000755000076500000240000000000012141707771022015 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/it/LC_MESSAGES/django.mo0000644000076500000240000000566312140410716023613 0ustar marcostaff00000000000000!$/,H'2Z ^j s7  /8J!# *8) t!J # +5K@P     % %  % : ,   }+   !   %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreAllApplicationDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!Fuzzy onlyGoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)OriginalPick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Some items in your last translation block couldn't be saved: this usually happens when the catalog file changes on disk after you last loaded it.Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 Last-Translator: Marco Bonetti Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit %(hits)s/%(message_number)s messaggio%(hits)s/%(message_number)s messaggiun altroancora %(more_count)sTuttiApplicazioneMostra:Mostrato:Scaricare il catalogoFilefile in solo lettura: scaricare il file alla fine dell'edizione!Solo fuzzyViaInizioSelezione della linguaMessaggioNulla da tradurre!ObsoletoOccorrenzeOriginaleScegliere un altro fileVogliate riferirvi alla documentazione sull'internazionalizzazione di Django per una giuda su come impostare le traduzioni per il vostro progetto.ProgressioneProgressione: %(percent_translated)s%Salvare e tradurre il prossimo bloccoCercarePassare alla pagina:Alcuni elementi non sono stati salvati: questo capita solitamente quando il catalogo delle traduzioni è stato modificato dopo che voi l'abbiate caricato.Tradurre verso il %(rosetta_i18n_lang_name)sTradottoSolo tradottiSolo non tradottiNon avete specificato nessuna lingua nelle vostre impostazioni, o non avete ancore generato un catalogo iniziale da tradurre.suggeriredjango-rosetta-0.7.2/rosetta/locale/it/LC_MESSAGES/django.po0000644000076500000240000001111312140410716023601 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "Last-Translator: Marco Bonetti \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: templates/rosetta/languages.html:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Selezione della lingua" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Inizio" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "Applicazione" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Progressione" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Messaggio" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Tradotto" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Obsoleto" #: templates/rosetta/languages.html:23 msgid "File" msgstr "File" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "Nulla da tradurre!" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Vogliate riferirvi alla documentazione " "sull'internazionalizzazione di Django per una giuda su come impostare le " "traduzioni per il vostro progetto." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Scegliere un altro file" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Scaricare il catalogo" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Progressione: %(percent_translated)s%" #: templates/rosetta/pofile.html:23 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:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "Alcuni elementi non sono stati salvati: questo capita solitamente quando " "il catalogo delle traduzioni è stato modificato dopo che voi l'abbiate caricato." #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Tradurre verso il %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Mostra:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Solo non tradotti" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Solo tradotti" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "Solo fuzzy" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "Tutti" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Cercare" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Via" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "Originale" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Occorrenze" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "suggerire" #: templates/rosetta/pofile.html:93 #, 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:105 msgid "Save and translate next block" msgstr "Salvare e tradurre il prossimo blocco" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Passare alla pagina:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Mostrato:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Inglese" #~ msgid "Both" #~ msgstr "Entrambi" django-rosetta-0.7.2/rosetta/locale/nl/0000755000076500000240000000000012141707771020225 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/nl/LC_MESSAGES/0000755000076500000240000000000012141707771022012 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/nl/LC_MESSAGES/django.mo0000644000076500000240000000454212140410716023603 0ustar marcostaff00000000000000%PHQ 7 &<ETf!!? F)T ~ti IWZ ] h u v D"N!q*_    %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messagesDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!GoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)Pick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.Project-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 PO-Revision-Date: 2008-06-05 17:06+0200 Last-Translator: Joost Cassee Language-Team: Joost Cassee MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); %(hits)s/%(message_number)s bericht%(hits)s/%(message_number)s berichtenBeeld:Tonen:Download deze catalogusBestandDit is bestand is alleen-lezen; download dit bestand wanneer u klaar bent met bewerken!GaVoorpaginaTaalselectieBerichtenNiets te vertalen!Niet meer gebruiktGevonden inSelecteer een ander bestandZie Django's I18N documentatie (Engels) voor meer informatie over internationalisatie.VoortgangVoortgang: %(percent_translated)s%Opslaan en volgende blok vertalenZoekenSnel naar pagina:Vertalen in het %(rosetta_i18n_lang_name)sVertaaldAlleen vertaaldAlleen onvertaaldU heeft geen talen gespecificeerd in het bestand settings.py of nog geen catalogus gegenereerd.django-rosetta-0.7.2/rosetta/locale/nl/LC_MESSAGES/django.po0000644000076500000240000001060412140410716023602 0ustar marcostaff00000000000000# 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 , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "PO-Revision-Date: 2008-06-05 17:06+0200\n" "Last-Translator: Joost Cassee \n" "Language-Team: Joost Cassee \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:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Taalselectie" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Voorpagina" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Voortgang" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Berichten" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Vertaald" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Niet meer gebruikt" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Bestand" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "Niets te vertalen!" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Zie Django's I18N documentatie (Engels) " "voor meer informatie over internationalisatie." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Selecteer een ander bestand" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Download deze catalogus" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Voortgang: %(percent_translated)s%" #: templates/rosetta/pofile.html:23 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:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Vertalen in het %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Beeld:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Alleen onvertaald" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Alleen vertaald" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Zoeken" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Ga" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Gevonden in" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "" #: templates/rosetta/pofile.html:93 #, python-format msgid "%(more_count)s more" msgid_plural "%(more_count)s more" msgstr[0] "" msgstr[1] "" #: templates/rosetta/pofile.html:105 msgid "Save and translate next block" msgstr "Opslaan en volgende blok vertalen" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Snel naar pagina:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Tonen:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Engels" #~ msgid "Both" #~ msgstr "Beide" django-rosetta-0.7.2/rosetta/locale/pl/0000755000076500000240000000000012141707771020227 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/pl/LC_MESSAGES/0000755000076500000240000000000012141707771022014 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/pl/LC_MESSAGES/django.mo0000644000076500000240000000503612140410716023604 0ustar marcostaff00000000000000%pHq'  7JMRen>!Gi ) thPpN- >IXlAq    ,!  & +: f v  p     %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!GoHomeLanguage selectionMessagesNothing to translate!ObsoleteOccurrences(s)Pick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 PO-Revision-Date: 2008-09-12 12:16 Last-Translator: Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Translated-Using: django-rosetta 0.4.RC2 %(hits)s/%(message_number)s komunikat%(hits)s/%(message_number)s komunikatów%(more_count)s więcej%(more_count)s więcejWyświetl:Wyświetlanie:Pobierz ten katalogPlikPlik jest tylko do odczytu: pobierz go kiedy skończysz edytowaćIdźPoczątekWybór językaKomunikatyNie ma nic do przetłumaczenia!PrzestarzałeWystąpienie(a)Wybierz inny plikSprawdź pomoc dotyczącą internacjonalizacji Django I18N , aby znaleźć dokumentację na temat internacjonalizacji twojego projektu.PostępPostęp: %(percent_translated)s %Zapisz i tłumacz następny blokSzukajPrzejdź do strony:Przetłumacz na %(rosetta_i18n_lang_name)s PrzetłumaczoneTylko przetłumaczoneTylko nieprzetłumaczoneNie podałeś żadnych języków w plikach ustawień, lub nie wygenerowałeś jeszcze katalogów do tłumaczeń.sugerujdjango-rosetta-0.7.2/rosetta/locale/pl/LC_MESSAGES/django.po0000644000076500000240000001075312140410716023611 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "PO-Revision-Date: 2008-09-12 12:16\n" "Last-Translator: \n" "Language-Team: LANGUAGE \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:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Wybór języka" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Początek" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Postęp" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Komunikaty" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Przetłumaczone" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Przestarzałe" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Plik" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "Nie ma nic do przetłumaczenia!" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Sprawdź pomoc dotyczącą internacjonalizacji " "Django I18N , aby znaleźć dokumentację na temat internacjonalizacji " "twojego projektu." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Wybierz inny plik" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Pobierz ten katalog" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Postęp: %(percent_translated)s %" #: templates/rosetta/pofile.html:23 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:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Przetłumacz na %(rosetta_i18n_lang_name)s " #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Wyświetl:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Tylko nieprzetłumaczone" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Tylko przetłumaczone" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Szukaj" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Idź" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Wystąpienie(a)" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "sugeruj" #: templates/rosetta/pofile.html:93 #, 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:105 msgid "Save and translate next block" msgstr "Zapisz i tłumacz następny blok" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Przejdź do strony:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Wyświetlanie:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Angielski" #~ msgid "Both" #~ msgstr "Oba" django-rosetta-0.7.2/rosetta/locale/ru/0000755000076500000240000000000012141707771020242 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/ru/LC_MESSAGES/0000755000076500000240000000000012141707771022027 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/ru/LC_MESSAGES/django.mo0000644000076500000240000000374312140410716023622 0ustar marcostaff00000000000000H R [g}7!3Q X)f  ]%;&Sz  "8K`$z-D '#2.V"$    %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messagesDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!GoHomeLanguage selectionMessagesObsoleteOccurrences(s)Pick another fileProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 Last-Translator: Nazar Leush Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit %(hits)s/%(message_number)s сообщение%(hits)s/%(message_number)s сообщенийОтображать:Отображение:Скачать этот каталогФайлФайл только для чтения: загрузите файл после завершения редактирования!ВперёдНачалоВыбор языкаСообщенийУстаревшихВстречается вВыбрать другой файлОбработаноОбработано: %(percent_translated)s%Сохранить и перевести следующий блокПоискПерейти к странице:Перевод на %(rosetta_i18n_lang_name)sС переводомТолько с переводомТолько без переводаdjango-rosetta-0.7.2/rosetta/locale/ru/LC_MESSAGES/django.po0000644000076500000240000001052112140410716023615 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "Last-Translator: Nazar Leush \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: templates/rosetta/languages.html:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Выбор языка" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Начало" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Обработано" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Сообщений" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "С переводом" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Устаревших" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Файл" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Выбрать другой файл" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Скачать этот каталог" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Обработано: %(percent_translated)s%" #: templates/rosetta/pofile.html:23 msgid "File is read-only: download the file when done editing!" msgstr "" "Файл только для чтения: загрузите файл после завершения редактирования!" #: templates/rosetta/pofile.html:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Перевод на %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Отображать:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Только без перевода" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Только с переводом" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Поиск" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Вперёд" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Встречается в" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "" #: templates/rosetta/pofile.html:93 #, python-format msgid "%(more_count)s more" msgid_plural "%(more_count)s more" msgstr[0] "" msgstr[1] "" #: templates/rosetta/pofile.html:105 msgid "Save and translate next block" msgstr "Сохранить и перевести следующий блок" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Перейти к странице:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Отображение:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Английский" #~ msgid "Both" #~ msgstr "Все" django-rosetta-0.7.2/rosetta/locale/tr/0000755000076500000240000000000012141707771020241 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/tr/LC_MESSAGES/0000755000076500000240000000000012141707771022026 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/tr/LC_MESSAGES/django.mo0000644000076500000240000000566512140410716023626 0ustar marcostaff00000000000000 +H': >J S_u7z ! ) tKSF'"JPYb&qK    # < P Y p   , 2 @ '  * m@      %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messages%(more_count)s more%(more_count)s moreAllApplicationDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!FuzzyFuzzy onlyGoHomeLanguage selectionMessagesNothing to translate!ObsoleteOriginalPick another filePlease refer to Django's I18N documentation for a guide on how to set up internationalization for your project.ProgressSave and translate next blockSearchSkip to page:Some items in your last translation block couldn't be saved: this usually happens when the catalog file changes on disk after you last loaded it.Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyYou haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs.suggestProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-11-11 15:45+0200 PO-Revision-Date: 2008-06-16 10:11+0100 Last-Translator: RECEP KIRMIZI Language-Team: Language: Turkish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: X-Poedit-Country: %(hits)s/%(message_number)s mesaj%(hits)s/%(message_number)s mesajlar%(more_count)s daha%(more_count)s dahaHepsiUygulamaGöster:Gösteriliyor:Bu kataloğu bilgisayarınıza indirinDosyaDosya salt-okunur: İşlemleriniz bittikten sonra bilgisayarınıza indirinBelirsizSadece belirsizGitAna SayfaDil seçimiMesajÇevrilecek birşey yok!Kullanımda olmayanOrijinalBaşka bir dosya alınProjenizdeki çoklu dilde geliştirebilmek için lütfen Django'nun Django'nun I18N dökümantasyonuna başvurun.İlerlemeKaydet ve sonraki bloğu çevirAramaSayfaya geç:Çeviri bloğunuzdaki bazı öğeler kayıt edilemedi: bu genellikle üzerinde çalıştığınız dosyanın sunucu tarafında değişmesi sonucundaortaya çıkar.Şuna çevir %(rosetta_i18n_lang_name)sÇevrildiSadece çevirilmişSadece çevirilmemişSettings dosyanızda hiçbir dil belirtmediniz, ya da toplu olarak çeviri kataloglarını oluşturmadınız.öneridjango-rosetta-0.7.2/rosetta/locale/tr/LC_MESSAGES/django.po0000644000076500000240000001143712140410716023623 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-11-11 15:45+0200\n" "PO-Revision-Date: 2008-06-16 10:11+0100\n" "Last-Translator: RECEP KIRMIZI \n" "Language-Team: \n" "Language: Turkish \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: \n" "X-Poedit-Country: \n" #: templates/rosetta/languages.html:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Dil seçimi" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Ana Sayfa" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "Uygulama" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "İlerleme" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Mesaj" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Çevrildi" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "Belirsiz" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Kullanımda olmayan" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Dosya" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "Çevrilecek birşey yok!" #: templates/rosetta/languages.html:45 msgid "" "You haven't specified any languages in your settings file, or haven't yet " "generated a batch of translation catalogs." msgstr "" "Settings dosyanızda hiçbir dil belirtmediniz, ya da toplu olarak çeviri " "kataloglarını oluşturmadınız." # python-format #: templates/rosetta/languages.html:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" "Projenizdeki çoklu dilde geliştirebilmek için lütfen Django'nun Django'nun I18N dökümantasyonuna başvurun." #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Başka bir dosya alın" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Bu kataloğu bilgisayarınıza indirin" #: templates/rosetta/pofile.html:21 #, fuzzy, python-format msgid "Progress: %(percent_translated)s%%" msgstr "İlerleme: %(percent_translated)s%" #: templates/rosetta/pofile.html:23 msgid "File is read-only: download the file when done editing!" msgstr "" "Dosya salt-okunur: İşlemleriniz bittikten sonra bilgisayarınıza indirin" #: templates/rosetta/pofile.html:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" "Çeviri bloğunuzdaki bazı öğeler kayıt edilemedi: bu genellikle üzerinde " "çalıştığınız dosyanın sunucu tarafında değişmesi sonucundaortaya çıkar." #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Şuna çevir %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Göster:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Sadece çevirilmemiş" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Sadece çevirilmiş" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "Sadece belirsiz" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "Hepsi" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Arama" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Git" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "Orijinal" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "öneri" #: templates/rosetta/pofile.html:93 #, python-format msgid "%(more_count)s more" msgid_plural "%(more_count)s more" msgstr[0] "%(more_count)s daha" msgstr[1] "%(more_count)s daha" #: templates/rosetta/pofile.html:105 msgid "Save and translate next block" msgstr "Kaydet ve sonraki bloğu çevir" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Sayfaya geç:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Gösteriliyor:" #: templates/rosetta/pofile.html:124 #, python-format msgid "%(hits)s/%(message_number)s message" msgid_plural "%(hits)s/%(message_number)s messages" msgstr[0] "%(hits)s/%(message_number)s mesaj" msgstr[1] "%(hits)s/%(message_number)s mesajlar" #~ msgid "Oluşum(lar)" #~ msgstr "Gefunden in" #~ msgid "English" #~ msgstr "İngilizce" #~ msgid "Both" #~ msgstr "İkiside" django-rosetta-0.7.2/rosetta/locale/uk/0000755000076500000240000000000012141707771020233 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/uk/LC_MESSAGES/0000755000076500000240000000000012141707771022020 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/uk/LC_MESSAGES/django.mo0000644000076500000240000000400012140410716023576 0ustar marcostaff00000000000000H R [g}7!3Q X)f  g/G,a '6Jav"+D ;%F0l#'    %(hits)s/%(message_number)s message%(hits)s/%(message_number)s messagesDisplay:Displaying:Download this catalogFileFile is read-only: download the file when done editing!GoHomeLanguage selectionMessagesObsoleteOccurrences(s)Pick another fileProgressProgress: %(percent_translated)s%Save and translate next blockSearchSkip to page:Translate into %(rosetta_i18n_lang_name)sTranslatedTranslated onlyUntranslated onlyProject-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2010-07-04 13:42+0200 Last-Translator: Nazar Leush Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit %(hits)s/%(message_number)s повідомлення%(hits)s/%(message_number)s повідомленьВідображати:Відображення:Завантажити цей каталогФайлФайл тільки для читання: завантажте файл після завершення редагування!ВпередДомівкаВибір мовиПовідомленьЗастарілихЗустрічається вВибрати інший файлЗавершеноЗавершено: %(percent_translated)s%Записати і перекласти наступний блокПошукПерейти до сторінки:Переклад на %(rosetta_i18n_lang_name)sПерекладеноТільки перекладеніТільки неперекладеніdjango-rosetta-0.7.2/rosetta/locale/uk/LC_MESSAGES/django.po0000644000076500000240000001055312140410716023613 0ustar marcostaff00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: Rosetta\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-07-04 13:42+0200\n" "Last-Translator: Nazar Leush \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: templates/rosetta/languages.html:4 templates/rosetta/languages.html.py:6 msgid "Language selection" msgstr "Вибір мови" #: templates/rosetta/languages.html:6 templates/rosetta/pofile.html:18 msgid "Home" msgstr "Домівка" #: templates/rosetta/languages.html:17 msgid "Application" msgstr "" #: templates/rosetta/languages.html:18 msgid "Progress" msgstr "Завершено" #: templates/rosetta/languages.html:19 msgid "Messages" msgstr "Повідомлень" #: templates/rosetta/languages.html:20 msgid "Translated" msgstr "Перекладено" #: templates/rosetta/languages.html:21 templates/rosetta/pofile.html:57 msgid "Fuzzy" msgstr "" #: templates/rosetta/languages.html:22 msgid "Obsolete" msgstr "Застарілих" #: templates/rosetta/languages.html:23 msgid "File" msgstr "Файл" #: templates/rosetta/languages.html:44 msgid "Nothing to translate!" msgstr "" #: templates/rosetta/languages.html:45 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:46 #, python-format msgid "" "Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project." msgstr "" #: templates/rosetta/pofile.html:8 msgid "Pick another file" msgstr "Вибрати інший файл" #: templates/rosetta/pofile.html:9 msgid "Download this catalog" msgstr "Завантажити цей каталог" #: templates/rosetta/pofile.html:21 msgid "Progress: %(percent_translated)s%" msgstr "Завершено: %(percent_translated)s%" #: templates/rosetta/pofile.html:23 msgid "File is read-only: download the file when done editing!" msgstr "Файл тільки для читання: завантажте файл після завершення редагування!" #: templates/rosetta/pofile.html:24 msgid "" "Some items in your last translation block couldn't be saved: this usually " "happens when the catalog file changes on disk after you last loaded it." msgstr "" #: templates/rosetta/pofile.html:28 #, python-format msgid "Translate into %(rosetta_i18n_lang_name)s" msgstr "Переклад на %(rosetta_i18n_lang_name)s" #: templates/rosetta/pofile.html:31 msgid "Display:" msgstr "Відображати:" #: templates/rosetta/pofile.html:32 msgid "Untranslated only" msgstr "Тільки неперекладені" #: templates/rosetta/pofile.html:33 msgid "Translated only" msgstr "Тільки перекладені" #: templates/rosetta/pofile.html:34 msgid "Fuzzy only" msgstr "" #: templates/rosetta/pofile.html:35 msgid "All" msgstr "" #: templates/rosetta/pofile.html:42 msgid "Search" msgstr "Пошук" #: templates/rosetta/pofile.html:44 msgid "Go" msgstr "Вперед" #: templates/rosetta/pofile.html:54 msgid "Original" msgstr "" #: templates/rosetta/pofile.html:58 msgid "Occurrences(s)" msgstr "Зустрічається в" #: templates/rosetta/pofile.html:82 msgid "suggest" msgstr "" #: templates/rosetta/pofile.html:93 #, python-format msgid "%(more_count)s more" msgid_plural "%(more_count)s more" msgstr[0] "" msgstr[1] "" #: templates/rosetta/pofile.html:105 msgid "Save and translate next block" msgstr "Записати і перекласти наступний блок" #: templates/rosetta/pofile.html:109 msgid "Skip to page:" msgstr "Перейти до сторінки:" #: templates/rosetta/pofile.html:122 msgid "Displaying:" msgstr "Відображення:" #: templates/rosetta/pofile.html:124 #, 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 "English" #~ msgstr "Англійська" #~ msgid "Both" #~ msgstr "Всі" django-rosetta-0.7.2/rosetta/locale/xx/0000755000076500000240000000000012141707771020253 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/xx/LC_MESSAGES/0000755000076500000240000000000012141707771022040 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/locale/xx/LC_MESSAGES/django.mo0000644000076500000240000000073412141706652023640 0ustar marcostaff000000000000004LLMVP_ String 1String 2Project-Id-Version: Rosetta Report-Msgid-Bugs-To: POT-Creation-Date: 2009-10-21 12:21+0200 PO-Revision-Date: 2013-05-06 06:02-0500 Last-Translator: b' ' Language-Team: French MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Translated-Using: django-rosetta 0.7.2 Hello, worldHello, world, from client two!django-rosetta-0.7.2/rosetta/locale/xx/LC_MESSAGES/django.po0000644000076500000240000000147012141706652023641 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \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" msgid "String 1" msgstr "" msgid "String 2" msgstr "" #. Translators: This is a text of the base template #: templates/base.html:43 msgid "String 3 with comment" msgstr "" msgctxt "Context hint" msgid "String 4" msgstr "" django-rosetta-0.7.2/rosetta/models.py0000644000076500000240000000007012140410716020174 0ustar marcostaff00000000000000from django.db import models # Create your models here. django-rosetta-0.7.2/rosetta/polib.py0000644000076500000240000016332312140410716020031 0ustar marcostaff00000000000000# -* coding: utf-8 -*- # # License: MIT (see LICENSE file provided) # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: """ **polib** allows you to manipulate, create, modify gettext files (pot, po and mo files). You can load existing files, iterate through it's entries, add, modify entries, comments or metadata, etc. or create new po files from scratch. **polib** provides a simple and pythonic API via the :func:`~polib.pofile` and :func:`~polib.mofile` convenience functions. """ __author__ = 'David Jean Louis ' __version__ = '1.0.3' __all__ = ['pofile', 'POFile', 'POEntry', 'mofile', 'MOFile', 'MOEntry', 'default_encoding', 'escape', 'unescape', 'detect_encoding', ] import array import codecs import os import re import struct import sys import textwrap # the default encoding to use when encoding cannot be detected default_encoding = 'utf-8' # python 2/3 compatibility helpers {{{ if sys.version_info[:2] < (3, 0): PY3 = False text_type = unicode def b(s): return s def u(s): return unicode(s, "unicode_escape") else: PY3 = True text_type = str def b(s): return s.encode("latin-1") def u(s): return s # }}} # _pofile_or_mofile {{{ def _pofile_or_mofile(f, type, **kwargs): """ Internal function used by :func:`polib.pofile` and :func:`polib.mofile` to honor the DRY concept. """ # get the file encoding enc = kwargs.get('encoding') if enc is None: enc = detect_encoding(f, type == 'mofile') # parse the file kls = type == 'pofile' and _POFileParser or _MOFileParser parser = kls( f, encoding=enc, check_for_duplicates=kwargs.get('check_for_duplicates', False), klass=kwargs.get('klass') ) instance = parser.parse() instance.wrapwidth = kwargs.get('wrapwidth', 78) return instance # }}} # function pofile() {{{ def pofile(pofile, **kwargs): """ Convenience function that parses the po or pot file ``pofile`` and returns a :class:`~polib.POFile` instance. Arguments: ``pofile`` string, full or relative path to the po/pot file or its content (data). ``wrapwidth`` integer, the wrap width, only useful when the ``-w`` option was passed to xgettext (optional, default: ``78``). ``encoding`` string, the encoding to use (e.g. "utf-8") (default: ``None``, the encoding will be auto-detected). ``check_for_duplicates`` whether to check for duplicate entries when adding entries to the file (optional, default: ``False``). ``klass`` class which is used to instantiate the return value (optional, default: ``None``, the return value with be a :class:`~polib.POFile` instance). """ return _pofile_or_mofile(pofile, 'pofile', **kwargs) # }}} # function mofile() {{{ def mofile(mofile, **kwargs): """ Convenience function that parses the mo file ``mofile`` and returns a :class:`~polib.MOFile` instance. Arguments: ``mofile`` string, full or relative path to the mo file or its content (data). ``wrapwidth`` integer, the wrap width, only useful when the ``-w`` option was passed to xgettext to generate the po file that was used to format the mo file (optional, default: ``78``). ``encoding`` string, the encoding to use (e.g. "utf-8") (default: ``None``, the encoding will be auto-detected). ``check_for_duplicates`` whether to check for duplicate entries when adding entries to the file (optional, default: ``False``). ``klass`` class which is used to instantiate the return value (optional, default: ``None``, the return value with be a :class:`~polib.POFile` instance). """ return _pofile_or_mofile(mofile, 'mofile', **kwargs) # }}} # function detect_encoding() {{{ def detect_encoding(file, binary_mode=False): """ Try to detect the encoding used by the ``file``. The ``file`` argument can be a PO or MO file path or a string containing the contents of the file. If the encoding cannot be detected, the function will return the value of ``default_encoding``. Arguments: ``file`` string, full or relative path to the po/mo file or its content. ``binary_mode`` boolean, set this to True if ``file`` is a mo file. """ PATTERN = r'"?Content-Type:.+? charset=([\w_\-:\.]+)' rxt = re.compile(u(PATTERN)) rxb = re.compile(b(PATTERN)) def charset_exists(charset): """Check whether ``charset`` is valid or not.""" try: codecs.lookup(charset) except LookupError: return False return True try: is_file = os.path.exists(file) except (ValueError, UnicodeEncodeError): is_file = False if not is_file: match = rxt.search(file) if match: enc = match.group(1).strip() if charset_exists(enc): return enc else: # For PY3, always treat as binary if binary_mode or PY3: mode = 'rb' rx = rxb else: mode = 'r' rx = rxt f = open(file, mode) for l in f.readlines(): match = rx.search(l) if match: f.close() enc = match.group(1).strip() if not isinstance(enc, text_type): enc = enc.decode('utf-8') if charset_exists(enc): return enc f.close() return default_encoding # }}} # function escape() {{{ def escape(st): """ Escapes the characters ``\\\\``, ``\\t``, ``\\n``, ``\\r`` and ``"`` in the given string ``st`` and returns it. """ return st.replace('\\', r'\\')\ .replace('\t', r'\t')\ .replace('\r', r'\r')\ .replace('\n', r'\n')\ .replace('\"', r'\"') # }}} # function unescape() {{{ def unescape(st): """ Unescapes the characters ``\\\\``, ``\\t``, ``\\n``, ``\\r`` and ``"`` in the given string ``st`` and returns it. """ def unescape_repl(m): m = m.group(1) if m == 'n': return '\n' if m == 't': return '\t' if m == 'r': return '\r' if m == '\\': return '\\' return m # handles escaped double quote return re.sub(r'\\(\\|n|t|r|")', unescape_repl, st) # }}} # class _BaseFile {{{ class _BaseFile(list): """ Common base class for the :class:`~polib.POFile` and :class:`~polib.MOFile` classes. This class should **not** be instanciated directly. """ def __init__(self, *args, **kwargs): """ Constructor, accepts the following keyword arguments: ``pofile`` string, the path to the po or mo file, or its content as a string. ``wrapwidth`` integer, the wrap width, only useful when the ``-w`` option was passed to xgettext (optional, default: ``78``). ``encoding`` string, the encoding to use, defaults to ``default_encoding`` global variable (optional). ``check_for_duplicates`` whether to check for duplicate entries when adding entries to the file, (optional, default: ``False``). """ list.__init__(self) # the opened file handle pofile = kwargs.get('pofile', None) if pofile and os.path.exists(pofile): self.fpath = pofile else: self.fpath = kwargs.get('fpath') # the width at which lines should be wrapped self.wrapwidth = kwargs.get('wrapwidth', 78) # the file encoding self.encoding = kwargs.get('encoding', default_encoding) # whether to check for duplicate entries or not self.check_for_duplicates = kwargs.get('check_for_duplicates', False) # header self.header = '' # both po and mo files have metadata self.metadata = {} self.metadata_is_fuzzy = 0 def __unicode__(self): """ Returns the unicode representation of the file. """ ret = [] entries = [self.metadata_as_entry()] + \ [e for e in self if not e.obsolete] for entry in entries: ret.append(entry.__unicode__(self.wrapwidth)) for entry in self.obsolete_entries(): ret.append(entry.__unicode__(self.wrapwidth)) ret = u('\n').join(ret) assert isinstance(ret, text_type) #if type(ret) != text_type: # return unicode(ret, self.encoding) return ret if PY3: def __str__(self): return self.__unicode__() else: def __str__(self): """ Returns the string representation of the file. """ return unicode(self).encode(self.encoding) def __contains__(self, entry): """ Overriden ``list`` method to implement the membership test (in and not in). The method considers that an entry is in the file if it finds an entry that has the same msgid (the test is **case sensitive**) and the same msgctxt (or none for both entries). Argument: ``entry`` an instance of :class:`~polib._BaseEntry`. """ return self.find(entry.msgid, by='msgid', msgctxt=entry.msgctxt) \ is not None def __eq__(self, other): return str(self) == str(other) def append(self, entry): """ Overriden method to check for duplicates entries, if a user tries to add an entry that is already in the file, the method will raise a ``ValueError`` exception. Argument: ``entry`` an instance of :class:`~polib._BaseEntry`. """ if self.check_for_duplicates and entry in self: raise ValueError('Entry "%s" already exists' % entry.msgid) super(_BaseFile, self).append(entry) def insert(self, index, entry): """ Overriden method to check for duplicates entries, if a user tries to add an entry that is already in the file, the method will raise a ``ValueError`` exception. Arguments: ``index`` index at which the entry should be inserted. ``entry`` an instance of :class:`~polib._BaseEntry`. """ if self.check_for_duplicates and entry in self: raise ValueError('Entry "%s" already exists' % entry.msgid) super(_BaseFile, self).insert(index, entry) def metadata_as_entry(self): """ Returns the file metadata as a :class:`~polib.POFile` instance. """ e = POEntry(msgid='') mdata = self.ordered_metadata() if mdata: strs = [] for name, value in mdata: # Strip whitespace off each line in a multi-line entry strs.append('%s: %s' % (name, value)) e.msgstr = '\n'.join(strs) + '\n' if self.metadata_is_fuzzy: e.flags.append('fuzzy') return e def save(self, fpath=None, repr_method='__unicode__'): """ Saves the po file to ``fpath``. If it is an existing file and no ``fpath`` is provided, then the existing file is rewritten with the modified data. Keyword arguments: ``fpath`` string, full or relative path to the file. ``repr_method`` string, the method to use for output. """ if self.fpath is None and fpath is None: raise IOError('You must provide a file path to save() method') contents = getattr(self, repr_method)() if fpath is None: fpath = self.fpath if repr_method == 'to_binary': fhandle = open(fpath, 'wb') else: fhandle = codecs.open(fpath, 'w', self.encoding) if not isinstance(contents, text_type): contents = contents.decode(self.encoding) fhandle.write(contents) fhandle.close() # set the file path if not set if self.fpath is None and fpath: self.fpath = fpath def find(self, st, by='msgid', include_obsolete_entries=False, msgctxt=False): """ Find the entry which msgid (or property identified by the ``by`` argument) matches the string ``st``. Keyword arguments: ``st`` string, the string to search for. ``by`` string, the property to use for comparison (default: ``msgid``). ``include_obsolete_entries`` boolean, whether to also search in entries that are obsolete. ``msgctxt`` string, allows to specify a specific message context for the search. """ if include_obsolete_entries: entries = self[:] else: entries = [e for e in self if not e.obsolete] for e in entries: if getattr(e, by) == st: if msgctxt is not False and e.msgctxt != msgctxt: continue return e return None def ordered_metadata(self): """ Convenience method that returns an ordered version of the metadata dictionary. The return value is list of tuples (metadata name, metadata_value). """ # copy the dict first metadata = self.metadata.copy() data_order = [ 'Project-Id-Version', 'Report-Msgid-Bugs-To', 'POT-Creation-Date', 'PO-Revision-Date', 'Last-Translator', 'Language-Team', 'MIME-Version', 'Content-Type', 'Content-Transfer-Encoding' ] ordered_data = [] for data in data_order: try: value = metadata.pop(data) ordered_data.append((data, value)) except KeyError: pass # the rest of the metadata will be alphabetically ordered since there # are no specs for this AFAIK for data in sorted(metadata.keys()): value = metadata[data] ordered_data.append((data, value)) return ordered_data def to_binary(self): """ Return the binary representation of the file. """ offsets = [] entries = self.translated_entries() # the keys are sorted in the .mo file def cmp(_self, other): # msgfmt compares entries with msgctxt if it exists self_msgid = _self.msgctxt and _self.msgctxt or _self.msgid other_msgid = other.msgctxt and other.msgctxt or other.msgid if self_msgid > other_msgid: return 1 elif self_msgid < other_msgid: return -1 else: return 0 # add metadata entry entries.sort(key=lambda o: o.msgctxt or o.msgid) mentry = self.metadata_as_entry() #mentry.msgstr = mentry.msgstr.replace('\\n', '').lstrip() entries = [mentry] + entries entries_len = len(entries) ids, strs = b(''), b('') for e in entries: # For each string, we need size and file offset. Each string is # NUL terminated; the NUL does not count into the size. msgid = b('') if e.msgctxt: # Contexts are stored by storing the concatenation of the # context, a byte, and the original string msgid = self._encode(e.msgctxt + '\4') if e.msgid_plural: msgstr = [] for index in sorted(e.msgstr_plural.keys()): msgstr.append(e.msgstr_plural[index]) msgid += self._encode(e.msgid + '\0' + e.msgid_plural) msgstr = self._encode('\0'.join(msgstr)) else: msgid += self._encode(e.msgid) msgstr = self._encode(e.msgstr) offsets.append((len(ids), len(msgid), len(strs), len(msgstr))) ids += msgid + b('\0') strs += msgstr + b('\0') # The header is 7 32-bit unsigned integers. keystart = 7 * 4 + 16 * entries_len # and the values start after the keys valuestart = keystart + len(ids) koffsets = [] voffsets = [] # The string table first has the list of keys, then the list of values. # Each entry has first the size of the string, then the file offset. for o1, l1, o2, l2 in offsets: koffsets += [l1, o1 + keystart] voffsets += [l2, o2 + valuestart] offsets = koffsets + voffsets # check endianness for magic number if struct.pack('@h', 1) == struct.pack(' 1: # python 3.2 or superior output += array.array("i", offsets).tobytes() else: output += array.array("i", offsets).tostring() output += ids output += strs return output def _encode(self, mixed): """ Encodes the given ``mixed`` argument with the file encoding if and only if it's an unicode string and returns the encoded string. """ if isinstance(mixed, text_type): mixed = mixed.encode(self.encoding) return mixed # }}} # class POFile {{{ class POFile(_BaseFile): """ Po (or Pot) file reader/writer. This class inherits the :class:`~polib._BaseFile` class and, by extension, the python ``list`` type. """ def __unicode__(self): """ Returns the unicode representation of the po file. """ ret, headers = '', self.header.split('\n') for header in headers: if header[:1] in [',', ':']: ret += '#%s\n' % header else: ret += '# %s\n' % header if not isinstance(ret, text_type): ret = ret.decode(self.encoding) return ret + _BaseFile.__unicode__(self) def save_as_mofile(self, fpath): """ Saves the binary representation of the file to given ``fpath``. Keyword argument: ``fpath`` string, full or relative path to the mo file. """ _BaseFile.save(self, fpath, 'to_binary') def percent_translated(self): """ Convenience method that returns the percentage of translated messages. """ total = len([e for e in self if not e.obsolete]) if total == 0: return 100 translated = len(self.translated_entries()) return int((100.00 / float(total)) * translated) def translated_entries(self): """ Convenience method that returns the list of translated entries. """ return [e for e in self if e.translated()] def untranslated_entries(self): """ Convenience method that returns the list of untranslated entries. """ return [e for e in self if not e.translated() and not e.obsolete and not 'fuzzy' in e.flags] def fuzzy_entries(self): """ Convenience method that returns the list of fuzzy entries. """ return [e for e in self if 'fuzzy' in e.flags] def obsolete_entries(self): """ Convenience method that returns the list of obsolete entries. """ return [e for e in self if e.obsolete] def merge(self, refpot): """ Convenience method that merges the current pofile with the pot file provided. It behaves exactly as the gettext msgmerge utility: * comments of this file will be preserved, but extracted comments and occurrences will be discarded; * any translations or comments in the file will be discarded, however, dot comments and file positions will be preserved; * the fuzzy flags are preserved. Keyword argument: ``refpot`` object POFile, the reference catalog. """ # Store entries in dict/set for faster access self_entries = dict((entry.msgid, entry) for entry in self) refpot_msgids = set(entry.msgid for entry in refpot) # Merge entries that are in the refpot for entry in refpot: e = self_entries.get(entry.msgid) if e is None: e = POEntry() self.append(e) e.merge(entry) # ok, now we must "obsolete" entries that are not in the refpot anymore for entry in self: if entry.msgid not in refpot_msgids: entry.obsolete = True # }}} # class MOFile {{{ class MOFile(_BaseFile): """ Mo file reader/writer. This class inherits the :class:`~polib._BaseFile` class and, by extension, the python ``list`` type. """ BIG_ENDIAN = 0xde120495 LITTLE_ENDIAN = 0x950412de def __init__(self, *args, **kwargs): """ Constructor, accepts all keywords arguments accepted by :class:`~polib._BaseFile` class. """ _BaseFile.__init__(self, *args, **kwargs) self.magic_number = None self.version = 0 def save_as_pofile(self, fpath): """ Saves the mofile as a pofile to ``fpath``. Keyword argument: ``fpath`` string, full or relative path to the file. """ _BaseFile.save(self, fpath) def save(self, fpath=None): """ Saves the mofile to ``fpath``. Keyword argument: ``fpath`` string, full or relative path to the file. """ _BaseFile.save(self, fpath, 'to_binary') def percent_translated(self): """ Convenience method to keep the same interface with POFile instances. """ return 100 def translated_entries(self): """ Convenience method to keep the same interface with POFile instances. """ return self def untranslated_entries(self): """ Convenience method to keep the same interface with POFile instances. """ return [] def fuzzy_entries(self): """ Convenience method to keep the same interface with POFile instances. """ return [] def obsolete_entries(self): """ Convenience method to keep the same interface with POFile instances. """ return [] # }}} # class _BaseEntry {{{ class _BaseEntry(object): """ Base class for :class:`~polib.POEntry` and :class:`~polib.MOEntry` classes. This class should **not** be instanciated directly. """ def __init__(self, *args, **kwargs): """ Constructor, accepts the following keyword arguments: ``msgid`` string, the entry msgid. ``msgstr`` string, the entry msgstr. ``msgid_plural`` string, the entry msgid_plural. ``msgstr_plural`` list, the entry msgstr_plural lines. ``msgctxt`` string, the entry context (msgctxt). ``obsolete`` bool, whether the entry is "obsolete" or not. ``encoding`` string, the encoding to use, defaults to ``default_encoding`` global variable (optional). """ self.msgid = kwargs.get('msgid', '') self.msgstr = kwargs.get('msgstr', '') self.msgid_plural = kwargs.get('msgid_plural', '') self.msgstr_plural = kwargs.get('msgstr_plural', {}) self.msgctxt = kwargs.get('msgctxt', None) self.obsolete = kwargs.get('obsolete', False) self.encoding = kwargs.get('encoding', default_encoding) def __unicode__(self, wrapwidth=78): """ Returns the unicode representation of the entry. """ if self.obsolete: delflag = '#~ ' else: delflag = '' ret = [] # write the msgctxt if any if self.msgctxt is not None: ret += self._str_field("msgctxt", delflag, "", self.msgctxt, wrapwidth) # write the msgid ret += self._str_field("msgid", delflag, "", self.msgid, wrapwidth) # write the msgid_plural if any if self.msgid_plural: ret += self._str_field("msgid_plural", delflag, "", self.msgid_plural, wrapwidth) if self.msgstr_plural: # write the msgstr_plural if any msgstrs = self.msgstr_plural keys = list(msgstrs) keys.sort() for index in keys: msgstr = msgstrs[index] plural_index = '[%s]' % index ret += self._str_field("msgstr", delflag, plural_index, msgstr, wrapwidth) else: # otherwise write the msgstr ret += self._str_field("msgstr", delflag, "", self.msgstr, wrapwidth) ret.append('') ret = u('\n').join(ret) return ret if PY3: def __str__(self): return self.__unicode__() else: def __str__(self): """ Returns the string representation of the entry. """ return unicode(self).encode(self.encoding) def __eq__(self, other): return str(self) == str(other) def _str_field(self, fieldname, delflag, plural_index, field, wrapwidth=78): lines = field.splitlines(True) if len(lines) > 1: lines = [''] + lines # start with initial empty line else: escaped_field = escape(field) specialchars_count = 0 for c in ['\\', '\n', '\r', '\t', '"']: specialchars_count += field.count(c) # comparison must take into account fieldname length + one space # + 2 quotes (eg. msgid "") flength = len(fieldname) + 3 if plural_index: flength += len(plural_index) real_wrapwidth = wrapwidth - flength + specialchars_count if wrapwidth > 0 and len(field) > real_wrapwidth: # Wrap the line but take field name into account lines = [''] + [unescape(item) for item in wrap( escaped_field, wrapwidth - 2, # 2 for quotes "" drop_whitespace=False, break_long_words=False )] else: lines = [field] if fieldname.startswith('previous_'): # quick and dirty trick to get the real field name fieldname = fieldname[9:] ret = ['%s%s%s "%s"' % (delflag, fieldname, plural_index, escape(lines.pop(0)))] for mstr in lines: #import pdb; pdb.set_trace() ret.append('%s"%s"' % (delflag, escape(mstr))) return ret # }}} # class POEntry {{{ class POEntry(_BaseEntry): """ Represents a po file entry. """ def __init__(self, *args, **kwargs): """ Constructor, accepts the following keyword arguments: ``comment`` string, the entry comment. ``tcomment`` string, the entry translator comment. ``occurrences`` list, the entry occurrences. ``flags`` list, the entry flags. ``previous_msgctxt`` string, the entry previous context. ``previous_msgid`` string, the entry previous msgid. ``previous_msgid_plural`` string, the entry previous msgid_plural. """ _BaseEntry.__init__(self, *args, **kwargs) self.comment = kwargs.get('comment', '') self.tcomment = kwargs.get('tcomment', '') self.occurrences = kwargs.get('occurrences', []) self.flags = kwargs.get('flags', []) self.previous_msgctxt = kwargs.get('previous_msgctxt', None) self.previous_msgid = kwargs.get('previous_msgid', None) self.previous_msgid_plural = kwargs.get('previous_msgid_plural', None) def __unicode__(self, wrapwidth=78): """ Returns the unicode representation of the entry. """ if self.obsolete: return _BaseEntry.__unicode__(self, wrapwidth) ret = [] # comments first, if any (with text wrapping as xgettext does) comments = [('comment', '#. '), ('tcomment', '# ')] for c in comments: val = getattr(self, c[0]) if val: for comment in val.split('\n'): if wrapwidth > 0 and len(comment) + len(c[1]) > wrapwidth: ret += wrap( comment, wrapwidth, initial_indent=c[1], subsequent_indent=c[1], break_long_words=False ) else: ret.append('%s%s' % (c[1], comment)) # occurrences (with text wrapping as xgettext does) if self.occurrences: filelist = [] for fpath, lineno in self.occurrences: if lineno: filelist.append('%s:%s' % (fpath, lineno)) else: filelist.append(fpath) filestr = ' '.join(filelist) if wrapwidth > 0 and len(filestr) + 3 > wrapwidth: # textwrap split words that contain hyphen, this is not # what we want for filenames, so the dirty hack is to # temporally replace hyphens with a char that a file cannot # contain, like "*" ret += [l.replace('*', '-') for l in wrap( filestr.replace('-', '*'), wrapwidth, initial_indent='#: ', subsequent_indent='#: ', break_long_words=False )] else: ret.append('#: ' + filestr) # flags (TODO: wrapping ?) if self.flags: ret.append('#, %s' % ', '.join(self.flags)) # previous context and previous msgid/msgid_plural fields = ['previous_msgctxt', 'previous_msgid', 'previous_msgid_plural'] for f in fields: val = getattr(self, f) if val: ret += self._str_field(f, "#| ", "", val, wrapwidth) ret.append(_BaseEntry.__unicode__(self, wrapwidth)) ret = u('\n').join(ret) assert isinstance(ret, text_type) #if type(ret) != types.UnicodeType: # return unicode(ret, self.encoding) return ret def __cmp__(self, other): """ Called by comparison operations if rich comparison is not defined. """ # First: Obsolete test if self.obsolete != other.obsolete: if self.obsolete: return -1 else: return 1 # Work on a copy to protect original occ1 = sorted(self.occurrences[:]) occ2 = sorted(other.occurrences[:]) pos = 0 for entry1 in occ1: try: entry2 = occ2[pos] except IndexError: return 1 pos = pos + 1 if entry1[0] != entry2[0]: if entry1[0] > entry2[0]: return 1 else: return -1 if entry1[1] != entry2[1]: if entry1[1] > entry2[1]: return 1 else: return -1 # Finally: Compare message ID if self.msgid > other.msgid: return 1 elif self.msgid < other.msgid: return -1 return 0 def __gt__(self, other): return self.__cmp__(other) > 0 def __lt__(self, other): return self.__cmp__(other) < 0 def __ge__(self, other): return self.__cmp__(other) >= 0 def __le__(self, other): return self.__cmp__(other) <= 0 def __eq__(self, other): return self.__cmp__(other) == 0 def __ne__(self, other): return self.__cmp__(other) != 0 def translated(self): """ Returns ``True`` if the entry has been translated or ``False`` otherwise. """ if self.obsolete or 'fuzzy' in self.flags: return False if self.msgstr != '': return True if self.msgstr_plural: for pos in self.msgstr_plural: if self.msgstr_plural[pos] == '': return False return True return False def merge(self, other): """ Merge the current entry with the given pot entry. """ self.msgid = other.msgid self.msgctxt = other.msgctxt self.occurrences = other.occurrences self.comment = other.comment fuzzy = 'fuzzy' in self.flags self.flags = other.flags[:] # clone flags if fuzzy: self.flags.append('fuzzy') self.msgid_plural = other.msgid_plural self.obsolete = other.obsolete self.previous_msgctxt = other.previous_msgctxt self.previous_msgid = other.previous_msgid self.previous_msgid_plural = other.previous_msgid_plural if other.msgstr_plural: for pos in other.msgstr_plural: try: # keep existing translation at pos if any self.msgstr_plural[pos] except KeyError: self.msgstr_plural[pos] = '' # }}} # class MOEntry {{{ class MOEntry(_BaseEntry): """ Represents a mo file entry. """ pass # }}} # class _POFileParser {{{ class _POFileParser(object): """ A finite state machine to parse efficiently and correctly po file format. """ def __init__(self, pofile, *args, **kwargs): """ Constructor. Keyword arguments: ``pofile`` string, path to the po file or its content ``encoding`` string, the encoding to use, defaults to ``default_encoding`` global variable (optional). ``check_for_duplicates`` whether to check for duplicate entries when adding entries to the file (optional, default: ``False``). """ enc = kwargs.get('encoding', default_encoding) if os.path.exists(pofile): try: self.fhandle = codecs.open(pofile, 'rU', enc) except LookupError: enc = default_encoding self.fhandle = codecs.open(pofile, 'rU', enc) else: self.fhandle = pofile.splitlines() klass = kwargs.get('klass') if klass is None: klass = POFile self.instance = klass( pofile=pofile, encoding=enc, check_for_duplicates=kwargs.get('check_for_duplicates', False) ) self.transitions = {} self.current_entry = POEntry() self.current_state = 'ST' self.current_token = None # two memo flags used in handlers self.msgstr_index = 0 self.entry_obsolete = 0 # Configure the state machine, by adding transitions. # Signification of symbols: # * ST: Beginning of the file (start) # * HE: Header # * TC: a translation comment # * GC: a generated comment # * OC: a file/line occurence # * FL: a flags line # * CT: a message context # * PC: a previous msgctxt # * PM: a previous msgid # * PP: a previous msgid_plural # * MI: a msgid # * MP: a msgid plural # * MS: a msgstr # * MX: a msgstr plural # * MC: a msgid or msgstr continuation line all = ['ST', 'HE', 'GC', 'OC', 'FL', 'CT', 'PC', 'PM', 'PP', 'TC', 'MS', 'MP', 'MX', 'MI'] self.add('TC', ['ST', 'HE'], 'HE') self.add('TC', ['GC', 'OC', 'FL', 'TC', 'PC', 'PM', 'PP', 'MS', 'MP', 'MX', 'MI'], 'TC') self.add('GC', all, 'GC') self.add('OC', all, 'OC') self.add('FL', all, 'FL') self.add('PC', all, 'PC') self.add('PM', all, 'PM') self.add('PP', all, 'PP') self.add('CT', ['ST', 'HE', 'GC', 'OC', 'FL', 'TC', 'PC', 'PM', 'PP', 'MS', 'MX'], 'CT') self.add('MI', ['ST', 'HE', 'GC', 'OC', 'FL', 'CT', 'TC', 'PC', 'PM', 'PP', 'MS', 'MX'], 'MI') self.add('MP', ['TC', 'GC', 'PC', 'PM', 'PP', 'MI'], 'MP') self.add('MS', ['MI', 'MP', 'TC'], 'MS') self.add('MX', ['MI', 'MX', 'MP', 'TC'], 'MX') self.add('MC', ['CT', 'MI', 'MP', 'MS', 'MX', 'PM', 'PP', 'PC'], 'MC') def parse(self): """ Run the state machine, parse the file line by line and call process() with the current matched symbol. """ i = 0 keywords = { 'msgctxt': 'CT', 'msgid': 'MI', 'msgstr': 'MS', 'msgid_plural': 'MP', } prev_keywords = { 'msgid_plural': 'PP', 'msgid': 'PM', 'msgctxt': 'PC', } for line in self.fhandle: i += 1 line = line.strip() if line == '': continue tokens = line.split(None, 2) nb_tokens = len(tokens) if tokens[0] == '#~|': continue if tokens[0] == '#~' and nb_tokens > 1: line = line[3:].strip() tokens = tokens[1:] nb_tokens -= 1 self.entry_obsolete = 1 else: self.entry_obsolete = 0 # Take care of keywords like # msgid, msgid_plural, msgctxt & msgstr. if tokens[0] in keywords and nb_tokens > 1: line = line[len(tokens[0]):].lstrip() if re.search(r'([^\\]|^)"', line[1:-1]): raise IOError('Syntax error in po file %s (line %s): ' 'unescaped double quote found' % (self.instance.fpath, i)) self.current_token = line self.process(keywords[tokens[0]], i) continue self.current_token = line if tokens[0] == '#:': if nb_tokens <= 1: continue # we are on a occurrences line self.process('OC', i) elif line[:1] == '"': # we are on a continuation line if re.search(r'([^\\]|^)"', line[1:-1]): raise IOError('Syntax error in po file %s (line %s): ' 'unescaped double quote found' % (self.instance.fpath, i)) self.process('MC', i) elif line[:7] == 'msgstr[': # we are on a msgstr plural self.process('MX', i) elif tokens[0] == '#,': if nb_tokens <= 1: continue # we are on a flags line self.process('FL', i) elif tokens[0] == '#' or tokens[0].startswith('##'): if line == '#': line += ' ' # we are on a translator comment line self.process('TC', i) elif tokens[0] == '#.': if nb_tokens <= 1: continue # we are on a generated comment line self.process('GC', i) elif tokens[0] == '#|': if nb_tokens <= 1: raise IOError('Syntax error in po file %s (line %s)' % (self.instance.fpath, i)) # Remove the marker and any whitespace right after that. line = line[2:].lstrip() self.current_token = line if tokens[1].startswith('"'): # Continuation of previous metadata. self.process('MC', i) continue if nb_tokens == 2: # Invalid continuation line. raise IOError('Syntax error in po file %s (line %s): ' 'invalid continuation line' % (self.instance.fpath, i)) # we are on a "previous translation" comment line, if tokens[1] not in prev_keywords: # Unknown keyword in previous translation comment. raise IOError('Syntax error in po file %s (line %s): ' 'unknown keyword %s' % (self.instance.fpath, i, tokens[1])) # Remove the keyword and any whitespace # between it and the starting quote. line = line[len(tokens[1]):].lstrip() self.current_token = line self.process(prev_keywords[tokens[1]], i) else: raise IOError('Syntax error in po file %s (line %s)' % (self.instance.fpath, i)) if self.current_entry: # since entries are added when another entry is found, we must add # the last entry here (only if there are lines) self.instance.append(self.current_entry) # before returning the instance, check if there's metadata and if # so extract it in a dict metadataentry = self.instance.find('') if metadataentry: # metadata found # remove the entry self.instance.remove(metadataentry) self.instance.metadata_is_fuzzy = metadataentry.flags key = None for msg in metadataentry.msgstr.splitlines(): try: key, val = msg.split(':', 1) self.instance.metadata[key] = val.strip() except (ValueError, KeyError): if key is not None: self.instance.metadata[key] += '\n' + msg.strip() # close opened file if not isinstance(self.fhandle, list): # must be file self.fhandle.close() return self.instance def add(self, symbol, states, next_state): """ Add a transition to the state machine. Keywords arguments: ``symbol`` string, the matched token (two chars symbol). ``states`` list, a list of states (two chars symbols). ``next_state`` the next state the fsm will have after the action. """ for state in states: action = getattr(self, 'handle_%s' % next_state.lower()) self.transitions[(symbol, state)] = (action, next_state) def process(self, symbol, linenum): """ Process the transition corresponding to the current state and the symbol provided. Keywords arguments: ``symbol`` string, the matched token (two chars symbol). ``linenum`` integer, the current line number of the parsed file. """ try: (action, state) = self.transitions[(symbol, self.current_state)] if action(): self.current_state = state except Exception: raise IOError('Syntax error in po file (line %s)' % linenum) # state handlers def handle_he(self): """Handle a header comment.""" if self.instance.header != '': self.instance.header += '\n' self.instance.header += self.current_token[2:] return 1 def handle_tc(self): """Handle a translator comment.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() if self.current_entry.tcomment != '': self.current_entry.tcomment += '\n' tcomment = self.current_token.lstrip('#') if tcomment.startswith(' '): tcomment = tcomment[1:] self.current_entry.tcomment += tcomment return True def handle_gc(self): """Handle a generated comment.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() if self.current_entry.comment != '': self.current_entry.comment += '\n' self.current_entry.comment += self.current_token[3:] return True def handle_oc(self): """Handle a file:num occurence.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() occurrences = self.current_token[3:].split() for occurrence in occurrences: if occurrence != '': try: fil, line = occurrence.split(':') if not line.isdigit(): fil = fil + line line = '' self.current_entry.occurrences.append((fil, line)) except (ValueError, AttributeError): self.current_entry.occurrences.append((occurrence, '')) return True def handle_fl(self): """Handle a flags line.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() self.current_entry.flags += self.current_token[3:].split(', ') return True def handle_pp(self): """Handle a previous msgid_plural line.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() self.current_entry.previous_msgid_plural = \ unescape(self.current_token[1:-1]) return True def handle_pm(self): """Handle a previous msgid line.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() self.current_entry.previous_msgid = \ unescape(self.current_token[1:-1]) return True def handle_pc(self): """Handle a previous msgctxt line.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() self.current_entry.previous_msgctxt = \ unescape(self.current_token[1:-1]) return True def handle_ct(self): """Handle a msgctxt.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() self.current_entry.msgctxt = unescape(self.current_token[1:-1]) return True def handle_mi(self): """Handle a msgid.""" if self.current_state in ['MC', 'MS', 'MX']: self.instance.append(self.current_entry) self.current_entry = POEntry() self.current_entry.obsolete = self.entry_obsolete self.current_entry.msgid = unescape(self.current_token[1:-1]) return True def handle_mp(self): """Handle a msgid plural.""" self.current_entry.msgid_plural = unescape(self.current_token[1:-1]) return True def handle_ms(self): """Handle a msgstr.""" self.current_entry.msgstr = unescape(self.current_token[1:-1]) return True def handle_mx(self): """Handle a msgstr plural.""" index, value = self.current_token[7], self.current_token[11:-1] self.current_entry.msgstr_plural[index] = unescape(value) self.msgstr_index = index return True def handle_mc(self): """Handle a msgid or msgstr continuation line.""" token = unescape(self.current_token[1:-1]) if self.current_state == 'CT': self.current_entry.msgctxt += token elif self.current_state == 'MI': self.current_entry.msgid += token elif self.current_state == 'MP': self.current_entry.msgid_plural += token elif self.current_state == 'MS': self.current_entry.msgstr += token elif self.current_state == 'MX': self.current_entry.msgstr_plural[self.msgstr_index] += token elif self.current_state == 'PP': token = token[3:] self.current_entry.previous_msgid_plural += token elif self.current_state == 'PM': token = token[3:] self.current_entry.previous_msgid += token elif self.current_state == 'PC': token = token[3:] self.current_entry.previous_msgctxt += token # don't change the current state return False # }}} # class _MOFileParser {{{ class _MOFileParser(object): """ A class to parse binary mo files. """ def __init__(self, mofile, *args, **kwargs): """ Constructor. Keyword arguments: ``mofile`` string, path to the mo file or its content ``encoding`` string, the encoding to use, defaults to ``default_encoding`` global variable (optional). ``check_for_duplicates`` whether to check for duplicate entries when adding entries to the file (optional, default: ``False``). """ self.fhandle = open(mofile, 'rb') klass = kwargs.get('klass') if klass is None: klass = MOFile self.instance = klass( fpath=mofile, encoding=kwargs.get('encoding', default_encoding), check_for_duplicates=kwargs.get('check_for_duplicates', False) ) def parse(self): """ Build the instance with the file handle provided in the constructor. """ # parse magic number magic_number = self._readbinary(' 1: entry = self._build_entry( msgid=msgid_tokens[0], msgid_plural=msgid_tokens[1], msgstr_plural=dict((k, v) for k, v in enumerate(msgstr.split(b('\0')))) ) else: entry = self._build_entry(msgid=msgid, msgstr=msgstr) self.instance.append(entry) # close opened file self.fhandle.close() return self.instance def _build_entry(self, msgid, msgstr=None, msgid_plural=None, msgstr_plural=None): msgctxt_msgid = msgid.split(b('\x04')) encoding = self.instance.encoding if len(msgctxt_msgid) > 1: kwargs = { 'msgctxt': msgctxt_msgid[0].decode(encoding), 'msgid': msgctxt_msgid[1].decode(encoding), } else: kwargs = {'msgid': msgid.decode(encoding)} if msgstr: kwargs['msgstr'] = msgstr.decode(encoding) if msgid_plural: kwargs['msgid_plural'] = msgid_plural.decode(encoding) if msgstr_plural: for k in msgstr_plural: msgstr_plural[k] = msgstr_plural[k].decode(encoding) kwargs['msgstr_plural'] = msgstr_plural return MOEntry(**kwargs) def _readbinary(self, fmt, numbytes): """ Private method that unpack n bytes of data using format . It returns a tuple or a mixed value if the tuple length is 1. """ bytes = self.fhandle.read(numbytes) tup = struct.unpack(fmt, bytes) if len(tup) == 1: return tup[0] return tup # }}} # class TextWrapper {{{ class TextWrapper(textwrap.TextWrapper): """ Subclass of textwrap.TextWrapper that backport the drop_whitespace option. """ def __init__(self, *args, **kwargs): drop_whitespace = kwargs.pop('drop_whitespace', True) textwrap.TextWrapper.__init__(self, *args, **kwargs) self.drop_whitespace = drop_whitespace def _wrap_chunks(self, chunks): """_wrap_chunks(chunks : [string]) -> [string] Wrap a sequence of text chunks and return a list of lines of length 'self.width' or less. (If 'break_long_words' is false, some lines may be longer than this.) Chunks correspond roughly to words and the whitespace between them: each chunk is indivisible (modulo 'break_long_words'), but a line break can come between any two chunks. Chunks should not have internal whitespace; ie. a chunk is either all whitespace or a "word". Whitespace chunks will be removed from the beginning and end of lines, but apart from that whitespace is preserved. """ lines = [] if self.width <= 0: raise ValueError("invalid width %r (must be > 0)" % self.width) # Arrange in reverse order so items can be efficiently popped # from a stack of chucks. chunks.reverse() while chunks: # Start the list of chunks that will make up the current line. # cur_len is just the length of all the chunks in cur_line. cur_line = [] cur_len = 0 # Figure out which static string will prefix this line. if lines: indent = self.subsequent_indent else: indent = self.initial_indent # Maximum width for this line. width = self.width - len(indent) # First chunk on line is whitespace -- drop it, unless this # is the very beginning of the text (ie. no lines started yet). if self.drop_whitespace and chunks[-1].strip() == '' and lines: del chunks[-1] while chunks: l = len(chunks[-1]) # Can at least squeeze this chunk onto the current line. if cur_len + l <= width: cur_line.append(chunks.pop()) cur_len += l # Nope, this line is full. else: break # The current line is full, and the next chunk is too big to # fit on *any* line (not just this one). if chunks and len(chunks[-1]) > width: self._handle_long_word(chunks, cur_line, cur_len, width) # If the last chunk on this line is all whitespace, drop it. if self.drop_whitespace and cur_line and not cur_line[-1].strip(): del cur_line[-1] # Convert current line back to a string and store it in list # of all lines (return value). if cur_line: lines.append(indent + ''.join(cur_line)) return lines # }}} # function wrap() {{{ def wrap(text, width=70, **kwargs): """ Wrap a single paragraph of text, returning a list of wrapped lines. """ if sys.version_info < (2, 6): return TextWrapper(width=width, **kwargs).wrap(text) return textwrap.wrap(text, width=width, **kwargs) # }}} django-rosetta-0.7.2/rosetta/poutil.py0000644000076500000240000001154512141706554020247 0ustar marcostaff00000000000000from datetime import datetime from django.conf import settings from django.core.cache import get_cache from rosetta.conf import settings as rosetta_settings import django import os try: from django.utils import timezone except: timezone = None try: set except NameError: from sets import Set as set # Python 2.3 fallback cache = get_cache(rosetta_settings.ROSETTA_CACHE_NAME) def timestamp_with_timezone(dt=None): """ Return a timestamp with a timezone for the configured locale. If all else fails, consider localtime to be UTC. """ dt = dt or datetime.now() if timezone is None: return dt.strftime('%Y-%m-%d %H:%M%z') if not dt.tzinfo: tz = timezone.get_current_timezone() if not tz: tz = timezone.utc dt = dt.replace(tzinfo=timezone.get_current_timezone()) return dt.strftime("%Y-%m-%d %H:%M%z") def find_pos(lang, project_apps=True, django_apps=False, third_party_apps=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], {}, {}, []) abs_project_path = os.path.normpath(os.path.abspath(os.path.dirname(project.__file__))) if project_apps: if os.path.exists(os.path.abspath(os.path.join(os.path.dirname(project.__file__), 'locale'))): paths.append(os.path.abspath(os.path.join(os.path.dirname(project.__file__), 'locale'))) if os.path.exists(os.path.abspath(os.path.join(os.path.dirname(project.__file__), '..', 'locale'))): paths.append(os.path.abspath(os.path.join(os.path.dirname(project.__file__), '..', 'locale'))) # django/locale if django_apps: django_paths = cache.get('rosetta_django_paths') if django_paths is None: django_paths = [] for root, dirnames, filename in os.walk(os.path.abspath(os.path.dirname(django.__file__))): if 'locale' in dirnames: django_paths.append(os.path.join(root, 'locale')) continue cache.set('rosetta_django_paths', django_paths, 60 * 60) paths = paths + django_paths # 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_settings.EXCLUDED_APPLICATIONS and appname in rosetta_settings.EXCLUDED_APPLICATIONS: continue p = appname.rfind('.') if p >= 0: app = getattr(__import__(appname[:p], {}, {}, [str(appname[p + 1:])]), appname[p + 1:]) else: app = __import__(appname, {}, {}, []) apppath = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(app.__file__), 'locale'))) # django apps if 'contrib' in apppath and 'django' in apppath and not django_apps: continue # third party external if not third_party_apps and abs_project_path not in apppath: continue # local apps if not project_apps and abs_project_path in apppath: continue if os.path.isdir(apppath): paths.append(apppath) ret = set() 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()), ] paths = map(os.path.normpath, paths) paths = list(set(paths)) for path in paths: for lang_ in langs: dirname = os.path.join(path, lang_, 'LC_MESSAGES') #print dirname for fn in ('django.po', 'djangojs.po',): filename = os.path.join(dirname, fn) if os.path.isfile(filename): ret.add(os.path.abspath(filename)) return list(sorted(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 django-rosetta-0.7.2/rosetta/signals.py0000644000076500000240000000034212140410716020353 0ustar marcostaff00000000000000from django import dispatch entry_changed = dispatch.Signal( providing_args=["user", "old_msgstr", "old_fuzzy", "pofile", "language_code",] ) post_save = dispatch.Signal( providing_args=["language_code","request",] ) django-rosetta-0.7.2/rosetta/storage.py0000644000076500000240000000735712141706554020405 0ustar marcostaff00000000000000from django.core.cache import get_cache from django.conf import settings from django.utils import importlib from django.core.exceptions import ImproperlyConfigured from rosetta.conf import settings as rosetta_settings import hashlib import time import six cache = get_cache(rosetta_settings.ROSETTA_CACHE_NAME) class BaseRosettaStorage(object): def __init__(self, request): self.request = request def get(self, key, default=None): raise NotImplementedError def set(self, key, val): raise NotImplementedError def has(self, key): raise NotImplementedError def delete(self, key): raise NotImplementedError class DummyRosettaStorage(BaseRosettaStorage): def get(self, key, default=None): return default def set(self, key, val): pass def has(self, key): return False def delete(self, key): pass class SessionRosettaStorage(BaseRosettaStorage): def get(self, key, default=None): if key in self.request.session: return self.request.session[key] return default def set(self, key, val): self.request.session[key] = val def has(self, key): return key in self.request.session def delete(self, key): del(self.request.session[key]) class CacheRosettaStorage(BaseRosettaStorage): # unlike the session storage backend, cache is shared among all users # so we need to per-user key prefix, which we store in the session def __init__(self, request): super(CacheRosettaStorage, self).__init__(request) if 'rosetta_cache_storage_key_prefix' in self.request.session: self._key_prefix = self.request.session['rosetta_cache_storage_key_prefix'] else: self._key_prefix = hashlib.new('sha1', six.text_type(time.time()).encode('utf8')).hexdigest() self.request.session['rosetta_cache_storage_key_prefix'] = self._key_prefix if self.request.session['rosetta_cache_storage_key_prefix'] != self._key_prefix: raise ImproperlyConfigured("You can't use the CacheRosettaStorage because your Django Session storage doesn't seem to be working. The CacheRosettaStorage relies on the Django Session storage to avoid conflicts.") # Make sure we're not using DummyCache if 'dummycache' in settings.CACHES[rosetta_settings.ROSETTA_CACHE_NAME]['BACKEND'].lower(): raise ImproperlyConfigured("You can't use the CacheRosettaStorage if your cache isn't correctly set up (you are use the DummyCache cache backend).") # Make sure the actually actually works try: self.set('rosetta_cache_test', 'rosetta') if not self.get('rosetta_cache_test') == 'rosetta': raise ImproperlyConfigured("You can't use the CacheRosettaStorage if your cache isn't correctly set up, please double check your Django DATABASES setting and that the cache server is responding.") finally: self.delete('rosetta_cache_test') def get(self, key, default=None): #print ('get', self._key_prefix + key) return cache.get(self._key_prefix + key, default) def set(self, key, val): #print ('set', self._key_prefix + key) cache.set(self._key_prefix + key, val, 86400) def has(self, key): #print ('has', self._key_prefix + key) return (self._key_prefix + key) in cache def delete(self, key): #print ('del', self._key_prefix + key) cache.delete(self._key_prefix + key) def get_storage(request): from rosetta.conf import settings storage_module, storage_class = settings.STORAGE_CLASS.rsplit('.', 1) storage_module = importlib.import_module(storage_module) return getattr(storage_module, storage_class)(request) django-rosetta-0.7.2/rosetta/templates/0000755000076500000240000000000012141707771020353 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/templates/rosetta/0000755000076500000240000000000012141707771022034 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/templates/rosetta/base.html0000644000076500000240000000312712140410716023624 0ustar marcostaff00000000000000{% load url from future %} {% block pagetitle %}Rosetta{% endblock %}
{% block main %}{% endblock %}
django-rosetta-0.7.2/rosetta/templates/rosetta/css/0000755000076500000240000000000012141707771022624 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/templates/rosetta/css/rosetta.css0000644000076500000240000000347212140410716025012 0ustar marcostaff00000000000000#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.original .context,td.original .message {display:block;} td.original .context { margin-top: 2em; color: #bbb; font-size:90%; } 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; } p.errornote { margin-top:0.4em;} #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;} .checkall {cursor:pointer} #toolbar { height:20px} #toolbar #translate-all { float:right} #toolbar form { float:left; } #changelist table thead th { padding: 2px 5px; }django-rosetta-0.7.2/rosetta/templates/rosetta/js/0000755000076500000240000000000012141707771022450 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/templates/rosetta/js/rosetta.js0000644000076500000240000000571012140410716024457 0ustar marcostaff00000000000000{% load rosetta %} google.setOnLoadCallback(function() { $('.location a').show().toggle(function() { $('.hide', $(this).parent()).show(); }, function() { $('.hide', $(this).parent()).hide(); }); {% if rosetta_settings.ENABLE_TRANSLATION_SUGGESTIONS and rosetta_settings.BING_APP_ID %} $('a.suggest').click(function(e){ e.preventDefault(); var a = $(this); var str = a.html(); var orig = $('.original .message', a.parents('tr')).html(); var trans=$('textarea',a.parent()); var sourceLang = '{{ rosetta_settings.MESSAGES_SOURCE_LANGUAGE_CODE }}'; var destLang = '{{ rosetta_i18n_lang_code }}'; var app_id = '{{ rosetta_settings.BING_APP_ID }}'; var apiUrl = "http://api.microsofttranslator.com/V2/Ajax.svc/Translate"; orig = unescape(orig).replace(//g,'\n').replace(//,'').replace(/<\/code>/g,'').replace(/>/g,'>').replace(/</g,'<'); a.attr('class','suggesting').html('...'); window.onTranslationComplete = function(resp) { trans.val(unescape(resp).replace(/'/g,'\'').replace(/"/g,'"').replace(/%\s+(\([^\)]+\))\s*s/g,' %$1s ')); a.hide(); }; window.onTranslationError = function(response){ a.text(response); }; var apiData = { onerror: 'onTranslationError', appid: app_id, from: sourceLang, to: destLang, oncomplete: "onTranslationComplete", text: orig }; $.ajax({ url: apiUrl, data: apiData, dataType: 'jsonp'}); }); {% 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 = $('Unmatched variables'); 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; } }); $('.translation textarea').eq(0).focus(); }); django-rosetta-0.7.2/rosetta/templates/rosetta/languages.html0000644000076500000240000000726512140410716024667 0ustar marcostaff00000000000000{% extends "rosetta/base.html" %} {% load i18n %} {% load url from future %} {% block pagetitle %}{{block.super}} - {% trans "Language selection" %}{% endblock %} {% block breadcumbs %}
{% trans "Home" %} › {% trans "Language selection" %}
{% if do_session_warn %}

{% trans "Couldn't load the specified language file. This usually happens when using the Encrypted Cookies Session Storage backend on Django 1.4 or higher.
Setting ROSETTA_STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage' in your settings file should fix this." %}

{% endif %} {% endblock %} {% block main %}

 

{% if has_pos %} {% for lid,language,pos in languages %} {% if pos %}

{{language}}

{% for app,path,po in pos %} {% with po.untranslated_entries|length as len_untranslated_entries %} {% endwith %} {% endfor %}
{% trans "Application" %} {% trans "Progress"%} {% trans "Messages" %} {% trans "Translated" %} {% trans "Fuzzy"%} {% trans "Obsolete"%} {% trans "File" %}
{{ app|title }} {{po.percent_translated|floatformat:2}}%{{po.translated_entries|length|add:len_untranslated_entries}}{{po.translated_entries|length}} {{po.fuzzy_entries|length}} {{po.obsolete_entries|length}} {{ path }}
{% endif %} {% endfor %} {% else %}

{% trans "Nothing to translate!" %}

{% trans "You haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs." %}

{% blocktrans with "http://docs.djangoproject.com/en/dev/topics/i18n/#topics-i18n" as i18n_doc_link %}Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project.{% endblocktrans %}

{% endif %} {% endblock %} django-rosetta-0.7.2/rosetta/templates/rosetta/pofile.html0000644000076500000240000002177712140410716024203 0ustar marcostaff00000000000000{% extends "rosetta/base.html" %} {% load rosetta i18n %} {% load url from future %} {% block header %} {{block.super}} {% endblock %} {% block pagetitle %}{{block.super}} - {{rosetta_settings.MESSAGES_SOURCE_LANGUAGE_NAME}} - {{rosetta_i18n_lang_name}} ({{ rosetta_i18n_pofile.percent_translated|floatformat:0 }}%){% endblock %} {% block breadcumbs %}
{% trans "Home" %} › {{ rosetta_i18n_lang_name }} › {{ rosetta_i18n_app|title }} › {% blocktrans with rosetta_i18n_pofile.percent_translated|floatformat:2 as percent_translated %}Progress: {{ percent_translated }}%{% endblocktrans %}
{% if not rosetta_i18n_write %}

{% trans "File is read-only: download the file when done editing!" %}

{% endif %} {% if rosetta_last_save_error %}

{% trans "Some items in your last translation block couldn't be saved: this usually happens when the catalog file changes on disk after you last loaded it." %}

{% endif %} {% endblock %} {% block main %}

{% blocktrans %}Translate into {{rosetta_i18n_lang_name}}{% endblocktrans %}

{% comment %} {% if rosetta_settings.ENABLE_TRANSLATION_SUGGESTIONS %}
{% endif %} {% endcomment %}
{% rosetta_csrf_token %} {% if main_language %}{% endif %} {% for message in rosetta_messages %} {% if message.msgid_plural %} {% else %} {% if main_language %}{% endif %} {% endif %} {% endfor %}
{% trans "Original" %}
{{ main_language }}{{ rosetta_i18n_lang_name }} [-] {% trans "Fuzzy" %} {% trans "Occurrences(s)" %}
{{message.msgid|format_message|linebreaksbr}} {{message.msgid_plural|format_message|linebreaksbr}}
{% if message.msgctxt %} {% trans "Context hint" %}: {{message.msgctxt|safe}} {% else %} {% if message.comment %} {% trans "Context hint" %}: {{message.comment|safe}} {% endif %} {% endif %}
{% for k, msgstr in message.msgstr_plural.items|dictsort:"0" %} {% endfor %} {{ message.msgid|format_message|linebreaksbr }} {% if message.msgctxt %} {% trans "Context hint" %}: "{{message.msgctxt|safe}}" {% else %} {% if message.comment %} {% trans "Context hint" %}: {{message.comment|safe}} {% endif %} {% endif %} {{ message.main_lang|format_message|linebreaksbr }} {% if rosetta_settings.ENABLE_TRANSLATION_SUGGESTIONS %}{% trans "suggest" %}{% endif %} {% for fn,lineno in message.occurrences %} {{ fn }}:{{lineno}} {% endfor %} {% if message.occurrences|length|gt:"3" %} … ({% blocktrans count message.occurrences|length|minus:"3" as more_count %}{{more_count}} more{% plural %}{{more_count}} more{% endblocktrans %}) {% endif %}

{% if query %} {% endif %} {% if needs_pagination %} {% trans "Skip to page:" %} {% for i in page_range %} {% if i == '...' %} {{ i }} {% else %} {% if i == page %} {{i}} {% else %} {{i}} {% endif %} {% endif %} {% endfor %} {% else %} {% trans "Displaying:" %} {% endif %} {% with paginator.object_list|length as hits %} {% blocktrans count rosetta_i18n_pofile|length as message_number %}{{hits}}/{{message_number}} message{% plural %}{{hits}}/{{message_number}} messages{% endblocktrans %} {% endwith %}

{% endblock %} django-rosetta-0.7.2/rosetta/templatetags/0000755000076500000240000000000012141707771021047 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/templatetags/__init__.py0000644000076500000240000000000012140410716023133 0ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/templatetags/rosetta.py0000644000076500000240000000376412140410716023101 0ustar marcostaff00000000000000from django import template from django.utils.safestring import mark_safe from django.utils.html import escape import re from django.template import Node import six register = template.Library() rx = re.compile(r'(%(\([^\s\)]*\))?[sd])') def format_message(message): return mark_safe(rx.sub('\\1', escape(message).replace(r'\n', '
\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 do_incr(parser, token): args = token.split_contents() if len(args) < 2: raise SyntaxError("'incr' tag requires at least one argument") name = args[1] if not hasattr(parser, '_namedIncrNodes'): parser._namedIncrNodes = {} if not name in parser._namedIncrNodes: parser._namedIncrNodes[name] = IncrNode(0) return parser._namedIncrNodes[name] do_incr = register.tag('increment', do_incr) class IncrNode(template.Node): def __init__(self, init_val=0): self.val = init_val def render(self, context): self.val += 1 return six.text_type(self.val) 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"") 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) django-rosetta-0.7.2/rosetta/tests/0000755000076500000240000000000012141707771017517 5ustar marcostaff00000000000000django-rosetta-0.7.2/rosetta/tests/__init__.py0000644000076500000240000007236412140410716021631 0ustar marcostaff00000000000000# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse, resolve from django.template.defaultfilters import floatformat from django.test import TestCase from django.test.client import Client from rosetta.conf import settings as rosetta_settings from rosetta.signals import entry_changed, post_save import os import shutil import six import django try: from django.dispatch import receiver except ImportError: # We might be in django < 1.3, so backport this function def receiver(signal, **kwargs): def _decorator(func): signal.connect(func, **kwargs) return func return _decorator class RosettaTestCase(TestCase): urls = 'rosetta.tests.urls' def __init__(self, *args, **kwargs): super(RosettaTestCase, self).__init__(*args, **kwargs) self.curdir = os.path.dirname(__file__) self.dest_file = os.path.normpath(os.path.join(self.curdir, '../locale/xx/LC_MESSAGES/django.po')) self.django_version_major, self.django_version_minor = django.VERSION[0], django.VERSION[1] def setUp(self): user = User.objects.create_user('test_admin', 'test@test.com', 'test_password') user2 = User.objects.create_user('test_admin2', 'test@test2.com', 'test_password') user3 = User.objects.create_user('test_admin3', 'test@test2.com', 'test_password') user.is_superuser, user2.is_superuser, user3.is_superuser = True, True, True user.is_staff, user2.is_staff, user3.is_staff = True, True, False user.save() user2.save() user3.save() self.client2 = Client() self.client.login(username='test_admin', password='test_password') self.client2.login(username='test_admin2', password='test_password') settings.LANGUAGES = (('xx', 'dummy language'), ('fr_FR.utf8', 'French (France), UTF8')) shutil.copy(self.dest_file, self.dest_file + '.orig') def tearDown(self): shutil.move(self.dest_file + '.orig', self.dest_file) def test_1_ListLoading(self): r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue(os.path.normpath('rosetta/locale/xx/LC_MESSAGES/django.po') in str(r.content)) def test_2_PickFile(self): r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0,), kwargs=dict()) + '?rosetta') r = self.client.get(reverse('rosetta-home')) self.assertTrue('dummy language' in str(r.content)) def test_3_DownloadZIP(self): r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict()) + '?rosetta') r = self.client.get(reverse('rosetta-home')) r = self.client.get(reverse('rosetta-download-file') + '?rosetta') self.assertTrue('content-type' in r._headers.keys()) self.assertTrue('application/x-zip' in r._headers.get('content-type')) def test_4_DoChanges(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.template')), self.dest_file) # Load the template file r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home') + '?filter=untranslated') r = self.client.get(reverse('rosetta-home')) # make sure both strings are untranslated self.assertTrue('dummy language' in str(r.content)) self.assertTrue('String 1' in str(r.content)) self.assertTrue('String 2' in str(r.content)) self.assertTrue('m_e48f149a8b2e8baa81b816c0edf93890' in str(r.content)) # post a translation r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world', _next='_next')) # reload all untranslated strings r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict()) + '?rosetta') r = self.client.get(reverse('rosetta-home') + '?filter=untranslated') r = self.client.get(reverse('rosetta-home')) # the translated string no longer is up for translation self.assertTrue('String 1' in str(r.content)) self.assertTrue('String 2' not in str(r.content)) # display only translated strings r = self.client.get(reverse('rosetta-home') + '?filter=translated') r = self.client.get(reverse('rosetta-home')) # The tranlsation was persisted self.assertTrue('String 1' not in str(r.content)) self.assertTrue('String 2' in str(r.content)) self.assertTrue('Hello, world' in str(r.content)) def test_5_TestIssue67(self): # testcase for issue 67: http://code.google.com/p/django-rosetta/issues/detail?id=67 shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue67.template')), self.dest_file) # Make sure the plurals string is valid f_ = open(self.dest_file, 'rb') content = f_.read() f_.close() self.assertTrue('Hello, world' not in six.text_type(content)) self.assertTrue('|| n%100>=20) ? 1 : 2)' in six.text_type(content)) del(content) # Load the template file r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict()) + '?rosetta') r = self.client.get(reverse('rosetta-home') + '?filter=untranslated') r = self.client.get(reverse('rosetta-home')) # make sure all strings are untranslated self.assertTrue('dummy language' in str(r.content)) self.assertTrue('String 1' in str(r.content)) self.assertTrue('String 2' in str(r.content)) self.assertTrue('m_e48f149a8b2e8baa81b816c0edf93890' in str(r.content)) # post a translation r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world', _next='_next')) # Make sure the plurals string is still valid f_ = open(self.dest_file, 'rb') content = f_.read() f_.close() self.assertTrue('Hello, world' in str(content)) self.assertTrue('|| n%100>=20) ? 1 : 2)' in str(content)) self.assertTrue('or n%100>=20) ? 1 : 2)' not in str(content)) del(content) def test_6_ExcludedApps(self): rosetta_settings.EXCLUDED_APPLICATIONS = ('rosetta',) r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue('rosetta/locale/xx/LC_MESSAGES/django.po' not in str(r.content)) rosetta_settings.EXCLUDED_APPLICATIONS = () r = self.client.get(reverse('rosetta-pick-file') + '?rosetta') self.assertTrue('rosetta/locale/xx/LC_MESSAGES/django.po' in str(r.content)) def test_7_selfInApplist(self): self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue('rosetta/locale/xx/LC_MESSAGES/django.po' in str(r.content)) self.client.get(reverse('rosetta-pick-file') + '?filter=project') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue('rosetta/locale/xx/LC_MESSAGES/django.po' not in str(r.content)) def test_8_hideObsoletes(self): r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-pick-file')) r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) # not in listing for p in range(1, 5): r = self.client.get(reverse('rosetta-home') + '?page=%d' % p) self.assertTrue('dummy language' in str(r.content)) self.assertTrue('Les deux' not in str(r.content)) r = self.client.get(reverse('rosetta-home') + '?query=Les%20Deux') self.assertTrue('dummy language' in str(r.content)) self.assertTrue('Les deux' not in str(r.content)) def test_9_concurrency(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.template')), self.dest_file) r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client2.get(reverse('rosetta-pick-file') + '?filter=third-party') self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) self.client2.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) # Load the template file r = self.client.get(reverse('rosetta-home') + '?filter=untranslated') r = self.client.get(reverse('rosetta-home')) r2 = self.client2.get(reverse('rosetta-home') + '?filter=untranslated') r2 = self.client2.get(reverse('rosetta-home')) self.assertTrue('String 1' in str(r.content)) self.assertTrue('String 1' in str(r2.content)) self.assertTrue('m_08e4e11e2243d764fc45a5a4fba5d0f2' in str(r.content)) r = self.client.post(reverse('rosetta-home'), dict(m_08e4e11e2243d764fc45a5a4fba5d0f2='Hello, world', _next='_next'), follow=True) r2 = self.client2.get(reverse('rosetta-home')) # Client 2 reloads the home, forces a reload of the catalog, # the untranslated string1 is now translated self.assertTrue('String 1' not in str(r2.content)) self.assertTrue('String 2' in str(r2.content)) r = self.client.get(reverse('rosetta-home') + '?filter=untranslated') r = self.client.get(reverse('rosetta-home')) r2 = self.client2.get(reverse('rosetta-home') + '?filter=untranslated') r2 = self.client2.get(reverse('rosetta-home')) self.assertTrue('String 2' in str(r2.content) and 'm_e48f149a8b2e8baa81b816c0edf93890' in str(r2.content)) self.assertTrue('String 2' in str(r.content) and 'm_e48f149a8b2e8baa81b816c0edf93890' in str(r.content)) # client 2 posts! r2 = self.client2.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world, from client two!', _next='_next'), follow=True) self.assertTrue('save-conflict' not in str(r2.content)) # uh-oh here comes client 1 r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world, from client one!', _next='_next'), follow=True) # An error message is displayed self.assertTrue('save-conflict' in str(r.content)) # client 2 won pofile_content = open(self.dest_file, 'r').read() self.assertTrue('Hello, world, from client two!' in pofile_content) # Both clients show all strings, error messages are gone r = self.client.get(reverse('rosetta-home') + '?filter=translated') self.assertTrue('save-conflict' not in str(r.content)) r2 = self.client2.get(reverse('rosetta-home') + '?filter=translated') self.assertTrue('save-conflict' not in str(r2.content)) r = self.client.get(reverse('rosetta-home')) self.assertTrue('save-conflict' not in str(r.content)) r2 = self.client2.get(reverse('rosetta-home')) self.assertTrue('save-conflict' not in str(r2.content)) # Both have client's two version self.assertTrue('Hello, world, from client two!' in str(r.content)) self.assertTrue('Hello, world, from client two!' in str(r2.content)) self.assertTrue('save-conflict' not in str(r2.content)) self.assertTrue('save-conflict' not in str(r.content)) def test_10_issue_79_num_entries(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue79.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue('1' in str(r.content)) self.assertTrue('%s%%' % str(floatformat(0.0, 2)) in str(r.content)) self.assertTrue('1' in str(r.content)) def test_11_issue_80_tab_indexes(self): self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0,), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertTrue('tabindex="3"' in str(r.content)) def test_12_issue_82_staff_user(self): settings.ROSETTA_REQUIRES_AUTH = True self.client3 = Client() self.client3.login(username='test_admin3', password='test_password') self.client3.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client3.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client3.get(reverse('rosetta-home')) self.assertTrue(not r.content) settings.ROSETTA_REQUIRES_AUTH = False self.client3.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client3.get(reverse('rosetta-language-selection', args=('xx', 0,), kwargs=dict())) r = self.client3.get(reverse('rosetta-home')) self.assertFalse(not r.content) def test_13_catalog_filters(self): settings.LANGUAGES = (('fr', 'French'), ('xx', 'Dummy Language'),) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue(os.path.normpath('rosetta/locale/xx/LC_MESSAGES/django.po') in str(r.content)) self.assertTrue(('contrib') not in str(r.content)) self.client.get(reverse('rosetta-pick-file') + '?filter=django') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue(os.path.normpath('rosetta/locale/xx/LC_MESSAGES/django.po') not in str(r.content)) if self.django_version_major >= 1 and self.django_version_minor >= 3: self.assertTrue(('contrib') in str(r.content)) self.client.get(reverse('rosetta-pick-file') + '?filter=all') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue(os.path.normpath('rosetta/locale/xx/LC_MESSAGES/django.po') in str(r.content)) if self.django_version_major >= 1 and self.django_version_minor >= 3: self.assertTrue(('contrib') in str(r.content)) self.client.get(reverse('rosetta-pick-file') + '?filter=project') r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue(os.path.normpath('rosetta/locale/xx/LC_MESSAGES/django.po') not in str(r.content)) if self.django_version_major >= 1 and self.django_version_minor >= 3: self.assertTrue(('contrib') not in str(r.content)) def test_14_issue_99_context_and_comments(self): self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertTrue('This is a text of the base template' in str(r.content)) self.assertTrue('Context hint' in str(r.content)) def test_15_issue_87_entry_changed_signal(self): # copy the template file shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0,), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) @receiver(entry_changed) def test_receiver(sender, **kwargs): self.test_old_msgstr = kwargs.get('old_msgstr') self.test_new_msgstr = sender.msgstr self.test_msg_id = sender.msgid self.assertTrue('m_e48f149a8b2e8baa81b816c0edf93890' in str(r.content)) # post a translation r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world', _next='_next')) self.assertTrue(self.test_old_msgstr == '') self.assertTrue(self.test_new_msgstr == 'Hello, world') self.assertTrue(self.test_msg_id == 'String 2') del(self.test_old_msgstr, self.test_new_msgstr, self.test_msg_id) def test_16_issue_101_post_save_signal(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) @receiver(post_save) def test_receiver(sender, **kwargs): self.test_sig_lang = kwargs.get('language_code') self.assertTrue('m_e48f149a8b2e8baa81b816c0edf93890' in str(r.content)) # post a translation r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world', _next='_next')) self.assertTrue(self.test_sig_lang == 'xx') del(self.test_sig_lang) def test_17_issue_103_post_save_signal_has_request(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) @receiver(post_save) def test_receiver(sender, **kwargs): self.test_16_has_request = 'request' in kwargs self.assertTrue('m_e48f149a8b2e8baa81b816c0edf93890' in str(r.content)) # post a translation r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world', _next='_next')) self.assertTrue(self.test_16_has_request) del(self.test_16_has_request) # reset the original file def test_18_Test_Issue_gh24(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue24gh.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0, ), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertTrue('m_bb9d8fe6159187b9ea494c1b313d23d4' in str(r.content)) # post a translation, it should have properly wrapped lines r = self.client.post(reverse('rosetta-home'), dict(m_bb9d8fe6159187b9ea494c1b313d23d4='Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.', _next='_next')) pofile_content = open(self.dest_file, 'r').read() self.assertTrue('"pede mollis pretium."' in pofile_content) # Again, with unwrapped lines shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue24gh.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0, ), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertTrue('m_bb9d8fe6159187b9ea494c1b313d23d4' in str(r.content)) rosetta_settings.POFILE_WRAP_WIDTH = 0 r = self.client.post(reverse('rosetta-home'), dict(m_bb9d8fe6159187b9ea494c1b313d23d4='Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.', _next='_next')) pofile_content = open(self.dest_file, 'r').read() self.assertTrue('felis eu pede mollis pretium."' in pofile_content) def test_19_Test_Issue_gh34(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue34gh.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0, ), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertTrue('m_ff7060c1a9aae9c42af4d54ac8551f67_1' in str(r.content)) self.assertTrue('m_ff7060c1a9aae9c42af4d54ac8551f67_0' in str(r.content)) self.assertTrue('m_09f7e02f1290be211da707a266f153b3' in str(r.content)) # post a translation, it should have properly wrapped lines r = self.client.post(reverse('rosetta-home'), dict( m_ff7060c1a9aae9c42af4d54ac8551f67_0='Foo %s', m_ff7060c1a9aae9c42af4d54ac8551f67_1='Bar %s', m_09f7e02f1290be211da707a266f153b3='Salut', _next='_next')) pofile_content = open(self.dest_file, 'r').read() self.assertTrue('msgstr "Salut\\n"' in pofile_content) self.assertTrue('msgstr[0] ""\n"\\n"\n"Foo %s\\n"' in pofile_content) self.assertTrue('msgstr[1] ""\n"\\n"\n"Bar %s\\n"' in pofile_content) def test_20_Test_Issue_gh38(self): if self.django_version_minor >= 4 and self.django_version_major >= 1: self.assertTrue('django.contrib.sessions.middleware.SessionMiddleware' in settings.MIDDLEWARE_CLASSES) settings.SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies" # One: cache backend rosetta_settings.STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage' shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue38gh.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') self.client.get(reverse('rosetta-language-selection', args=('xx', 0, ), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertFalse(len(str(self.client.cookies.get('sessionid'))) > 4096) self.assertTrue('m_9efd113f7919952523f06e0d88da9c54' in str(r.content)) r = self.client.post(reverse('rosetta-home'), dict( m_9efd113f7919952523f06e0d88da9c54='Testing cookie length', _next='_next' )) pofile_content = open(self.dest_file, 'r').read() self.assertTrue('Testing cookie length' in pofile_content) self.client.get(reverse('rosetta-home') + '?filter=translated') r = self.client.get(reverse('rosetta-home')) self.assertTrue('Testing cookie length' in str(r.content)) self.assertTrue('m_9f6c442c6d579707440ba9dada0fb373' in str(r.content)) # Two, the cookie backend rosetta_settings.STORAGE_CLASS = 'rosetta.storage.SessionRosettaStorage' shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue38gh.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') self.client.get(reverse('rosetta-language-selection', args=('xx', 0, ), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertTrue(len(str(self.client.cookies.get('sessionid'))) > 4096) # boom: be a good browser, truncate the cookie self.client.cookies['sessionid'] = six.text_type(self.client.cookies.get('sessionid'))[:4096] r = self.client.get(reverse('rosetta-home')) self.assertFalse('m_9efd113f7919952523f06e0d88da9c54' in str(r.content)) def test_21_concurrency_of_cache_backend(self): rosetta_settings.STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage' shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue38gh.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') self.client.get(reverse('rosetta-language-selection', args=('xx', 0, ), kwargs=dict())) self.client2.get(reverse('rosetta-pick-file') + '?filter=third-party') self.client2.get(reverse('rosetta-language-selection', args=('xx', 0, ), kwargs=dict())) self.assertTrue(self.client.session.get('rosetta_cache_storage_key_prefix') != self.client2.session.get('rosetta_cache_storage_key_prefix')) def test_22_Test_Issue_gh39(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.issue39gh.template')), self.dest_file) self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) # We have distinct hashes, even though the msgid and msgstr are identical #print (r.content) self.assertTrue('m_4765f7de94996d3de5975fa797c3451f' in str(r.content)) self.assertTrue('m_08e4e11e2243d764fc45a5a4fba5d0f2' in str(r.content)) def test_23_save_header_data(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.template')), self.dest_file) unicode_user = User.objects.create_user('test_unicode', 'save_header_data@test.com', 'test_unicode') unicode_user.first_name = "aéaéaé aàaàaàa" unicode_user.last_name = "aâââ üüüü" unicode_user.is_superuser, unicode_user.is_staff = True, True unicode_user.save() self.client.login(username='test_unicode', password='test_unicode') # Load the template file r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home') + '?filter=untranslated') r = self.client.get(reverse('rosetta-home')) # make sure both strings are untranslated self.assertTrue('dummy language' in str(r.content)) self.assertTrue('String 1' in str(r.content)) self.assertTrue('String 2' in str(r.content)) self.assertTrue('m_e48f149a8b2e8baa81b816c0edf93890' in str(r.content)) # post a translation r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world', _next='_next')) # read the result f_ = open(self.dest_file, 'rb') content = six.text_type(f_.read()) f_.close() #print (content) # make sure unicode data was properly converted to ascii self.assertTrue('Hello, world' in content) self.assertTrue('save_header_data@test.com' in content) self.assertTrue('aeaeae aaaaaaa aaaa uuuu' in content) def test_24_percent_transaltion(self): shutil.copy(os.path.normpath(os.path.join(self.curdir, './django.po.template')), self.dest_file) # Load the template file r = self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') r = self.client.get(reverse('rosetta-language-selection', args=('xx', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home') + '?filter=untranslated') r = self.client.get(reverse('rosetta-home')) self.assertTrue('Progress: 0.00%' in str(r.content)) r = self.client.post(reverse('rosetta-home'), dict(m_e48f149a8b2e8baa81b816c0edf93890='Hello, world', _next='_next')) r = self.client.get(reverse('rosetta-home')) self.assertTrue('Progress: 25.00%' in str(r.content)) def test_25_replace_access_control(self): # Test default access control allows access url = reverse('rosetta-home') response = self.client.get(url) self.assertEqual(200, response.status_code) # Now replace access control, and check we get redirected settings.ROSETTA_ACCESS_CONTROL_FUNCTION = 'rosetta.tests.no_access' response = self.client.get(url) self.assertEqual(302, response.status_code) # Restore setting to default settings.ROSETTA_ACCESS_CONTROL_FUNCTION = None def test_26_urlconf_accept_dots_and_underscores(self): resolver_match = resolve("/rosetta/select/fr_FR.utf8/0/") self.assertEqual(resolver_match.url_name, "rosetta-language-selection") self.assertEqual(resolver_match.kwargs['langid'], 'fr_FR.utf8') def test_27_extended_urlconf_language_code_loads_file(self): r = self.client.get(reverse('rosetta-pick-file') + '?filter=all') r = self.client.get(reverse('rosetta-language-selection', args=('fr_FR.utf8', 0), kwargs=dict())) r = self.client.get(reverse('rosetta-home')) self.assertTrue('French (France), UTF8' in str(r.content)) self.assertTrue('m_71a6479faf8712e37dd5755cd1d11804' in str(r.content)) # Stubbed access control function def no_access(user): return False django-rosetta-0.7.2/rosetta/tests/__init__.pyc0000644000076500000240000006537612141706222022002 0ustar marcostaff00000000000000 Qc@sddlmZddlmZddlmZmZddlmZddl m Z ddl m Z ddl mZddlmZmZddlZddlZddlZddlZydd lmZWnek rd ZnXd e fd YZd ZdS(i(tsettings(tUser(treversetresolve(t floatformat(tTestCase(tClient(t entry_changedt post_saveN(treceiverc sfd}|S(Ncsj||S(N(tconnect(tfunc(tkwargstsignal(s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt _decorators((R R R((R R s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyR stRosettaTestCasecBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ RS(srosetta.tests.urlscOsztt|j||tjjt|_tjjtjj |jd|_ t j dt j d|_ |_dS(Ns"../locale/xx/LC_MESSAGES/django.poii(tsuperRt__init__tostpathtdirnamet__file__tcurdirtnormpathtjoint dest_filetdjangotVERSIONtdjango_version_majortdjango_version_minor(tselftargsR ((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyRs'cCs tjjddd}tjjddd}tjjddd}ttt|_|_|_ttt|_|_|_|j|j|jt|_ |j j dddd|j j ddddddft _ tj|j|jd dS(Nt test_admins test@test.comt test_passwordt test_admin2stest@test2.comt test_admin3tusernametpasswordtxxsdummy languages fr_FR.utf8sFrench (France), UTF8s.orig(sxxsdummy language(s fr_FR.utf8sFrench (France), UTF8(Rtobjectst create_usertTruet is_superusertFalsetis_stafftsaveRtclient2tclienttloginRt LANGUAGEStshutiltcopyR(Rtusertuser2tuser3((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pytsetUp$s    cCstj|jd|jdS(Ns.orig(R2tmoveR(R((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttearDown9scCs`|jjtdd}|jjtd}|jtjjdt|jkdS(Nsrosetta-pick-files?filter=third-partys'rosetta/locale/xx/LC_MESSAGES/django.po( R/tgetRt assertTrueRRRtstrtcontent(Rtr((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_1_ListLoading<scCs|jjtdd}|jjtddd dtd}|jjtd }|jd t|jkdS( Nsrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s?rosettas rosetta-homesdummy language(sxxi(R/R:RtdictR;R<R=(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_2_PickFileAs+cCs|jjtdd}|jjtddd dtd}|jjtd }|jjtd d}|jd |jjk|jd |jjd kdS(Nsrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s?rosettas rosetta-homesrosetta-download-files content-typesapplication/x-zip(sxxi(R/R:RR@R;t_headerstkeys(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_3_DownloadZIPHs +cCsetjtjjtjj|jd|j|jj t dd}|jj t ddddt }|jj t d d }|jj t d }|j d t |jk|j d t |jk|j d t |jk|j dt |jk|jjt d t dddd}|jj t ddddt d}|jj t d d }|jj t d }|j d t |jk|j d t |jk|jj t d d}|jj t d }|j d t |jk|j d t |jk|j dt |jkdS(Ns./django.po.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homes?filter=untranslatedsdummy languagesString 1sString 2t"m_e48f149a8b2e8baa81b816c0edf93890s Hello, worldt_nexts?rosettas?filter=translated(sxxi(sxxi(R2R3RRRRRRR/R:RR@R;R<R=tpost(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_4_DoChangesQs(1'*+cCs#tjtjjtjj|jd|jt|jd}|j }|j |j dt j |k|j dt j |k~|jjtdd}|jjtdddd td }|jjtd d}|jjtd }|j dt|jk|j dt|jk|j dt|jk|j dt|jk|jjtd tdddd}t|jd}|j }|j |j dt|k|j dt|k|j dt|k~dS(Ns./django.po.issue67.templatetrbs Hello, worlds|| n%100>=20) ? 1 : 2)srosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s?rosettas rosetta-homes?filter=untranslatedsdummy languagesString 1sString 2RERFsor n%100>=20) ? 1 : 2)(sxxi(R2R3RRRRRRtopentreadtcloseR;tsixt text_typeR/R:RR@R<R=RG(Rtf_R=R>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_5_TestIssue67ts.1  +*  cCsdt_|jjtdd}|jjtd}|jdt|jkdt_|jjtdd}|jdt|jkdS(Ntrosettasrosetta-pick-files?filter=third-partys'rosetta/locale/xx/LC_MESSAGES/django.pos?rosetta(srosetta((trosetta_settingstEXCLUDED_APPLICATIONSR/R:RR;R<R=(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_6_ExcludedAppss  cCs|jjtdd|jjtd}|jdt|jk|jjtdd|jjtd}|jdt|jkdS(Nsrosetta-pick-files?filter=third-partys'rosetta/locale/xx/LC_MESSAGES/django.pos?filter=project(R/R:RR;R<R=(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_7_selfInApplists cCs%|jjtdd}|jjtd}|jjtddddt}xotdd D]^}|jjtd d |}|jd t|jk|jd t|jkqkW|jjtd d}|jd t|jk|jd t|jkdS(Nsrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR iis rosetta-homes?page=%dsdummy languagesLes deuxs?query=Les%20Deux(sxxi(R/R:RR@trangeR;R<R=(RR>tp((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_8_hideObsoletess'  c Cstjtjjtjj|jd|j|jj t dd}|j j t dd}|jj t ddddt |j j t ddddt |jj t d d }|jj t d }|j j t d d }|j j t d }|j d t|jk|j d t|jk|j d t|jk|jjt d t d d dddt}|j j t d }|j d t|jk|j dt|jk|jj t d d }|jj t d }|j j t d d }|j j t d }|j dt|jkodt|jk|j dt|jkodt|jk|j jt d t dddddt}|j dt|jk|jjt d t dddddt}|j dt|jkt|jdj}|j d|k|jj t d d}|j dt|jk|j j t d d}|j dt|jk|jj t d }|j dt|jk|j j t d }|j dt|jk|j dt|jk|j dt|jk|j dt|jk|j dt|jkdS(Ns./django.po.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homes?filter=untranslatedsString 1t"m_08e4e11e2243d764fc45a5a4fba5d0f2s Hello, worldRFtfollowsString 2REsHello, world, from client two!s save-conflictsHello, world, from client one!R>s?filter=translated(sxxi(sxxi(R2R3RRRRRRR/R:RR.R@R;R<R=RGR)RJRK(RR>tr2tpofile_content((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_9_concurrencysP1%%01100cCstjtjjtjj|jd|j|jj t dd|jj t d}|j dt |j k|j dt tddt |j k|j dt |j kdS( Ns./django.po.issue79.templatesrosetta-pick-files?filter=third-partys 1s#%s%%gis 1(R2R3RRRRRRR/R:RR;R<R=R(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_10_issue_79_num_entriess 1/cCsy|jjtdd|jjtddd dt}|jjtd}|jd t|jkdS( Nsrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homes tabindex="3"(sxxi(R/R:RR@R;R<R=(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_11_issue_80_tab_indexess'cCstt_t|_|jjdddd|jjtdd|jjtddd d t}|jjtd }|j |j t t_|jjtdd|jjtdddd t}|jjtd }|j |j dS(NR$R#R%R!srosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-home(sxxi(sxxi( R)RtROSETTA_REQUIRES_AUTHRtclient3R0R:RR@R;R=R+t assertFalse(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_12_issue_82_staff_user s  ' 'cCsNddft_|jjtdd|jjtd}|jtjjdt |j k|jdt |j k|jjtdd |jjtd}|jtjjdt |j k|j d kr|j d kr|jdt |j kn|jjtdd |jjtd}|jtjjdt |j k|j d kr|j d kr|jdt |j kn|jjtdd |jjtd}|jtjjdt |j k|j d krJ|j d krJ|jdt |j kndS(NtfrtFrenchR&sDummy Languagesrosetta-pick-files?filter=third-partys'rosetta/locale/xx/LC_MESSAGES/django.potcontribs?filter=djangoiis ?filter=alls?filter=project(sfrsFrench(sxxsDummy Language( RR1R/R:RR;RRRR<R=RR(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_13_catalog_filterss(((((cCs|jjtdd|jjtddd dt}|jjtd}|jd t|jk|jd t|jkdS( Nsrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homes#This is a text of the base templates Context hint(sxxi(R/R:RR@R;R<R=(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt%test_14_issue_99_context_and_comments9s 'csCtjtjjtjjjdjjj t ddjj t ddddt }jj t d }t t fd }jd t|jkjjt d t d d d d }jjdkjjd kjjdk```dS(Ns./django.po.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homecs.|jd_|j_|j_dS(Nt old_msgstr(R:ttest_old_msgstrtmsgstrttest_new_msgstrtmsgidt test_msg_id(tsenderR (R(s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt test_receiverHs REs Hello, worldRFtsString 2(sxxi(R2R3RRRRRRR/R:RR@R RR;R<R=RGRjRlRn(RR>Rp((Rs:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt%test_15_issue_87_entry_changed_signal@s1'*cs tjtjjtjjjdjjj t ddjj t ddddt }jj t d }t t fd }jd t|jkjjt d t d d d d }jjdk`dS(Ns./django.po.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homecs|jd_dS(Nt language_code(R:t test_sig_lang(RoR (R(s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyRp^sREs Hello, worldRF(sxxi(R2R3RRRRRRR/R:RR@R RR;R<R=RGRt(RR>Rp((Rs:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt"test_16_issue_101_post_save_signalXs1'*cstjtjjtjjjdjjj t ddjj t ddddt }jj t d }t t fd }jd t|jkjjt d t d d d d }jj`dS(Ns./django.po.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homecsd|k_dS(Ntrequest(ttest_16_has_request(RoR (R(s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyRpqsREs Hello, worldRF(sxxi(R2R3RRRRRRR/R:RR@R RR;R<R=RGRw(RR>Rp((Rs:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt.test_17_issue_103_post_save_signal_has_requestjs1'*cCstjtjjtjj|jd|j|jj t dd|jj t ddddt }|jj t d }|j d t |jk|jjt d t d d d d }t|jd j}|j d|ktjtjjtjj|jd|j|jj t dd|jj t ddddt }|jj t d }|j d t |jkdt_|jjt d t d d d d }t|jd j}|j d|kdS(Ns./django.po.issue24gh.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homet"m_bb9d8fe6159187b9ea494c1b313d23d4sLorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.RFR>s"pede mollis pretium."sfelis eu pede mollis pretium."(sxxi(sxxi(R2R3RRRRRRR/R:RR@R;R<R=RGRJRKRRtPOFILE_WRAP_WIDTH(RR>R\((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_18_Test_Issue_gh24~s"1'*1' *c Csitjtjjtjj|jd|j|jj t dd|jj t ddddt }|jj t d }|j d t |jk|j d t |jk|j d t |jk|jjt d t d d d dd ddd}t|jdj}|j d|k|j d|k|j d|kdS(Ns./django.po.issue34gh.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homet$m_ff7060c1a9aae9c42af4d54ac8551f67_1t$m_ff7060c1a9aae9c42af4d54ac8551f67_0t"m_09f7e02f1290be211da707a266f153b3sFoo %ssBar %stSalutRFR>smsgstr "Salut\n"smsgstr[0] "" "\n" "Foo %s\n"smsgstr[1] "" "\n" "Bar %s\n"(sxxi(R2R3RRRRRRR/R:RR@R;R<R=RGRJRK(RR>R\((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_19_Test_Issue_gh34s1'cCs|jdkr|jdkr|jdtjkdt_dt_tj t j j t j j |jd|j|jjtdd|jjtd d dd t|jjtd}|jtt|jjjddk|jdt|jk|jjtdtdddd}t|jdj}|jd|k|jjtdd|jjtd}|jdt|jk|jdt|jkdt_tj t j j t j j |jd|j|jjtdd|jjtd d dd t|jjtd}|jtt|jjjddktj|jjjdd |jjd<|jjtd}|jdt|jkndS(Niis4django.contrib.sessions.middleware.SessionMiddlewares/django.contrib.sessions.backends.signed_cookiess#rosetta.storage.CacheRosettaStorages./django.po.issue38gh.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homet sessionidit"m_9efd113f7919952523f06e0d88da9c54sTesting cookie lengthRFR>s?filter=translatedt"m_9f6c442c6d579707440ba9dada0fb373s%rosetta.storage.SessionRosettaStorage(sxxi(sxxi(RRR;RtMIDDLEWARE_CLASSEStSESSION_ENGINERRt STORAGE_CLASSR2R3RRRRRRR/R:RR@RbtlenR<tcookiesR=RGRJRKRMRN(RR>R\((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_20_Test_Issue_gh38s8  1%.  1%.,cCsdt_tjtjjtjj|jd|j |j j t dd|j j t ddd d t |jj t dd|jj t ddd d t |j|j jj d |jjj d kdS( Ns#rosetta.storage.CacheRosettaStorages./django.po.issue38gh.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR t rosetta_cache_storage_key_prefix(sxxi(sxxi(RRRR2R3RRRRRRR/R:RR@R.R;tsession(R((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt$test_21_concurrency_of_cache_backends 1%%cCstjtjjtjj|jd|j|jj t dd|jj t ddd dt }|jj t d }|j d t |jk|j d t |jkdS( Ns./django.po.issue39gh.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homet"m_4765f7de94996d3de5975fa797c3451fRY(sxxi(R2R3RRRRRRR/R:RR@R;R<R=(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_22_Test_Issue_gh39s 1'cCstjtjjtjj|jd|jtj j ddd}d|_ d|_ t t |_|_|j|jjdddd|jjtdd }|jjtd d ddt}|jjtdd}|jjtd}|jdt|jk|jdt|jk|jdt|jk|jdt|jk|jjtdtdddd}t|jd}tj|j}|j|jd|k|jd|k|jd|kdS(Ns./django.po.templatet test_unicodessave_header_data@test.comsaéaéaé aàaàaàasaâââ üüüüR$R%srosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homes?filter=untranslatedsdummy languagesString 1sString 2REs Hello, worldRFRIsaeaeae aaaaaaa aaaa uuuu(sxxi(R2R3RRRRRRRR'R(t first_namet last_nameR)R*R,R-R/R0R:RR@R;R<R=RGRJRMRNRKRL(Rt unicode_userR>ROR=((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_23_save_header_datas,1   '* cCs&tjtjjtjj|jd|j|jj t dd}|jj t ddddt }|jj t d d }|jj t d }|j d t |jk|jjt d t d d dd}|jj t d }|j dt |jkdS(Ns./django.po.templatesrosetta-pick-files?filter=third-partysrosetta-language-selectionRR&iR s rosetta-homes?filter=untranslatedsProgress: 0.00%REs Hello, worldRFsProgress: 25.00%(sxxi(R2R3RRRRRRR/R:RR@R;R<R=RG(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_24_percent_transaltions1'*cCsltd}|jj|}|jd|jdt_|jj|}|jd|jdt_dS(Ns rosetta-homeisrosetta.tests.no_accessi.(RR/R:t assertEqualt status_codeRtROSETTA_ACCESS_CONTROL_FUNCTIONtNone(Rturltresponse((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyttest_25_replace_access_controls  cCs:td}|j|jd|j|jdddS(Ns/rosetta/select/fr_FR.utf8/0/srosetta-language-selectiontlangids fr_FR.utf8(RRturl_nameR (Rtresolver_match((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt+test_26_urlconf_accept_dots_and_underscores+s cCs|jjtdd}|jjtddd dt}|jjtd}|jd t|jk|jd t|jkdS( Nsrosetta-pick-files ?filter=allsrosetta-language-selectionRs fr_FR.utf8iR s rosetta-homesFrench (France), UTF8t"m_71a6479faf8712e37dd5755cd1d11804(s fr_FR.utf8i(R/R:RR@R;R<R=(RR>((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt1test_27_extended_urlconf_language_code_loads_file0s '(!t__name__t __module__turlsRR7R9R?RARDRHRPRTRURXR]R^R_RcRgRhRrRuRxR{RRRRRRRRR(((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyRs>      # $  @          + "   cCstS(N(R+(R4((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyt no_access9s(t django.confRtdjango.contrib.auth.modelsRtdjango.core.urlresolversRRtdjango.template.defaultfiltersRt django.testRtdjango.test.clientRt rosetta.confRRtrosetta.signalsRRRR2RMRtdjango.dispatchR t ImportErrorRR(((s:/Users/marco/Code/django-rosetta/rosetta/tests/__init__.pyts&       django-rosetta-0.7.2/rosetta/tests/django.po.issue24gh.template0000644000076500000240000000230112140410716024730 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \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" msgid "String 1" msgstr "" msgid "String 2" msgstr "" #. Translators: This is a text of the base template #: templates/base.html:43 msgid "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium." msgstr "" django-rosetta-0.7.2/rosetta/tests/django.po.issue34gh.template0000644000076500000240000000133312140410716024735 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \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" msgid "" "\n" " %s customer hidden\n" msgid_plural "" "\n" " %s customers hidden\n" msgstr[0] "" msgstr[1] "" msgid "Hello\n" msgstr "" django-rosetta-0.7.2/rosetta/tests/django.po.issue38gh.template0000644000076500000240000005136212140410716024750 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2)\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" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 1" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 2" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 3" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 4" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 5" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 6" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 7" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 8" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 9" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 10" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 11" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 12" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 13" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 14" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 15" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 16" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 17" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 18" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 19" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 20" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 21" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 22" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 23" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 24" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 25" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 26" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 27" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 28" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 29" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 30" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 31" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 32" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 33" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 34" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 35" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 36" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 37" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 38" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 39" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 40" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 41" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 42" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 43" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 44" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 45" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 46" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 47" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 48" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 49" msgstr "" msgid "0_81EhfRiLPoxAH5j3f1D2P33S_-Fe_7Mn_R_t9V8Bysr01xWAgvVEyyA190oYYTnzJCBucLBWKiqaAIjWAvQ3ZfrbCkDRe02iESoGhHEIBmmDI49SY6cQQk0AxGoB-kmZfloBiMsQraFOWetVEF4SRTHlxhNEPA-kCYB4LUCfl-l String 50" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 1" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 2" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 3" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 4" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 5" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 6" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 7" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 8" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 9" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 10" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 11" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 12" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 13" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 14" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 15" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 16" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 17" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 18" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 19" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 20" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 21" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 22" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 23" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 24" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 25" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 26" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 27" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 28" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 29" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 30" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 31" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 32" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 33" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 34" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 35" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 36" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 37" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 38" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 39" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 40" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 41" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 42" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 43" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 44" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 45" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 46" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 47" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 48" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 49" msgstr "" msgid "xeXu5ur6xtXV69d2-7u7Fz5eD6TpYXyNVcFd28vjsZ7fnYIrzTTMEn__E_5ykGYGm-aY_7JXpx9_fXD9K-75dlH1vTvOv2w2HsZPL9zu7MdvupP-qNh5xo8PjfCLkR1kO4QUmB8CZHeW2BcGw2nYTjt7I7NcBLDuNM9PpbvPQt3le1Pex String 50" msgstr "" django-rosetta-0.7.2/rosetta/tests/django.po.issue39gh.template0000644000076500000240000000136412140410716024746 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \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/base.html:43 msgctxt "Report (by_customer). Parent table: invoices" msgid "String 1" msgstr "" #: templates/base.html:44 msgid "String 1" msgstr "" django-rosetta-0.7.2/rosetta/tests/django.po.issue67.template0000644000076500000240000000136712140410716024433 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2)\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" msgid "String 1" msgstr "" msgid "String 2" msgstr "" django-rosetta-0.7.2/rosetta/tests/django.po.issue79.template0000644000076500000240000000122312140410716024425 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \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" msgid "String 1" msgstr "" #~ msgid "String 2" #~ msgstr "" django-rosetta-0.7.2/rosetta/tests/django.po.template0000644000076500000240000000147012140410716023122 0ustar marcostaff00000000000000# 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. # 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 \n" "Language-Team: French \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" msgid "String 1" msgstr "" msgid "String 2" msgstr "" #. Translators: This is a text of the base template #: templates/base.html:43 msgid "String 3 with comment" msgstr "" msgctxt "Context hint" msgid "String 4" msgstr "" django-rosetta-0.7.2/rosetta/tests/test_unicode_literals.pyc0000644000076500000240000000034112140410716024603 0ustar marcostaff00000000000000 4Qc@sddlmZdS(i(tunicode_literalsN(t __future__R(((sG/Users/marco/Code/django-rosetta/rosetta/tests/test_unicode_literals.pytsdjango-rosetta-0.7.2/rosetta/tests/urls.py0000644000076500000240000000044512140410716021046 0ustar marcostaff00000000000000try: from django.conf.urls import patterns, include, url except ImportError: from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('', url(r'^rosetta/',include('rosetta.urls')), url(r'^admin/$','rosetta.tests.views.dummy', name='dummy-login') ) django-rosetta-0.7.2/rosetta/tests/urls.pyc0000644000076500000240000000101612141706222021205 0ustar marcostaff00000000000000 Qc@sy ddlmZmZmZWn-ek rOddlmZmZmZnXededededdddZd S( i(tpatternstincludeturlts ^rosetta/s rosetta.urlss^admin/$srosetta.tests.views.dummytnames dummy-loginN(tdjango.conf.urlsRRRt ImportErrortdjango.conf.urls.defaultst urlpatterns(((s6/Users/marco/Code/django-rosetta/rosetta/tests/urls.pyts    django-rosetta-0.7.2/rosetta/tests/views.py0000644000076500000240000000003612140410716021212 0ustar marcostaff00000000000000def dummy(request): pass django-rosetta-0.7.2/rosetta/tests/views.pyc0000644000076500000240000000045512141706222021363 0ustar marcostaff00000000000000 Qc@s dZdS(cCsdS(N((trequest((s7/Users/marco/Code/django-rosetta/rosetta/tests/views.pytdummysN(R(((s7/Users/marco/Code/django-rosetta/rosetta/tests/views.pytsdjango-rosetta-0.7.2/rosetta/urls.py0000644000076500000240000000071412140410716017703 0ustar marcostaff00000000000000try: from django.conf.urls import patterns, url except ImportError: from django.conf.urls.defaults import patterns, url 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[\w\-_\.]+)/(?P\d+)/$', 'lang_sel', name='rosetta-language-selection'), ) django-rosetta-0.7.2/rosetta/views.py0000644000076500000240000004311512140410716020055 0ustar marcostaff00000000000000from django.conf import settings from django.contrib.auth.decorators import user_passes_test from django.core.paginator import Paginator from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.encoding import iri_to_uri from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import never_cache from rosetta.conf import settings as rosetta_settings from rosetta.polib import pofile from rosetta.poutil import find_pos, pagination_range, timestamp_with_timezone from rosetta.signals import entry_changed, post_save from rosetta.storage import get_storage from rosetta.access import can_translate import re import rosetta import unicodedata import hashlib import os import six @never_cache @user_passes_test(lambda user: can_translate(user), 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_ storage = get_storage(request) query = '' if storage.has('rosetta_i18n_fn'): rosetta_i18n_fn = storage.get('rosetta_i18n_fn') rosetta_i18n_app = get_app_name(rosetta_i18n_fn) rosetta_i18n_lang_code = storage.get('rosetta_i18n_lang_code') rosetta_i18n_lang_bidi = rosetta_i18n_lang_code.split('-')[0] in settings.LANGUAGES_BIDI rosetta_i18n_write = storage.get('rosetta_i18n_write', True) if rosetta_i18n_write: rosetta_i18n_pofile = pofile(rosetta_i18n_fn, wrapwidth=rosetta_settings.POFILE_WRAP_WIDTH) for entry in rosetta_i18n_pofile: entry.md5hash = hashlib.md5( (six.text_type(entry.msgid) + six.text_type(entry.msgstr) + six.text_type(entry.msgctxt or "")).encode('utf8') ).hexdigest() else: rosetta_i18n_pofile = storage.get('rosetta_i18n_pofile') if 'filter' in request.GET: if request.GET.get('filter') in ('untranslated', 'translated', 'fuzzy', 'all'): filter_ = request.GET.get('filter') storage.set('rosetta_i18n_filter', filter_) return HttpResponseRedirect(reverse('rosetta-home')) rosetta_i18n_filter = storage.get('rosetta_i18n_filter', 'all') if '_next' in request.POST: rx = re.compile(r'^m_([0-9a-f]+)') rx_plural = re.compile(r'^m_([0-9a-f]+)_([0-9]+)') file_change = False for key, value in request.POST.items(): md5hash = None plural_id = None if rx_plural.match(key): md5hash = str(rx_plural.match(key).groups()[0]) # polib parses .po files into unicode strings, but # doesn't bother to convert plural indexes to int, # so we need unicode here. plural_id = six.text_type(rx_plural.match(key).groups()[1]) elif rx.match(key): md5hash = str(rx.match(key).groups()[0]) if md5hash is not None: entry = rosetta_i18n_pofile.find(md5hash, 'md5hash') # If someone did a makemessage, some entries might # have been removed, so we need to check. if entry: old_msgstr = entry.msgstr if plural_id is not None: #plural_string = fix_nls(entry.msgstr_plural[plural_id], value) plural_string = fix_nls(entry.msgid_plural, value) entry.msgstr_plural[plural_id] = plural_string else: entry.msgstr = fix_nls(entry.msgid, value) is_fuzzy = bool(request.POST.get('f_%s' % md5hash, False)) old_fuzzy = 'fuzzy' in entry.flags if old_fuzzy and not is_fuzzy: entry.flags.remove('fuzzy') elif not old_fuzzy and is_fuzzy: entry.flags.append('fuzzy') file_change = True if old_msgstr != value or old_fuzzy != is_fuzzy: entry_changed.send(sender=entry, user=request.user, old_msgstr=old_msgstr, old_fuzzy=old_fuzzy, pofile=rosetta_i18n_fn, language_code=rosetta_i18n_lang_code, ) else: storage.set('rosetta_last_save_error', True) if file_change and rosetta_i18n_write: try: # Provide defaults in case authorization is not required. request.user.first_name = getattr(request.user, 'first_name', 'Anonymous') request.user.last_name = getattr(request.user, 'last_name', 'User') request.user.email = getattr(request.user, 'email', 'anonymous@user.tld') 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'] = timestamp_with_timezone() except UnicodeDecodeError: pass try: rosetta_i18n_pofile.save() po_filepath, ext = os.path.splitext(rosetta_i18n_fn) save_as_mo_filepath = po_filepath + '.mo' rosetta_i18n_pofile.save_as_mofile(save_as_mo_filepath) post_save.send(sender=None, language_code=rosetta_i18n_lang_code, request=request) # Try auto-reloading via the WSGI daemon mode reload mechanism if rosetta_settings.WSGI_AUTO_RELOAD and \ 'mod_wsgi.process_group' in request.environ and \ request.environ.get('mod_wsgi.process_group', None) and \ 'SCRIPT_FILENAME' in request.environ and \ int(request.environ.get('mod_wsgi.script_reloading', '0')): try: os.utime(request.environ.get('SCRIPT_FILENAME'), None) except OSError: pass # Try auto-reloading via uwsgi daemon reload mechanism if rosetta_settings.UWSGI_AUTO_RELOAD: try: import uwsgi # pretty easy right? uwsgi.reload() except: # we may not be running under uwsgi :P pass except: storage.set('rosetta_i18n_write', False) storage.set('rosetta_i18n_pofile', rosetta_i18n_pofile) # Retain query arguments query_arg = '?_next=1' if 'query' in request.GET or 'query' in request.POST: query_arg += '&query=%s' % request.REQUEST.get('query') if 'page' in request.GET: query_arg += '&page=%d&_next=1' % int(request.GET.get('page')) return HttpResponseRedirect(reverse('rosetta-home') + iri_to_uri(query_arg)) rosetta_i18n_lang_code = storage.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(re.escape(query), re.IGNORECASE) paginator = Paginator([e for e in rosetta_i18n_pofile if not e.obsolete and rx.search(six.text_type(e.msgstr) + six.text_type(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([e for e in rosetta_i18n_pofile.fuzzy_entries() if not e.obsolete], 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 if '_next' in request.GET or '_next' in request.POST: page += 1 if page > paginator.num_pages: page = 1 query_arg = '?page=%d' % page return HttpResponseRedirect(reverse('rosetta-home') + iri_to_uri(query_arg)) rosetta_messages = paginator.page(page).object_list main_language = None if rosetta_settings.MAIN_LANGUAGE and rosetta_settings.MAIN_LANGUAGE != rosetta_i18n_lang_code: 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) for message in rosetta_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) try: ADMIN_MEDIA_PREFIX = settings.ADMIN_MEDIA_PREFIX ADMIN_IMAGE_DIR = ADMIN_MEDIA_PREFIX + 'img/admin/' except AttributeError: ADMIN_MEDIA_PREFIX = settings.STATIC_URL + 'admin/' ADMIN_IMAGE_DIR = ADMIN_MEDIA_PREFIX + 'img/' if storage.has('rosetta_last_save_error'): storage.delete('rosetta_last_save_error') rosetta_last_save_error = True else: rosetta_last_save_error = False return render_to_response('rosetta/pofile.html', dict( version=rosetta.get_version(True), ADMIN_MEDIA_PREFIX=ADMIN_MEDIA_PREFIX, ADMIN_IMAGE_DIR=ADMIN_IMAGE_DIR, rosetta_settings=rosetta_settings, rosetta_i18n_lang_name=_(storage.get('rosetta_i18n_lang_name')), rosetta_i18n_lang_code=rosetta_i18n_lang_code, rosetta_i18n_lang_bidi=rosetta_i18n_lang_bidi, rosetta_last_save_error=rosetta_last_save_error, rosetta_i18n_filter=rosetta_i18n_filter, rosetta_i18n_write=rosetta_i18n_write, rosetta_messages=rosetta_messages, page_range=needs_pagination and page_range, needs_pagination=needs_pagination, main_language=main_language, rosetta_i18n_app=rosetta_i18n_app, page=page, query=query, paginator=paginator, rosetta_i18n_pofile=rosetta_i18n_pofile ), context_instance=RequestContext(request)) else: return list_languages(request, do_session_warn=True) @never_cache @user_passes_test(lambda user: can_translate(user), settings.LOGIN_URL) def download_file(request): import zipfile storage = get_storage(request) # original filename rosetta_i18n_fn = storage.get('rosetta_i18n_fn', None) # in-session modified catalog rosetta_i18n_pofile = storage.get('rosetta_i18n_pofile', None) # language code rosetta_i18n_lang_code = storage.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 = six.BytesIO() zipf = zipfile.ZipFile(zipdata, mode="w") zipf.writestr(po_fn, six.text_type(rosetta_i18n_pofile).encode("utf8")) 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: return HttpResponseRedirect(reverse('rosetta-home')) @never_cache @user_passes_test(lambda user: can_translate(user), settings.LOGIN_URL) def list_languages(request, do_session_warn=False): """ Lists the languages for the current project, the gettext catalog files that can be translated and their translation progress """ storage = get_storage(request) languages = [] if 'filter' in request.GET: if request.GET.get('filter') in ('project', 'third-party', 'django', 'all'): filter_ = request.GET.get('filter') storage.set('rosetta_i18n_catalog_filter', filter_) return HttpResponseRedirect(reverse('rosetta-pick-file')) rosetta_i18n_catalog_filter = storage.get('rosetta_i18n_catalog_filter', 'project') third_party_apps = rosetta_i18n_catalog_filter in ('all', 'third-party') django_apps = rosetta_i18n_catalog_filter in ('all', 'django') project_apps = rosetta_i18n_catalog_filter in ('all', 'project') has_pos = False for language in settings.LANGUAGES: pos = find_pos(language[0], project_apps=project_apps, django_apps=django_apps, third_party_apps=third_party_apps) has_pos = has_pos or len(pos) languages.append( (language[0], _(language[1]), sorted([(get_app_name(l), os.path.realpath(l), pofile(l)) for l in pos], key=lambda app: app[0]), ) ) try: ADMIN_MEDIA_PREFIX = settings.ADMIN_MEDIA_PREFIX except AttributeError: ADMIN_MEDIA_PREFIX = settings.STATIC_URL + 'admin/' do_session_warn = do_session_warn and 'SessionRosettaStorage' in rosetta_settings.STORAGE_CLASS and 'signed_cookies' in settings.SESSION_ENGINE return render_to_response('rosetta/languages.html', dict( version=rosetta.get_version(True), ADMIN_MEDIA_PREFIX=ADMIN_MEDIA_PREFIX, do_session_warn=do_session_warn, languages=languages, has_pos=has_pos ), context_instance=RequestContext(request)) def get_app_name(path): app = path.split("/locale")[0].split("/")[-1] return app @never_cache @user_passes_test(lambda user: can_translate(user), settings.LOGIN_URL) def lang_sel(request, langid, idx): """ Selects a file to be translated """ storage = get_storage(request) if langid not in [l[0] for l in settings.LANGUAGES]: raise Http404 else: rosetta_i18n_catalog_filter = storage.get('rosetta_i18n_catalog_filter', 'project') third_party_apps = rosetta_i18n_catalog_filter in ('all', 'third-party') django_apps = rosetta_i18n_catalog_filter in ('all', 'django') project_apps = rosetta_i18n_catalog_filter in ('all', 'project') file_ = sorted(find_pos(langid, project_apps=project_apps, django_apps=django_apps, third_party_apps=third_party_apps), key=get_app_name)[int(idx)] storage.set('rosetta_i18n_lang_code', langid) storage.set('rosetta_i18n_lang_name', six.text_type([l[1] for l in settings.LANGUAGES if l[0] == langid][0])) storage.set('rosetta_i18n_fn', file_) po = pofile(file_) for entry in po: entry.md5hash = hashlib.new('md5', (six.text_type(entry.msgid) + six.text_type(entry.msgstr) + six.text_type(entry.msgctxt or "")).encode('utf8') ).hexdigest() storage.set('rosetta_i18n_pofile', po) try: os.utime(file_, None) storage.set('rosetta_i18n_write', True) except OSError: storage.set('rosetta_i18n_write', False) return HttpResponseRedirect(reverse('rosetta-home')) django-rosetta-0.7.2/setup.cfg0000644000076500000240000000007312141707771016515 0ustar marcostaff00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 django-rosetta-0.7.2/setup.py0000644000076500000240000000167512140410716016404 0ustar marcostaff00000000000000from setuptools import setup, find_packages setup( name='django-rosetta', version=__import__('rosetta').get_version(limit=3), description='A Django application that eases the translation of Django projects', author='Marco Bonetti', author_email='mbonetti@gmail.com', url='https://github.com/mbi/django-rosetta', license='MIT', packages=find_packages(), classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Localization', 'Topic :: Software Development :: Internationalization', 'Framework :: Django', ], include_package_data=True, zip_safe=False, install_requires=[ 'six >=1.2.0', 'Django >= 1.3' ] )