From 891b9e3b7ecaedc9ac32bc941400a267c77482a0 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 25 May 2010 14:40:56 +0200 Subject: [PATCH] some translation stuff added modeltranslation added infopages, deleted static pages from templates catalogue.Book._short_html now modeltranslated added Ukrainian l10n some minor fixes --- .../catalogue/locale/de/LC_MESSAGES/django.po | 24 +- .../catalogue/locale/en/LC_MESSAGES/django.po | 24 +- .../catalogue/locale/es/LC_MESSAGES/django.po | 24 +- .../catalogue/locale/fr/LC_MESSAGES/django.po | 24 +- .../catalogue/locale/lt/LC_MESSAGES/django.po | 24 +- .../catalogue/locale/pl/LC_MESSAGES/django.po | 26 +- .../catalogue/locale/ru/LC_MESSAGES/django.po | 24 +- .../catalogue/locale/uk/LC_MESSAGES/django.po | 258 ++++++ .../0009__short_html_translation.py | 172 ++++ apps/catalogue/models.py | 3 +- apps/chunks/locale/uk/LC_MESSAGES/django.po | 53 ++ apps/infopages/__init__.py | 0 apps/infopages/admin.py | 9 + apps/infopages/migrations/0001_initial.py | 105 +++ apps/infopages/migrations/__init__.py | 0 apps/infopages/models.py | 26 + apps/lessons/locale/uk/LC_MESSAGES/django.po | 49 ++ apps/modeltranslation/__init__.py | 0 apps/modeltranslation/admin.py | 140 ++++ apps/modeltranslation/fields.py | 110 +++ apps/modeltranslation/management/__init__.py | 0 .../management/commands/__init__.py | 0 .../commands/update_translation_fields.py | 30 + apps/modeltranslation/models.py | 44 + apps/modeltranslation/tests.py | 258 ++++++ apps/modeltranslation/testurls.py | 7 + apps/modeltranslation/translator.py | 191 +++++ apps/modeltranslation/utils.py | 123 +++ .../locale/uk/LC_MESSAGES/django.po | 50 ++ apps/sponsors/locale/de/LC_MESSAGES/django.po | 37 + apps/sponsors/locale/uk/LC_MESSAGES/django.po | 37 + wolnelektury/locale/de/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/de/LC_MESSAGES/django.po | 73 +- wolnelektury/locale/en/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/en/LC_MESSAGES/django.po | 73 +- wolnelektury/locale/es/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/es/LC_MESSAGES/django.po | 73 +- wolnelektury/locale/fr/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/fr/LC_MESSAGES/django.po | 73 +- wolnelektury/locale/lt/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/lt/LC_MESSAGES/django.po | 73 +- wolnelektury/locale/pl/LC_MESSAGES/django.mo | Bin 14593 -> 15784 bytes wolnelektury/locale/pl/LC_MESSAGES/django.po | 85 +- wolnelektury/locale/ru/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/ru/LC_MESSAGES/django.po | 73 +- wolnelektury/locale/uk/LC_MESSAGES/django.mo | Bin 0 -> 367 bytes wolnelektury/locale/uk/LC_MESSAGES/django.po | 782 ++++++++++++++++++ wolnelektury/settings.py | 9 +- wolnelektury/static/js/catalogue.js | 30 +- .../templates/catalogue/book_fragments.html | 2 +- .../catalogue/search_multiple_hits.html | 9 +- .../templates/catalogue/search_too_short.html | 9 +- .../catalogue/tagged_object_list.html | 2 +- wolnelektury/templates/info/about_us.html | 18 - wolnelektury/templates/info/base.html | 21 + wolnelektury/templates/info/help_us.html | 18 - wolnelektury/templates/info/join_us.html | 15 +- .../templates/info/voluntary_services.html | 19 - wolnelektury/translation.py | 19 + wolnelektury/urls.py | 22 +- 60 files changed, 3089 insertions(+), 281 deletions(-) create mode 100644 apps/catalogue/locale/uk/LC_MESSAGES/django.po create mode 100644 apps/catalogue/migrations/0009__short_html_translation.py create mode 100644 apps/chunks/locale/uk/LC_MESSAGES/django.po create mode 100644 apps/infopages/__init__.py create mode 100644 apps/infopages/admin.py create mode 100644 apps/infopages/migrations/0001_initial.py create mode 100644 apps/infopages/migrations/__init__.py create mode 100644 apps/infopages/models.py create mode 100644 apps/lessons/locale/uk/LC_MESSAGES/django.po create mode 100644 apps/modeltranslation/__init__.py create mode 100644 apps/modeltranslation/admin.py create mode 100644 apps/modeltranslation/fields.py create mode 100644 apps/modeltranslation/management/__init__.py create mode 100644 apps/modeltranslation/management/commands/__init__.py create mode 100644 apps/modeltranslation/management/commands/update_translation_fields.py create mode 100644 apps/modeltranslation/models.py create mode 100644 apps/modeltranslation/tests.py create mode 100644 apps/modeltranslation/testurls.py create mode 100644 apps/modeltranslation/translator.py create mode 100644 apps/modeltranslation/utils.py create mode 100644 apps/newtagging/locale/uk/LC_MESSAGES/django.po create mode 100644 apps/sponsors/locale/de/LC_MESSAGES/django.po create mode 100644 apps/sponsors/locale/uk/LC_MESSAGES/django.po create mode 100644 wolnelektury/locale/uk/LC_MESSAGES/django.mo create mode 100644 wolnelektury/locale/uk/LC_MESSAGES/django.po delete mode 100644 wolnelektury/templates/info/about_us.html create mode 100644 wolnelektury/templates/info/base.html delete mode 100644 wolnelektury/templates/info/help_us.html delete mode 100644 wolnelektury/templates/info/voluntary_services.html create mode 100644 wolnelektury/translation.py diff --git a/apps/catalogue/locale/de/LC_MESSAGES/django.po b/apps/catalogue/locale/de/LC_MESSAGES/django.po index 5362b95bb..fa770ffd8 100644 --- a/apps/catalogue/locale/de/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-18 10:57+0200\n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: fields.py:45 +#: fields.py:47 #, python-format msgid "Enter a valid JSON value. Error: %s" msgstr "" @@ -201,38 +201,38 @@ msgstr "" msgid "book stubs" msgstr "" -#: views.py:308 +#: views.py:339 msgid "

To maintain your shelves you need to be logged in.

" msgstr "" -#: views.py:326 +#: views.py:357 msgid "

Shelves were sucessfully saved.

" msgstr "" -#: views.py:350 +#: views.py:381 msgid "Book was successfully removed from the shelf" msgstr "" -#: views.py:352 +#: views.py:383 msgid "This book is not on the shelf" msgstr "" -#: views.py:448 +#: views.py:479 #, python-format msgid "

Shelf %s was successfully created

" msgstr "" -#: views.py:463 +#: views.py:494 #, python-format msgid "

Shelf %s was successfully removed

" msgstr "" -#: views.py:522 +#: views.py:553 #, python-format msgid "Today is %(month)s, %(day)s." msgstr "" -#: views.py:523 +#: views.py:554 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -240,11 +240,11 @@ msgid "" "%(tb)s" msgstr "" -#: views.py:524 +#: views.py:555 msgid "Book imported successfully" msgstr "" -#: views.py:526 +#: views.py:557 #, python-format msgid "Error importing file: %r" msgstr "" diff --git a/apps/catalogue/locale/en/LC_MESSAGES/django.po b/apps/catalogue/locale/en/LC_MESSAGES/django.po index 5362b95bb..fa770ffd8 100644 --- a/apps/catalogue/locale/en/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-18 10:57+0200\n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: fields.py:45 +#: fields.py:47 #, python-format msgid "Enter a valid JSON value. Error: %s" msgstr "" @@ -201,38 +201,38 @@ msgstr "" msgid "book stubs" msgstr "" -#: views.py:308 +#: views.py:339 msgid "

To maintain your shelves you need to be logged in.

" msgstr "" -#: views.py:326 +#: views.py:357 msgid "

Shelves were sucessfully saved.

" msgstr "" -#: views.py:350 +#: views.py:381 msgid "Book was successfully removed from the shelf" msgstr "" -#: views.py:352 +#: views.py:383 msgid "This book is not on the shelf" msgstr "" -#: views.py:448 +#: views.py:479 #, python-format msgid "

Shelf %s was successfully created

" msgstr "" -#: views.py:463 +#: views.py:494 #, python-format msgid "

Shelf %s was successfully removed

" msgstr "" -#: views.py:522 +#: views.py:553 #, python-format msgid "Today is %(month)s, %(day)s." msgstr "" -#: views.py:523 +#: views.py:554 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -240,11 +240,11 @@ msgid "" "%(tb)s" msgstr "" -#: views.py:524 +#: views.py:555 msgid "Book imported successfully" msgstr "" -#: views.py:526 +#: views.py:557 #, python-format msgid "Error importing file: %r" msgstr "" diff --git a/apps/catalogue/locale/es/LC_MESSAGES/django.po b/apps/catalogue/locale/es/LC_MESSAGES/django.po index 5362b95bb..fa770ffd8 100644 --- a/apps/catalogue/locale/es/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-18 10:57+0200\n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: fields.py:45 +#: fields.py:47 #, python-format msgid "Enter a valid JSON value. Error: %s" msgstr "" @@ -201,38 +201,38 @@ msgstr "" msgid "book stubs" msgstr "" -#: views.py:308 +#: views.py:339 msgid "

To maintain your shelves you need to be logged in.

" msgstr "" -#: views.py:326 +#: views.py:357 msgid "

Shelves were sucessfully saved.

" msgstr "" -#: views.py:350 +#: views.py:381 msgid "Book was successfully removed from the shelf" msgstr "" -#: views.py:352 +#: views.py:383 msgid "This book is not on the shelf" msgstr "" -#: views.py:448 +#: views.py:479 #, python-format msgid "

Shelf %s was successfully created

" msgstr "" -#: views.py:463 +#: views.py:494 #, python-format msgid "

Shelf %s was successfully removed

" msgstr "" -#: views.py:522 +#: views.py:553 #, python-format msgid "Today is %(month)s, %(day)s." msgstr "" -#: views.py:523 +#: views.py:554 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -240,11 +240,11 @@ msgid "" "%(tb)s" msgstr "" -#: views.py:524 +#: views.py:555 msgid "Book imported successfully" msgstr "" -#: views.py:526 +#: views.py:557 #, python-format msgid "Error importing file: %r" msgstr "" diff --git a/apps/catalogue/locale/fr/LC_MESSAGES/django.po b/apps/catalogue/locale/fr/LC_MESSAGES/django.po index 5362b95bb..fa770ffd8 100644 --- a/apps/catalogue/locale/fr/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-18 10:57+0200\n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: fields.py:45 +#: fields.py:47 #, python-format msgid "Enter a valid JSON value. Error: %s" msgstr "" @@ -201,38 +201,38 @@ msgstr "" msgid "book stubs" msgstr "" -#: views.py:308 +#: views.py:339 msgid "

To maintain your shelves you need to be logged in.

" msgstr "" -#: views.py:326 +#: views.py:357 msgid "

Shelves were sucessfully saved.

" msgstr "" -#: views.py:350 +#: views.py:381 msgid "Book was successfully removed from the shelf" msgstr "" -#: views.py:352 +#: views.py:383 msgid "This book is not on the shelf" msgstr "" -#: views.py:448 +#: views.py:479 #, python-format msgid "

Shelf %s was successfully created

" msgstr "" -#: views.py:463 +#: views.py:494 #, python-format msgid "

Shelf %s was successfully removed

" msgstr "" -#: views.py:522 +#: views.py:553 #, python-format msgid "Today is %(month)s, %(day)s." msgstr "" -#: views.py:523 +#: views.py:554 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -240,11 +240,11 @@ msgid "" "%(tb)s" msgstr "" -#: views.py:524 +#: views.py:555 msgid "Book imported successfully" msgstr "" -#: views.py:526 +#: views.py:557 #, python-format msgid "Error importing file: %r" msgstr "" diff --git a/apps/catalogue/locale/lt/LC_MESSAGES/django.po b/apps/catalogue/locale/lt/LC_MESSAGES/django.po index 5362b95bb..fa770ffd8 100644 --- a/apps/catalogue/locale/lt/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/lt/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-18 10:57+0200\n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: fields.py:45 +#: fields.py:47 #, python-format msgid "Enter a valid JSON value. Error: %s" msgstr "" @@ -201,38 +201,38 @@ msgstr "" msgid "book stubs" msgstr "" -#: views.py:308 +#: views.py:339 msgid "

To maintain your shelves you need to be logged in.

" msgstr "" -#: views.py:326 +#: views.py:357 msgid "

Shelves were sucessfully saved.

" msgstr "" -#: views.py:350 +#: views.py:381 msgid "Book was successfully removed from the shelf" msgstr "" -#: views.py:352 +#: views.py:383 msgid "This book is not on the shelf" msgstr "" -#: views.py:448 +#: views.py:479 #, python-format msgid "

Shelf %s was successfully created

" msgstr "" -#: views.py:463 +#: views.py:494 #, python-format msgid "

Shelf %s was successfully removed

" msgstr "" -#: views.py:522 +#: views.py:553 #, python-format msgid "Today is %(month)s, %(day)s." msgstr "" -#: views.py:523 +#: views.py:554 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -240,11 +240,11 @@ msgid "" "%(tb)s" msgstr "" -#: views.py:524 +#: views.py:555 msgid "Book imported successfully" msgstr "" -#: views.py:526 +#: views.py:557 #, python-format msgid "Error importing file: %r" msgstr "" diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.po b/apps/catalogue/locale/pl/LC_MESSAGES/django.po index 109cc2878..83b0bc7a9 100644 --- a/apps/catalogue/locale/pl/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/pl/LC_MESSAGES/django.po @@ -2,12 +2,12 @@ # 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-05-18 10:57+0200\n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" "PO-Revision-Date: 2010-05-19 16:15\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Translated-Using: django-rosetta 0.5.3\n" -#: fields.py:45 +#: fields.py:47 #, python-format msgid "Enter a valid JSON value. Error: %s" msgstr "Wprowadź prawidłową wartość JSON. Błąd: %s" @@ -201,38 +201,38 @@ msgstr "zapowiedź książki" msgid "book stubs" msgstr "zapowiedzi książek" -#: views.py:308 +#: views.py:339 msgid "

To maintain your shelves you need to be logged in.

" msgstr "

Aby zarządzać swoimi półkami, musisz się zalogować.

" -#: views.py:326 +#: views.py:357 msgid "

Shelves were sucessfully saved.

" msgstr "

Półki zostały zapisane.

" -#: views.py:350 +#: views.py:381 msgid "Book was successfully removed from the shelf" msgstr "Usunięto" -#: views.py:352 +#: views.py:383 msgid "This book is not on the shelf" msgstr "Książki nie ma na półce" -#: views.py:448 +#: views.py:479 #, python-format msgid "

Shelf %s was successfully created

" msgstr "

Półka %s została utworzona

" -#: views.py:463 +#: views.py:494 #, python-format msgid "

Shelf %s was successfully removed

" msgstr "

Półka %s została usunięta

" -#: views.py:522 +#: views.py:553 #, python-format msgid "Today is %(month)s, %(day)s." msgstr "" -#: views.py:523 +#: views.py:554 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -243,11 +243,11 @@ msgstr "" "\n" "%(tb)s" -#: views.py:524 +#: views.py:555 msgid "Book imported successfully" msgstr "Książka zaimportowana" -#: views.py:526 +#: views.py:557 #, python-format msgid "Error importing file: %r" msgstr "Błąd podczas importowania pliku: %r" diff --git a/apps/catalogue/locale/ru/LC_MESSAGES/django.po b/apps/catalogue/locale/ru/LC_MESSAGES/django.po index 5362b95bb..fa770ffd8 100644 --- a/apps/catalogue/locale/ru/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-18 10:57+0200\n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: fields.py:45 +#: fields.py:47 #, python-format msgid "Enter a valid JSON value. Error: %s" msgstr "" @@ -201,38 +201,38 @@ msgstr "" msgid "book stubs" msgstr "" -#: views.py:308 +#: views.py:339 msgid "

To maintain your shelves you need to be logged in.

" msgstr "" -#: views.py:326 +#: views.py:357 msgid "

Shelves were sucessfully saved.

