From: Lukasz Date: Tue, 11 May 2010 11:56:22 +0000 (+0200) Subject: Further i18n implementation. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e47d97fdd290dc51a32cd84ce93aade29da56e36?ds=sidebyside;hp=-c Further i18n implementation. --- e47d97fdd290dc51a32cd84ce93aade29da56e36 diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index b760eccc2..59011fd9b 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -138,7 +138,7 @@ class Book(models.Model): formats = [] if self.html_file: - formats.append(u'Czytaj online' % reverse('book_text', kwargs={'slug': self.slug})) + formats.append(u'%s' % (reverse('book_text', kwargs={'slug': self.slug}), _('Read online'))) if self.pdf_file: formats.append(u'PDF' % self.pdf_file.url) if self.odt_file: @@ -218,7 +218,7 @@ class Book(models.Model): book_shelves = [] else: if not overwrite: - raise Book.AlreadyExists('Book %s already exists' % book_slug) + raise Book.AlreadyExists(_('Book %s already exists') % book_slug) # Save shelves for this book book_shelves = list(book.tags.filter(category='set')) @@ -261,7 +261,7 @@ class Book(models.Model): child_book.parent_number = n child_book.save() except Book.DoesNotExist, e: - raise Book.DoesNotExist(u'Book with slug = "%s" does not exist.' % slug) + raise Book.DoesNotExist(_('Book with slug = "%s" does not exist.') % slug) book_descendants = list(book.children.all()) while len(book_descendants) > 0: @@ -383,5 +383,4 @@ class BookStub(models.Model): class Meta: ordering = ('title',) verbose_name = _('book stub') - verbose_name_plural = _('book stubs') - + verbose_name_plural = _('book stubs') \ No newline at end of file diff --git a/wolnelektury/static/js/jquery.countdown-pl.js b/wolnelektury/static/js/jquery.countdown-pl.js index 4d6d1d44c..10f84d41e 100644 --- a/wolnelektury/static/js/jquery.countdown-pl.js +++ b/wolnelektury/static/js/jquery.countdown-pl.js @@ -19,4 +19,4 @@ } }; $.countdown.setDefaults($.countdown.regional['pl']); -})(jQuery); +})(jQuery); \ No newline at end of file diff --git a/wolnelektury/static/js/jquery.countdown.js b/wolnelektury/static/js/jquery.countdown.js index 11d550612..06f612520 100644 --- a/wolnelektury/static/js/jquery.countdown.js +++ b/wolnelektury/static/js/jquery.countdown.js @@ -6,7 +6,7 @@ Please attribute the author if you use it. */ /* Modified by Radek Czajka, Fundacja Nowoczesna Polska (radoslaw.czajka(at)nowoczesnapolska.org.pl) */ -w + /* Display a countdown timer. Attach it with options like: $('div selector').countdown( diff --git a/wolnelektury/templates/catalogue/book_detail.html b/wolnelektury/templates/catalogue/book_detail.html index 03b46bc7b..6b36c955c 100644 --- a/wolnelektury/templates/catalogue/book_detail.html +++ b/wolnelektury/templates/catalogue/book_detail.html @@ -2,14 +2,14 @@ {% load i18n %} {% load catalogue_tags pagination_tags %} -{% block title %}{{ book.title }} w WolneLektury.pl{% endblock %} +{% block title %}{{ book.title }} {% trans "on WolneLektury.pl" %}{% endblock %} {% block bodyid %}book-detail{% endblock %} {% block body %}

{{ book.title }}, {{ categories.author|join:", " }}

-

{{ form.q }} {% trans "or" %} {% trans "return to homepage" %}

+

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

diff --git a/wolnelektury/templates/catalogue/book_stub_detail.html b/wolnelektury/templates/catalogue/book_stub_detail.html index 5037ecb8f..9ed3a8b10 100644 --- a/wolnelektury/templates/catalogue/book_stub_detail.html +++ b/wolnelektury/templates/catalogue/book_stub_detail.html @@ -1,37 +1,35 @@ {% extends "base.html" %} +{% load i18n %} {% load catalogue_tags pagination_tags %} -{% block title %}Lektura {{ book.title }} w WolneLektury.pl{% endblock %} +{% block title %}{{ book.title }} w WolneLektury.pl{% endblock %} {% block bodyid %}book-stub-detail{% endblock %} {% block body %}

{{ book.title }}, {{ book.author }}

-

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

+

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

{% if book.in_pd %} - To dzieło znajduje się w domenie publicznej i niedługo zostanie - opublikowane w szkolnej bibliotece internetowej Wolne Lektury. + {% trans "This author's works are in public domain and will be published on Internet school library of Wolne Lektury soon." %} {% else %} {% if book.pd %} - To dzieło przejdzie - do zasobów domeny publicznej i będzie mogło być publikowane bez - żadnych ograniczeń za: + {% trans "This author's works will become part of public domain and will be allowed to be published without restrictions in:" %} {% include "catalogue/pd_counter.html" %} {% else %} - To dzieło objęte jest prawem autorskim. + {% trans "This author's works are copyrighted." %} {% endif %} {% endif %} {% include "info/join_us.html" %}
- +
-

* Ładowanie

+

* {% trans "Loading" %}

{% endblock %} \ No newline at end of file diff --git a/wolnelektury/templates/catalogue/book_text.html b/wolnelektury/templates/catalogue/book_text.html index 55eef8ebd..39934f859 100644 --- a/wolnelektury/templates/catalogue/book_text.html +++ b/wolnelektury/templates/catalogue/book_text.html @@ -14,7 +14,7 @@ diff --git a/wolnelektury/templates/catalogue/search_no_hits.html b/wolnelektury/templates/catalogue/search_no_hits.html index 8e4e788a4..b2a71c8c0 100644 --- a/wolnelektury/templates/catalogue/search_no_hits.html +++ b/wolnelektury/templates/catalogue/search_no_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 "Search in WolneLektury.pl" %}{% endblock %} {% block bodyid %}tagged-object-list{% endblock %} @@ -10,14 +11,14 @@ {% breadcrumbs tags %}
-

Wyszukiwanie {{ query }} nie dało rezultatu.

+

{% trans "Search of " %}{{ query }} {% trans "did not match any resources." %}

{% 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 b8d091a92..230d8ed34 100644 --- a/wolnelektury/templates/catalogue/tagged_object_list.html +++ b/wolnelektury/templates/catalogue/tagged_object_list.html @@ -13,7 +13,7 @@ {% if shelf_is_set and not object_list %}

{% trans "Your shelf is empty" %}

-

{% trans "You can put a book on a shelf by entering page of the reading and clicking \"Put on the shelf\". %}

+

{% trans "You can put a book on a shelf by entering page of the reading and clicking 'Put on the shelf'." %}

{% else %} {% autopaginate object_list 10 %} @@ -113,7 +113,7 @@ {% tag_list categories.genre tags %} {% endif %} {% if categories.epoch %} -

{% trans "Epochs" %}Epoki

+

{% trans "Epochs" %}

{% tag_list categories.epoch tags %} {% endif %}
diff --git a/wolnelektury/templates/lessons/document_detail.html b/wolnelektury/templates/lessons/document_detail.html index 7c6406c19..afc3d69db 100644 --- a/wolnelektury/templates/lessons/document_detail.html +++ b/wolnelektury/templates/lessons/document_detail.html @@ -6,7 +6,7 @@ {% block body %}

{{ object.title }}

-

{{ form.q }} {% trans "or" %} {% trans "return to list of materials" %}

+

{{ form.q }} {% trans "or" %} {% trans "return to list of materials" %}