from django.utils import simplejson
from django.utils.functional import Promise
from django.utils.encoding import force_unicode
+ from django.utils.http import urlquote_plus
from django.views.decorators import cache
++from django.utils.translation import ugettext as _
from catalogue import models
from catalogue import forms
- alert(LANGUAGE_CODE);
+var LOCALE_TEXTS = {
+ "pl": {
+ "DELETE_SHELF": "Czy na pewno usunąć półkę",
+ "HIDE_DESCRIPTION": "Zwiń opis",
+ "EXPAND DESCRIPTION": "Rozwiń opis",
+ "LOADING": "Ładowanie",
+ },
+ "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!",
+ "EXPAND DESCRIPTION": "Translate me!",
+ "LOADING": "Translate me!",
+ },
+ "ru": {
+ "DELETE_SHELF": "Translate me!",
+ "HIDE_DESCRIPTION": "Translate me!",
+ "EXPAND DESCRIPTION": "Translate me!",
+ "LOADING": "Translate me!",
+ },
+ "es": {
+ "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!",
+ }
+}
-
- alert(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']);
var BANNER_TEXTS = [
'Przekaż 1% żeby ukryć ten baner.',
'Jak dobrze wydać 1% swojego podatku? <strong>Poradnik dla opornych</strong>.',
<body>
- <a href="/"><img src="/static/img/logo.png" /></a>
+ <a href="/"><img src="{{ STATIC_URL }}img/logo.png" /></a>
<p class="haj" style="font-weight: bold">{% trans "Site does not exist" %}</p>
<p>
-{% trans "We are sorry, but this site does not exist. Please check if you entered correct address or go to "%} <a href="/">{% trans "homepage" %}</a>.
+{% trans "We are sorry, but this site does not exist. Please check if you entered correct address or go to "%} <a href="/">{% trans "main page" %}</a>.
</p>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
<body>
- <a href="/"><img src="/static/img/logo.png" /></a>
+ <a href="/"><img src="{{ STATIC_URL }}img/logo.png" /></a>
<p class="haj" style="font-weight: bold">{% trans "Server error" %}</p>
<p>
-{% trans "We are sorry for your inconvenience, but server error occured. We are working on fixing it as soon as possible. Meanwhile, please go to " %}<a href="/">{% trans "homepage" %}</a>.
+{% trans "We are sorry for your inconvenience, but server error occured. We are working on fixing it as soon as possible. Meanwhile, please go to " %}<a href="/">{% trans "main page" %}</a>.
</p>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>{% block title %}WolneLektury.pl{% endblock %}</title>
- <link rel="icon" href="/static/img/favicon.png" type="image/x-icon" />
+ <link rel="icon" href="{{ STATIC_URL }}img/favicon.png" type="image/x-icon" />
{% compressed_css "all" %}
+ <script type="text/javascript">var LANGUAGE_CODE = "{{ LANGUAGE_CODE}}";</script>
{% compressed_js "jquery" %}
{% compressed_js "all" %}
{% block extrahead %}
{% endif %}
</div>
<div class="social-links" style="float:right">
- <a href="http://pl-pl.facebook.com/pages/Wolne-Lektury/203084073268"><img src="/static/img/social/facebook.png" /></a>
- <a href="http://twitter.com/wolnelektury"><img src="/static/img/social/twitter.png" /></a>
- <a href="http://nasza-klasa.pl/profile/30441509"><img src="/static/img/social/naszaklasa.png" /></a>
+ <a href="http://pl-pl.facebook.com/pages/Wolne-Lektury/203084073268"><img src="{{ STATIC_URL }}img/social/facebook.png" /></a>
+ <a href="http://twitter.com/wolnelektury"><img src="{{ STATIC_URL }}img/social/twitter.png" /></a>
+ <a href="http://nasza-klasa.pl/profile/30441509"><img src="{{ STATIC_URL }}img/social/naszaklasa.png" /></a>
</div>
+ <div class="lang-menu" style="float:right;">
+ <form action="/i18n/setlang/" method="post">
+ {% trans "Choose your interface language: " %} <select name="language">
+ {% for lang in LANGUAGES %}
+ <option value="{{ lang.0 }}"{% ifequal lang.0 LANGUAGE_CODE %} selected="selected"{% endifequal %}>{{ lang.1 }}</option>
+ {% endfor %}
+ </select>
+ <input type="submit" value="{% trans "Choose language" %}">
+ </form>
+ </div>
<div class="clearboth"></div>
</div>
<div id="maincontent">
</div>
<div id="set-window">
- <div class="header"><a href="#" class="jqmClose">Zamknij</a></div>
+ <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
<div class="target">
- <p><img src="/static/img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
- <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> Ładowanie</p>
++ <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
</div>
</div>
{% endblock %}
{% breadcrumbs tags %}
<div id="books-list">
- <p>Przepraszamy! Brak wyników spełniających kryteria podane w zapytaniu.</p>
-
- <p>Wyszukiwarka obsługuje takie kryteria jak tytuł, autor, motyw/temat, epoka, rodzaj i gatunek utworu.
- Obecnie nie obsługujemy wyszukiwania fraz w tekstach utworów.</p>
-
+ <p>{% trans "Search of " %}<i>{{ query }}</i> {% trans "did not match any resources." %}</p>
++
++ <p>{% transblock %}Search engine supports following criteria: title, author, theme/topic, epoch, kind and genre.
++ As for now we do not support full text search.{% endtransblock %}</p>
{% include "info/join_us.html" %}
</div>
<div id="set-window">
- <div class="header"><a href="#" class="jqmClose">Zamknij</a></div>
+ <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
<div class="target">
- <p><img src="/static/img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
- <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> Ładowanie</p>
++ <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
</div>
</div>
{% endblock %}
</a>
<div id="download-shelf-menu" style="display:none;">
<form action="{% url download_shelf last_tag.slug %}" method="get" accept-charset="utf-8" id="download-formats-form" data-formats-feed="{% url shelf_book_formats last_tag.slug %}">
- <p>{% trans "Choose books' which you want to download:" %}</p>
- <p>Wybierz formaty książek, które chcesz pobrać:</p>
- <li data-format="pdf"><label for="id_formats_2"><input type="checkbox" name="formats" value="pdf" id="id_formats_2" /> PDF</label> <em><strong>do czytania</strong> i drukowania przy pomocy <a href="http://get.adobe.com/reader/">Adobe Reader</a></em></li>
- <li data-format="odt"><label for="id_formats_3"><input type="checkbox" name="formats" value="odt" id="id_formats_3" /> ODT</label> <em><strong>do czytania</strong> i edytowania przy pomocy <a href="http://pl.openoffice.org/">OpenOffice.org</a></em></li>
- <li data-format="txt"><label for="id_formats_4"><input type="checkbox" name="formats" value="txt" id="id_formats_4" /> TXT</label> <em><strong>do czytania</strong> na małych ekranach, np. na komórce</em></li>
- <li data-format="mp3"><label for="id_formats_0"><input type="checkbox" name="formats" value="mp3" id="id_formats_0" /> MP3</label> <em><strong>do słuchania</strong> w ulubionym odtwarzaczu MP3</em></li>
- <li data-format="ogg"><label for="id_formats_1"><input type="checkbox" name="formats" value="ogg" id="id_formats_1" /> Ogg Vorbis</label> <em><strong>do słuchania</strong> — otwarty format <a href="http://www.vorbis.com/">Fundacji Xiph.Org</a></em></li>
- <li id="download-formats-form-submit-li"><label><input type="submit" name="submit" value="Pobierz" id="download-formats-form-submit" disabled="disabled" /> <img src="{{ STATIC_URL }}img/indicator.gif" /></label> <span id="updating-formats">Uaktualniam listę formatów książek na półce.</span><span id="formats-updated" style="display:none;">lub <a href="#" id="download-formats-form-cancel">anuluj</a></span></li>
++ <p>{% trans "Choose books' formats which you want to download:" %}</p>
+ <li data-format="pdf"><label for="id_formats_2"><input type="checkbox" name="formats" value="pdf" id="id_formats_2" /> PDF</label> <em><strong>{% trans "for reading" %}</strong> {% trans "and printing using" %} <a href="http://get.adobe.com/reader/">Adobe Reader</a></em></li>
+ <li data-format="odt"><label for="id_formats_3"><input type="checkbox" name="formats" value="odt" id="id_formats_3" /> ODT</label> <em><strong>{% trans "for reading" %}</strong> {% trans "and editing using" %} <a href="http://pl.openoffice.org/">OpenOffice.org</a></em></li>
+ <li data-format="txt"><label for="id_formats_4"><input type="checkbox" name="formats" value="txt" id="id_formats_4" /> TXT</label> <em><strong>{% trans "for reading" %}</strong> {% trans "on small displays, for example mobile phones" %}</em></li>
+ <li data-format="mp3"><label for="id_formats_0"><input type="checkbox" name="formats" value="mp3" id="id_formats_0" /> MP3</label> <em><strong>{% trans "for listening" %}</strong> {% trans "on favourite MP3 player" %}</em></li>
+ <li data-format="ogg"><label for="id_formats_1"><input type="checkbox" name="formats" value="ogg" id="id_formats_1" /> Ogg Vorbis</label> <em><strong>{% trans "for listening" %}</strong> — {% trans "open format" %} <a href="http://www.vorbis.com/">{% trans "Xiph.org Foundation" %}</a></em></li>
- <li id="download-formats-form-submit-li"><label><input type="submit" name="submit" value="{% trans "Download" %}" id="download-formats-form-submit" disabled="disabled" /> <img src="/static/img/indicator.gif" /></label> <span id="updating-formats">{% trans "Updating list of books' formats on the shelf" %}</span><span id="formats-updated" style="display:none;">{% trans "or" %} <a href="#" id="download-formats-form-cancel">{% trans "cancel" %}</a></span></li>
++ <li id="download-formats-form-submit-li"><label><input type="submit" name="submit" value="{% trans "Download" %}" id="download-formats-form-submit" disabled="disabled" /> <img src="{{ STATIC_URL }}img/indicator.gif" /></label> <span id="updating-formats">{% trans "Updating list of books' formats on the shelf" %}</span><span id="formats-updated" style="display:none;">{% trans "or" %} <a href="#" id="download-formats-form-cancel">{% trans "cancel" %}</a></span></li>
<div class="clearboth"></div>
</form>
</div>
{% else %}
{% if only_author %}
{% if last_tag.alive %}
- <p>Dzieła tego autora objęte są prawem autorskim.</p>
- <p>Dowiedz się, dlaczego biblioteki internetowe
- nie mogą udostępniać dzieł tego autora.</p>
- {% else %}{% comment %} Nie żyje {% endcomment %}
+ {% trans "This author's works are copyrighted." %}
+ {% else %}{% comment %} Is dead {% endcomment %}
{% if last_tag.in_pd %}
- {% trans "This author's works are in public domain and will be published on Internet school library of Wolne Lektury soon." %}
- {% else %}{% comment %} Is dead, but not yet in public domain {% endcomment %}
- <p>Dzieła tego autora znajdują się w domenie publicznej
- i niedługo zostaną opublikowane w szkolnej bibliotece
- internetowej Wolne Lektury.</p>
- {% else %}{% comment %} Nie żyje, ale jeszcze nie w PD {% endcomment %}
++ <p>{% trans "This author's works are in public domain and will be published on Internet school library of Wolne Lektury soon." %}</p>
++ {% else %}
++ {% comment %} Is dead, but not yet in public domain {% endcomment %}
<div>
- <p>Dzieła tego autora przejdą do zasobów domeny
- publicznej i będą mogły być publikowane bez
- żadnych ograniczeń za:</p>
+ <p>{% trans "This author's works will become part of public domain and will be allowed to be published without restrictions in:" %}</p>
{% include "catalogue/pd_counter.html" %}
+ <p>Dowiedz się, dlaczego biblioteki internetowe
+ nie mogą udostępniać dzieł tego autora.</p>
</div>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
<div id="set-window">
- <div class="header"><a href="#" class="jqmClose">Zamknij</a></div>
+ <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
<div class="target">
- <p><img src="/static/img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
- <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> Ładowanie</p>
++ <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
</div>
</div>
{% endblock %}