" msgstr "" -#: views.py:350 +#: views.py:381 msgid "Book was successfully removed from the shelf" msgstr "" -#: views.py:352 +#: views.py:383 msgid "This book is not on the shelf" msgstr "" -#: views.py:448 +#: views.py:479 #, python-format msgid "

Shelf %s was successfully created

" msgstr "" -#: views.py:463 +#: views.py:494 #, python-format msgid "

Shelf %s was successfully removed

" msgstr "" -#: views.py:522 +#: views.py:553 #, python-format msgid "Today is %(month)s, %(day)s." msgstr "" -#: views.py:523 +#: views.py:554 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -240,11 +240,11 @@ msgid "" "%(tb)s" msgstr "" -#: views.py:524 +#: views.py:555 msgid "Book imported successfully" msgstr "" -#: views.py:526 +#: views.py:557 #, python-format msgid "Error importing file: %r" msgstr "" diff --git a/apps/catalogue/locale/uk/LC_MESSAGES/django.po b/apps/catalogue/locale/uk/LC_MESSAGES/django.po new file mode 100644 index 000000000..fa770ffd8 --- /dev/null +++ b/apps/catalogue/locale/uk/LC_MESSAGES/django.po @@ -0,0 +1,258 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-25 11:21+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: fields.py:47 +#, python-format +msgid "Enter a valid JSON value. Error: %s" +msgstr "" + +#: forms.py:28 +msgid "title, author, theme/topic, epoch, kind, genre" +msgstr "" + +#: forms.py:44 +msgid "Shelves" +msgstr "" + +#: forms.py:57 +msgid "Name of the new shelf" +msgstr "" + +#: models.py:24 models.py:363 +msgid "author" +msgstr "" + +#: models.py:25 +msgid "epoch" +msgstr "" + +#: models.py:26 +msgid "kind" +msgstr "" + +#: models.py:27 +msgid "genre" +msgstr "" + +#: models.py:28 +msgid "theme" +msgstr "" + +#: models.py:29 +msgid "set" +msgstr "" + +#: models.py:30 models.py:322 +msgid "book" +msgstr "" + +#: models.py:44 migrations/0001_initial.py:47 +msgid "name" +msgstr "" + +#: models.py:45 models.py:103 models.py:365 migrations/0001_initial.py:19 +#: migrations/0001_initial.py:48 +msgid "slug" +msgstr "" + +#: models.py:46 migrations/0001_initial.py:49 +msgid "sort key" +msgstr "" + +#: models.py:47 migrations/0001_initial.py:50 +msgid "category" +msgstr "" + +#: models.py:49 models.py:60 models.py:104 models.py:185 +#: migrations/0001_initial.py:20 migrations/0001_initial.py:51 +msgid "description" +msgstr "" + +#: models.py:50 migrations/0001_initial.py:52 +msgid "main page" +msgstr "" + +#: models.py:50 migrations/0001_initial.py:52 +msgid "Show tag on main page" +msgstr "" + +#: models.py:53 migrations/0001_initial.py:54 +msgid "book count" +msgstr "" + +#: models.py:54 +msgid "year of death" +msgstr "" + +#: models.py:80 migrations/0001_initial.py:61 +msgid "tag" +msgstr "" + +#: models.py:81 +msgid "tags" +msgstr "" + +#: models.py:102 models.py:362 migrations/0001_initial.py:18 +msgid "title" +msgstr "" + +#: models.py:105 migrations/0001_initial.py:21 +msgid "creation date" +msgstr "" + +#: models.py:106 migrations/0001_initial.py:22 +msgid "short HTML" +msgstr "" + +#: models.py:107 migrations/0001_initial.py:23 +msgid "parent number" +msgstr "" + +#: models.py:108 +msgid "extra information" +msgstr "" + +#: models.py:114 migrations/0001_initial.py:24 +msgid "XML file" +msgstr "" + +#: models.py:115 migrations/0001_initial.py:25 +msgid "HTML file" +msgstr "" + +#: models.py:116 migrations/0001_initial.py:26 +msgid "PDF file" +msgstr "" + +#: models.py:117 migrations/0001_initial.py:27 +msgid "ODT file" +msgstr "" + +#: models.py:118 migrations/0001_initial.py:28 +msgid "TXT file" +msgstr "" + +#: models.py:119 +msgid "MP3 file" +msgstr "" + +#: models.py:120 +msgid "OGG file" +msgstr "" + +#: models.py:141 +msgid "Read online" +msgstr "" + +#: models.py:221 +#, python-format +msgid "Book %s already exists" +msgstr "" + +#: models.py:264 +#, python-format +msgid "Book with slug = \"%s\" does not exist." +msgstr "" + +#: models.py:323 +msgid "books" +msgstr "" + +#: models.py:357 +msgid "fragment" +msgstr "" + +#: models.py:358 +msgid "fragments" +msgstr "" + +#: models.py:364 +msgid "goes to public domain" +msgstr "" + +#: models.py:366 +msgid "translator" +msgstr "" + +#: models.py:367 +msgid "year of translator's death" +msgstr "" + +#: models.py:385 +msgid "book stub" +msgstr "" + +#: models.py:386 +msgid "book stubs" +msgstr "" + +#: views.py:339 +msgid "

To maintain your shelves you need to be logged in.

" +msgstr "" + +#: views.py:357 +msgid "

Shelves were sucessfully saved.

" +msgstr "" + +#: views.py:381 +msgid "Book was successfully removed from the shelf" +msgstr "" + +#: views.py:383 +msgid "This book is not on the shelf" +msgstr "" + +#: views.py:479 +#, python-format +msgid "

Shelf %s was successfully created

" +msgstr "" + +#: views.py:494 +#, python-format +msgid "

Shelf %s was successfully removed

" +msgstr "" + +#: views.py:553 +#, python-format +msgid "Today is %(month)s, %(day)s." +msgstr "" + +#: views.py:554 +#, python-format +msgid "" +"An error occurred: %(exception)s\n" +"\n" +"%(tb)s" +msgstr "" + +#: views.py:555 +msgid "Book imported successfully" +msgstr "" + +#: views.py:557 +#, python-format +msgid "Error importing file: %r" +msgstr "" + +#: migrations/0001_initial.py:62 +msgid "content type" +msgstr "" + +#: migrations/0001_initial.py:63 +msgid "object id" +msgstr "" diff --git a/apps/catalogue/migrations/0009__short_html_translation.py b/apps/catalogue/migrations/0009__short_html_translation.py new file mode 100644 index 000000000..c67fc22ff --- /dev/null +++ b/apps/catalogue/migrations/0009__short_html_translation.py @@ -0,0 +1,172 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding field 'Book._short_html_pl' + db.add_column('catalogue_book', '_short_html_pl', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + # Adding field 'Book._short_html_de' + db.add_column('catalogue_book', '_short_html_de', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + # Adding field 'Book._short_html_en' + db.add_column('catalogue_book', '_short_html_en', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + # Adding field 'Book._short_html_lt' + db.add_column('catalogue_book', '_short_html_lt', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + # Adding field 'Book._short_html_fr' + db.add_column('catalogue_book', '_short_html_fr', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + # Adding field 'Book._short_html_ru' + db.add_column('catalogue_book', '_short_html_ru', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + # Adding field 'Book._short_html_es' + db.add_column('catalogue_book', '_short_html_es', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + # Adding field 'Book._short_html_uk' + db.add_column('catalogue_book', '_short_html_uk', self.gf('django.db.models.fields.TextField')(), keep_default=False) + + + def backwards(self, orm): + + # Deleting field 'Book._short_html_pl' + db.delete_column('catalogue_book', '_short_html_pl') + + # Deleting field 'Book._short_html_de' + db.delete_column('catalogue_book', '_short_html_de') + + # Deleting field 'Book._short_html_en' + db.delete_column('catalogue_book', '_short_html_en') + + # Deleting field 'Book._short_html_lt' + db.delete_column('catalogue_book', '_short_html_lt') + + # Deleting field 'Book._short_html_fr' + db.delete_column('catalogue_book', '_short_html_fr') + + # Deleting field 'Book._short_html_ru' + db.delete_column('catalogue_book', '_short_html_ru') + + # Deleting field 'Book._short_html_es' + db.delete_column('catalogue_book', '_short_html_es') + + # Deleting field 'Book._short_html_uk' + db.delete_column('catalogue_book', '_short_html_uk') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'catalogue.book': { + 'Meta': {'object_name': 'Book'}, + '_short_html': ('django.db.models.fields.TextField', [], {}), + '_short_html_de': ('django.db.models.fields.TextField', [], {}), + '_short_html_en': ('django.db.models.fields.TextField', [], {}), + '_short_html_es': ('django.db.models.fields.TextField', [], {}), + '_short_html_fr': ('django.db.models.fields.TextField', [], {}), + '_short_html_lt': ('django.db.models.fields.TextField', [], {}), + '_short_html_pl': ('django.db.models.fields.TextField', [], {}), + '_short_html_ru': ('django.db.models.fields.TextField', [], {}), + '_short_html_uk': ('django.db.models.fields.TextField', [], {}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'extra_info': ('catalogue.fields.JSONField', [], {}), + 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}), + 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mp3_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), + 'odt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), + 'ogg_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}), + 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), + 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}), + 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}) + }, + 'catalogue.bookstub': { + 'Meta': {'object_name': 'BookStub'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'pd': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'translator': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'translator_death': ('django.db.models.fields.TextField', [], {'blank': 'True'}) + }, + 'catalogue.fragment': { + 'Meta': {'object_name': 'Fragment'}, + '_short_html': ('django.db.models.fields.TextField', [], {}), + 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'short_text': ('django.db.models.fields.TextField', [], {}), + 'text': ('django.db.models.fields.TextField', [], {}) + }, + 'catalogue.tag': { + 'Meta': {'object_name': 'Tag'}, + 'book_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), + 'death': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}), + 'sort_key': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), + 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}) + }, + 'catalogue.tagrelation': { + 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"}) + }, + 'contenttypes.contenttype': { + 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['catalogue'] diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 59011fd9b..ec225d4d9 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -160,7 +160,8 @@ class Book(models.Model): def save(self, force_insert=False, force_update=False, reset_short_html=True): if reset_short_html: # Reset _short_html during save - self._short_html = '' + for key in filter(lambda x: x.startswith('_short_html'), self.__dict__): + self.key = '' book = super(Book, self).save(force_insert, force_update) diff --git a/apps/chunks/locale/uk/LC_MESSAGES/django.po b/apps/chunks/locale/uk/LC_MESSAGES/django.po new file mode 100644 index 000000000..90a86b5d9 --- /dev/null +++ b/apps/chunks/locale/uk/LC_MESSAGES/django.po @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-25 11:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: models.py:10 models.py:24 +msgid "key" +msgstr "" + +#: models.py:10 +msgid "A unique name for this chunk of content" +msgstr "" + +#: models.py:11 +msgid "description" +msgstr "" + +#: models.py:12 +msgid "content" +msgstr "" + +#: models.py:16 +msgid "chunk" +msgstr "" + +#: models.py:17 +msgid "chunks" +msgstr "" + +#: models.py:24 +msgid "A unique name for this attachment" +msgstr "" + +#: models.py:29 +msgid "attachment" +msgstr "" + +#: models.py:29 +msgid "attachments" +msgstr "" diff --git a/apps/infopages/__init__.py b/apps/infopages/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/infopages/admin.py b/apps/infopages/admin.py new file mode 100644 index 000000000..66f2996c5 --- /dev/null +++ b/apps/infopages/admin.py @@ -0,0 +1,9 @@ +from django.contrib import admin + +from modeltranslation.admin import TranslationAdmin +from infopages.models import InfoPage + +class InfoPageAdmin(TranslationAdmin): + list_display = ('title',) + +admin.site.register(InfoPage, InfoPageAdmin) \ No newline at end of file diff --git a/apps/infopages/migrations/0001_initial.py b/apps/infopages/migrations/0001_initial.py new file mode 100644 index 000000000..a317db835 --- /dev/null +++ b/apps/infopages/migrations/0001_initial.py @@ -0,0 +1,105 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding model 'InfoPage' + db.create_table('infopages_infopage', ( + ('title_de', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('page_title', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('left_column_uk', self.gf('django.db.models.fields.TextField')(blank=True)), + ('right_column_pl', self.gf('django.db.models.fields.TextField')(blank=True)), + ('page_title_en', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('page_title_es', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('left_column_lt', self.gf('django.db.models.fields.TextField')(blank=True)), + ('title_fr', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('right_column_ru', self.gf('django.db.models.fields.TextField')(blank=True)), + ('left_column_fr', self.gf('django.db.models.fields.TextField')(blank=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('title_lt', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('right_column', self.gf('django.db.models.fields.TextField')(blank=True)), + ('right_column_es', self.gf('django.db.models.fields.TextField')(blank=True)), + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('right_column_en', self.gf('django.db.models.fields.TextField')(blank=True)), + ('left_column_de', self.gf('django.db.models.fields.TextField')(blank=True)), + ('title_uk', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('right_column_fr', self.gf('django.db.models.fields.TextField')(blank=True)), + ('left_column', self.gf('django.db.models.fields.TextField')(blank=True)), + ('right_column_uk', self.gf('django.db.models.fields.TextField')(blank=True)), + ('title_en', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('left_column_pl', self.gf('django.db.models.fields.TextField')(blank=True)), + ('left_column_ru', self.gf('django.db.models.fields.TextField')(blank=True)), + ('right_column_lt', self.gf('django.db.models.fields.TextField')(blank=True)), + ('title_es', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('page_title_fr', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('page_title_uk', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('page_title_de', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=120, db_index=True)), + ('page_title_lt', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('right_column_de', self.gf('django.db.models.fields.TextField')(blank=True)), + ('page_title_pl', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('left_column_es', self.gf('django.db.models.fields.TextField')(blank=True)), + ('left_column_en', self.gf('django.db.models.fields.TextField')(blank=True)), + ('title_pl', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('title_ru', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('page_title_ru', self.gf('django.db.models.fields.CharField')(max_length=120)), + )) + db.send_create_signal('infopages', ['InfoPage']) + + + def backwards(self, orm): + + # Deleting model 'InfoPage' + db.delete_table('infopages_infopage') + + + models = { + 'infopages.infopage': { + 'Meta': {'object_name': 'InfoPage'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'left_column': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_de': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_en': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_es': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_fr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_lt': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_pl': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_ru': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'left_column_uk': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'page_title': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_de': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_en': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_es': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_fr': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_lt': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_pl': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_ru': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'page_title_uk': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'right_column': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_de': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_en': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_es': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_fr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_lt': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_pl': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_ru': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'right_column_uk': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_de': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_es': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_fr': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_lt': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_ru': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'title_uk': ('django.db.models.fields.CharField', [], {'max_length': '120'}) + } + } + + complete_apps = ['infopages'] diff --git a/apps/infopages/migrations/__init__.py b/apps/infopages/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/infopages/models.py b/apps/infopages/models.py new file mode 100644 index 000000000..15dd94f5f --- /dev/null +++ b/apps/infopages/models.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.db import models +from django.utils.translation import ugettext_lazy as _ + +class InfoPage(models.Model): + """ + An InfoPage is used to display a two-column flatpage + """ + + page_title = models.CharField(_('page title'), max_length=120) + slug = models.SlugField(_('slug'), max_length=120, unique=True, db_index=True) + title = models.CharField(_('title'), max_length=120) + left_column = models.TextField(_('left column'), blank=True) + right_column = models.TextField(_('right column'), blank=True) + + class Meta: + ordering = ('slug',) + verbose_name = _('info page') + verbose_name_plural = _('info pages') + + def __unicode__(self): + return self.title + diff --git a/apps/lessons/locale/uk/LC_MESSAGES/django.po b/apps/lessons/locale/uk/LC_MESSAGES/django.po new file mode 100644 index 000000000..e9b8e76ee --- /dev/null +++ b/apps/lessons/locale/uk/LC_MESSAGES/django.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-25 11:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "slug" +msgstr "" + +#: models.py:14 +msgid "file" +msgstr "" + +#: models.py:15 +msgid "author" +msgstr "" + +#: models.py:16 +msgid "slideshare ID" +msgstr "" + +#: models.py:17 +msgid "description" +msgstr "" + +#: models.py:29 +msgid "document" +msgstr "" + +#: models.py:29 +msgid "documents" +msgstr "" diff --git a/apps/modeltranslation/__init__.py b/apps/modeltranslation/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/modeltranslation/admin.py b/apps/modeltranslation/admin.py new file mode 100644 index 000000000..b51e3a332 --- /dev/null +++ b/apps/modeltranslation/admin.py @@ -0,0 +1,140 @@ +# -*- coding: utf-8 -*- +from copy import deepcopy + +from django import forms, template +from django.conf import settings +from django.contrib import admin +from django.contrib.contenttypes import generic + +from modeltranslation.translator import translator +from modeltranslation.utils import get_translation_fields +# Ensure that models are registered for translation before TranslationAdmin +# runs. The import is supposed to resolve a race condition between model import +# and translation registration in production (see issue 19). +import modeltranslation.models + + +class TranslationAdminBase(object): + """ + Mixin class which adds patch_translation_field functionality. + """ + def patch_translation_field(self, db_field, field, **kwargs): + trans_opts = translator.get_options_for_model(self.model) + + # Hide the original field by making it non-editable. + if db_field.name in trans_opts.fields: + db_field.editable = False + + # For every localized field copy the widget from the original field + if db_field.name in trans_opts.localized_fieldnames_rev: + orig_fieldname = trans_opts.localized_fieldnames_rev[db_field.name] + orig_formfield = self.formfield_for_dbfield( \ + self.model._meta.get_field(orig_fieldname), + **kwargs) + + # In case the original form field was required, make the default + # translation field required instead. + if db_field.language == settings.LANGUAGES[0][0] and \ + orig_formfield.required: + orig_formfield.required = False + orig_formfield.blank = True + field.required = True + field.blank = False + + field.widget = deepcopy(orig_formfield.widget) + + +class TranslationAdmin(admin.ModelAdmin, TranslationAdminBase): + def __init__(self, *args, **kwargs): + super(TranslationAdmin, self).__init__(*args, **kwargs) + + trans_opts = translator.get_options_for_model(self.model) + + # Replace original field with translation field for each language + if self.fields: + fields_new = list(self.fields) + for field in self.fields: + if field in trans_opts.fields: + index = fields_new.index(field) + translation_fields = get_translation_fields(field) + fields_new[index:index + 1] = translation_fields + self.fields = fields_new + + if self.fieldsets: + fieldsets_new = list(self.fieldsets) + for (name, dct) in self.fieldsets: + if 'fields' in dct: + fields_new = list(dct['fields']) + for field in dct['fields']: + if field in trans_opts.fields: + index = fields_new.index(field) + translation_fields = get_translation_fields(field) + fields_new[index:index + 1] = translation_fields + dct['fields'] = fields_new + self.fieldsets = fieldsets_new + + if self.list_editable: + editable_new = list(self.list_editable) + display_new = list(self.list_display) + for field in self.list_editable: + if field in trans_opts.fields: + index = editable_new.index(field) + display_index = display_new.index(field) + translation_fields = get_translation_fields(field) + editable_new[index:index + 1] = translation_fields + display_new[display_index:display_index + 1] = \ + translation_fields + self.list_editable = editable_new + self.list_display = display_new + + if self.prepopulated_fields: + prepopulated_fields_new = dict(self.prepopulated_fields) + for (k, v) in self.prepopulated_fields.items(): + translation_fields = get_translation_fields(v[0]) + prepopulated_fields_new[k] = tuple([translation_fields[0]]) + self.prepopulated_fields = prepopulated_fields_new + + def formfield_for_dbfield(self, db_field, **kwargs): + # Call the baseclass function to get the formfield + field = super(TranslationAdmin, self).formfield_for_dbfield(db_field, + **kwargs) + self.patch_translation_field(db_field, field, **kwargs) + return field + + +class TranslationTabularInline(admin.TabularInline, TranslationAdminBase): + def formfield_for_dbfield(self, db_field, **kwargs): + # Call the baseclass function to get the formfield + field = super(TranslationTabularInline, + self).formfield_for_dbfield(db_field, **kwargs) + self.patch_translation_field(db_field, field, **kwargs) + return field + + +class TranslationStackedInline(admin.StackedInline, TranslationAdminBase): + def formfield_for_dbfield(self, db_field, **kwargs): + # Call the baseclass function to get the formfield + field = super(TranslationStackedInline, + self).formfield_for_dbfield(db_field, **kwargs) + self.patch_translation_field(db_field, field, **kwargs) + return field + + +class TranslationGenericTabularInline(generic.GenericTabularInline, + TranslationAdminBase): + def formfield_for_dbfield(self, db_field, **kwargs): + # Call the baseclass function to get the formfield + field = super(TranslationGenericTabularInline, + self).formfield_for_dbfield(db_field, **kwargs) + self.patch_translation_field(db_field, field, **kwargs) + return field + + +class TranslationGenericStackedInline(generic.GenericStackedInline, + TranslationAdminBase): + def formfield_for_dbfield(self, db_field, **kwargs): + # Call the baseclass function to get the formfield + field = super(TranslationGenericStackedInline, + self).formfield_for_dbfield(db_field, **kwargs) + self.patch_translation_field(db_field, field, **kwargs) + return field diff --git a/apps/modeltranslation/fields.py b/apps/modeltranslation/fields.py new file mode 100644 index 000000000..5498d6b1d --- /dev/null +++ b/apps/modeltranslation/fields.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +from django.conf import settings +from django.db.models.fields import Field, CharField + +from modeltranslation.utils import get_language, build_localized_fieldname + + +class TranslationField(Field): + """ + The translation field functions as a proxy to the original field which is + wrapped. + + For every field defined in the model's ``TranslationOptions`` localized + versions of that field are added to the model depending on the languages + given in ``settings.LANGUAGES``. + + If for example there is a model ``News`` with a field ``title`` which is + registered for translation and the ``settings.LANGUAGES`` contains the + ``de`` and ``en`` languages, the fields ``title_de`` and ``title_en`` will + be added to the model class. These fields are realized using this + descriptor. + + The translation field needs to know which language it contains therefore + that needs to be specified when the field is created. + """ + def __init__(self, translated_field, language, *args, **kwargs): + # Store the originally wrapped field for later + self.translated_field = translated_field + self.language = language + + # Update the dict of this field with the content of the original one + # This might be a bit radical?! Seems to work though... + self.__dict__.update(translated_field.__dict__) + + # Translation are always optional (for now - maybe add some parameters + # to the translation options for configuring this) + self.null = True + self.blank = True + + # Adjust the name of this field to reflect the language + self.attname = build_localized_fieldname(translated_field.name, + language) + self.name = self.attname + + # Copy the verbose name and append a language suffix (will e.g. in the + # admin). This might be a proxy function so we have to check that here. + if hasattr(translated_field.verbose_name, '_proxy____unicode_cast'): + verbose_name = \ + translated_field.verbose_name._proxy____unicode_cast() + else: + verbose_name = translated_field.verbose_name + self.verbose_name = '%s [%s]' % (verbose_name, language) + + def pre_save(self, model_instance, add): + val = super(TranslationField, self).pre_save(model_instance, add) + if get_language() == self.language and not add: + # Rule is: 3. Assigning a value to a translation field of the + # default language also updates the original field + model_instance.__dict__[self.translated_field.name] = val + return val + + def get_internal_type(self): + return self.translated_field.get_internal_type() + + #def contribute_to_class(self, cls, name): + #super(TranslationField, self).contribute_to_class(cls, name) + ##setattr(cls, 'get_%s_display' % self.name, + ##curry(cls._get_FIELD_display, field=self)) + + def south_field_triple(self): + """Returns a suitable description of this field for South.""" + # We'll just introspect the _actual_ field. + from south.modelsinspector import introspector + field_class = '%s.%s' % (self.translated_field.__class__.__module__, + self.translated_field.__class__.__name__) + args, kwargs = introspector(self.translated_field) + # That's our definition! + return (field_class, args, kwargs) + + def formfield(self, *args, **kwargs): + """Preserves the widget of the translated field.""" + trans_formfield = self.translated_field.formfield(*args, **kwargs) + defaults = {'widget': type(trans_formfield.widget)} + defaults.update(kwargs) + return super(TranslationField, self).formfield(*args, **defaults) + + +#class CurrentLanguageField(CharField): + #def __init__(self, **kwargs): + #super(CurrentLanguageField, self).__init__(null=True, max_length=5, + #**kwargs) + + #def contribute_to_class(self, cls, name): + #super(CurrentLanguageField, self).contribute_to_class(cls, name) + #registry = CurrentLanguageFieldRegistry() + #registry.add_field(cls, self) + + +#class CurrentLanguageFieldRegistry(object): + #_registry = {} + + #def add_field(self, model, field): + #reg = self.__class__._registry.setdefault(model, []) + #reg.append(field) + + #def get_fields(self, model): + #return self.__class__._registry.get(model, []) + + #def __contains__(self, model): + #return model in self.__class__._registry diff --git a/apps/modeltranslation/management/__init__.py b/apps/modeltranslation/management/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/modeltranslation/management/commands/__init__.py b/apps/modeltranslation/management/commands/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/modeltranslation/management/commands/update_translation_fields.py b/apps/modeltranslation/management/commands/update_translation_fields.py new file mode 100644 index 000000000..adb5e6de9 --- /dev/null +++ b/apps/modeltranslation/management/commands/update_translation_fields.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +from django.conf import settings +from django.core.management.base import (BaseCommand, CommandError, + NoArgsCommand) + +from modeltranslation.translator import translator +from modeltranslation.utils import build_localized_fieldname + + +class Command(NoArgsCommand): + help = 'Updates the default translation fields of all or the specified' \ + 'translated application using the value of the original field.' + + def handle(self, **options): + default_lang = settings.LANGUAGES[0][0] + print "Using default language:", default_lang + + for model, trans_opts in translator._registry.items(): + print "Updating data of model '%s'" % model + for obj in model.objects.all(): + for fieldname in trans_opts.fields: + def_lang_fieldname = \ + build_localized_fieldname(fieldname, default_lang) + #print "setting %s from %s to %s." % \ + #(def_lang_fieldname, fieldname, + #obj.__dict__[fieldname]) + if not getattr(obj, def_lang_fieldname): + setattr(obj, def_lang_fieldname, + obj.__dict__[fieldname]) + obj.save() diff --git a/apps/modeltranslation/models.py b/apps/modeltranslation/models.py new file mode 100644 index 000000000..739c89706 --- /dev/null +++ b/apps/modeltranslation/models.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +import sys + +from django.conf import settings +from django.core.exceptions import ImproperlyConfigured +from django.db import models + +from modeltranslation.translator import translator + +# Every model registered with the modeltranslation.translator.translator +# is patched to contain additional localized versions for every +# field specified in the model's translation options. + +# Import the project's global "translation.py" which registers model +# classes and their translation options with the translator object. +if getattr(settings, 'TRANSLATION_REGISTRY', False): + try: + __import__(settings.TRANSLATION_REGISTRY, {}, {}, ['']) + except ImportError: + sys.stderr.write("modeltranslation: Can't import module '%s'.\n" + "(If the module exists, it's causing an " + "ImportError somehow.)\n" %\ + settings.TRANSLATION_REGISTRY) + # For some reason ImportErrors raised in translation.py or in modules + # that are included from there become swallowed. Work around this + # problem by printing the traceback explicitly. + import traceback + traceback.print_exc() + + # After importing all translation modules, all translation classes are + # registered with the translator. + if settings.DEBUG: + try: + if sys.argv[1] in ('runserver', 'runserver_plus'): + translated_model_names = ', '.join( + t.__name__ for t in translator._registry.keys()) + print('modeltranslation: Registered %d models for ' + 'translation (%s).' % (len(translator._registry), + translated_model_names)) + except IndexError: + pass +else: + raise ImproperlyConfigured("You haven't set the TRANSLATION_REGISTRY " + "setting yet.") diff --git a/apps/modeltranslation/tests.py b/apps/modeltranslation/tests.py new file mode 100644 index 000000000..3e0f39bb8 --- /dev/null +++ b/apps/modeltranslation/tests.py @@ -0,0 +1,258 @@ +# -*- coding: utf-8 -*- +from django.conf import settings +from django.contrib.auth.models import User +from django.contrib.contenttypes.models import ContentType +from django.db import models +from django.test import TestCase +from django.utils.thread_support import currentThread +from django.utils.translation import get_language +from django.utils.translation import trans_real + +# TODO: tests for TranslationAdmin + +from modeltranslation import translator + +settings.LANGUAGES = (('de', 'Deutsch'), + ('en', 'English')) + + +class TestModel(models.Model): + title = models.CharField(max_length=255) + text = models.TextField(null=True) + + +class TestTranslationOptions(translator.TranslationOptions): + fields = ('title', 'text',) + + +translator.translator._registry = {} +translator.translator.register(TestModel, TestTranslationOptions) + + +class ModelTranslationTest(TestCase): + """Basic tests for the modeltranslation application.""" + urls = 'modeltranslation.testurls' + + def setUp(self): + trans_real.activate("de") + + def tearDown(self): + trans_real.deactivate() + + def test_registration(self): + self.client.post('/set_language/', data={'language': 'de'}) + #self.client.session['django_language'] = 'de-de' + #self.client.cookies[settings.LANGUAGE_COOKIE_NAME] = 'de-de' + + langs = tuple(l[0] for l in settings.LANGUAGES) + self.failUnlessEqual(2, len(langs)) + self.failUnless('de' in langs) + self.failUnless('en' in langs) + self.failUnless(translator.translator) + + # Check that only one model is registered for translation + self.failUnlessEqual(len(translator.translator._registry), 1) + + # Try to unregister a model that is not registered + self.assertRaises(translator.NotRegistered, + translator.translator.unregister, User) + + # Try to get options for a model that is not registered + self.assertRaises(translator.NotRegistered, + translator.translator.get_options_for_model, User) + + def test_translated_models(self): + # First create an instance of the test model to play with + inst = TestModel.objects.create(title="Testtitle", text="Testtext") + field_names = dir(inst) + self.failUnless('id' in field_names) + self.failUnless('title' in field_names) + self.failUnless('text' in field_names) + self.failUnless('title_de' in field_names) + self.failUnless('title_en' in field_names) + self.failUnless('text_de' in field_names) + self.failUnless('text_en' in field_names) + + inst.delete() + + def test_set_translation(self): + self.failUnlessEqual(get_language(), "de") + # First create an instance of the test model to play with + title1_de = "title de" + title1_en = "title en" + title2_de = "title2 de" + inst1 = TestModel(title_en=title1_en, text="Testtext") + inst1.title = title1_de + inst2 = TestModel(title=title2_de, text="Testtext") + inst1.save() + inst2.save() + + self.failUnlessEqual(inst1.title, title1_de) + self.failUnlessEqual(inst1.title_en, title1_en) + + self.failUnlessEqual(inst2.title, title2_de) + self.failUnlessEqual(inst2.title_en, None) + + del inst1 + del inst2 + + # Check that the translation fields are correctly saved and provide the + # correct value when retrieving them again. + n = TestModel.objects.get(title=title1_de) + self.failUnlessEqual(n.title, title1_de) + self.failUnlessEqual(n.title_en, title1_en) + + def test_titleonly(self): + title1_de = "title de" + n = TestModel.objects.create(title=title1_de) + self.failUnlessEqual(n.title, title1_de) + # Because the original field "title" was specified in the constructor + # it is directly passed into the instance's __dict__ and the descriptor + # which updates the associated default translation field is not called + # and the default translation will be None. + self.failUnlessEqual(n.title_de, None) + self.failUnlessEqual(n.title_en, None) + + # Now assign the title, that triggers the descriptor and the default + # translation field is updated + n.title = title1_de + self.failUnlessEqual(n.title, title1_de) + self.failUnlessEqual(n.title_de, title1_de) + self.failUnlessEqual(n.title_en, None) + + def test_rule1(self): + """ + Rule 1: Reading the value from the original field returns the value in + translated to the current language. + """ + title1_de = "title de" + title1_en = "title en" + text_de = "Dies ist ein deutscher Satz" + text_en = "This is an english sentence" + + # Test 1. + n = TestModel.objects.create(title_de=title1_de, title_en=title1_en, + text_de=text_de, text_en=text_en) + n.save() + + # language is set to "de" at this point + self.failUnlessEqual(get_language(), "de") + self.failUnlessEqual(n.title, title1_de) + self.failUnlessEqual(n.title_de, title1_de) + self.failUnlessEqual(n.title_en, title1_en) + self.failUnlessEqual(n.text, text_de) + self.failUnlessEqual(n.text_de, text_de) + self.failUnlessEqual(n.text_en, text_en) + # Now switch to "en" + trans_real.activate("en") + self.failUnlessEqual(get_language(), "en") + # Title should now be return the english one (just by switching the + # language) + self.failUnlessEqual(n.title, title1_en) + self.failUnlessEqual(n.text, text_en) + + n = TestModel.objects.create(title_de=title1_de, title_en=title1_en, + text_de=text_de, text_en=text_en) + n.save() + # language is set to "en" at this point + self.failUnlessEqual(n.title, title1_en) + self.failUnlessEqual(n.title_de, title1_de) + self.failUnlessEqual(n.title_en, title1_en) + self.failUnlessEqual(n.text, text_en) + self.failUnlessEqual(n.text_de, text_de) + self.failUnlessEqual(n.text_en, text_en) + trans_real.activate("de") + self.failUnlessEqual(get_language(), "de") + self.failUnlessEqual(n.title, title1_de) + self.failUnlessEqual(n.text, text_de) + trans_real.deactivate() + + def test_rule2(self): + """ + Rule 2: Assigning a value to the original field also updates the value + in the associated translation field of the default language + """ + self.failUnlessEqual(get_language(), "de") + title1_de = "title de" + title1_en = "title en" + n = TestModel.objects.create(title_de=title1_de, title_en=title1_en) + self.failUnlessEqual(n.title, title1_de) + self.failUnlessEqual(n.title_de, title1_de) + self.failUnlessEqual(n.title_en, title1_en) + + title2 = "Neuer Titel" + n.title = title2 + n.save() + self.failUnlessEqual(n.title, title2) + self.failUnlessEqual(n.title, n.title_de) + + trans_real.activate("en") + self.failUnlessEqual(get_language(), "en") + title3 = "new title" + + n.title = title3 + n.title_de = title1_de + n.save() + self.failUnlessEqual(n.title, title3) + self.failUnlessEqual(n.title, n.title_en) + self.failUnlessEqual(title1_de, n.title_de) + + trans_real.deactivate() + + def test_rule3(self): + """ + Rule 3: Assigning a value to a translation field of the default + language also updates the original field - note that the value of the + original field will not be updated until the model instance is saved. + """ + title1_de = "title de" + title1_en = "title en" + n = TestModel.objects.create(title_de=title1_de, title_en=title1_en) + self.failUnlessEqual(get_language(), "de") + self.failUnlessEqual(n.title, title1_de) + self.failUnlessEqual(n.title_de, title1_de) + self.failUnlessEqual(n.title_en, title1_en) + + n.title_de = "Neuer Titel" + n.save() + self.failUnlessEqual(n.title, n.title_de) + + # Now switch to "en" + trans_real.activate("en") + self.failUnlessEqual(get_language(), "en") + n.title_en = "New title" + # the n.title field is not updated before the instance is saved + n.save() + self.failUnlessEqual(n.title, n.title_en) + trans_real.deactivate() + + def test_rule4(self): + """ + Rule 4: If both fields - the original and the translation field of the + default language - are updated at the same time, the translation field + wins. + """ + self.failUnlessEqual(get_language(), "de") + title1_de = "title de" + title1_en = "title en" + n = TestModel.objects.create(title_de=title1_de, title_en=title1_en) + self.failUnlessEqual(n.title, title1_de) + self.failUnlessEqual(n.title_de, title1_de) + self.failUnlessEqual(n.title_en, title1_en) + + title2_de = "neu de" + title2_en = "new en" + title_foo = "foo" + n.title = title_foo + n.title_de = title2_de + n.title_en = title2_en + n.save() + self.failUnlessEqual(n.title, title2_de) + self.failUnlessEqual(n.title_de, title2_de) + self.failUnlessEqual(n.title_en, title2_en) + + n.title = title_foo + n.save() + self.failUnlessEqual(n.title, title_foo) + self.failUnlessEqual(n.title_de, title_foo) + self.failUnlessEqual(n.title_en, title2_en) diff --git a/apps/modeltranslation/testurls.py b/apps/modeltranslation/testurls.py new file mode 100644 index 000000000..8cb4d86d2 --- /dev/null +++ b/apps/modeltranslation/testurls.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +from django.conf.urls.defaults import * + +urlpatterns = patterns('', + url(r'^set_language/$', 'django.views.i18n.set_language', {}, + name='set_language'), +) diff --git a/apps/modeltranslation/translator.py b/apps/modeltranslation/translator.py new file mode 100644 index 000000000..0a5536261 --- /dev/null +++ b/apps/modeltranslation/translator.py @@ -0,0 +1,191 @@ +# -*- coding: utf-8 -*- +from django.conf import settings +#from django.contrib.contenttypes.models import ContentType +from django.db import models +from django.db.models import signals +from django.db.models.base import ModelBase +from django.utils.functional import curry + +from modeltranslation.fields import TranslationField +from modeltranslation.utils import (TranslationFieldDescriptor, + build_localized_fieldname) + + +class AlreadyRegistered(Exception): + pass + + +class NotRegistered(Exception): + pass + + +class TranslationOptions(object): + """ + The TranslationOptions object is used to specify the fields to translate. + + The options are registered in combination with a model class at the + ``modeltranslation.translator.translator`` instance. + + It caches the content type of the translated model for faster lookup later + on. + """ + def __init__(self, *args, **kwargs): + # self.translation_model = None + #self.model_ct = None + self.localized_fieldnames = list() + + +def add_localized_fields(model): + """ + Monkey patchs the original model class to provide additional fields for + every language. Only do that for fields which are defined in the + translation options of the model. + + Returns a dict mapping the original fieldname to a list containing the + names of the localized fields created for the original field. + """ + localized_fields = dict() + translation_opts = translator.get_options_for_model(model) + for field_name in translation_opts.fields: + localized_fields[field_name] = list() + for l in settings.LANGUAGES: + # Construct the name for the localized field + localized_field_name = build_localized_fieldname(field_name, l[0]) + # Check if the model already has a field by that name + if hasattr(model, localized_field_name): + raise ValueError("Error adding translation field. The model "\ + "'%s' already contains a field named '%s'. "\ + % (instance.__class__.__name__, + localized_field_name)) + + # This approach implements the translation fields as full valid + # django model fields and therefore adds them via add_to_class + localized_field = model.add_to_class( \ + localized_field_name, + TranslationField(model._meta.get_field(field_name), l[0])) + localized_fields[field_name].append(localized_field_name) + return localized_fields + + +#def translated_model_initialized(field_names, instance, **kwargs): + #print "translated_model_initialized instance:", \ + #instance, ", field:", field_names + #for field_name in field_names: + #initial_val = getattr(instance, field_name) + #print " field: %s, initialval: %s" % (field_name, initial_val) + #setattr(instance.__class__, field_name, + #TranslationFieldDescriptor(field_name, initial_val)) + + +#def translated_model_initializing(sender, args, kwargs, **signal_kwargs): + #print "translated_model_initializing", sender, args, kwargs + #trans_opts = translator.get_options_for_model(sender) + #for field_name in trans_opts.fields: + #setattr(sender, field_name, TranslationFieldDescriptor(field_name)) + + +class Translator(object): + """ + A Translator object encapsulates an instance of a translator. Models are + registered with the Translator using the register() method. + """ + def __init__(self): + # model_class class -> translation_opts instance + self._registry = {} + + def register(self, model_or_iterable, translation_opts, **options): + """ + Registers the given model(s) with the given translation options. + + The model(s) should be Model classes, not instances. + + If a model is already registered for translation, this will raise + AlreadyRegistered. + """ + # Don't import the humongous validation code unless required + if translation_opts and settings.DEBUG: + from django.contrib.admin.validation import validate + else: + validate = lambda model, adminclass: None + + #if not translation_opts: + #translation_opts = TranslationOptions + if isinstance(model_or_iterable, ModelBase): + model_or_iterable = [model_or_iterable] + + for model in model_or_iterable: + if model in self._registry: + raise AlreadyRegistered('The model %s is already registered ' + 'for translation' % model.__name__) + + # If we got **options then dynamically construct a subclass of + # translation_opts with those **options. + if options: + # For reasons I don't quite understand, without a __module__ + # the created class appears to "live" in the wrong place, + # which causes issues later on. + options['__module__'] = __name__ + translation_opts = type("%sAdmin" % model.__name__, + (translation_opts,), options) + + # Validate (which might be a no-op) + #validate(translation_opts, model) + + # Store the translation class associated to the model + self._registry[model] = translation_opts + + # Get the content type of the original model and store it on the + # translation options for faster lookup later on. + #translation_opts.model_ct = \ + #ContentType.objects.get_for_model(model) + + # Add the localized fields to the model and store the names of + # these fields in the model's translation options for faster lookup + # later on. + translation_opts.localized_fieldnames = add_localized_fields(model) + + # Create a reverse dict mapping the localized_fieldnames to the + # original fieldname + rev_dict = dict() + for orig_name, loc_names in \ + translation_opts.localized_fieldnames.items(): + for ln in loc_names: + rev_dict[ln] = orig_name + + translation_opts.localized_fieldnames_rev = rev_dict + + # print "Applying descriptor field for model %s" % model + for field_name in translation_opts.fields: + setattr(model, field_name, TranslationFieldDescriptor(field_name)) + + #signals.pre_init.connect(translated_model_initializing, sender=model, + #weak=False) + + def unregister(self, model_or_iterable): + """ + Unregisters the given model(s). + + If a model isn't already registered, this will raise NotRegistered. + """ + if isinstance(model_or_iterable, ModelBase): + model_or_iterable = [model_or_iterable] + for model in model_or_iterable: + if model not in self._registry: + raise NotRegistered('The model "%s" is not registered for ' + 'translation' % model.__name__) + del self._registry[model] + + def get_options_for_model(self, model): + """ + Returns the translation options for the given ``model``. If the + ``model`` is not registered a ``NotRegistered`` exception is raised. + """ + try: + return self._registry[model] + except KeyError: + raise NotRegistered('The model "%s" is not registered for ' + 'translation' % model.__name__) + + +# This global object represents the singleton translator object +translator = Translator() diff --git a/apps/modeltranslation/utils.py b/apps/modeltranslation/utils.py new file mode 100644 index 000000000..aeb57d14a --- /dev/null +++ b/apps/modeltranslation/utils.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +from django.db import models +from django.conf import settings +from django.core.exceptions import ValidationError +from django.contrib.contenttypes.models import ContentType +from django.utils.translation import get_language as _get_language + + +def get_language(): + """ + Return an active language code that is guaranteed to be in + settings.LANGUAGES (Django does not seem to guarantee this for us.) + + """ + lang = _get_language() + available_languages = [l[0] for l in settings.LANGUAGES] + if lang not in available_languages and '-' in lang: + lang = lang.split('-')[0] + if lang in available_languages: + return lang + return available_languages[0] + + +def get_translation_fields(field): + """Returns a list of localized fieldnames for a given field.""" + return [build_localized_fieldname(field, l[0]) for l in settings.LANGUAGES] + + +def build_localized_fieldname(field_name, lang): + return '%s_%s' % (field_name, lang.replace('-', '_')) + + +class TranslationFieldDescriptor(object): + """A descriptor used for the original translated field.""" + def __init__(self, name, initial_val=""): + """ + The ``name`` is the name of the field (which is not available in the + descriptor by default - this is Python behaviour). + """ + self.name = name + self.val = initial_val + + def __set__(self, instance, value): + lang = get_language() + loc_field_name = build_localized_fieldname(self.name, lang) + # also update the translation field of the current language + setattr(instance, loc_field_name, value) + # update the original field via the __dict__ to prevent calling the + # descriptor + instance.__dict__[self.name] = value + + def __get__(self, instance, owner): + if not instance: + raise ValueError(u"Translation field '%s' can only be " + "accessed via an instance not via " + "a class." % self.name) + lang = get_language() + loc_field_name = build_localized_fieldname(self.name, lang) + if hasattr(instance, loc_field_name): + return getattr(instance, loc_field_name) or \ + instance.__dict__[self.name] + return instance.__dict__[self.name] + + +#def create_model(name, fields=None, app_label='', module='', options=None, + #admin_opts=None): + #""" + #Create specified model. + #This is taken from http://code.djangoproject.com/wiki/DynamicModels + #""" + #class Meta: + ## Using type('Meta', ...) gives a dictproxy error during model + ## creation + #pass + + #if app_label: + ## app_label must be set using the Meta inner class + #setattr(Meta, 'app_label', app_label) + + ## Update Meta with any options that were provided + #if options is not None: + #for key, value in options.iteritems(): + #setattr(Meta, key, value) + + ## Set up a dictionary to simulate declarations within a class + #attrs = {'__module__': module, 'Meta': Meta} + + ## Add in any fields that were provided + #if fields: + #attrs.update(fields) + + ## Create the class, which automatically triggers ModelBase processing + #model = type(name, (models.Model,), attrs) + + ## Create an Admin class if admin options were provided + #if admin_opts is not None: + #class Admin(admin.ModelAdmin): + #pass + #for key, value in admin_opts: + #setattr(Admin, key, value) + #admin.site.register(model, Admin) + + #return model + + +def copy_field(field): + """ + Instantiate a new field, with all of the values from the old one, except + the to and to_field in the case of related fields. + + This taken from http://www.djangosnippets.org/snippets/442/ + """ + base_kw = dict([(n, getattr(field, n, '_null')) for n in \ + models.fields.Field.__init__.im_func.func_code.co_varnames]) + if isinstance(field, models.fields.related.RelatedField): + rel = base_kw.get('rel') + rel_kw = dict([(n, getattr(rel, n, '_null')) for n in \ + rel.__init__.im_func.func_code.co_varnames]) + if isinstance(field, models.fields.related.ForeignKey): + base_kw['to_field'] = rel_kw.pop('field_name') + base_kw.update(rel_kw) + base_kw.pop('self') + return field.__class__(**base_kw) diff --git a/apps/newtagging/locale/uk/LC_MESSAGES/django.po b/apps/newtagging/locale/uk/LC_MESSAGES/django.po new file mode 100644 index 000000000..f4bf97ffa --- /dev/null +++ b/apps/newtagging/locale/uk/LC_MESSAGES/django.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-25 11:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.py:38 +msgid "tags" +msgstr "" + +#: models.py:491 +msgid "tag" +msgstr "" + +#: models.py:492 +msgid "content type" +msgstr "" + +#: models.py:493 +msgid "object id" +msgstr "" + +#: views.py:30 +msgid "tagged_object_list must be called with a queryset or a model." +msgstr "" + +#: views.py:32 +msgid "tagged_object_list must be called with a tag model." +msgstr "" + +#: views.py:34 +msgid "tagged_object_list must be called with a tag." +msgstr "" + +#: views.py:38 +#, python-format +msgid "No tags found matching \"%s\"." +msgstr "" diff --git a/apps/sponsors/locale/de/LC_MESSAGES/django.po b/apps/sponsors/locale/de/LC_MESSAGES/django.po new file mode 100644 index 000000000..05536bc6b --- /dev/null +++ b/apps/sponsors/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-25 14:24+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: models.py:14 models.py:37 +msgid "name" +msgstr "" + +#: models.py:15 +msgid "description" +msgstr "" + +#: models.py:17 +msgid "logo" +msgstr "" + +#: models.py:24 +msgid "url" +msgstr "" + +#: models.py:38 +msgid "sponsors" +msgstr "" diff --git a/apps/sponsors/locale/uk/LC_MESSAGES/django.po b/apps/sponsors/locale/uk/LC_MESSAGES/django.po new file mode 100644 index 000000000..d146b23e2 --- /dev/null +++ b/apps/sponsors/locale/uk/LC_MESSAGES/django.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-25 11:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: models.py:14 models.py:37 +msgid "name" +msgstr "" + +#: models.py:15 +msgid "description" +msgstr "" + +#: models.py:17 +msgid "logo" +msgstr "" + +#: models.py:24 +msgid "url" +msgstr "" + +#: models.py:38 +msgid "sponsors" +msgstr "" diff --git a/wolnelektury/locale/de/LC_MESSAGES/django.mo b/wolnelektury/locale/de/LC_MESSAGES/django.mo index 7b038feefd10b835f439aab88b82909679e465f5..55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4 100644 GIT binary patch delta 18 ZcmaFQ^qy%#KZlX2f}x3(k>$kcHvm4;2Aco? delta 18 ZcmaFQ^qy%#KZl{Ef}xp}k-^02Hvm4_2A2Q; diff --git a/wolnelektury/locale/de/LC_MESSAGES/django.po b/wolnelektury/locale/de/LC_MESSAGES/django.po index e1c2ee10f..bc5d3d53b 100644 --- a/wolnelektury/locale/de/LC_MESSAGES/django.po +++ b/wolnelektury/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-19 16:20+0200\n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: settings.py:37 -msgid "German" +msgid "Polish" msgstr "" #: settings.py:38 -msgid "English" +msgid "German" msgstr "" #: settings.py:39 -msgid "Polish" +msgid "English" msgstr "" #: settings.py:40 @@ -44,6 +44,10 @@ msgstr "" msgid "Spanish" msgstr "" +#: settings.py:44 +msgid "Ukrainian" +msgstr "" + #: templates/404.html:6 templates/404.html.py:15 msgid "Page does not exist" msgstr "" @@ -146,7 +150,9 @@ msgstr "" #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 -#: templates/catalogue/search_no_hits.html:23 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 #: templates/catalogue/tagged_object_list.html:141 msgid "Close" msgstr "" @@ -154,7 +160,9 @@ msgstr "" #: templates/base.html:107 templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 -#: templates/catalogue/search_no_hits.html:25 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 #: templates/catalogue/tagged_object_list.html:143 msgid "Loading" msgstr "" @@ -180,7 +188,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/breadcrumbs.html:9 -#: templates/catalogue/main_page.html:13 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "Search" @@ -191,7 +199,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/main_page.html:13 -#: templates/catalogue/tagged_object_list.html:41 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "or" @@ -315,6 +323,10 @@ msgstr "" msgid "in work " msgstr "" +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "" + #: templates/catalogue/book_fragments.html:12 msgid "return to book's page" msgstr "" @@ -558,21 +570,35 @@ msgid "" "\t\t\t" msgstr "" +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "" + #: templates/catalogue/search_no_hits.html:5 msgid "Search in WolneLektury.pl" msgstr "" -#: templates/catalogue/search_no_hits.html:15 +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 msgid "Sorry! Search cirteria did not match any resources." msgstr "" -#: templates/catalogue/search_no_hits.html:17 +#: templates/catalogue/search_no_hits.html:16 msgid "" "Search engine supports following criteria: title, author, theme/topic, " "epoch, kind and genre.\n" "\t\tAs for now we do not support full text search." msgstr "" +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "" + #: templates/catalogue/tag_list.html:4 msgid "See full category" msgstr "" @@ -701,10 +727,6 @@ msgstr "" msgid "Find out why Internet libraries can't publish this author's works." msgstr "" -#: templates/catalogue/tagged_object_list.html:102 -msgid "No works of this author found." -msgstr "" - #: templates/catalogue/user_shelves.html:6 msgid "remove" msgstr "" @@ -713,6 +735,29 @@ msgstr "" msgid "You do not own any shelves. You can create one below if you want to" msgstr "" +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "" + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" + #: templates/lessons/ajax_document_detail.html:3 #: templates/lessons/document_detail.html:13 msgid "author" diff --git a/wolnelektury/locale/en/LC_MESSAGES/django.mo b/wolnelektury/locale/en/LC_MESSAGES/django.mo index 7b038feefd10b835f439aab88b82909679e465f5..55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4 100644 GIT binary patch delta 18 ZcmaFQ^qy%#KZlX2f}x3(k>$kcHvm4;2Aco? delta 18 ZcmaFQ^qy%#KZl{Ef}xp}k-^02Hvm4_2A2Q; diff --git a/wolnelektury/locale/en/LC_MESSAGES/django.po b/wolnelektury/locale/en/LC_MESSAGES/django.po index e1c2ee10f..bc5d3d53b 100644 --- a/wolnelektury/locale/en/LC_MESSAGES/django.po +++ b/wolnelektury/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-19 16:20+0200\n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: settings.py:37 -msgid "German" +msgid "Polish" msgstr "" #: settings.py:38 -msgid "English" +msgid "German" msgstr "" #: settings.py:39 -msgid "Polish" +msgid "English" msgstr "" #: settings.py:40 @@ -44,6 +44,10 @@ msgstr "" msgid "Spanish" msgstr "" +#: settings.py:44 +msgid "Ukrainian" +msgstr "" + #: templates/404.html:6 templates/404.html.py:15 msgid "Page does not exist" msgstr "" @@ -146,7 +150,9 @@ msgstr "" #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 -#: templates/catalogue/search_no_hits.html:23 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 #: templates/catalogue/tagged_object_list.html:141 msgid "Close" msgstr "" @@ -154,7 +160,9 @@ msgstr "" #: templates/base.html:107 templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 -#: templates/catalogue/search_no_hits.html:25 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 #: templates/catalogue/tagged_object_list.html:143 msgid "Loading" msgstr "" @@ -180,7 +188,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/breadcrumbs.html:9 -#: templates/catalogue/main_page.html:13 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "Search" @@ -191,7 +199,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/main_page.html:13 -#: templates/catalogue/tagged_object_list.html:41 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "or" @@ -315,6 +323,10 @@ msgstr "" msgid "in work " msgstr "" +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "" + #: templates/catalogue/book_fragments.html:12 msgid "return to book's page" msgstr "" @@ -558,21 +570,35 @@ msgid "" "\t\t\t" msgstr "" +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "" + #: templates/catalogue/search_no_hits.html:5 msgid "Search in WolneLektury.pl" msgstr "" -#: templates/catalogue/search_no_hits.html:15 +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 msgid "Sorry! Search cirteria did not match any resources." msgstr "" -#: templates/catalogue/search_no_hits.html:17 +#: templates/catalogue/search_no_hits.html:16 msgid "" "Search engine supports following criteria: title, author, theme/topic, " "epoch, kind and genre.\n" "\t\tAs for now we do not support full text search." msgstr "" +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "" + #: templates/catalogue/tag_list.html:4 msgid "See full category" msgstr "" @@ -701,10 +727,6 @@ msgstr "" msgid "Find out why Internet libraries can't publish this author's works." msgstr "" -#: templates/catalogue/tagged_object_list.html:102 -msgid "No works of this author found." -msgstr "" - #: templates/catalogue/user_shelves.html:6 msgid "remove" msgstr "" @@ -713,6 +735,29 @@ msgstr "" msgid "You do not own any shelves. You can create one below if you want to" msgstr "" +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "" + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" + #: templates/lessons/ajax_document_detail.html:3 #: templates/lessons/document_detail.html:13 msgid "author" diff --git a/wolnelektury/locale/es/LC_MESSAGES/django.mo b/wolnelektury/locale/es/LC_MESSAGES/django.mo index e98412db1d8ea1815898eb0a8738930d3bfc2397..55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4 100644 GIT binary patch delta 18 ZcmaFQ^qy%#KZlX2f}x3(k>$kcHvm4;2Aco? delta 18 ZcmaFQ^qy%#KZl{Ef}xp}k>SMYHvm4}2ABW< diff --git a/wolnelektury/locale/es/LC_MESSAGES/django.po b/wolnelektury/locale/es/LC_MESSAGES/django.po index 2d61afc1e..bc5d3d53b 100644 --- a/wolnelektury/locale/es/LC_MESSAGES/django.po +++ b/wolnelektury/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-19 16:21+0200\n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: settings.py:37 -msgid "German" +msgid "Polish" msgstr "" #: settings.py:38 -msgid "English" +msgid "German" msgstr "" #: settings.py:39 -msgid "Polish" +msgid "English" msgstr "" #: settings.py:40 @@ -44,6 +44,10 @@ msgstr "" msgid "Spanish" msgstr "" +#: settings.py:44 +msgid "Ukrainian" +msgstr "" + #: templates/404.html:6 templates/404.html.py:15 msgid "Page does not exist" msgstr "" @@ -146,7 +150,9 @@ msgstr "" #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 -#: templates/catalogue/search_no_hits.html:23 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 #: templates/catalogue/tagged_object_list.html:141 msgid "Close" msgstr "" @@ -154,7 +160,9 @@ msgstr "" #: templates/base.html:107 templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 -#: templates/catalogue/search_no_hits.html:25 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 #: templates/catalogue/tagged_object_list.html:143 msgid "Loading" msgstr "" @@ -180,7 +188,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/breadcrumbs.html:9 -#: templates/catalogue/main_page.html:13 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "Search" @@ -191,7 +199,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/main_page.html:13 -#: templates/catalogue/tagged_object_list.html:41 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "or" @@ -315,6 +323,10 @@ msgstr "" msgid "in work " msgstr "" +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "" + #: templates/catalogue/book_fragments.html:12 msgid "return to book's page" msgstr "" @@ -558,21 +570,35 @@ msgid "" "\t\t\t" msgstr "" +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "" + #: templates/catalogue/search_no_hits.html:5 msgid "Search in WolneLektury.pl" msgstr "" -#: templates/catalogue/search_no_hits.html:15 +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 msgid "Sorry! Search cirteria did not match any resources." msgstr "" -#: templates/catalogue/search_no_hits.html:17 +#: templates/catalogue/search_no_hits.html:16 msgid "" "Search engine supports following criteria: title, author, theme/topic, " "epoch, kind and genre.\n" "\t\tAs for now we do not support full text search." msgstr "" +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "" + #: templates/catalogue/tag_list.html:4 msgid "See full category" msgstr "" @@ -701,10 +727,6 @@ msgstr "" msgid "Find out why Internet libraries can't publish this author's works." msgstr "" -#: templates/catalogue/tagged_object_list.html:102 -msgid "No works of this author found." -msgstr "" - #: templates/catalogue/user_shelves.html:6 msgid "remove" msgstr "" @@ -713,6 +735,29 @@ msgstr "" msgid "You do not own any shelves. You can create one below if you want to" msgstr "" +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "" + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" + #: templates/lessons/ajax_document_detail.html:3 #: templates/lessons/document_detail.html:13 msgid "author" diff --git a/wolnelektury/locale/fr/LC_MESSAGES/django.mo b/wolnelektury/locale/fr/LC_MESSAGES/django.mo index e98412db1d8ea1815898eb0a8738930d3bfc2397..55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4 100644 GIT binary patch delta 18 ZcmaFQ^qy%#KZlX2f}x3(k>$kcHvm4;2Aco? delta 18 ZcmaFQ^qy%#KZl{Ef}xp}k>SMYHvm4}2ABW< diff --git a/wolnelektury/locale/fr/LC_MESSAGES/django.po b/wolnelektury/locale/fr/LC_MESSAGES/django.po index 2d61afc1e..bc5d3d53b 100644 --- a/wolnelektury/locale/fr/LC_MESSAGES/django.po +++ b/wolnelektury/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-19 16:21+0200\n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: settings.py:37 -msgid "German" +msgid "Polish" msgstr "" #: settings.py:38 -msgid "English" +msgid "German" msgstr "" #: settings.py:39 -msgid "Polish" +msgid "English" msgstr "" #: settings.py:40 @@ -44,6 +44,10 @@ msgstr "" msgid "Spanish" msgstr "" +#: settings.py:44 +msgid "Ukrainian" +msgstr "" + #: templates/404.html:6 templates/404.html.py:15 msgid "Page does not exist" msgstr "" @@ -146,7 +150,9 @@ msgstr "" #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 -#: templates/catalogue/search_no_hits.html:23 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 #: templates/catalogue/tagged_object_list.html:141 msgid "Close" msgstr "" @@ -154,7 +160,9 @@ msgstr "" #: templates/base.html:107 templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 -#: templates/catalogue/search_no_hits.html:25 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 #: templates/catalogue/tagged_object_list.html:143 msgid "Loading" msgstr "" @@ -180,7 +188,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/breadcrumbs.html:9 -#: templates/catalogue/main_page.html:13 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "Search" @@ -191,7 +199,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/main_page.html:13 -#: templates/catalogue/tagged_object_list.html:41 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "or" @@ -315,6 +323,10 @@ msgstr "" msgid "in work " msgstr "" +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "" + #: templates/catalogue/book_fragments.html:12 msgid "return to book's page" msgstr "" @@ -558,21 +570,35 @@ msgid "" "\t\t\t" msgstr "" +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "" + #: templates/catalogue/search_no_hits.html:5 msgid "Search in WolneLektury.pl" msgstr "" -#: templates/catalogue/search_no_hits.html:15 +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 msgid "Sorry! Search cirteria did not match any resources." msgstr "" -#: templates/catalogue/search_no_hits.html:17 +#: templates/catalogue/search_no_hits.html:16 msgid "" "Search engine supports following criteria: title, author, theme/topic, " "epoch, kind and genre.\n" "\t\tAs for now we do not support full text search." msgstr "" +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "" + #: templates/catalogue/tag_list.html:4 msgid "See full category" msgstr "" @@ -701,10 +727,6 @@ msgstr "" msgid "Find out why Internet libraries can't publish this author's works." msgstr "" -#: templates/catalogue/tagged_object_list.html:102 -msgid "No works of this author found." -msgstr "" - #: templates/catalogue/user_shelves.html:6 msgid "remove" msgstr "" @@ -713,6 +735,29 @@ msgstr "" msgid "You do not own any shelves. You can create one below if you want to" msgstr "" +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "" + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" + #: templates/lessons/ajax_document_detail.html:3 #: templates/lessons/document_detail.html:13 msgid "author" diff --git a/wolnelektury/locale/lt/LC_MESSAGES/django.mo b/wolnelektury/locale/lt/LC_MESSAGES/django.mo index e98412db1d8ea1815898eb0a8738930d3bfc2397..55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4 100644 GIT binary patch delta 18 ZcmaFQ^qy%#KZlX2f}x3(k>$kcHvm4;2Aco? delta 18 ZcmaFQ^qy%#KZl{Ef}xp}k>SMYHvm4}2ABW< diff --git a/wolnelektury/locale/lt/LC_MESSAGES/django.po b/wolnelektury/locale/lt/LC_MESSAGES/django.po index 2d61afc1e..bc5d3d53b 100644 --- a/wolnelektury/locale/lt/LC_MESSAGES/django.po +++ b/wolnelektury/locale/lt/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-19 16:21+0200\n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: settings.py:37 -msgid "German" +msgid "Polish" msgstr "" #: settings.py:38 -msgid "English" +msgid "German" msgstr "" #: settings.py:39 -msgid "Polish" +msgid "English" msgstr "" #: settings.py:40 @@ -44,6 +44,10 @@ msgstr "" msgid "Spanish" msgstr "" +#: settings.py:44 +msgid "Ukrainian" +msgstr "" + #: templates/404.html:6 templates/404.html.py:15 msgid "Page does not exist" msgstr "" @@ -146,7 +150,9 @@ msgstr "" #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 -#: templates/catalogue/search_no_hits.html:23 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 #: templates/catalogue/tagged_object_list.html:141 msgid "Close" msgstr "" @@ -154,7 +160,9 @@ msgstr "" #: templates/base.html:107 templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 -#: templates/catalogue/search_no_hits.html:25 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 #: templates/catalogue/tagged_object_list.html:143 msgid "Loading" msgstr "" @@ -180,7 +188,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/breadcrumbs.html:9 -#: templates/catalogue/main_page.html:13 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "Search" @@ -191,7 +199,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/main_page.html:13 -#: templates/catalogue/tagged_object_list.html:41 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "or" @@ -315,6 +323,10 @@ msgstr "" msgid "in work " msgstr "" +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "" + #: templates/catalogue/book_fragments.html:12 msgid "return to book's page" msgstr "" @@ -558,21 +570,35 @@ msgid "" "\t\t\t" msgstr "" +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "" + #: templates/catalogue/search_no_hits.html:5 msgid "Search in WolneLektury.pl" msgstr "" -#: templates/catalogue/search_no_hits.html:15 +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 msgid "Sorry! Search cirteria did not match any resources." msgstr "" -#: templates/catalogue/search_no_hits.html:17 +#: templates/catalogue/search_no_hits.html:16 msgid "" "Search engine supports following criteria: title, author, theme/topic, " "epoch, kind and genre.\n" "\t\tAs for now we do not support full text search." msgstr "" +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "" + #: templates/catalogue/tag_list.html:4 msgid "See full category" msgstr "" @@ -701,10 +727,6 @@ msgstr "" msgid "Find out why Internet libraries can't publish this author's works." msgstr "" -#: templates/catalogue/tagged_object_list.html:102 -msgid "No works of this author found." -msgstr "" - #: templates/catalogue/user_shelves.html:6 msgid "remove" msgstr "" @@ -713,6 +735,29 @@ msgstr "" msgid "You do not own any shelves. You can create one below if you want to" msgstr "" +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "" + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" + #: templates/lessons/ajax_document_detail.html:3 #: templates/lessons/document_detail.html:13 msgid "author" diff --git a/wolnelektury/locale/pl/LC_MESSAGES/django.mo b/wolnelektury/locale/pl/LC_MESSAGES/django.mo index 539cc5cc7b952c847163cd4fcff90c4e31540589..bb032989a03fd83e519e949c1b1223ae67654c50 100644 GIT binary patch delta 4698 zcmZ9O36K=k8OI;6T+88t;DUg@MJ_pp-30}VqM#5kA}bhH7cutE^s+rW)4lY}FwCHg zt9T!YE}lfARy3N5Nz539Xc1FFip0u+m83$vVk+@Sm1U~blwzuq-+#K7n7pcg|K5B3 zj_-Zn_j;x;d~#>y&GB{j7|LU4Dw;pkn782B^*kv1#u)QD+z+P@GUnc~jDh=4Fy?*w z-)S&r1pMtdV|Znb!fEh5*bIk_M{r5Z<#0IdRgifVvyRHMbZmk%;iwa%1zO-qwAaIv zVHcE5eXs@I4za-;fENB5V!Qbeu7#gKY%}LhFlIDtgPY+ND1-LH;p}f-qM{QVj(G%X z!k=Qk3t7v29JfbIjNVU#)9IfMYbSy-U>(#38=(yBfGc4dE`?9W@85w#+24E+cYGA{ z7}UuJ@zBX9!8*7I>O@N+(J*V_DA*3y!z7d;RjBbVKpFHByb%5z%7fz?qj6JVMV8K> zBA3pKUu=O|z=b+N8p;D@sPT6~Ep!i@1RsHf+w70qufTb<{|aSb1A{bwDm()=LwUSw z68_hKfDT!{6Y7N5Lv6GN-U;`@$#5WWcBKK>2+U?FsNqxCUxm1!~;gP#Zr8SHtf?x%wk0!#|7PYZnRMh1<$=qgJdlM~!pbfxI>8(8d^p2m9qfiO;QLS$Ux?ekfm--=C=YxL z<(Xkkd>i0oC=dKF=JQbV55(np2r70%xl=mvSg0hN1ZBuHI2g`_ z+(fe=?q3OIz@K74+bF>lj9YfiNBh|?oOCP31{OouY?99X;m zX;tXxh1zI4)QNY&SK)2Y!Yk)S*R2xsez=hSXP`XtHf(|ago^o`dC`VTpw`_0H^C0b zr@%Y|D@umLREqE@lp&X3-bmOEM?nW_fh^ScLd+YXTz+5N{z1%_AU2yLQ0sgSweHXb z5l2C-Gj0L?znsc+I>f7?Cj0?v!#~G-FYf;b#LMOw#Jk2Oq6OE&dfMxuPTm0(LJtP; z8mRXlKqcp=Q0xCYLHxH+8IB*76fV?2A8J4e%B6jAe-)0VeE=%yUV)0~n@|gX22X(c z>Ei~Q2B>ihpmOUxD9>C0$G{saRJg)s4_pa<1joWppeEL_y9{fD>bFoEErd_NGa*;r zyb-_u7gWebwMMzp2pecOL(N|ix7*@&#i1fs^+J7!c0(ETFyyOiUW7XF@1btVU*H<} zDLe8Q+0&)s_5W z^ue3qHdxR1SQ}go6{=exYnwe#p*#$qg|n6rfA|`F3a(lj8S)`i4t)X}bpNL;i%u{f zp2&;kPzG#(m&0Gejc~?UQF{j@|IDjU9x`8wVmTR3ra2p`e?`m=_;uPjC{GMIJMzRx zID!350~NiP36&J{pj^2ODt4>jNVq9(Ulq5vLAi7%)gohhHXtIpIA`}K7ejj7v&r1GNcq+h2;3VkbcFdp(dpJ z<02JBd?_N>wR;0<|11`(LRpE{B4SqiMk>>;MJihq80D-k)}1JWRO--GXeK%zaVKl# zVV*nUx-#ccGz5958R=U(P?VaFAbqwbAwDD~hi*n!p!-lo{~za2xfm&D&qD(xOXY@v z2D|`&HCEP9V^XbL#FNj!@uKT`8v07yGYjgbspx7ex!ch-NM$>^11&=#N}+DF86}WK z_n=)!rC$~g6y2zSvX@F5`W70G)}xz{if-CKd5B6&+)zrSQ5ki_ecyyV=v=kyM^e@W zDL3?OTaa=5lwBQEPZ@JdUByiXS=TzgbyHqG2yM`1+k=en+Kb$td?73~+0`DygF@bV zUG+tGcIet!yx$659-xyTygwbfv z?|-@RSZk>BZgkaaw-wy5WV3}_-gZ0NaZ%o8T!&V^7}#XD6FNy2ukM@l*x(U8q2u|U zwaQb8!6{H`8kiIqUA|m7ipJ#_J3nwpTmn z=B@7*2i%*pU7_pZs`{)`^RHu5fnRf`#nbuILdVZ_xnU?Tw9K5Th|0liTnlyH*^#Ke zJLSlbL8kx6NfY~DIrWcYLYGkcHu8A?{kCsJ>lwCX@ma0Q`kR{UKx0XDZBunZrLV1x05*;cVjIrt!HyiHb|8{HxsQ@E^Q6+ z1%@AA=K&>Cf%TF$=N){2U5=*^D{YYZ$x@mv64lRV%^142!*?=nnWPMCk?~3P_Ps+d z+O(T;eQff*o-bJDISJDq4O337z$_=@2Z#11z3RI8t%Jw5A3p@U6|1`vO9q|Y##uOa zuIyyVv<|1Yly_u4Y3A9oQ}o=>Ie3#z1{j;p@+NIlMaPzXLS3yc96hAIpjXdB|xg@}y3QF1~iF-+zRFt3v5;}ajT5RIekbSwz zG;%E{7riv56>O(RT!OsY9-}9X9US3{avB>%+ zGHA1*)Dzu_?}LmvjYmRxp@c*j^A(0-uK;7NU>t_FHRd|kQ`>P5y4oAl1_xjd9FB>Y zi7m0pu^L;^-i&uNYH=`aqfEYUIz5tYC-R0ltz z61;=sFt`J=fm2ZLSD@}+r#AhYYUhp3sFCkLjogQGid<}KqAygvA&{78hn7=1shO%@>p82>E=i_Bm;?phCi=#3NbFdP#@EYm?6F8H~ z_-$m6<|yizok5M@ThvH@$7~Ga2q|GVj>iU^h__K4j%1znxyh)ul|@AlE6$B z;TGJ78gW{T?ReA!raA3w)C}aK*1iPw91FEX8&O{+^{BnJ7uE3rWZzomZRf&CRL5sg z34Mo}nLwA_K_aSy(bxi~p*om>N-z`IujUD4@=OUT(HhhY?m<2GRdn+Ob{s#_`5)Yi zFBUHRipAKUg}lU#Tl?4@F70b4uoiVJy{N=qN9~F8j+am!T}6%XCc5x1Wc!#N{cKY) zfp!LVpnqdgNy0kR+J1oQ=nHIxKVc>|A}7aW^tac19+uNCMI?%qq6xHEM$4cjVH8Ppz zMIRBX2~lS*t-Lf!$E=Z@`wg1=Yb$d;<4j2nMnqx-T5{el%(c zVz4L1q4rifYG!j#&s!14{Ob#54Hq~;#_QbJfZ9aIkwKaZs9hd9*#41<#&NV$P>C-= zbx?&$sNT802i4J=xF6p^4wRW2Z!eK$QPJkufSTI9*ai3)IY9Mtz|)B1hUp zvXk`rL=4BNs8f)MQ?Lki91mh^{1A2DY0NFP3YE|d)aJ~_4OolX zblthAnW@7HJcd8_G1OB1f^K|}iwE#9(ywLmhuWK?5Y^#EY>&H9BYq3j z;YX-VH-=x7nOKi%|A@@0nUZSH#A1w~U4xpbozC?`j-O!-*RNx+&i~S3_Q);lz#EmQ z8QG3{&@R-}y@5*bFoxnOr+vn0Uq!9;lBi27W|;r4)fqW07f)Ne%whU@&7QfY$~ z7>Ko~4(d>eyoAxX7xmyHs9k&xwd-$V0N!=aqQbL7{yieN9A3B+b%1hItB61+&PCbW-qN}eQE5}M_W zL{q8P`fF;nE^`R>n155PLlqCvg6K@RiB3cU!JhLk)iRt;u$TOs6-+>WDBFl< zi2^m66%K@1tM%{Q?BWB|3!AmqQ-7WqOz8J~ArV956Dn^2J1j2gRo6mzS7ykE`6XsIbK4ndd4kaF@7p z%1R47i(K)Y896l3cQ)1+?8_b)8yr8ju(T|vsMz!V_FT6~cjvp773UP?FLQf} zJ+AkUu$P0p=MuYnccoqM IZXXr#FGMVWng9R* diff --git a/wolnelektury/locale/pl/LC_MESSAGES/django.po b/wolnelektury/locale/pl/LC_MESSAGES/django.po index eb7420acf..05eb66f76 100644 --- a/wolnelektury/locale/pl/LC_MESSAGES/django.po +++ b/wolnelektury/locale/pl/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-19 16:21+0200\n" -"PO-Revision-Date: 2010-05-19 15:40\n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"PO-Revision-Date: 2010-05-25 14:27\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -17,17 +17,17 @@ msgstr "" "X-Translated-Using: django-rosetta 0.5.3\n" #: settings.py:37 +msgid "Polish" +msgstr "polski" + +#: settings.py:38 msgid "German" msgstr "niemiecki" -#: settings.py:38 +#: settings.py:39 msgid "English" msgstr "angielski" -#: settings.py:39 -msgid "Polish" -msgstr "polski" - #: settings.py:40 msgid "Lithuanian" msgstr "litewski" @@ -44,6 +44,10 @@ msgstr "rosyjski" msgid "Spanish" msgstr "hiszpański" +#: settings.py:44 +msgid "Ukrainian" +msgstr "ukraiński" + #: templates/404.html:6 templates/404.html.py:15 msgid "Page does not exist" msgstr "Podana strona nie istnieje" @@ -166,7 +170,9 @@ msgstr "" #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 -#: templates/catalogue/search_no_hits.html:23 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 #: templates/catalogue/tagged_object_list.html:141 msgid "Close" msgstr "Zamknij" @@ -174,7 +180,9 @@ msgstr "Zamknij" #: templates/base.html:107 templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 -#: templates/catalogue/search_no_hits.html:25 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 #: templates/catalogue/tagged_object_list.html:143 msgid "Loading" msgstr "Ładowanie" @@ -200,7 +208,7 @@ msgstr "Zarejestruj się w" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/breadcrumbs.html:9 -#: templates/catalogue/main_page.html:13 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "Search" @@ -211,7 +219,7 @@ msgstr "Szukaj" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/main_page.html:13 -#: templates/catalogue/tagged_object_list.html:41 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "or" @@ -335,6 +343,10 @@ msgstr "Motyw" msgid "in work " msgstr "w utworze" +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "w" + #: templates/catalogue/book_fragments.html:12 msgid "return to book's page" msgstr "wróć do strony utworu" @@ -605,15 +617,25 @@ msgstr "" "zbiorach lektury szkolne, które są zalecane do użytku przez Ministerstwo " "Edukacji Narodowej i które trafiły już do domeny publicznej." +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "Wyszukiwanie w" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "Znaleziono więcej niż jeden wynik wyszukiwania." + #: templates/catalogue/search_no_hits.html:5 msgid "Search in WolneLektury.pl" msgstr "Wyszukiwanie w WolneLektury.pl" -#: templates/catalogue/search_no_hits.html:15 +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 msgid "Sorry! Search cirteria did not match any resources." msgstr "Przepraszamy! Brak wyników spełniających kryteria podane w zapytaniu." -#: templates/catalogue/search_no_hits.html:17 +#: templates/catalogue/search_no_hits.html:16 msgid "" "Search engine supports following criteria: title, author, theme/topic, " "epoch, kind and genre.\n" @@ -623,6 +645,10 @@ msgstr "" "rodzaj i gatunek utworu. Obecnie nie obsługujemy wyszukiwania fraz w " "tekstach utworów." +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "Przepraszamy! Zapytanie musi zawierać co najmniej dwa znaki." + #: templates/catalogue/tag_list.html:4 msgid "See full category" msgstr "Zobacz całą kategorię" @@ -761,10 +787,6 @@ msgstr "" "Dowiedz się, dlaczego biblioteki internetowe nie mogą udostępniać dzieł tego " "autora." -#: templates/catalogue/tagged_object_list.html:102 -msgid "No works of this author found." -msgstr "Nie znaleziono żadnych utworów." - #: templates/catalogue/user_shelves.html:6 msgid "remove" msgstr "usuń" @@ -774,6 +796,35 @@ msgid "You do not own any shelves. You can create one below if you want to" msgstr "" "Nie posiadasz żadnych półek. Jeśli chcesz, możesz utworzyć półkę poniżej." +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "wróć do strony głównej" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" +"W serwisie Wolne Lektury już teraz opublikowanych jest ponad 1000 utworów! " +"Pomóż w rozwijaniu biblioteki i uwalnianiu nowych lektur przekazując nam " +"darowiznę lub 1%% podatku." + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "Więcej..." + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" +"Zostań redaktorem lub redaktorką Wolnych Lektur! Sprawdź, czy obecnie " +"pracujemy nad publikacją wyszukiwanej przez ciebie lektury i samodzielnie " +"przygotuj publikację logując się na Platformie Redakcyjnej." + #: templates/lessons/ajax_document_detail.html:3 #: templates/lessons/document_detail.html:13 msgid "author" diff --git a/wolnelektury/locale/ru/LC_MESSAGES/django.mo b/wolnelektury/locale/ru/LC_MESSAGES/django.mo index e98412db1d8ea1815898eb0a8738930d3bfc2397..55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4 100644 GIT binary patch delta 18 ZcmaFQ^qy%#KZlX2f}x3(k>$kcHvm4;2Aco? delta 18 ZcmaFQ^qy%#KZl{Ef}xp}k>SMYHvm4}2ABW< diff --git a/wolnelektury/locale/ru/LC_MESSAGES/django.po b/wolnelektury/locale/ru/LC_MESSAGES/django.po index 2d61afc1e..bc5d3d53b 100644 --- a/wolnelektury/locale/ru/LC_MESSAGES/django.po +++ b/wolnelektury/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-19 16:21+0200\n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: settings.py:37 -msgid "German" +msgid "Polish" msgstr "" #: settings.py:38 -msgid "English" +msgid "German" msgstr "" #: settings.py:39 -msgid "Polish" +msgid "English" msgstr "" #: settings.py:40 @@ -44,6 +44,10 @@ msgstr "" msgid "Spanish" msgstr "" +#: settings.py:44 +msgid "Ukrainian" +msgstr "" + #: templates/404.html:6 templates/404.html.py:15 msgid "Page does not exist" msgstr "" @@ -146,7 +150,9 @@ msgstr "" #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 -#: templates/catalogue/search_no_hits.html:23 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 #: templates/catalogue/tagged_object_list.html:141 msgid "Close" msgstr "" @@ -154,7 +160,9 @@ msgstr "" #: templates/base.html:107 templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 -#: templates/catalogue/search_no_hits.html:25 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 #: templates/catalogue/tagged_object_list.html:143 msgid "Loading" msgstr "" @@ -180,7 +188,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/breadcrumbs.html:9 -#: templates/catalogue/main_page.html:13 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "Search" @@ -191,7 +199,7 @@ msgstr "" #: templates/catalogue/book_list.html:12 #: templates/catalogue/book_stub_detail.html:12 #: templates/catalogue/main_page.html:13 -#: templates/catalogue/tagged_object_list.html:41 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 #: templates/lessons/document_detail.html:9 #: templates/lessons/document_list.html:51 msgid "or" @@ -315,6 +323,10 @@ msgstr "" msgid "in work " msgstr "" +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "" + #: templates/catalogue/book_fragments.html:12 msgid "return to book's page" msgstr "" @@ -558,21 +570,35 @@ msgid "" "\t\t\t" msgstr "" +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "" + #: templates/catalogue/search_no_hits.html:5 msgid "Search in WolneLektury.pl" msgstr "" -#: templates/catalogue/search_no_hits.html:15 +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 msgid "Sorry! Search cirteria did not match any resources." msgstr "" -#: templates/catalogue/search_no_hits.html:17 +#: templates/catalogue/search_no_hits.html:16 msgid "" "Search engine supports following criteria: title, author, theme/topic, " "epoch, kind and genre.\n" "\t\tAs for now we do not support full text search." msgstr "" +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "" + #: templates/catalogue/tag_list.html:4 msgid "See full category" msgstr "" @@ -701,10 +727,6 @@ msgstr "" msgid "Find out why Internet libraries can't publish this author's works." msgstr "" -#: templates/catalogue/tagged_object_list.html:102 -msgid "No works of this author found." -msgstr "" - #: templates/catalogue/user_shelves.html:6 msgid "remove" msgstr "" @@ -713,6 +735,29 @@ msgstr "" msgid "You do not own any shelves. You can create one below if you want to" msgstr "" +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "" + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" + #: templates/lessons/ajax_document_detail.html:3 #: templates/lessons/document_detail.html:13 msgid "author" diff --git a/wolnelektury/locale/uk/LC_MESSAGES/django.mo b/wolnelektury/locale/uk/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4 GIT binary patch literal 367 zcmYL^K~KUk7=|%=+R?Lz9=zd)Wsw9b5-KaW*luJD61`QZvj$tz6{0`HzvpkUON_k9 zlOFnf?fd6E`07zo7 literal 0 HcmV?d00001 diff --git a/wolnelektury/locale/uk/LC_MESSAGES/django.po b/wolnelektury/locale/uk/LC_MESSAGES/django.po new file mode 100644 index 000000000..bc5d3d53b --- /dev/null +++ b/wolnelektury/locale/uk/LC_MESSAGES/django.po @@ -0,0 +1,782 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: settings.py:37 +msgid "Polish" +msgstr "" + +#: settings.py:38 +msgid "German" +msgstr "" + +#: settings.py:39 +msgid "English" +msgstr "" + +#: settings.py:40 +msgid "Lithuanian" +msgstr "" + +#: settings.py:41 +msgid "French" +msgstr "" + +#: settings.py:42 +msgid "Russian" +msgstr "" + +#: settings.py:43 +msgid "Spanish" +msgstr "" + +#: settings.py:44 +msgid "Ukrainian" +msgstr "" + +#: templates/404.html:6 templates/404.html.py:15 +msgid "Page does not exist" +msgstr "" + +#: templates/404.html:17 +msgid "" +"We are sorry, but this page does not exist. Please check if you entered " +"correct address or go to " +msgstr "" + +#: templates/404.html:17 +msgid "main page" +msgstr "" + +#: templates/500.html:6 templates/500.html.py:54 +msgid "Server error" +msgstr "" + +#: templates/500.html:55 +msgid "" +"

The Wolnelektury.pl site is currently unavailable. Meanwhile, visit our " +"blog.

Inform our administrators about the " +"error.

" +msgstr "" + +#: templates/503.html:6 templates/503.html.py:54 +msgid "Service unavailable" +msgstr "" + +#: templates/503.html:56 +msgid "The Wolnelektury.pl site is currently unavailable due to maintainance." +msgstr "" + +#: templates/base.html:20 +msgid "" +"Internet Explorer cannot display this site properly. Click here to read " +"more..." +msgstr "" + +#: templates/base.html:33 +msgid "Welcome" +msgstr "" + +#: templates/base.html:34 +msgid "Your shelves" +msgstr "" + +#: templates/base.html:36 +msgid "Administration" +msgstr "" + +#: templates/base.html:38 +msgid "Logout" +msgstr "" + +#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 +#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/auth/login.html.py:7 templates/auth/login.html:12 +#: templates/auth/login.html.py:15 +msgid "Sign in" +msgstr "" + +#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 +#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/auth/login.html.py:21 templates/auth/login.html:23 +msgid "Register" +msgstr "" + +#: templates/base.html:51 +msgid "Choose your interface language: " +msgstr "" + +#: templates/base.html:56 +msgid "Choose language" +msgstr "" + +#: templates/base.html:68 +msgid "" +"\n" +"\t\t\t\tWolne Lektury is a project lead by Modern Poland Foundation.\n" +"\t\t\t\tDigital reproductions are made by The National Library, based on TNL resources. \n" +"\t\t\t\tHosting EO Networks.\n" +"\t\t\t\t" +msgstr "" + +#: templates/base.html:75 +msgid "" +"\n" +"\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. Marszałkowska 84/92 " +"lok. 125, tel/fax: (22) 621-30-17\n" +" e-mail: fundacja@nowoczesnapolska.org.pl\n" +"\t\t\t\t" +msgstr "" + +#: templates/base.html:84 templates/base.html.py:105 +#: templates/catalogue/book_detail.html:129 +#: templates/catalogue/book_fragments.html:33 +#: templates/catalogue/book_stub_detail.html:31 +#: templates/catalogue/search_multiple_hits.html:23 +#: templates/catalogue/search_no_hits.html:22 +#: templates/catalogue/search_too_short.html:19 +#: templates/catalogue/tagged_object_list.html:141 +msgid "Close" +msgstr "" + +#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/catalogue/book_fragments.html:35 +#: templates/catalogue/book_stub_detail.html:33 +#: templates/catalogue/search_multiple_hits.html:25 +#: templates/catalogue/search_no_hits.html:24 +#: templates/catalogue/search_too_short.html:21 +#: templates/catalogue/tagged_object_list.html:143 +msgid "Loading" +msgstr "" + +#: templates/admin/base_site.html:4 templates/admin/base_site.html.py:7 +msgid "Site administration" +msgstr "" + +#: templates/admin/base_site.html:8 +msgid "Translations" +msgstr "" + +#: templates/admin/catalogue/book/change_list.html:6 +msgid "Import book" +msgstr "" + +#: templates/auth/login.html:4 +msgid "Register on" +msgstr "" + +#: templates/auth/login.html:9 templates/catalogue/book_detail.html:12 +#: templates/catalogue/book_fragments.html:12 +#: templates/catalogue/book_list.html:12 +#: templates/catalogue/book_stub_detail.html:12 +#: templates/catalogue/breadcrumbs.html:9 +#: templates/catalogue/main_page.html:13 templates/info/base.html:10 +#: templates/lessons/document_detail.html:9 +#: templates/lessons/document_list.html:51 +msgid "Search" +msgstr "" + +#: templates/auth/login.html:9 templates/catalogue/book_detail.html:12 +#: templates/catalogue/book_fragments.html:12 +#: templates/catalogue/book_list.html:12 +#: templates/catalogue/book_stub_detail.html:12 +#: templates/catalogue/main_page.html:13 +#: templates/catalogue/tagged_object_list.html:41 templates/info/base.html:10 +#: templates/lessons/document_detail.html:9 +#: templates/lessons/document_list.html:51 +msgid "or" +msgstr "" + +#: templates/auth/login.html:9 templates/catalogue/book_detail.html:12 +#: templates/catalogue/book_list.html:12 +#: templates/catalogue/book_stub_detail.html:12 +#: templates/lessons/document_list.html:51 +msgid "return to main page" +msgstr "" + +#: templates/catalogue/book_detail.html:5 +msgid "on WolneLektury.pl" +msgstr "" + +#: templates/catalogue/book_detail.html:17 +msgid "Work is licensed under " +msgstr "" + +#: templates/catalogue/book_detail.html:19 +msgid "Based on" +msgstr "" + +#: templates/catalogue/book_detail.html:24 +#: templates/catalogue/tagged_object_list.html:27 +msgid "Hide description" +msgstr "" + +#: templates/catalogue/book_detail.html:27 +msgid "Put a book" +msgstr "" + +#: templates/catalogue/book_detail.html:27 +msgid "on the shelf!" +msgstr "" + +#: templates/catalogue/book_detail.html:31 +msgid "Read online" +msgstr "" + +#: templates/catalogue/book_detail.html:34 +msgid "Download PDF" +msgstr "" + +#: templates/catalogue/book_detail.html:37 +msgid "Download ODT" +msgstr "" + +#: templates/catalogue/book_detail.html:40 +msgid "Download TXT" +msgstr "" + +#: templates/catalogue/book_detail.html:45 +msgid "Artist" +msgstr "" + +#: templates/catalogue/book_detail.html:47 +msgid "Director" +msgstr "" + +#: templates/catalogue/book_detail.html:51 +msgid "Download MP3" +msgstr "" + +#: templates/catalogue/book_detail.html:52 +msgid "Download Ogg Vorbis" +msgstr "" + +#: templates/catalogue/book_detail.html:79 +msgid "Details" +msgstr "" + +#: templates/catalogue/book_detail.html:82 +msgid "Author" +msgstr "" + +#: templates/catalogue/book_detail.html:88 +msgid "Epoch" +msgstr "" + +#: templates/catalogue/book_detail.html:94 +msgid "Kind" +msgstr "" + +#: templates/catalogue/book_detail.html:100 +msgid "Genre" +msgstr "" + +#: templates/catalogue/book_detail.html:106 +msgid "Other resources" +msgstr "" + +#: templates/catalogue/book_detail.html:108 +msgid "Book on project's wiki" +msgstr "" + +#: templates/catalogue/book_detail.html:109 +msgid "Source of the book" +msgstr "" + +#: templates/catalogue/book_detail.html:111 +msgid "Book description on Lektury.Gazeta.pl" +msgstr "" + +#: templates/catalogue/book_detail.html:114 +msgid "Book description on Wikipedia" +msgstr "" + +#: templates/catalogue/book_detail.html:119 +msgid "Work's themes " +msgstr "" + +#: templates/catalogue/book_fragments.html:5 +#: templates/catalogue/book_fragments.html:10 +msgid "Theme" +msgstr "" + +#: templates/catalogue/book_fragments.html:5 +#: templates/catalogue/book_fragments.html:10 +msgid "in work " +msgstr "" + +#: templates/catalogue/book_fragments.html:5 +msgid "on" +msgstr "" + +#: templates/catalogue/book_fragments.html:12 +msgid "return to book's page" +msgstr "" + +#: templates/catalogue/book_fragments.html:26 +msgid "See description" +msgstr "" + +#: templates/catalogue/book_fragments.html:26 +msgid "of the book " +msgstr "" + +#: templates/catalogue/book_list.html:7 +msgid "Alphabetical listing of works on WolneLektury.pl" +msgstr "" + +#: templates/catalogue/book_list.html:10 +msgid "Alphabetical listing of works" +msgstr "" + +#: templates/catalogue/book_sets.html:2 +msgid "Put a book on the shelf!" +msgstr "" + +#: templates/catalogue/book_sets.html:4 +msgid "You do not have any shelves. You can create one below, if you want to." +msgstr "" + +#: templates/catalogue/book_sets.html:9 templates/catalogue/book_short.html:4 +msgid "Put on the shelf!" +msgstr "" + +#: templates/catalogue/book_sets.html:16 +#: templates/catalogue/fragment_sets.html:16 +msgid "Create new shelf" +msgstr "" + +#: templates/catalogue/book_short.html:14 +msgid "Jump to" +msgstr "" + +#: templates/catalogue/book_short.html:16 +msgid "Categories" +msgstr "" + +#: templates/catalogue/book_stub_detail.html:17 +msgid "" +"This work is in public domain and will be published on Internet school " +"library of Wolne Lektury soon." +msgstr "" + +#: templates/catalogue/book_stub_detail.html:20 +msgid "" +"This work will become part of public domain and will be allowed to be " +"published without restrictions in" +msgstr "" + +#: templates/catalogue/book_stub_detail.html:22 +msgid "Find out why Internet libraries can't publish this work." +msgstr "" + +#: templates/catalogue/book_stub_detail.html:24 +msgid "This work is copyrighted." +msgstr "" + +#: templates/catalogue/book_text.html:17 +msgid "Table of contents" +msgstr "" + +#: templates/catalogue/book_text.html:18 +#: templates/catalogue/tagged_object_list.html:132 +msgid "Themes" +msgstr "" + +#: templates/catalogue/folded_tag_list.html:4 +msgid "Show full category" +msgstr "" + +#: templates/catalogue/folded_tag_list.html:13 +#: templates/catalogue/main_page.html:43 templates/catalogue/main_page.html:48 +#: templates/catalogue/main_page.html:87 +#: templates/catalogue/main_page.html:270 +#: templates/catalogue/main_page.html:279 +msgid "See more" +msgstr "" + +#: templates/catalogue/folded_tag_list.html:22 +#: templates/catalogue/main_page.html:250 +msgid "Hide" +msgstr "" + +#: templates/catalogue/fragment_sets.html:2 +msgid "Shelves containing fragment" +msgstr "" + +#: templates/catalogue/fragment_sets.html:4 +#: templates/catalogue/main_page.html:28 +msgid "You do not own any shelves. You can create one below, if you want to." +msgstr "" + +#: templates/catalogue/fragment_sets.html:9 +msgid "Save all shelves" +msgstr "" + +#: templates/catalogue/fragment_short.html:6 +msgid "Expand fragment" +msgstr "" + +#: templates/catalogue/fragment_short.html:12 +msgid "Hide fragment" +msgstr "" + +#: templates/catalogue/fragment_short.html:17 +msgid "See in a book" +msgstr "" + +#: templates/catalogue/main_page.html:13 +msgid "check list of books" +msgstr "" + +#: templates/catalogue/main_page.html:13 +msgid "in our repository" +msgstr "" + +#: templates/catalogue/main_page.html:17 +msgid "Browse books by categories" +msgstr "" + +#: templates/catalogue/main_page.html:19 +#: templates/catalogue/user_shelves.html:2 +msgid "Your shelves with books" +msgstr "" + +#: templates/catalogue/main_page.html:24 +msgid "delete" +msgstr "" + +#: templates/catalogue/main_page.html:33 +#: templates/catalogue/user_shelves.html:15 +msgid "Create shelf" +msgstr "" + +#: templates/catalogue/main_page.html:37 +msgid "" +"Create your own book set. You can share it with friends by sending them link " +"to your shelf." +msgstr "" + +#: templates/catalogue/main_page.html:38 +msgid "You need to " +msgstr "" + +#: templates/catalogue/main_page.html:38 +msgid "sign in" +msgstr "" + +#: templates/catalogue/main_page.html:38 +msgid "to manage your shelves." +msgstr "" + +#: templates/catalogue/main_page.html:41 +#: templates/lessons/document_list.html:49 +msgid "Hand-outs for teachers" +msgstr "" + +#: templates/catalogue/main_page.html:42 +msgid "" +"Lessons' prospects and other ideas for using Wolnelektury.pl for teaching." +msgstr "" + +#: templates/catalogue/main_page.html:47 +msgid "" +"are professional recordings of literary texts from our repository, available " +"on free license in MP3 and Ogg Vorbis formats as well as in DAISY system." +msgstr "" + +#: templates/catalogue/main_page.html:54 +#: templates/catalogue/tagged_object_list.html:114 +msgid "Authors" +msgstr "" + +#: templates/catalogue/main_page.html:58 +#: templates/catalogue/tagged_object_list.html:118 +msgid "Kinds" +msgstr "" + +#: templates/catalogue/main_page.html:62 +#: templates/catalogue/tagged_object_list.html:122 +msgid "Genres" +msgstr "" + +#: templates/catalogue/main_page.html:66 +#: templates/catalogue/tagged_object_list.html:126 +msgid "Epochs" +msgstr "" + +#: templates/catalogue/main_page.html:72 +msgid "Themes and topics" +msgstr "" + +#: templates/catalogue/main_page.html:75 +msgid "Themes groups" +msgstr "" + +#: templates/catalogue/main_page.html:260 +msgid "News" +msgstr "" + +#: templates/catalogue/main_page.html:264 +msgid "See our blog" +msgstr "" + +#: templates/catalogue/main_page.html:267 +msgid "You can help us!" +msgstr "" + +#: templates/catalogue/main_page.html:268 +msgid "" +"We try our best to elaborate works appended to our library. It is possible " +"only due to support of our volunteers." +msgstr "" + +#: templates/catalogue/main_page.html:269 +msgid "" +"We invite people who want to take part in developing Internet school library " +"Wolne Lektury." +msgstr "" + +#: templates/catalogue/main_page.html:273 +msgid "About us" +msgstr "" + +#: templates/catalogue/main_page.html:275 +msgid "" +"\n" +"\t\t\tInternet library with school readings “Wolne Lektury” (www.wolnelektury.pl) is a project made by " +"Modern Poland Foundation. It started in 2007 and shares school readings, " +"which are recommended by Ministry of National Education and are in public " +"domain.\n" +"\t\t\t" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:5 +#: templates/catalogue/search_too_short.html:5 +msgid "Searching in" +msgstr "" + +#: templates/catalogue/search_multiple_hits.html:14 +msgid "More than one result matching the criteria found." +msgstr "" + +#: templates/catalogue/search_no_hits.html:5 +msgid "Search in WolneLektury.pl" +msgstr "" + +#: templates/catalogue/search_no_hits.html:14 +#: templates/catalogue/tagged_object_list.html:102 +msgid "Sorry! Search cirteria did not match any resources." +msgstr "" + +#: templates/catalogue/search_no_hits.html:16 +msgid "" +"Search engine supports following criteria: title, author, theme/topic, " +"epoch, kind and genre.\n" +"\t\tAs for now we do not support full text search." +msgstr "" + +#: templates/catalogue/search_too_short.html:14 +msgid "Sorry! Search query must have at least two characters." +msgstr "" + +#: templates/catalogue/tag_list.html:4 +msgid "See full category" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:15 +msgid "Your shelf is empty" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:16 +msgid "" +"You can put a book on a shelf by entering page of the reading and clicking " +"'Put on the shelf'." +msgstr "" + +#: templates/catalogue/tagged_object_list.html:31 +msgid "Download all books from this shelf" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:35 +msgid "Choose books' formats which you want to download:" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:36 +#: templates/catalogue/tagged_object_list.html:37 +#: templates/catalogue/tagged_object_list.html:38 +msgid "for reading" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:36 +msgid "and printing using" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:37 +msgid "and editing using" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:38 +msgid "on small displays, for example mobile phones" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:39 +#: templates/catalogue/tagged_object_list.html:40 +msgid "for listening" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:39 +msgid "on favourite MP3 player" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:40 +msgid "open format" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:40 +msgid "Xiph.org Foundation" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:41 +#: templates/lessons/ajax_document_detail.html:3 +#: templates/lessons/document_detail.html:13 +msgid "Download" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:41 +msgid "Updating list of books' formats on the shelf" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:41 +msgid "cancel" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:46 +msgid "Share this shelf" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:48 +msgid "" +"Copy this link and share it with other people to let them see your shelf." +msgstr "" + +#: templates/catalogue/tagged_object_list.html:57 +msgid "Read work's study of this author on Lektury.Gazeta.pl" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:60 +msgid "Read study of epoch" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:60 +msgid "on Lektury.Gazeta.pl" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:67 +msgid "Read article about this author on Wikipedia" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:70 +msgid "Read article about epoch" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:70 +msgid "on Wikipedia" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:80 +msgid "Delete" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:88 +msgid "This author's works are copyrighted." +msgstr "" + +#: templates/catalogue/tagged_object_list.html:91 +msgid "" +"This author's works are in public domain and will be published on Internet " +"school library of Wolne Lektury soon." +msgstr "" + +#: templates/catalogue/tagged_object_list.html:95 +msgid "" +"This author's works will become part of public domain and will be allowed to " +"be published without restrictions in" +msgstr "" + +#: templates/catalogue/tagged_object_list.html:97 +msgid "Find out why Internet libraries can't publish this author's works." +msgstr "" + +#: templates/catalogue/user_shelves.html:6 +msgid "remove" +msgstr "" + +#: templates/catalogue/user_shelves.html:10 +msgid "You do not own any shelves. You can create one below if you want to" +msgstr "" + +#: templates/info/base.html:10 +msgid "return to the main page" +msgstr "" + +#: templates/info/join_us.html:2 +#, python-format +msgid "" +"We have over 1000 works published in Wolne Lektury!\n" +"Help us expand the library and set new readings free by\n" +"making a donation or transferring 1%% of your income tax." +msgstr "" + +#: templates/info/join_us.html:5 templates/info/join_us.html.py:10 +msgid "More..." +msgstr "" + +#: templates/info/join_us.html:7 +msgid "" +"Become an editor of Wolne Lektury! Find out if\n" +"we're currently working on a reading you're looking for and prepare\n" +"a publication by yourself by logging into the Editorial Platform." +msgstr "" + +#: templates/lessons/ajax_document_detail.html:3 +#: templates/lessons/document_detail.html:13 +msgid "author" +msgstr "" + +#: templates/lessons/document_detail.html:9 +msgid "return to list of materials" +msgstr "" + +#: templates/lessons/document_list.html:7 +msgid "Hand-outs for teachers on " +msgstr "" + +#: templates/pagination/pagination.html:5 +#: templates/pagination/pagination.html:7 +msgid "previous" +msgstr "" + +#: templates/pagination/pagination.html:21 +#: templates/pagination/pagination.html:23 +msgid "next" +msgstr "" diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index 861799232..d40fd5532 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -34,13 +34,14 @@ LANGUAGE_CODE = 'pl' gettext = lambda s: s LANGUAGES = ( + ('pl', gettext('Polish')), ('de', gettext('German')), ('en', gettext('English')), - ('pl', gettext('Polish')), ('lt', gettext('Lithuanian')), ('fr', gettext('French')), ('ru', gettext('Russian')), - ('es', gettext('Spanish')), + ('es', gettext('Spanish')), + ('uk', gettext('Ukrainian')), ) @@ -122,11 +123,13 @@ INSTALLED_APPS = [ 'pagination', 'chunks', 'compress', + 'modeltranslation', 'catalogue', 'lessons', 'piston', 'api', 'rosetta', + 'infopages', ] CACHE_BACKEND = 'locmem:///?max_entries=3000' @@ -180,6 +183,8 @@ THUMBNAIL_PROCESSORS = ( 'sponsors.processors.add_padding', ) +TRANSLATION_REGISTRY = "wolnelektury.translation" + # Load localsettings, if they exist try: from localsettings import * diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index ad9768edf..7a7709de1 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -5,18 +5,18 @@ var LOCALE_TEXTS = { "EXPAND_DESCRIPTION": "Rozwiń opis", "LOADING": "Ładowanie", }, + "de": { + "DELETE_SHELF": "Translate me!", + "HIDE_DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", + "LOADING": "Translate me!", + }, "fr": { "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", }, - "ru": { - "DELETE_SHELF": "Translate me!", - "HIDE_DESCRIPTION": "Translate me!", - "EXPAND_DESCRIPTION": "Translate me!", - "LOADING": "Translate me!", - }, "en": { "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", @@ -35,12 +35,18 @@ var LOCALE_TEXTS = { "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", }, - "lt":{ - "DELETE_SHELF": "Translate me!", - "HIDE_DESCRIPTION": "Translate me!", - "EXPAND_DESCRIPTION": "Translate me!", - "LOADING": "Translate me!", - } + "lt":{ + "DELETE_SHELF": "Translate me!", + "HIDE_DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", + "LOADING": "Translate me!", + }, + "uk":{ + "DELETE_SHELF": "Translate me!", + "HIDE_DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", + "LOADING": "Translate me!", + } } var BANNER_TEXTS = [ 'Przekaż 1% żeby ukryć ten baner.', diff --git a/wolnelektury/templates/catalogue/book_fragments.html b/wolnelektury/templates/catalogue/book_fragments.html index 550787d28..e71a1908d 100644 --- a/wolnelektury/templates/catalogue/book_fragments.html +++ b/wolnelektury/templates/catalogue/book_fragments.html @@ -2,7 +2,7 @@ {% load i18n %} {% load catalogue_tags pagination_tags %} -{% block title %}{% trans "Theme" %} {{ theme }} {% trans "in work " %} {{ book }} {% "on " %} WolneLektury.pl{% endblock %} +{% block title %}{% trans "Theme" %} {{ theme }} {% trans "in work " %} {{ book }} {% trans "on" %} WolneLektury.pl{% endblock %} {% block bodyid %}tagged-object-list{% endblock %} diff --git a/wolnelektury/templates/catalogue/search_multiple_hits.html b/wolnelektury/templates/catalogue/search_multiple_hits.html index cc93d5631..fe4514009 100644 --- a/wolnelektury/templates/catalogue/search_multiple_hits.html +++ b/wolnelektury/templates/catalogue/search_multiple_hits.html @@ -1,7 +1,8 @@ {% extends "base.html" %} +{% load i18n %} {% load catalogue_tags pagination_tags %} -{% block title %}Wyszukiwanie w WolneLektury.pl{% endblock %} +{% block title %}{% trans "Searching in" %} WolneLektury.pl{% endblock %} {% block bodyid %}tagged-object-list{% endblock %} @@ -10,7 +11,7 @@ {% breadcrumbs tags %}
-

Znaleziono więcej niż jeden wynik odpowiadający kryteriom wyszukiwania.

+

{% trans "More than one result matching the criteria found." %}

    {% for match, link, type in results %}
  • {{ match.name }} ({{ type }})
  • @@ -19,9 +20,9 @@
- +
-

* Ładowanie

+

* {% trans "Loading" %}

{% endblock %} \ No newline at end of file diff --git a/wolnelektury/templates/catalogue/search_too_short.html b/wolnelektury/templates/catalogue/search_too_short.html index db9e58527..f68d065e6 100644 --- a/wolnelektury/templates/catalogue/search_too_short.html +++ b/wolnelektury/templates/catalogue/search_too_short.html @@ -1,7 +1,8 @@ {% extends "base.html" %} +{% load i18n %} {% load catalogue_tags pagination_tags %} -{% block title %}Wyszukiwanie w WolneLektury.pl{% endblock %} +{% block title %}{% trans "Searching in" %} WolneLektury.pl{% endblock %} {% block bodyid %}tagged-object-list{% endblock %} @@ -10,14 +11,14 @@ {% breadcrumbs tags %}
-

Przepraszamy! Wyszukiwana fraza musi mieć co najmniej dwa znaki.

+

{% trans "Sorry! Search query must have at least two characters." %}

{% include "info/join_us.html" %}
- +
-

* Ładowanie

+

* {% trans "Loading" %}

{% endblock %} \ No newline at end of file diff --git a/wolnelektury/templates/catalogue/tagged_object_list.html b/wolnelektury/templates/catalogue/tagged_object_list.html index 66d6ee49a..fd6517c49 100644 --- a/wolnelektury/templates/catalogue/tagged_object_list.html +++ b/wolnelektury/templates/catalogue/tagged_object_list.html @@ -99,7 +99,7 @@ {% endif %} {% endif %} {% else %} - {% trans "No works of this author found." %} + {% trans "Sorry! Search cirteria did not match any resources." %} {% endif %} {% include "info/join_us.html" %} {% endif %} diff --git a/wolnelektury/templates/info/about_us.html b/wolnelektury/templates/info/about_us.html deleted file mode 100644 index 7f43802b3..000000000 --- a/wolnelektury/templates/info/about_us.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} -{% load chunks %} - -{% block title %}O projekcie WolneLektury.pl{% endblock %} - -{% block body %} -

O projekcie Wolne Lektury

-
-

{{ form.q }} lub wróć do strony głównej

-
- -
- {% chunk "about_us_left" %} -
-
- {% chunk "about_us_right" %} -
-{% endblock %} diff --git a/wolnelektury/templates/info/base.html b/wolnelektury/templates/info/base.html new file mode 100644 index 000000000..528e2966c --- /dev/null +++ b/wolnelektury/templates/info/base.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} +{% load i18n %} +{% load chunks %} + +{% block title %}{{ object.page_title }}{% endblock %} + +{% block body %} +

{{ object.title }}

+
+

{{ form.q }} {%trans "or" %} {% trans "return to the main page" %}

+
+ + {% autoescape off %} +
+ {{ object.left_column }} +
+
+ {{ object.right_column }} +
+ {% endautoescape %} +{% endblock %} diff --git a/wolnelektury/templates/info/help_us.html b/wolnelektury/templates/info/help_us.html deleted file mode 100644 index ebe45fe43..000000000 --- a/wolnelektury/templates/info/help_us.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} -{% load chunks %} - -{% block title %}Możesz nam pomóc w WolneLektury.pl{% endblock %} - -{% block body %} -

Możesz nam pomóc

-
-

{{ form.q }} lub wróć do strony głównej

-
- -
- {% chunk "help_us_left" %} -
-
- {% chunk "help_us_right" %} -
-{% endblock %} diff --git a/wolnelektury/templates/info/join_us.html b/wolnelektury/templates/info/join_us.html index f3b3f1db3..b38a56694 100644 --- a/wolnelektury/templates/info/join_us.html +++ b/wolnelektury/templates/info/join_us.html @@ -1,7 +1,10 @@ -

W serwisie Wolne Lektury już teraz opublikowanych jest ponad 1000 utworów! -Pomóż w rozwijaniu biblioteki i uwalnianiu nowych lektur przekazując nam -darowiznę lub 1% podatku. {% comment %}Więcej...{% endcomment %}

+{% load i18n %} +

{% blocktrans %}We have over 1000 works published in Wolne Lektury! +Help us expand the library and set new readings free by +making a donation or transferring 1%% of your income tax.{% endblocktrans %} +{% comment %}{% trans "More..." %}{% endcomment %}

-

Zostań redaktorem lub redaktorką Wolnych Lektur! Sprawdź, czy obecnie -pracujemy nad publikacją wyszukiwanej przez ciebie lektury i samodzielnie -przygotuj publikację logując się na Platformie Redakcyjnej. Więcej...

+

{% blocktrans %}Become an editor of Wolne Lektury! Find out if +we're currently working on a reading you're looking for and prepare +a publication by yourself by logging into the Editorial Platform.{% endblocktrans %} +{% trans "More..." %}

diff --git a/wolnelektury/templates/info/voluntary_services.html b/wolnelektury/templates/info/voluntary_services.html deleted file mode 100644 index e6253d768..000000000 --- a/wolnelektury/templates/info/voluntary_services.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} -{% load chunks %} - -{% block title %}Wolontariat dla wiedzy w WolneLektury.pl{% endblock %} - -{% block body %} -

Wolontariat dla wiedzy

-
-

{{ form.q }} lub wróć do strony głównej

-
- -
- {% chunk "voluntary_services_left" %} -
-
- {% chunk "voluntary_services_right" %} -
-{% endblock %} - diff --git a/wolnelektury/translation.py b/wolnelektury/translation.py new file mode 100644 index 000000000..227896ee4 --- /dev/null +++ b/wolnelektury/translation.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# + +from modeltranslation.translator import translator, TranslationOptions +from infopages.models import InfoPage +from catalogue.models import Book + +class InfoPageTranslationOptions(TranslationOptions): + fields = ('page_title', 'title', 'left_column', 'right_column') + +translator.register(InfoPage, InfoPageTranslationOptions) + +class BookTranslationOptions(TranslationOptions): + fields = ('_short_html', ) + +translator.register(Book, BookTranslationOptions) + diff --git a/wolnelektury/urls.py b/wolnelektury/urls.py index a7cd45f43..0628b1568 100644 --- a/wolnelektury/urls.py +++ b/wolnelektury/urls.py @@ -7,24 +7,28 @@ from django.contrib import admin from catalogue.forms import SearchForm +from infopages.models import InfoPage + admin.autodiscover() +infopages = { + 'queryset': InfoPage.objects.all(), + 'template_name': 'info/base.html', +} urlpatterns = patterns('', url(r'^katalog/', include('catalogue.urls')), url(r'^materialy/', include('lessons.urls')), # Static pages - url(r'^wolontariat/$', 'django.views.generic.simple.direct_to_template', - {'template': 'info/voluntary_services.html', 'extra_context': {'form': SearchForm()}}, - name='voluntary_services'), - url(r'^mozesz-nam-pomoc/$', 'django.views.generic.simple.direct_to_template', - {'template': 'info/help_us.html', 'extra_context': {'form': SearchForm()}}, - name='help_us'), - url(r'^o-projekcie/$', 'django.views.generic.simple.direct_to_template', - {'template': 'info/about_us.html', 'extra_context': {'form': SearchForm()}}, - name='about_us'), + url(r'^wolontariat/$', 'django.views.generic.list_detail.object_detail', + dict(infopages, slug='voluntary_services'), name='voluntary_services'), + url(r'^mozesz-nam-pomoc/$', 'django.views.generic.list_detail.object_detail', + dict(infopages, slug='help_us'), name='help_us'), + url(r'^o-projekcie/$', 'django.views.generic.list_detail.object_detail', + dict(infopages, slug='about_us'), name='about_us'), + url(r'^1procent/$', 'django.views.generic.simple.direct_to_template', { 'template': '1percent.html' }, name='1percent'), -- 2.20.1