From fa1630806ff10c3e3ac7d803f396dff16402eea1 Mon Sep 17 00:00:00 2001 From: janek37 <none@none> Date: Mon, 15 Jun 2015 17:22:23 +0200 Subject: [PATCH] tłumaczenie na angielski --- README-DEV | 6 +----- accounts/locale/en/LC_MESSAGES/django.po | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ accounts/locale/pl/LC_MESSAGES/django.po | 220 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ accounts/models.py | 15 ++++++++------- accounts/templates/manage_groups.html | 8 ++++---- accounts/templates/registration/activation_complete.html | 7 +++++++ accounts/templates/registration/activation_email.txt | 5 +++++ accounts/templates/registration/activation_email_subject.txt | 1 + accounts/templates/registration/login.html | 39 +++++++++++++++++++++++++++++++++++++++ accounts/templates/registration/logout.html | 11 +++++++++++ accounts/templates/registration/password_change_done.html | 16 ++++++++++++++++ accounts/templates/registration/password_change_form.html | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ accounts/templates/registration/password_reset_complete.html | 14 ++++++++++++++ accounts/templates/registration/password_reset_confirm.html | 36 ++++++++++++++++++++++++++++++++++++ accounts/templates/registration/password_reset_done.html | 12 ++++++++++++ accounts/templates/registration/password_reset_email.html | 19 +++++++++++++++++++ accounts/templates/registration/password_reset_form.html | 19 +++++++++++++++++++ accounts/templates/registration/registration_complete.html | 7 +++++++ accounts/templates/registration/registration_form.html | 41 +++++++++++++++++++++++++++++++++++++++++ accounts/templates/settings.html | 8 ++++---- common/django_patch.py | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/forms.py | 5 +++-- common/locale/en/LC_MESSAGES/django.po | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/locale/en/LC_MESSAGES/djangojs.po | 29 ++++++++++++++++++++++++----- common/locale/pl/LC_MESSAGES/django.po | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/locale/pl/LC_MESSAGES/djangojs.po | 36 ++++++++++++++++++++++++++++++++++++ common/templates/404.html | 8 ++++++++ common/templates/base.html | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/templates/main_menu.html | 27 +++++++++++++++++++++++++++ common/urls.py | 2 +- common/util.py | 13 +++++++------ dictionary/ajax_lexeme_view.py | 65 ++++++++++------------------------------------------------------- dictionary/forms.py | 44 ++++++++++++++++++++++++-------------------- dictionary/locale/en/LC_MESSAGES/django.po | 552 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ dictionary/locale/en/LC_MESSAGES/djangojs.po | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------- dictionary/locale/pl/LC_MESSAGES/django.po | 552 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ dictionary/locale/pl/LC_MESSAGES/djangojs.po | 369 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ dictionary/models.py | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------- dictionary/reports.py | 14 ++++++++------ dictionary/static/js/lexeme-edit.js | 10 +++++----- dictionary/templates/classification_forms.html | 4 +++- dictionary/templates/classification_value_tree.html | 6 +++--- dictionary/templates/inflection_tables.html | 8 ++++---- dictionary/templates/lexeme_edit_form.html | 30 +++++++++++++++--------------- dictionary/templates/lexeme_view.html | 96 ++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------ dictionary/templates/reader_view.html | 34 +++++++++++++++++----------------- dictionary/templates/sort_dialog.html | 23 ++++++++++++----------- dictionary/urls.py | 3 --- dictionary/views.py | 23 +++++++++++++---------- export/forms.py | 18 ++++++++++-------- export/locale/en/LC_MESSAGES/django.po | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ export/locale/en/LC_MESSAGES/djangojs.po | 39 +++++++++++++++++++++++++++++---------- export/locale/pl/LC_MESSAGES/django.po | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ export/locale/pl/LC_MESSAGES/djangojs.po | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ export/templates/export.html | 15 +++++++-------- history/lexeme_history.py | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------- history/locale/en/LC_MESSAGES/django.po | 191 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ history/locale/en/LC_MESSAGES/djangojs.po | 23 +++++++++++++++++++++-- history/locale/pl/LC_MESSAGES/django.po | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ history/locale/pl/LC_MESSAGES/djangojs.po | 24 ++++++++++++++++++++++++ history/pagination_types.py | 5 +++-- history/pattern_history.py | 51 +++++++++++++++++++++++++++------------------------ history/templates/history_row.html | 20 ++++++++++++++++++++ history/templates/history_view.html | 10 +++++----- history/templates/lexeme_history_table.html | 50 +++++++------------------------------------------- history/templates/pattern_history_table.html | 50 +++++++------------------------------------------- makemessages.sh | 18 ++++++++++++++++++ management/ajax.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ management/forms.py | 31 +++++++++++++++++-------------- management/locale/en/LC_MESSAGES/django.po | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ management/locale/en/LC_MESSAGES/djangojs.po | 23 +++++++++++++++++++++-- management/locale/pl/LC_MESSAGES/django.po | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ management/locale/pl/LC_MESSAGES/djangojs.po | 24 ++++++++++++++++++++++++ management/templates/manage_classifications.html | 16 ++++++++-------- management/templates/manage_qualifiers.html | 14 +++++++------- management/templates/management_menu.html | 18 +++++++++--------- management/templates/table_edit_form.html | 21 +++++++++++---------- management/templates/table_edit_row.html | 9 +++++---- management/templates/table_view.html | 12 ++++++------ management/templates/template_preview_form.html | 2 +- management/urls.py | 7 +++++++ paginer/locale/de/LC_MESSAGES/django.po | 25 ++++++++++++++++++++----- paginer/locale/de/LC_MESSAGES/djangojs.po | 27 +++++++++++++++++++++++++++ paginer/locale/fr/LC_MESSAGES/django.po | 25 ++++++++++++++++++++----- paginer/locale/fr/LC_MESSAGES/djangojs.po | 27 +++++++++++++++++++++++++++ paginer/locale/pl/LC_MESSAGES/django.po | 27 +++++++++++++++++++++------ paginer/locale/pl/LC_MESSAGES/djangojs.po | 25 ++++++++++++++++++++++--- paginer/static/css/paginer.css | 6 +----- paginer/templates/filter_panel.html | 2 +- paginer/templates/paginated_list_panel.html | 4 ++-- paginer/templates/paginated_list_rows.html | 2 +- paginer/templates/pagination.html | 4 ++-- paginer/templatetags/pagination_tags.py | 1 - patterns/ajax_pattern_view.py | 10 +++++----- patterns/locale/en/LC_MESSAGES/django.po | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ patterns/locale/en/LC_MESSAGES/djangojs.po | 61 ++++++++++++++++++++++++++++++++++++++++--------------------- patterns/locale/pl/LC_MESSAGES/django.po | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ patterns/locale/pl/LC_MESSAGES/djangojs.po | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ patterns/templates/pattern_view.html | 18 +++++++++--------- settings.py | 5 +++-- templates/404.html | 8 -------- templates/base.html | 109 ------------------------------------------------------------------------------------------------------------- templates/main_menu.html | 25 ------------------------- templates/registration/activate.html | 14 -------------- templates/registration/activation_email.txt | 5 ----- templates/registration/activation_email_subject.txt | 1 - templates/registration/login.html | 41 ----------------------------------------- templates/registration/logout.html | 11 ----------- templates/registration/password_change_done.html | 16 ---------------- templates/registration/password_change_form.html | 59 ----------------------------------------------------------- templates/registration/password_reset_complete.html | 14 -------------- templates/registration/password_reset_confirm.html | 36 ------------------------------------ templates/registration/password_reset_done.html | 12 ------------ templates/registration/password_reset_email.html | 19 ------------------- templates/registration/password_reset_form.html | 19 ------------------- templates/registration/registration_complete.html | 7 ------- templates/registration/registration_form.html | 43 ------------------------------------------- 117 files changed, 4854 insertions(+), 1158 deletions(-) create mode 100644 accounts/locale/en/LC_MESSAGES/django.po create mode 100644 accounts/locale/pl/LC_MESSAGES/django.po create mode 100644 accounts/templates/registration/activation_complete.html create mode 100644 accounts/templates/registration/activation_email.txt create mode 100644 accounts/templates/registration/activation_email_subject.txt create mode 100644 accounts/templates/registration/login.html create mode 100644 accounts/templates/registration/logout.html create mode 100644 accounts/templates/registration/password_change_done.html create mode 100644 accounts/templates/registration/password_change_form.html create mode 100644 accounts/templates/registration/password_reset_complete.html create mode 100644 accounts/templates/registration/password_reset_confirm.html create mode 100644 accounts/templates/registration/password_reset_done.html create mode 100644 accounts/templates/registration/password_reset_email.html create mode 100644 accounts/templates/registration/password_reset_form.html create mode 100644 accounts/templates/registration/registration_complete.html create mode 100644 accounts/templates/registration/registration_form.html create mode 100644 common/django_patch.py create mode 100644 common/locale/en/LC_MESSAGES/django.po create mode 100644 common/locale/pl/LC_MESSAGES/django.po create mode 100644 common/locale/pl/LC_MESSAGES/djangojs.po create mode 100644 common/templates/404.html create mode 100644 common/templates/base.html create mode 100644 common/templates/main_menu.html create mode 100644 dictionary/locale/en/LC_MESSAGES/django.po create mode 100644 dictionary/locale/pl/LC_MESSAGES/django.po create mode 100644 dictionary/locale/pl/LC_MESSAGES/djangojs.po create mode 100644 export/locale/en/LC_MESSAGES/django.po create mode 100644 export/locale/pl/LC_MESSAGES/django.po create mode 100644 export/locale/pl/LC_MESSAGES/djangojs.po create mode 100644 history/locale/en/LC_MESSAGES/django.po create mode 100644 history/locale/pl/LC_MESSAGES/django.po create mode 100644 history/locale/pl/LC_MESSAGES/djangojs.po create mode 100644 history/templates/history_row.html create mode 100755 makemessages.sh create mode 100644 management/ajax.py create mode 100644 management/locale/en/LC_MESSAGES/django.po create mode 100644 management/locale/pl/LC_MESSAGES/django.po create mode 100644 management/locale/pl/LC_MESSAGES/djangojs.po create mode 100644 paginer/locale/de/LC_MESSAGES/djangojs.po create mode 100644 paginer/locale/fr/LC_MESSAGES/djangojs.po create mode 100644 patterns/locale/en/LC_MESSAGES/django.po create mode 100644 patterns/locale/pl/LC_MESSAGES/django.po create mode 100644 patterns/locale/pl/LC_MESSAGES/djangojs.po delete mode 100644 templates/404.html delete mode 100644 templates/base.html delete mode 100644 templates/main_menu.html delete mode 100644 templates/registration/activate.html delete mode 100644 templates/registration/activation_email.txt delete mode 100644 templates/registration/activation_email_subject.txt delete mode 100644 templates/registration/login.html delete mode 100644 templates/registration/logout.html delete mode 100644 templates/registration/password_change_done.html delete mode 100644 templates/registration/password_change_form.html delete mode 100644 templates/registration/password_reset_complete.html delete mode 100644 templates/registration/password_reset_confirm.html delete mode 100644 templates/registration/password_reset_done.html delete mode 100644 templates/registration/password_reset_email.html delete mode 100644 templates/registration/password_reset_form.html delete mode 100644 templates/registration/registration_complete.html delete mode 100644 templates/registration/registration_form.html diff --git a/README-DEV b/README-DEV index 7606529..aabfa2f 100644 --- a/README-DEV +++ b/README-DEV @@ -17,8 +17,4 @@ dodawanie pól leksemu w historii 1. attribute_translation_list 2. lexeme_attribute_order 3. get_lexeme_attr -4. prepare_value - -wyszukiwanie wywołań gettext w javascripcie - -grep -no 'gettext([^)]*)' -r . | sed -e 's/:gettext(/\nmsgid /' -e 's/")/"\nmsgstr ""\n/' -e 's%./%# %' \ No newline at end of file +4. prepare_value \ No newline at end of file diff --git a/accounts/locale/en/LC_MESSAGES/django.po b/accounts/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..093b5cd --- /dev/null +++ b/accounts/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,219 @@ +# English translation of the accounts module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: models.py:19 +msgid "wyszukiwanie przyrostowe" +msgstr "incremental search" + +#: models.py:20 +msgid "" +"Wyszukiwanie odbywa się automatycznie w miarę wpisywania szukanego hasła. " +"Sugerujemy wyłączenie w wypadku wolnego połączenia internetowego." +msgstr "" +"Search is automatically performed while the search entry is being entered. " +"Not recommended for slow Internet connections." + +#: models.py:25 +msgid "domyślny słownik właściciel dodawanych leksemów" +msgstr "default owner dictionary of created lexemes" + +#: models.py:28 +msgid "domyślna część mowy dodawanych leksemów" +msgstr "default part of speech of created lexemes" + +#: models.py:47 +msgid "Może nadawać dowolne role" +msgstr "Can give any role" + +#: templates/manage_groups.html:9 templates/manage_groups.html.py:12 +msgid "Role użytkowników" +msgstr "User roles" + +#: templates/manage_groups.html:15 +msgid "nazwa" +msgstr "name" + +#: templates/settings.html:4 +msgid "Ustawienia" +msgstr "Settings" + +#: templates/settings.html:7 +msgid "Ustawienia użytkownika" +msgstr "User settings" + +#: templates/settings.html:17 +msgid "Zmiana hasła" +msgstr "Change password" + +#: templates/registration/activation_complete.html:5 +msgid "Your account is active." +msgstr "" + +#: templates/registration/activation_complete.html:6 +msgid "Now you can log in." +msgstr "" + +#: templates/registration/login.html:8 +#: templates/registration/password_change_form.html:16 +#: templates/registration/registration_form.html:24 +msgid "Please correct the error below." +msgid_plural "Please correct the errors below." +msgstr[0] "" +msgstr[1] "" + +#: templates/registration/login.html:28 +#: templates/registration/password_reset_complete.html:12 +msgid "Log in" +msgstr "" + +#: templates/registration/login.html:32 +msgid "I forgot my password" +msgstr "" + +#: templates/registration/logout.html:7 +msgid "Thanks for using our Web site." +msgstr "" + +#: templates/registration/logout.html:9 +msgid "Log in again" +msgstr "" + +#: templates/registration/password_change_done.html:5 +#: templates/registration/password_change_form.html:4 +msgid "Change password" +msgstr "" + +#: templates/registration/password_change_done.html:6 +#: templates/registration/password_change_form.html:5 +msgid "Log out" +msgstr "" + +#: templates/registration/password_change_done.html:8 +#: templates/registration/password_change_done.html:12 +msgid "Password change successful" +msgstr "" + +#: templates/registration/password_change_done.html:14 +msgid "Your password was changed." +msgstr "" + +#: templates/registration/password_change_form.html:7 +#: templates/registration/password_change_form.html:20 +msgid "Password change" +msgstr "" + +#: templates/registration/password_change_form.html:22 +msgid "" +"Please enter your old password, for security's sake, and then enter your new " +"password twice so we can verify you typed it in correctly." +msgstr "" + +#: templates/registration/password_change_form.html:29 +msgid "Old password" +msgstr "" + +#: templates/registration/password_change_form.html:35 +msgid "New password" +msgstr "" + +#: templates/registration/password_change_form.html:41 +msgid "Password (again)" +msgstr "" + +#: templates/registration/password_change_form.html:48 +#: templates/registration/password_reset_confirm.html:24 +msgid "Change my password" +msgstr "" + +#: templates/registration/password_reset_complete.html:4 +#: templates/registration/password_reset_complete.html:8 +msgid "Password reset complete" +msgstr "" + +#: templates/registration/password_reset_complete.html:10 +msgid "Your password has been set. You may go ahead and log in now." +msgstr "" + +#: templates/registration/password_reset_confirm.html:4 +#: templates/registration/password_reset_form.html:4 +#: templates/registration/password_reset_form.html:8 +msgid "Password reset" +msgstr "" + +#: templates/registration/password_reset_confirm.html:10 +msgid "Enter new password" +msgstr "" + +#: templates/registration/password_reset_confirm.html:12 +msgid "" +"Please enter your new password twice so we can verify you typed it in " +"correctly." +msgstr "" + +#: templates/registration/password_reset_confirm.html:17 +msgid "New password:" +msgstr "" + +#: templates/registration/password_reset_confirm.html:21 +msgid "Confirm password:" +msgstr "" + +#: templates/registration/password_reset_confirm.html:30 +msgid "Password reset unsuccessful" +msgstr "" + +#: templates/registration/password_reset_confirm.html:32 +msgid "" +"The password reset link was invalid, possibly because it has already been " +"used. Please request a new password reset." +msgstr "" + +#: templates/registration/password_reset_done.html:4 +#: templates/registration/password_reset_done.html:8 +msgid "Password reset successful" +msgstr "" + +#: templates/registration/password_reset_done.html:10 +msgid "" +"We've e-mailed you instructions for setting your password to the e-mail " +"address you submitted. You should be receiving it shortly." +msgstr "" + +#: templates/registration/password_reset_form.html:10 +msgid "" +"Forgotten your password? Enter your e-mail address below, and we'll e-mail " +"instructions for setting a new one." +msgstr "" + +#: templates/registration/password_reset_form.html:15 +msgid "E-mail address:" +msgstr "" + +#: templates/registration/password_reset_form.html:16 +msgid "Reset my password" +msgstr "" + +#: templates/registration/registration_form.html:15 +#: templates/registration/registration_form.html:28 +msgid "Registration" +msgstr "" + +#: templates/registration/registration_form.html:33 +msgid "Add user" +msgstr "" diff --git a/accounts/locale/pl/LC_MESSAGES/django.po b/accounts/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..7559ded --- /dev/null +++ b/accounts/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,220 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: models.py:19 +msgid "wyszukiwanie przyrostowe" +msgstr "" + +#: models.py:20 +msgid "" +"Wyszukiwanie odbywa się automatycznie w miarę wpisywania szukanego hasła. " +"Sugerujemy wyłączenie w wypadku wolnego połączenia internetowego." +msgstr "" + +#: models.py:25 +msgid "domyślny słownik właściciel dodawanych leksemów" +msgstr "" + +#: models.py:28 +msgid "domyślna część mowy dodawanych leksemów" +msgstr "" + +#: models.py:47 +msgid "Może nadawać dowolne role" +msgstr "" + +#: templates/manage_groups.html:9 templates/manage_groups.html.py:12 +msgid "Role użytkowników" +msgstr "" + +#: templates/manage_groups.html:15 +msgid "nazwa" +msgstr "" + +#: templates/settings.html:4 +msgid "Ustawienia" +msgstr "" + +#: templates/settings.html:7 +msgid "Ustawienia użytkownika" +msgstr "" + +#: templates/settings.html:17 +msgid "Zmiana hasła" +msgstr "" + +#: templates/registration/activation_complete.html:5 +msgid "Your account is active." +msgstr "Twoje konto jest aktywne" + +#: templates/registration/activation_complete.html:6 +msgid "Now you can log in." +msgstr "Możesz się teraz zalogować." + +#: templates/registration/login.html:8 +#: templates/registration/password_change_form.html:16 +#: templates/registration/registration_form.html:24 +msgid "Please correct the error below." +msgid_plural "Please correct the errors below." +msgstr[0] "Proszę poprawić poniższy błąd." +msgstr[1] "Proszę poprawić poniższe błędy." +msgstr[2] "Proszę poprawić poniższe błędy." + +#: templates/registration/login.html:28 +#: templates/registration/password_reset_complete.html:12 +msgid "Log in" +msgstr "" + +#: templates/registration/login.html:32 +msgid "I forgot my password" +msgstr "Nie pamiętam hasła" + +#: templates/registration/logout.html:7 +msgid "Thanks for using our Web site." +msgstr "Dziękujemy za skorzystanie z serwisu." + +#: templates/registration/logout.html:9 +msgid "Log in again" +msgstr "" + +#: templates/registration/password_change_done.html:5 +#: templates/registration/password_change_form.html:4 +msgid "Change password" +msgstr "" + +#: templates/registration/password_change_done.html:6 +#: templates/registration/password_change_form.html:5 +msgid "Log out" +msgstr "" + +#: templates/registration/password_change_done.html:8 +#: templates/registration/password_change_done.html:12 +msgid "Password change successful" +msgstr "" + +#: templates/registration/password_change_done.html:14 +msgid "Your password was changed." +msgstr "" + +#: templates/registration/password_change_form.html:7 +#: templates/registration/password_change_form.html:20 +msgid "Password change" +msgstr "" + +#: templates/registration/password_change_form.html:22 +msgid "" +"Please enter your old password, for security's sake, and then enter your new " +"password twice so we can verify you typed it in correctly." +msgstr "" + +#: templates/registration/password_change_form.html:29 +msgid "Old password" +msgstr "" + +#: templates/registration/password_change_form.html:35 +msgid "New password" +msgstr "" + +#: templates/registration/password_change_form.html:41 +msgid "Password (again)" +msgstr "" + +#: templates/registration/password_change_form.html:48 +#: templates/registration/password_reset_confirm.html:24 +msgid "Change my password" +msgstr "" + +#: templates/registration/password_reset_complete.html:4 +#: templates/registration/password_reset_complete.html:8 +msgid "Password reset complete" +msgstr "" + +#: templates/registration/password_reset_complete.html:10 +msgid "Your password has been set. You may go ahead and log in now." +msgstr "" + +#: templates/registration/password_reset_confirm.html:4 +#: templates/registration/password_reset_form.html:4 +#: templates/registration/password_reset_form.html:8 +msgid "Password reset" +msgstr "" + +#: templates/registration/password_reset_confirm.html:10 +msgid "Enter new password" +msgstr "" + +#: templates/registration/password_reset_confirm.html:12 +msgid "" +"Please enter your new password twice so we can verify you typed it in " +"correctly." +msgstr "" + +#: templates/registration/password_reset_confirm.html:17 +msgid "New password:" +msgstr "" + +#: templates/registration/password_reset_confirm.html:21 +msgid "Confirm password:" +msgstr "" + +#: templates/registration/password_reset_confirm.html:30 +msgid "Password reset unsuccessful" +msgstr "" + +#: templates/registration/password_reset_confirm.html:32 +msgid "" +"The password reset link was invalid, possibly because it has already been " +"used. Please request a new password reset." +msgstr "" + +#: templates/registration/password_reset_done.html:4 +#: templates/registration/password_reset_done.html:8 +msgid "Password reset successful" +msgstr "" + +#: templates/registration/password_reset_done.html:10 +msgid "" +"We've e-mailed you instructions for setting your password to the e-mail " +"address you submitted. You should be receiving it shortly." +msgstr "" + +#: templates/registration/password_reset_form.html:10 +msgid "" +"Forgotten your password? Enter your e-mail address below, and we'll e-mail " +"instructions for setting a new one." +msgstr "" + +#: templates/registration/password_reset_form.html:15 +msgid "E-mail address:" +msgstr "Adres email:" + +#: templates/registration/password_reset_form.html:16 +msgid "Reset my password" +msgstr "" + +#: templates/registration/registration_form.html:15 +#: templates/registration/registration_form.html:28 +msgid "Registration" +msgstr "Rejestracja" + +#: templates/registration/registration_form.html:33 +msgid "Add user" +msgstr "Dodaj użytkownika" diff --git a/accounts/models.py b/accounts/models.py index b67fc4b..a028ea1 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -2,6 +2,7 @@ from django.db.models import * from django.contrib.auth.models import User, Group +from django.utils.translation import gettext as _ from dictionary.models import Vocabulary, PartOfSpeech MANAGER_GROUPS = ('Obserwator', 'Leksykograf', 'Superleksykograf') @@ -15,16 +16,16 @@ class UserSettings(Model): user = OneToOneField(User) incremental_search = BooleanField( default=True, - verbose_name=u'wyszukiwanie przyrostowe', - help_text=u'Wyszukiwanie odbywa się automatycznie w miarę wpisywania ' - u'szukanego hasła. Sugerujemy wyłączenie w wypadku wolnego ' - u'połączenia internetowego.') + verbose_name=_(u'wyszukiwanie przyrostowe'), + help_text=_(u'Wyszukiwanie odbywa się automatycznie w miarę wpisywania ' + u'szukanego hasła. Sugerujemy wyłączenie w wypadku wolnego ' + u'połączenia internetowego.')) default_owner = ForeignKey( Vocabulary, blank=True, null=True, - verbose_name=u'domyślny słownik właściciel dodawanych leksemów') + verbose_name=_(u'domyślny słownik właściciel dodawanych leksemów')) default_pos = ForeignKey( PartOfSpeech, blank=True, null=True, - verbose_name=u'domyślna część mowy dodawanych leksemów') + verbose_name=_(u'domyślna część mowy dodawanych leksemów')) def views_lexeme(self): return self.user.has_perm('dictionary.view_lexeme') @@ -43,5 +44,5 @@ class UserSettings(Model): class Meta: permissions = ( - ('create_admin', u'Może nadawać dowolne role'), + ('create_admin', _(u'Może nadawać dowolne role')), ) diff --git a/accounts/templates/manage_groups.html b/accounts/templates/manage_groups.html index df7c37f..2f52226 100644 --- a/accounts/templates/manage_groups.html +++ b/accounts/templates/manage_groups.html @@ -1,18 +1,18 @@ {% extends "base.html" %} -{% load ingroup staticfiles %} +{% load ingroup staticfiles i18n %} {% block extrahead %} <script type="text/javascript" src="{% static 'js/manage-groups.js' %}"></script> {% endblock %} -{% block title %}Role użytkowników{% endblock %} +{% block title %}{% trans 'Role użytkowników' %}{% endblock %} {% block content %} - <h3>Role użytkowników</h3> + <h3>{% trans 'Role użytkowników' %}</h3> <table id="user-groups"> <tr> - <th>nazwa</th> + <th>{% trans 'nazwa' %}</th> {% for group in groups %} <th>{{ group.name }}</th> {% endfor %} diff --git a/accounts/templates/registration/activation_complete.html b/accounts/templates/registration/activation_complete.html new file mode 100644 index 0000000..9ff5b3a --- /dev/null +++ b/accounts/templates/registration/activation_complete.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + <h1>{% trans 'Your account is active.' %}</h1> + <p>{% trans 'Now you can log in.' %}</p> +{% endblock %} diff --git a/accounts/templates/registration/activation_email.txt b/accounts/templates/registration/activation_email.txt new file mode 100644 index 0000000..b90fe09 --- /dev/null +++ b/accounts/templates/registration/activation_email.txt @@ -0,0 +1,5 @@ +Hi, + +Thank you for your registration. To activate your account click on the link below : + +<a href="{% url registration_activate activation_key %}">{% url registration_activate activation_key %}</a>. diff --git a/accounts/templates/registration/activation_email_subject.txt b/accounts/templates/registration/activation_email_subject.txt new file mode 100644 index 0000000..ed8a3a9 --- /dev/null +++ b/accounts/templates/registration/activation_email_subject.txt @@ -0,0 +1 @@ +{{ site }}. Confirm your registration \ No newline at end of file diff --git a/accounts/templates/registration/login.html b/accounts/templates/registration/login.html new file mode 100644 index 0000000..712222b --- /dev/null +++ b/accounts/templates/registration/login.html @@ -0,0 +1,39 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block content %} + {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %} + <p class="errornote"> + {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} + </p> + {% endif %} + + {% if form.non_field_errors or form.this_is_the_login_form.errors %} + {% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} + <p class="errornote"> + {{ error }} + </p> + {% endfor %} + {% endif %} + + <div id="content-main"> + <div id="login-box"> + <form action="" method="post" id="login-form">{% csrf_token %} + <table> + {{ form.as_table }} + </table> + <div class="submit-row"> + <label> </label> + <input type="submit" value="{% trans 'Log in' %}"/> + </div> + </form> + + <a href="{% url 'auth_password_reset' %}">{% trans 'I forgot my password' %}</a> + </div> + + <script type="text/javascript"> + document.getElementById('id_username').focus() + </script> + </div> +{% endblock %} diff --git a/accounts/templates/registration/logout.html b/accounts/templates/registration/logout.html new file mode 100644 index 0000000..dbe7467 --- /dev/null +++ b/accounts/templates/registration/logout.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block content %} + + <p>{% trans "Thanks for using our Web site." %}</p> + + <p><a href="{% url 'auth_login' %}">{% trans 'Log in again' %}</a></p> + +{% endblock %} diff --git a/accounts/templates/registration/password_change_done.html b/accounts/templates/registration/password_change_done.html new file mode 100644 index 0000000..3747246 --- /dev/null +++ b/accounts/templates/registration/password_change_done.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block userlinks %}{% trans 'Change password' %} / + <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} + +{% block title %}{% trans 'Password change successful' %}{% endblock %} + +{% block content %} + + <h1>{% trans 'Password change successful' %}</h1> + + <p>{% trans 'Your password was changed.' %}</p> + +{% endblock %} diff --git a/accounts/templates/registration/password_change_form.html b/accounts/templates/registration/password_change_form.html new file mode 100644 index 0000000..f2ea18b --- /dev/null +++ b/accounts/templates/registration/password_change_form.html @@ -0,0 +1,57 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} +{% block userlinks %}{% trans 'Change password' %} / + <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} + +{% block title %}{% trans 'Password change' %}{% endblock %} + +{% block content %} + <div id="content-main"> + + <form action="" method="post">{% csrf_token %} + <div> + {% if form.errors %} + <p class="errornote"> + {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} + </p> + {% endif %} + + <h1>{% trans 'Password change' %}</h1> + + <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> + + <fieldset class="module aligned wide"> + + <div class="form-row"> + {{ form.old_password.errors }} + <label for="id_old_password" + class="required">{% trans 'Old password' %}:</label>{{ form.old_password }} + </div> + + <div class="form-row"> + {{ form.new_password1.errors }} + <label for="id_new_password1" + class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }} + </div> + + <div class="form-row"> + {{ form.new_password2.errors }} + <label for="id_new_password2" + class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }} + </div> + + </fieldset> + + <div class="submit-row"> + <input type="submit" + value="{% trans 'Change my password' %}" + class="default"/> + </div> + + <script type="text/javascript">document.getElementById("id_old_password").focus();</script> + </div> + </form> + </div> + +{% endblock %} diff --git a/accounts/templates/registration/password_reset_complete.html b/accounts/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..63565a3 --- /dev/null +++ b/accounts/templates/registration/password_reset_complete.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans 'Password reset complete' %}{% endblock %} + +{% block content %} + + <h1>{% trans 'Password reset complete' %}</h1> + + <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p> + + <p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p> + +{% endblock %} diff --git a/accounts/templates/registration/password_reset_confirm.html b/accounts/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..41d22ee --- /dev/null +++ b/accounts/templates/registration/password_reset_confirm.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans 'Password reset' %}{% endblock %} + +{% block content %} + + {% if validlink %} + + <h1>{% trans 'Enter new password' %}</h1> + + <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> + + <form action="" method="post">{% csrf_token %} + {{ form.new_password1.errors }} + <p class="aligned wide"><label + for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }} + </p> + {{ form.new_password2.errors }} + <p class="aligned wide"><label + for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }} + </p> + + <p><input type="submit" value="{% trans 'Change my password' %}"/> + </p> + </form> + + {% else %} + + <h1>{% trans 'Password reset unsuccessful' %}</h1> + + <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> + + {% endif %} + +{% endblock %} diff --git a/accounts/templates/registration/password_reset_done.html b/accounts/templates/registration/password_reset_done.html new file mode 100644 index 0000000..bd14f94 --- /dev/null +++ b/accounts/templates/registration/password_reset_done.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans 'Password reset successful' %}{% endblock %} + +{% block content %} + + <h1>{% trans 'Password reset successful' %}</h1> + + <p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p> + +{% endblock %} diff --git a/accounts/templates/registration/password_reset_email.html b/accounts/templates/registration/password_reset_email.html new file mode 100644 index 0000000..c4b4c3f --- /dev/null +++ b/accounts/templates/registration/password_reset_email.html @@ -0,0 +1,19 @@ +{% load i18n %}{% load url from future %}{% autoescape off %} +Szanowny Użytkowniku! + +Ten list jest częścią procedury ustanawiania lub zmiany hasła w systemie +Kuźnia. +Jeżeli fakt, że masz konto w systemie Kuźnia jest dla Ciebie +zaskoczeniem, zechciej ten list uznać za doniesienie, że właśnie +założyliśmy Ci konto. + +Aby wprowadzić nowe hasło, przejdź na następującą stronę: +{% block reset_link %} +{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} +{% endblock %} + +Twoja nazwa użytkownika: {{ user.username }} + +Z wyrazami szacunku +Zespół Kuźni +{% endautoescape %} diff --git a/accounts/templates/registration/password_reset_form.html b/accounts/templates/registration/password_reset_form.html new file mode 100644 index 0000000..bdf9f1b --- /dev/null +++ b/accounts/templates/registration/password_reset_form.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans "Password reset" %}{% endblock %} + +{% block content %} + + <h1>{% trans "Password reset" %}</h1> + + <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p> + + <form action="" method="post">{% csrf_token %} + {{ form.email.errors }} + <p><label + for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} + <input type="submit" value="{% trans 'Reset my password' %}"/></p> + </form> + +{% endblock %} diff --git a/accounts/templates/registration/registration_complete.html b/accounts/templates/registration/registration_complete.html new file mode 100644 index 0000000..a460c34 --- /dev/null +++ b/accounts/templates/registration/registration_complete.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + <h1>Rejestracja zakończona</h1> + <p>Pomyślnie dodano użytkownika, wysłano email.</p> +{% endblock %} diff --git a/accounts/templates/registration/registration_form.html b/accounts/templates/registration/registration_form.html new file mode 100644 index 0000000..68746f1 --- /dev/null +++ b/accounts/templates/registration/registration_form.html @@ -0,0 +1,41 @@ +{% extends "base.html" %} +{% load i18n %} +{% load url from future %} + +{% block extrahead %} + <style> + label { + vertical-align: top; + width: 100px; + display: inline-block; + } + </style> +{% endblock %} + +{% block title %}{% trans 'Registration' %}{% endblock %} + +{% block content %} + <div id="content-main"> + + <form action="" method="post">{% csrf_token %} + <div> + {% if form.errors %} + <p class="errornote"> + {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} + </p> + {% endif %} + + <h1>{% trans 'Registration' %}</h1> + + {{ form.as_p }} + + <div class="submit-row"> + <input type="submit" value="{% trans 'Add user' %}" + class="default"/> + </div> + + </div> + </form> + </div> + +{% endblock %} diff --git a/accounts/templates/settings.html b/accounts/templates/settings.html index db5f7a5..a2e6872 100644 --- a/accounts/templates/settings.html +++ b/accounts/templates/settings.html @@ -1,10 +1,10 @@ {% extends "base.html" %} -{% load url from future %} +{% load i18n %} -{% block title %}Ustawienia{% endblock %} +{% block title %}{% trans 'Ustawienia' %}{% endblock %} {% block content %} - <h1>Ustawienia użytkownika</h1> + <h1>{% trans 'Ustawienia użytkownika' %}</h1> <form method="post" action=""> {{ form.as_p }} {% csrf_token %} @@ -14,6 +14,6 @@ </button> </form> <p> - <a href="{% url 'auth_password_change' %}">Zmiana hasła</a> + <a href="{% url 'auth_password_change' %}">{% trans 'Zmiana hasła' %}</a> </p> {% endblock %} diff --git a/common/django_patch.py b/common/django_patch.py new file mode 100644 index 0000000..ff54433 --- /dev/null +++ b/common/django_patch.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- + +import os +import gettext as gettext_module + +from django.conf import settings +from django.utils import importlib +from django.utils.translation import check_for_language, to_locale, get_language +from django.utils._os import upath +from django.utils import six +from django.views.i18n import render_javascript_catalog + + +# copypasta z django.views.i18n +# jedyne zmiany to wykomentowany fragment i dodana jedna pętla zamiast +def get_javascript_catalog(locale, domain, packages): + default_locale = to_locale(settings.LANGUAGE_CODE) + packages = [p for p in packages if p == 'django.conf' or p in settings.INSTALLED_APPS] + t = {} + paths = [] + en_selected = locale.startswith('en') + en_catalog_missing = True + # paths of requested packages + for package in packages: + p = importlib.import_module(package) + path = os.path.join(os.path.dirname(upath(p.__file__)), 'locale') + paths.append(path) + # add the filesystem paths listed in the LOCALE_PATHS setting + paths.extend(list(reversed(settings.LOCALE_PATHS))) + # # first load all english languages files for defaults + # for path in paths: + # try: + # catalog = gettext_module.translation(domain, path, ['en']) + # t.update(catalog._catalog) + # except IOError: + # pass + # else: + # # 'en' is the selected language and at least one of the packages + # # listed in `packages` has an 'en' catalog + # if en_selected: + # en_catalog_missing = False + # next load the settings.LANGUAGE_CODE translations if it isn't english + # if default_locale != 'en': + # for path in paths: + # try: + # catalog = gettext_module.translation(domain, path, [default_locale]) + # except IOError: + # catalog = None + # if catalog is not None: + # t.update(catalog._catalog) + # # last load the currently selected language, if it isn't identical to the default. + # if locale != default_locale: + # # If the currently selected language is English but it doesn't have a + # # translation catalog (presumably due to being the language translated + # # from) then a wrong language catalog might have been loaded in the + # # previous step. It needs to be discarded. + # if en_selected and en_catalog_missing: + # t = {} + # else: + # locale_t = {} + # for path in paths: + # try: + # catalog = gettext_module.translation(domain, path, [locale]) + # except IOError: + # catalog = None + # if catalog is not None: + # locale_t.update(catalog._catalog) + # if locale_t: + # t = locale_t + for path in paths: + try: + catalog = gettext_module.translation(domain, path, [locale]) + except IOError: + catalog = None + if catalog is not None: + t.update(catalog._catalog) + + plural = None + if '' in t: + for l in t[''].split('\n'): + if l.startswith('Plural-Forms:'): + plural = l.split(':', 1)[1].strip() + if plural is not None: + # this should actually be a compiled function of a typical plural-form: + # Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2; + plural = [el.strip() for el in plural.split(';') if el.strip().startswith('plural=')][0].split('=', 1)[1] + + pdict = {} + maxcnts = {} + catalog = {} + for k, v in t.items(): + if k == '': + continue + if isinstance(k, six.string_types): + catalog[k] = v + elif isinstance(k, tuple): + msgid = k[0] + cnt = k[1] + maxcnts[msgid] = max(cnt, maxcnts.get(msgid, 0)) + pdict.setdefault(msgid, {})[cnt] = v + else: + raise TypeError(k) + for k, v in pdict.items(): + catalog[k] = [v.get(i, '') for i in range(maxcnts[msgid] + 1)] + + return catalog, plural + + +def javascript_catalog(request, domain='djangojs', packages=None): + """ + Returns the selected language catalog as a javascript library. + + Receives the list of packages to check for translations in the + packages parameter either from an infodict or as a +-delimited + string from the request. Default is 'django.conf'. + + Additionally you can override the gettext domain for this view, + but usually you don't want to do that, as JavaScript messages + go to the djangojs domain. But this might be needed if you + deliver your JavaScript source from Django templates. + """ + locale = to_locale(get_language()) + + if request.GET and 'language' in request.GET: + if check_for_language(request.GET['language']): + locale = to_locale(request.GET['language']) + + if packages is None: + packages = ['django.conf'] + if isinstance(packages, six.string_types): + packages = packages.split('+') + + catalog, plural = get_javascript_catalog(locale, domain, packages) + return render_javascript_catalog(catalog, plural) diff --git a/common/forms.py b/common/forms.py index f9ea9dc..507b74a 100644 --- a/common/forms.py +++ b/common/forms.py @@ -14,7 +14,8 @@ def remove_holddown(form, fields): """This removes the unhelpful "Hold down the...." help texts for the specified fields for a form.""" remove_message = unicode( - _('Hold down "Control", or "Command" on a Mac, to select more than one.')) + _('Hold down "Control", or "Command" on a Mac, ' + 'to select more than one.')) for field in fields: if field in form.base_fields: if form.base_fields[field].help_text: @@ -28,4 +29,4 @@ def disable_field(field): if type(field.widget) in (Textarea, TextInput): field.widget.attrs['readonly'] = 'readonly' else: - field.widget.attrs['disabled'] = 'disabled' \ No newline at end of file + field.widget.attrs['disabled'] = 'disabled' diff --git a/common/locale/en/LC_MESSAGES/django.po b/common/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..af1dbfe --- /dev/null +++ b/common/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,63 @@ +# English translation of the common module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:17 +msgid "" +"Hold down \"Control\", or \"Command\" on a Mac, to select more than one." +msgstr "" + +#: util.py:140 +msgid "%d.%m.%Y %H:%M" +msgstr "%Y/%m/%d %I:%M %p" + +#: util.py:144 +msgid "%d.%m.%Y %H:%M:%S.%f" +msgstr "%Y/%m/%d %I:%M:%S.%f %p" + +#: templates/404.html:4 +msgid "Błąd 404: nie znaleziono pliku" +msgstr "Error 404: File Not Found" + +#: templates/404.html:7 +msgid "Błąd: wybrano błędny adres." +msgstr "Error: wrong address entered" + +#: templates/base.html:68 +msgid "Ustawienia" +msgstr "Settings" + +#: templates/base.html:70 +msgid "Wyloguj się" +msgstr "Log out" + +#: templates/main_menu.html:4 templates/main_menu.html.py:7 +msgid "Leksemy" +msgstr "Lexemes" + +#: templates/main_menu.html:10 +msgid "Wzory" +msgstr "Patterns" + +#: templates/main_menu.html:18 +msgid "Historia" +msgstr "History" + +#: templates/main_menu.html:27 +msgid "Administracja" +msgstr "Administration" diff --git a/common/locale/en/LC_MESSAGES/djangojs.po b/common/locale/en/LC_MESSAGES/djangojs.po index 3840c0e..a030d8f 100644 --- a/common/locale/en/LC_MESSAGES/djangojs.po +++ b/common/locale/en/LC_MESSAGES/djangojs.po @@ -1,15 +1,34 @@ -# common.js:188 +# English translation of the common module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: static/js/common.js:188 msgid "Sesja wygasła — zaloguj się i spróbuj ponownie." msgstr "Session expired – log in and try again." -# common.js:192 +#: static/js/common.js:192 msgid "Odmowa dostępu — brak uprawnień." msgstr "Access denied — insufficient permissions" -# common.js:195 +#: static/js/common.js:195 msgid "Żądanie" msgstr "Request" -# common.js:196 +#: static/js/common.js:196 msgid "nie powiodło się" -msgstr "failed" \ No newline at end of file +msgstr "failed" diff --git a/common/locale/pl/LC_MESSAGES/django.po b/common/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..50370c7 --- /dev/null +++ b/common/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: forms.py:17 +msgid "" +"Hold down \"Control\", or \"Command\" on a Mac, to select more than one." +msgstr "" + +#: util.py:140 +msgid "%d.%m.%Y %H:%M" +msgstr "" + +#: util.py:144 +msgid "%d.%m.%Y %H:%M:%S.%f" +msgstr "" + +#: templates/404.html:4 +msgid "Błąd 404: nie znaleziono pliku" +msgstr "" + +#: templates/404.html:7 +msgid "Błąd: wybrano błędny adres." +msgstr "" + +#: templates/base.html:68 +msgid "Ustawienia" +msgstr "" + +#: templates/base.html:70 +msgid "Wyloguj się" +msgstr "" + +#: templates/main_menu.html:4 templates/main_menu.html.py:7 +msgid "Leksemy" +msgstr "" + +#: templates/main_menu.html:10 +msgid "Wzory" +msgstr "" + +#: templates/main_menu.html:18 +msgid "Historia" +msgstr "" + +#: templates/main_menu.html:27 +msgid "Administracja" +msgstr "" diff --git a/common/locale/pl/LC_MESSAGES/djangojs.po b/common/locale/pl/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..868ce26 --- /dev/null +++ b/common/locale/pl/LC_MESSAGES/djangojs.po @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: static/js/common.js:188 +msgid "Sesja wygasła — zaloguj się i spróbuj ponownie." +msgstr "" + +#: static/js/common.js:192 +msgid "Odmowa dostępu — brak uprawnień." +msgstr "" + +#: static/js/common.js:195 +msgid "Żądanie" +msgstr "" + +#: static/js/common.js:196 +msgid "nie powiodło się" +msgstr "" diff --git a/common/templates/404.html b/common/templates/404.html new file mode 100644 index 0000000..5ac7a20 --- /dev/null +++ b/common/templates/404.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% load staticfiles i18n %} + +{% block title %}{% trans 'Błąd 404: nie znaleziono pliku' %}{% endblock %} + +{% block content %} + <p style="font-size: large;">{% trans 'Błąd: wybrano błędny adres.' %}</p> +{% endblock %} diff --git a/common/templates/base.html b/common/templates/base.html new file mode 100644 index 0000000..57f3e1a --- /dev/null +++ b/common/templates/base.html @@ -0,0 +1,109 @@ +{% load staticfiles %}<!DOCTYPE HTML> +<html> +<head> + <title>{% block title %}{% endblock %}</title> + <meta http-equiv="content-type" content="text/html; charset=utf-8"/> + <link rel="shortcut icon" href="{% static 'forge.ico' %}" + type="image/x-icon"/> + <script type="text/javascript" + src="{% static 'js/lib/jquery-1.10.2.js' %}"></script> + <script type="text/javascript" + src="{% static 'js/lib/jquery.json-2.2.min.js' %}"></script> + <script type="text/javascript" + src="{% static 'js/lib/jquery-ui-1.11.2.custom.min.js' %}"></script> + <script type="text/javascript" + src="{% static 'js/lib/jquery.ui.datepicker-pl.js' %}"></script> + <script type="text/javascript" + src="{% static 'js/lib/jquery.multiselect.js' %}"></script> + <script type="text/javascript"> + $.fn.multiselect2 = $.fn.multiselect; + </script> + <script type="text/javascript" src="{% url 'jsi18n' %}"></script> + <script type="text/javascript" + src="{% static 'js/base-layout.js' %}"></script> + <script type="text/javascript" src="{% static 'js/common.js' %}"></script> + {% if paginer %} + <script type="text/javascript" + src="{% static 'js/paginer.js' %}"></script> + {% endif %} + {% load script jsonify %} + {% script %} + var $dj = {}; + {% for name,var in js_vars.iteritems %} + $dj.{{ name }} = {{ var|jsonify }}; + {% endfor %} + {% endscript %} + <link rel="stylesheet" + href="{% static 'css/lib/smoothness/jquery-ui-1.11.2.custom.css' %}" + type="text/css" media="screen" charset="utf-8"/> + <link rel="stylesheet" type="text/css" + href="{% static 'css/lib/jquery.multiselect.css' %}"/> + <link rel="stylesheet" href="{% static 'css/general.css' %}" type="text/css" + media="screen" charset="utf-8"/> + <link rel="stylesheet" href="{% static 'css/inflection_table.css' %}" + type="text/css" media="screen" charset="utf-8"/> + {% block extrahead %}{% endblock %} +</head> +{% load i18n %} + +<body> + +<!-- Container --> +<!--div id="container"--> + +<!-- Header --> +<div id="header"> + <div id="branding"> + {% block branding %}{% endblock %} + </div> + {% if user.is_active %} + <div id="user-tools"> + {# if debug #} + <span id="show-debug">debug <span id="hide-debug">⨯</span></span> + {# endif #} + <strong>{% filter force_escape %} + {{ user.username }}{% endfilter %}</strong> + {% block userlinks %} + <a href="{% url 'settings' %}"> + {% trans 'Ustawienia' %}</a> / + <a href="{% url 'auth_logout' %}"> + {% trans 'Wyloguj się' %}</a> + {% endblock %} + </div> + {% endif %} + {% include 'main_menu.html' %} + {% block nav-global %}{% endblock %} + + {% if messages %} + <ul class="messagelist">{% for message in messages %} + <li{% if message.tags %} + class="{{ message.tags }}"{% endif %}>{{ message }}</li> + {% endfor %}</ul> + {% endif %} +</div> +<!-- END Header --> +<!-- Content --> +<div id="content"> + {% block pretitle %}{% endblock %} + {% block content_title %}{% if title %}<h1>{{ title }}</h1> + {% endif %}{% endblock %} + {% block content %} + {% block object-tools %}{% endblock %} + {{ content }} + {% endblock %} + {% block sidebar %}{% endblock %} +</div> +<!-- END Content --> + +{% block footer %} + <div id="footer"></div>{% endblock %} +{% block modal_elements %}{% endblock %} +{# if debug #} +<iframe id="debug"> +</iframe> +{# endif #} +<!--/div--> +<!-- END Container --> + +</body> +</html> diff --git a/common/templates/main_menu.html b/common/templates/main_menu.html new file mode 100644 index 0000000..8fcc39f --- /dev/null +++ b/common/templates/main_menu.html @@ -0,0 +1,27 @@ +{% load i18n %} +<ul id="main_menu"> + {% if not user.is_authenticated %} + <li><a href="{% url 'reader_view' %}">{% trans 'Leksemy' %}</a></li> + {% endif %} + {% if perms.dictionary.view_lexeme %} + <li><a href="{% url 'lexeme_view' %}">{% trans 'Leksemy' %}</a></li> + {% endif %} + {% if perms.dictionary.view_pattern %} + <li><a href="{% url 'pattern_view' %}">{% trans 'Wzory' %}</a></li> + {% endif %} + {% if user.is_authenticated %} + {% comment %} + <li><a href="{% url 'tasks' %}">{% trans 'Zadania' %}</a></li> + <li><a href="{% url 'reports' %}">{% trans 'Raporty' %}</a></li> + {% endcomment %} + <li><a href="{% url 'history_view' %}">{% trans 'Historia' %}</a></li> + {% endif %} + {% comment %} + {% if perms.dictionary.export_lexemes %} + <li><a href="{% url 'export' %}">{% trans 'Eksport' %}</a></li> + {% endif %} + {% endcomment %} + {% if perms.dictionary.manage_vocabulary or perms.auth.add_user %} + <li><a href="{% url 'management_menu' %}">{% trans 'Administracja' %}</a></li> + {% endif %} +</ul> diff --git a/common/urls.py b/common/urls.py index d26fe2c..ee32b58 100644 --- a/common/urls.py +++ b/common/urls.py @@ -8,6 +8,6 @@ js_info_dict = { urlpatterns = patterns( '', - (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict, + (r'^jsi18n/$', 'common.django_patch.javascript_catalog', js_info_dict, 'jsi18n'), ) diff --git a/common/util.py b/common/util.py index a5fe3cb..dcf69b8 100644 --- a/common/util.py +++ b/common/util.py @@ -4,6 +4,7 @@ import json import sys from django.conf import urls from django.http import HttpResponseRedirect +from django.utils.translation import ugettext_lazy as _ def uniopen(filename): @@ -18,14 +19,14 @@ def debug(entry, text): print>> sys.stderr, (u'%s: %s' % (entry, text)).encode() -def error_redirect(request, error, url='/'): +def error_redirect(request, error, redirect_url='/'): request.session['error'] = error - return HttpResponseRedirect(url) + return HttpResponseRedirect(redirect_url) -def message_redirect(request, message, url='/'): +def message_redirect(request, message, redirect_url='/'): request.session['message'] = message - return HttpResponseRedirect(url) + return HttpResponseRedirect(redirect_url) def make_form(request, form_class, **kwargs): @@ -136,8 +137,8 @@ class FakeQueryset(list): def format_date(date): - return date.strftime('%d.%m.%Y %H:%M') + return date.strftime(_('%d.%m.%Y %H:%M')) def format_date_exact(date): - return date.strftime('%d.%m.%Y %H:%M:%S.%f') \ No newline at end of file + return date.strftime(_('%d.%m.%Y %H:%M:%S.%f')) diff --git a/dictionary/ajax_lexeme_view.py b/dictionary/ajax_lexeme_view.py index 954e396..9d70990 100644 --- a/dictionary/ajax_lexeme_view.py +++ b/dictionary/ajax_lexeme_view.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- import datetime -from django.contrib.auth.models import User from django.core.cache import cache +from django.utils.translation import ugettext as _ from django.db.models import Max + from dictionary.ajax_lexeme_slickgrid import LexemeQuery from dictionary.auto_derivatives import lexeme_derivatives, create_derivative from dictionary.models import Lexeme, LexemeInflectionPattern, PartOfSpeech, \ @@ -222,7 +223,7 @@ def new_lip_edit_row(request, lexeme_id, pos_id, num): if not l.perm(request.user, 'change'): raise AjaxError('access denied') if not pos_id: - raise AjaxError(u'Nieokreślona część mowy.') + raise AjaxError(_(u'Nieokreślona część mowy.')) pos = PartOfSpeech.objects.get(pk=pos_id) lip_form = LIPEditForm( part_of_speech=pos, prefix='lip_add_%s' % num, user=request.user) @@ -341,7 +342,7 @@ def update_lexeme(request, form_data): lip.root = l.get_root(lip.pattern, lip.gender) if lip.root is None: raise AjaxError( - u'Niepasujące zakończenie formy podstawowej.') + _(u'Niepasujące zakończenie formy podstawowej.')) for qualifier in lip_form.fields['qualifiers'].queryset: qualifier.set_for( lip, qualifier in lip_form.cleaned_data['qualifiers']) @@ -356,7 +357,7 @@ def update_lexeme(request, form_data): else: raise AjaxError(error_messages(cr_form)) if len(submitted_lips) == 0 and l.status != Lexeme.STATUS_CANDIDATE: - raise AjaxError(u'Wybierz odmianę lub ustaw status "kandydat".') + raise AjaxError(_(u'Wybierz odmianę lub ustaw status „kandydat”.')) extra_attrs = l.attributes() for attr in extra_attrs: @@ -424,7 +425,7 @@ def create_derivatives(request, lexeme_id, chosen_derivatives): pos = der_data['pos'] entry = der_data['entry'] if entry == '': - raise AjaxError(u'Nie wpisano hasła') + raise AjaxError(_(u'Nie wpisano hasła')) new_lexemes = create_derivative( lexeme, pos, entry, pl=der_data.get('pl'), index=der_data['index']) @@ -519,7 +520,7 @@ def create_lexeme(request): owner = editable[0] pos_id = request.user.usersettings.default_pos_id or 'subst' if not owner: - raise AjaxError(u'Nie wybrano słownika właściciela') + raise AjaxError(_(u'Nie wybrano słownika właściciela')) if request.user not in owner.all_editors(): raise AjaxError('access denied') next_id = Lexeme.all_objects.filter( @@ -585,19 +586,18 @@ def cr_homonyms(request, entry, cr_type): entry=entry, part_of_speech=pos, vocabularies__in=visible_vocabs) aspect = LexemeAttribute.objects.get(name=u'aspekt') if pos in aspect.parts_of_speech.all(): - labels = (u'Nr hom.', u'Aspekt', u'Wzór') - aspect = LexemeAttribute.objects.get(name=u'aspekt') + labels = (_(u'Nr hom.'), _(u'Aspekt'), _(u'Wzór')) make_row = lambda lexeme, lip_data: ( lexeme.homonym_number, lexeme.attribute_value(aspect).value if lexeme.attribute_value(aspect) else '', lip_data['patterns']) elif pos.lexical_class_id == 'subst': - labels = (u'Nr hom.', u'Rodzaj', u'Wzór') + labels = (_(u'Nr hom.'), _(u'Rodzaj'), _(u'Wzór')) make_row = lambda lexeme, lip_data: ( lexeme.homonym_number, lip_data['genders'], lip_data['patterns']) else: - labels = (u'Nr hom.', u'Wzór') + labels = (_(u'Nr hom.'), _(u'Wzór')) make_row = lambda lexeme, lip_data: ( lexeme.homonym_number, lip_data['patterns']) lexemes_data = [ @@ -659,48 +659,3 @@ def execute_group_actions(request, actions, filter): def save_columns(request, columns): request.session['columns'] = columns return {} - - -@ajax(method='post') -def add_vocabulary(request, name): - if not request.user.has_perm('dictionary.manage_vocabulary'): - raise AjaxError('access denied') - if not name: - raise AjaxError(u'nazwa słownika nie może być pusta!') - if Vocabulary.objects.filter(id=name): - raise AjaxError(u'słownik o tej nazwie już istnieje!') - vocab = Vocabulary.objects.create(id=name) - vocab.managers.add(request.user) # add - return {} - - -# nieużywane -@ajax(method='get') -def vocabulary_permissions(request, vocab_id): - if not request.user.has_perm('dictionary.manage_vocabulary'): - raise AjaxError('access denied') - vocab = Vocabulary.objects.get(id=vocab_id) - return { - 'managers': list(vocab.all_managers().values_list('pk', flat=True)), - 'viewers': list(vocab.all_viewers().values_list('pk', flat=True)), - 'editors': list(vocab.editors.values_list('pk', flat=True)), - } - - -@ajax(method='post') -def set_vocabulary_permission(request, name, user_id, perm, on): - if not request.user.has_perm('dictionary.manage_vocabulary'): - raise AjaxError('access denied') - vocab = Vocabulary.objects.get(id=name) - user = User.objects.get(pk=user_id) - if perm == 'view': - related_manager = vocab.viewers - elif perm == 'change': - related_manager = vocab.editors - else: # type == 'manage' - related_manager = vocab.managers - if on: - related_manager.add(user) # add - else: - related_manager.remove(user) # add - return {} \ No newline at end of file diff --git a/dictionary/forms.py b/dictionary/forms.py index 577eab1..8934b5b 100644 --- a/dictionary/forms.py +++ b/dictionary/forms.py @@ -4,6 +4,7 @@ from django.core.exceptions import ValidationError from django.forms import Textarea, TextInput, ModelMultipleChoiceField, \ ModelChoiceField, ModelForm, Form, CharField, SelectMultiple, Select, \ TypedMultipleChoiceField, HiddenInput, IntegerField, ChoiceField +from django.utils.translation import ugettext_lazy as _ from common.forms import disable_field from common.util import GroupDict @@ -70,10 +71,10 @@ class LexemeEditForm(ModelForm): vocabularies = ModelMultipleChoiceField( queryset=Vocabulary.objects.none(), required=False) style_qualifiers = QualifiersField( - required=False, label='kwal styl.', + required=False, label=_(u'kwal. styl.'), widget=SelectMultiple(attrs={'class': 'qualifiers'})) scope_qualifiers = QualifiersField( - required=False, label='kwal. zakr.', + required=False, label=_(u'kwal. zakr.'), widget=SelectMultiple(attrs={'class': 'qualifiers'})) new_owner = ModelChoiceField( queryset=Vocabulary.objects.none(), required=False) @@ -107,7 +108,7 @@ class LexemeEditForm(ModelForm): def clean_entry(self): entry = self.cleaned_data['entry'] if ' ' in entry: - raise ValidationError(u'niedozwolona spacja') + raise ValidationError(_(u'niedozwolona spacja')) return entry def clean_comment(self): @@ -201,9 +202,9 @@ class LexemeMultipleAttributeForm(LexemeAttributeForm): class LIPEditForm(ModelForm): pattern_name = CharField(widget=TextInput( - attrs={'class': 'pattern', 'size': '10'}), label=u'Wzór') + attrs={'class': 'pattern', 'size': '10'}), label=_(u'Wzór')) qualifiers = QualifiersField( - required=False, label=u'Kwal.', + required=False, label=_(u'Kwal.'), widget=SelectMultiple(attrs={'class': 'lip-qualifiers'})) lexical_class = CharField(widget=HiddenInput(), label=u'') @@ -231,10 +232,10 @@ class LIPEditForm(ModelForm): try: pattern = Pattern.objects.get(name=cleaned_data['pattern_name']) except Pattern.DoesNotExist: - raise ValidationError(u'Niepoprawna nazwa wzoru.') + raise ValidationError(_(u'Niepoprawna nazwa wzoru.')) lc = cleaned_data['lexical_class'] if pattern.type.lexical_class_id != lc: - raise ValidationError(u'Wzór nie pasuje do części mowy.') + raise ValidationError(_(u'Wzór nie pasuje do części mowy.')) cleaned_data['pattern'] = pattern return cleaned_data @@ -252,7 +253,8 @@ class LIPEditForm(ModelForm): fields = ['gender', 'pronunciation'] widgets = { 'gender': Select(attrs={'class': 'gender'}), - 'pronunciation': TextInput(attrs={'class': 'lip-pronunciation-field'}), + 'pronunciation': TextInput( + attrs={'class': 'lip-pronunciation-field'}), } @@ -275,12 +277,12 @@ class ClassificationForm(Form): class CrossReferenceForm(ModelForm): - entry = CharField(label=u'hasło', widget=TextInput(attrs={ + entry = CharField(label=_(u'hasło'), widget=TextInput(attrs={ 'class': 'entry', 'size': 12, })) homonym_number = IntegerField( - label=u'hom.', + label=_(u'hom.'), widget=TextInput(attrs={ 'class': 'homonym-number', 'readonly': 'readonly', @@ -307,13 +309,14 @@ class CrossReferenceForm(ModelForm): to_lexeme = Lexeme.objects.get( entry=entry, homonym_number=hom, part_of_speech=cr_type.to_pos) except Lexeme.DoesNotExist: - raise ValidationError(u'Wybrany leksem nie istnieje.') + raise ValidationError(_(u'Wybrany leksem nie istnieje.')) except Lexeme.MultipleObjectsReturned: # jeśli się zdarzy, to jest niespójność w danych - raise ValidationError(u'Niejednoznaczny numer homonimu!') + raise ValidationError(_(u'Niejednoznaczny numer homonimu!')) if from_lexeme and to_lexeme and cr_type: if cr_type.from_pos != from_lexeme.part_of_speech: - raise ValidationError(u'Nieprawidłowa część mowy w odsyłaczu.') + raise ValidationError( + _(u'Nieprawidłowa część mowy w odsyłaczu.')) cleaned_data['to_lexeme'] = to_lexeme return cleaned_data @@ -336,14 +339,14 @@ class CrossReferenceForm(ModelForm): # dynamic actions ADD_REMOVE_CHOICES = ( - ('add', u'Dodaj'), - ('remove', u'Usuń'), + ('add', _(u'Dodaj')), + ('remove', _(u'Usuń')), ) class StatusActionForm(Form): action = ChoiceField( - choices=[('set', u'ustaw')], label=u'', + choices=[('set', _(u'ustaw'))], label=u'', widget=Select(attrs={'class': 'action-choice'})) @@ -390,16 +393,17 @@ class LexemeQualifierValueForm(Form): ACTION_FIELDS = ( ( 'status', - (u'Status', StatusActionForm, StatusValueForm) + (_(u'Status'), StatusActionForm, StatusValueForm) ), ( 'using_vocabulary', - (u'Słownik używający', UsingVocabularyActionForm, VocabularyValueForm) + (_(u'Słownik używający'), UsingVocabularyActionForm, + VocabularyValueForm) ), ( 'lexeme_qualifier', ( - u'Kwalifikator leksemu', + _(u'Kwalifikator leksemu'), LexemeQualifierActionForm, LexemeQualifierValueForm ) ), @@ -409,4 +413,4 @@ ACTION_FIELDS = ( class ActionFieldForm(Form): field = ChoiceField( choices=[(id, data[0]) for id, data in ACTION_FIELDS], label=u'', - widget=Select(attrs={'class': 'field-choice'})) \ No newline at end of file + widget=Select(attrs={'class': 'field-choice'})) diff --git a/dictionary/locale/en/LC_MESSAGES/django.po b/dictionary/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..ed557f4 --- /dev/null +++ b/dictionary/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,552 @@ +# English translation of the dictionary module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ajax_lexeme_view.py:226 +msgid "Nieokreślona część mowy." +msgstr "Unspecified part of speech." + +#: ajax_lexeme_view.py:345 +msgid "Niepasujące zakończenie formy podstawowej." +msgstr "Basic form ending doesn't match the pattern" + +#: ajax_lexeme_view.py:360 +msgid "Wybierz odmianę lub ustaw status „kandydat”." +msgstr "Enter inflection or set “candidate” status" + +#: ajax_lexeme_view.py:428 +msgid "Nie wpisano hasła" +msgstr "Empty entry" + +#: ajax_lexeme_view.py:523 +msgid "Nie wybrano słownika właściciela" +msgstr "Empty owner dictionary" + +#: ajax_lexeme_view.py:589 ajax_lexeme_view.py:596 ajax_lexeme_view.py:600 +#: templates/lexeme_view.html:126 +msgid "Nr hom." +msgstr "Hom. №" + +#: ajax_lexeme_view.py:589 +msgid "Aspekt" +msgstr "Aspect" + +#: ajax_lexeme_view.py:589 ajax_lexeme_view.py:596 ajax_lexeme_view.py:600 +#: forms.py:205 templates/lexeme_view.html:128 +msgid "Wzór" +msgstr "Pattern" + +#: ajax_lexeme_view.py:596 templates/lexeme_view.html:127 +msgid "Rodzaj" +msgstr "Gender" + +#: forms.py:74 models.py:479 +msgid "kwal. styl." +msgstr "styl. qual." + +#: forms.py:77 models.py:480 +msgid "kwal. zakr." +msgstr "scope qual." + +#: forms.py:111 +msgid "niedozwolona spacja" +msgstr "space is not allowed in entry" + +#: forms.py:207 +msgid "Kwal." +msgstr "Qual." + +#: forms.py:235 +msgid "Niepoprawna nazwa wzoru." +msgstr "Incorrect pattern name." + +#: forms.py:238 +msgid "Wzór nie pasuje do części mowy." +msgstr "The pattern doesn't match the part of speech" + +#: forms.py:280 models.py:451 +msgid "hasło" +msgstr "entry" + +#: forms.py:285 +msgid "hom." +msgstr "hom." + +#: forms.py:312 +msgid "Wybrany leksem nie istnieje." +msgstr "Chosen lexeme doesn't exist." + +#: forms.py:315 +msgid "Niejednoznaczny numer homonimu!" +msgstr "Ambiguous homonym number!" + +#: forms.py:319 +msgid "Nieprawidłowa część mowy w odsyłaczu." +msgstr "Incorrect part of speech in cross-reference." + +#: forms.py:342 +msgid "Dodaj" +msgstr "Add" + +#: forms.py:343 +msgid "Usuń" +msgstr "Remove" + +#: forms.py:349 +msgid "ustaw" +msgstr "set" + +#: forms.py:396 +msgid "Status" +msgstr "Status" + +#: forms.py:400 +msgid "Słownik używający" +msgstr "Using dictionary" + +#: forms.py:406 +msgid "Kwalifikator leksemu" +msgstr "Lexeme qualifier" + +#: models.py:68 models.py:101 models.py:325 +msgid "nazwa" +msgstr "name" + +#: models.py:70 models.py:105 +msgid "słownik" +msgstr "dictionary" + +#: models.py:96 +msgid "stylistyczny" +msgstr "stylistic" + +#: models.py:97 +msgid "zakresowy" +msgstr "scope" + +#: models.py:98 +msgid "przy formach" +msgstr "at forms" + +#: models.py:103 models.py:329 models.py:1117 +msgid "typ" +msgstr "type" + +#: models.py:109 +msgid "klasa wykluczania" +msgstr "exclusion class" + +#: models.py:153 +msgid "nazwa klasyfikacji" +msgstr "classification name" + +#: models.py:188 +msgid "nazwa wartości" +msgstr "value name" + +#: models.py:193 +msgid "rodzic wartości" +msgstr "parent value" + +#: models.py:287 +msgid "typ odmiany" +msgstr "inflection type" + +#: models.py:291 +msgid "typ wzoru" +msgstr "pattern type" + +#: models.py:321 +msgid "nowy" +msgstr "new" + +#: models.py:322 +msgid "tymczasowy" +msgstr "temporary" + +#: models.py:327 +msgid "stara nazwa" +msgstr "old name" + +#: models.py:332 +msgid "przykład" +msgstr "example" + +#: models.py:336 +msgid "zakończenie formy podstawowej" +msgstr "basic form ending" + +#: models.py:338 +msgid "status" +msgstr "status" + +#: models.py:340 models.py:484 +msgid "komentarz" +msgstr "comment" + +#: models.py:374 +msgid "Może oglądać wzory" +msgstr "Can view patterns" + +#: models.py:444 +msgid "kandydat" +msgstr "candidate" + +#: models.py:445 +msgid "wprowadzony" +msgstr "entered" + +#: models.py:446 +msgid "zatwierdzony" +msgstr "confirmed" + +#: models.py:457 +msgid "sufiks hasła" +msgstr "entry suffix" + +#: models.py:458 +msgid "glosa" +msgstr "gloss" + +#: models.py:459 +msgid "nota" +msgstr "note" + +#: models.py:460 +msgid "nota rozszerzona" +msgstr "extended note" + +#: models.py:462 models.py:867 +msgid "wymowa" +msgstr "pronunciation" + +#: models.py:463 +msgid "łączliwość" +msgstr "valence" + +#: models.py:466 +msgid "cz. mowy" +msgstr "part of speech" + +#: models.py:471 +msgid "źródło" +msgstr "source" + +#: models.py:474 +msgid "źródło zapożyczenia" +msgstr "borrowing source" + +#: models.py:478 +msgid "kwal. z Dor." +msgstr "Dor. qual." + +#: models.py:482 templates/lexeme_edit_form.html:104 +msgid "specjalistyczny" +msgstr "specialist" + +#: models.py:760 +msgid "Może oglądać leksemy" +msgstr "Can view lexemes" + +#: models.py:761 +msgid "Może oglądać wszystkie leksemy" +msgstr "Can view all lexemes" + +#: models.py:763 +msgid "Ważniejszy głos przy modyfikowaniu leksemów" +msgstr "Decisive lexeme modifications" + +#: models.py:764 +msgid "Może eksportować leksemy" +msgstr "Can export lexemes" + +#: models.py:860 +msgid "wzór" +msgstr "pattern" + +#: models.py:862 +msgid "rodzaj" +msgstr "gender" + +#: models.py:1040 +msgid "Może zarządzać słownikami" +msgstr "Can manage dictionaries" + +#: models.py:1041 +msgid "Zarządza wszystkimi słownikami" +msgstr "Manages all dictionaries" + +#: models.py:1115 +msgid "nr docelowy" +msgstr "targer number" + +#: reports.py:20 +msgid "Brak odsyłacza do czasownika" +msgstr "No cross-reference to the verb" + +#: reports.py:63 +msgid "Brak imiesłowu biernego" +msgstr "No passive participle" + +#: reports.py:64 +msgid "Brak quasi-imiesłowu biernego" +msgstr "No passive quasi-participle" + +#: reports.py:65 +msgid "Brak imiesłowu czynnego" +msgstr "No active participle" + +#: reports.py:66 +msgid "Brak odsłownika" +msgstr "No gerund" + +#: views.py:48 views.py:49 views.py:50 views.py:156 views.py:157 views.py:158 +#: views.py:187 +msgid "(puste)" +msgstr "(empty)" + +#: templates/classification_forms.html:4 +msgid "Klasyfikacje" +msgstr "Classifications" + +#: templates/classification_value_tree.html:15 +msgid "usuń" +msgstr "delete" + +#: templates/classification_value_tree.html:25 +msgid "zmień nazwę" +msgstr "rename" + +#: templates/inflection_tables.html:26 +msgid "n. wł." +msgstr "proper name" + +#: templates/inflection_tables.html:39 +msgid "rozwinięcie" +msgstr "expansion" + +#: templates/inflection_tables.html:71 templates/lexeme_edit_form.html:137 +msgid "Odsyłacze" +msgstr "Cross-references" + +#: templates/lexeme_edit_form.html:5 templates/lexeme_edit_form.html.py:170 +msgid "Zapisz" +msgstr "Save" + +#: templates/lexeme_edit_form.html:8 templates/lexeme_edit_form.html.py:173 +#: templates/sort_dialog.html:23 +msgid "Anuluj" +msgstr "Cancel" + +#: templates/lexeme_edit_form.html:12 templates/lexeme_edit_form.html:177 +msgid "Usuń leksem" +msgstr "Delete lexeme" + +#: templates/lexeme_edit_form.html:17 +msgid "Słownik właściciel" +msgstr "Owner dictionary" + +#: templates/lexeme_edit_form.html:18 +msgid "Słowniki używające" +msgstr "Using dictionaries" + +#: templates/lexeme_edit_form.html:78 +msgid "Sposoby odmiany" +msgstr "Inflections" + +#: templates/lexeme_edit_form.html:91 +msgid "Kwalifikatory" +msgstr "Qualifiers" + +#: templates/lexeme_edit_form.html:98 +msgid "stylistyczne" +msgstr "stylistic" + +#: templates/lexeme_edit_form.html:101 +msgid "zakresowe" +msgstr "scope" + +#: templates/lexeme_view.html:47 +msgid "Widok leksemów" +msgstr "Lexeme view" + +#: templates/lexeme_view.html:52 templates/lexeme_view.html.py:53 +#: templates/reader_view.html:44 templates/reader_view.html.py:45 +msgid "sortuj" +msgstr "sort" + +#: templates/lexeme_view.html:55 templates/lexeme_view.html.py:56 +#: templates/reader_view.html:47 templates/reader_view.html.py:48 +msgid "filtruj" +msgstr "filter" + +#: templates/lexeme_view.html:58 templates/lexeme_view.html.py:59 +#: templates/reader_view.html:50 templates/reader_view.html.py:51 +msgid "pokaż/ukryj" +msgstr "show/hide" + +#: templates/lexeme_view.html:62 templates/lexeme_view.html.py:63 +#: templates/reader_view.html:54 templates/reader_view.html.py:55 +msgid "szukaj" +msgstr "search" + +#: templates/lexeme_view.html:66 templates/lexeme_view.html.py:67 +msgid "akcje grupowe" +msgstr "group actions" + +#: templates/lexeme_view.html:69 templates/lexeme_view.html.py:70 +msgid "dodaj leksem" +msgstr "create lexeme" + +#: templates/lexeme_view.html:73 +msgid "więcej" +msgstr "more" + +#: templates/lexeme_view.html:82 +msgid "Edycja" +msgstr "Edit" + +#: templates/lexeme_view.html:83 templates/reader_view.html:64 +msgid "Formy bazowe" +msgstr "Base forms" + +#: templates/lexeme_view.html:84 templates/reader_view.html:63 +msgid "Wszystkie formy" +msgstr "All forms" + +#: templates/lexeme_view.html:86 +msgid "Historia" +msgstr "History" + +#: templates/lexeme_view.html:98 templates/reader_view.html:73 +msgid "Wybierz kolumny" +msgstr "Choose columns" + +#: templates/lexeme_view.html:101 templates/reader_view.html:76 +msgid "Filtrowanie" +msgstr "Filters" + +#: templates/lexeme_view.html:104 templates/reader_view.html:79 +msgid "oraz" +msgstr "and" + +#: templates/lexeme_view.html:105 templates/reader_view.html:80 +msgid "lub" +msgstr "or" + +#: templates/lexeme_view.html:107 templates/reader_view.html:82 +msgid "Dodaj filtr" +msgstr "Add filter" + +#: templates/lexeme_view.html:112 +msgid "Wybierz filtr" +msgstr "Choose filter" + +#: templates/lexeme_view.html:115 +msgid "Wybierz akcję grupową" +msgstr "Choose group action" + +#: templates/lexeme_view.html:116 templates/lexeme_view.html.py:117 +msgid "dodaj akcję" +msgstr "add action" + +#: templates/lexeme_view.html:122 +msgid "Wybierz homonim" +msgstr "Choose homonym" + +#: templates/lexeme_view.html:135 +msgid "Podpowiadacz wzorów" +msgstr "Pattern prompter" + +#: templates/lexeme_view.html:142 +msgid "Uwzględniaj rodzaj" +msgstr "Match gender" + +#: templates/lexeme_view.html:146 +msgid "Uwzględniaj pospolitość" +msgstr "Match commonness" + +#: templates/lexeme_view.html:150 +msgid "Pomijaj wzory nietypowe" +msgstr "Exclude atypical patterns" + +#: templates/lexeme_view.html:157 +msgid "Wybór domyślnego słownika" +msgstr "Choose default dictionary" + +#: templates/lexeme_view.html:159 +msgid "" +"\n" +" Wybierz słownik domyślnie ustawiany jako właściciel przy\n" +" dodawaniu leksemów.\n" +" " +msgstr "" +"\n" +"Choose a dictionary to be set as the default owner when creating new lexemes." + +#: templates/lexeme_view.html:165 +msgid "Wybór można będzie zmienić w Ustawieniach." +msgstr "This choice can be change in Settings." + +#: templates/lexeme_view.html:176 +msgid "Inne działania" +msgstr "Other actions" + +#: templates/lexeme_view.html:178 +msgid "Eksport aktualnie filtrowanej listy" +msgstr "Export the current list" + +#: templates/lexeme_view.html:181 +msgid "Przeładowanie listy" +msgstr "Reload the list" + +#: templates/lexeme_view.html:184 +msgid "Sklonowanie aktywnego leksemu" +msgstr "Clone the active lexeme" + +#: templates/lexeme_view.html:187 +msgid "Tworzenie derywatów" +msgstr "Create derivatives" + +#: templates/lexeme_view.html:188 +msgid "Wybierz hasła do utworzenia" +msgstr "Choose entries to create" + +#: templates/lexeme_view.html:192 templates/reader_view.html:87 +msgid "Szukanie według formy" +msgstr "Search by form" + +#: templates/reader_view.html:39 +msgid "Słownik gramatyczny języka polskiego" +msgstr "Grammatical Dictionary of Polish" + +#: templates/sort_dialog.html:2 +msgid "Porządek sortowania" +msgstr "Sort order" + +#: templates/sort_dialog.html:9 +msgid "Rosnąco" +msgstr "Incremental" + +#: templates/sort_dialog.html:10 +msgid "Malejąco" +msgstr "Decremental" + +#: templates/sort_dialog.html:22 +msgid "Zatwierdź" +msgstr "Confirm" diff --git a/dictionary/locale/en/LC_MESSAGES/djangojs.po b/dictionary/locale/en/LC_MESSAGES/djangojs.po index eac8cbf..4f7b66f 100644 --- a/dictionary/locale/en/LC_MESSAGES/djangojs.po +++ b/dictionary/locale/en/LC_MESSAGES/djangojs.po @@ -1,347 +1,366 @@ -# lexeme-edit.js:86 -msgid "Atrybuty: %s zostaną usunięte." -msgstr "Attributes: %s will be removed." +# English translation of the dictionary module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: static/js/edit.js:14 static/js/edit.js.c:26 +msgid "Edycja" +msgstr "Edit" + +#: static/js/edit.js:14 +msgid "niezapisane" +msgstr "not saved" + +#: static/js/edit.js:17 +msgid "Są niezapisane zmiany." +msgstr "There are unsaved changes." + +#: static/js/edit.js:79 +msgid "Czy chcesz porzucić niezapisane zmiany?" +msgstr "Do you want to discard changes?" -# lexeme-edit.js:87 +#: static/js/edit.js:86 +msgid "kwalifikatorów" +msgstr "qualifiers" + +#: static/js/lexeme-edit.js:86 static/js/lexeme-edit.js.c:277 +#, fuzzy, c-format msgid "Atrybut: %s zostanie usunięty." -msgstr "Attribute: %s will be removed." +msgid_plural "Atrybuty: %s zostaną usunięte." +msgstr[0] "Attribute: %s will be removed." +msgstr[1] "Attributes: %s will be removed." -# lexeme-edit.js:89 +#: static/js/lexeme-edit.js:89 static/js/lexeme-edit.js.c:261 +#: static/js/lexeme-edit.js:281 static/js/lexeme-edit.js.c:906 msgid "Kontynuować?" msgstr "Do you want to continue?" -# lexeme-edit.js:170 +#: static/js/lexeme-edit.js:170 static/js/lexeme-edit.js.c:187 +#: static/js/lexeme-edit.js:229 static/js/slickgrid.js:466 msgid "Anuluj" msgstr "Cancel" -# lexeme-edit.js:176 +#: static/js/lexeme-edit.js:176 static/js/lexeme-edit.js.c:235 msgid "Wybierz" msgstr "Choose" -# lexeme-edit.js:193 +#: static/js/lexeme-edit.js:193 msgid "Utwórz" msgstr "Create" -# lexeme-edit.js:213 +#: static/js/lexeme-edit.js:213 msgid "Wykonaj" msgstr "Execute" -# lexeme-edit.js:256 -msgid "Zostaną usunięte klasyfikacje:" -msgstr "The following classifications will be removed:" - -# lexeme-edit.js:256 +#: static/js/lexeme-edit.js:256 +#, fuzzy msgid "Zostanie usunięta klasyfikacja:" -msgstr "The following classification will be removed:" +msgid_plural "Zostaną usunięte klasyfikacje:" +msgstr[0] "The following classification will be removed:" +msgstr[1] "The following classifications will be removed:" -# lexeme-edit.js:320 +#: static/js/lexeme-edit.js:320 msgid "Wybierz słowniki" msgstr "Choose dictionaries" -# lexeme-edit.js:321 +#: static/js/lexeme-edit.js:321 msgid "# słowników" msgstr "# dictionaries" -# lexeme-edit.js:413 +#: static/js/lexeme-edit.js:413 msgid "Zapisanie zmian" msgstr "Save" -# lexeme-edit.js:493 +#: static/js/lexeme-edit.js:493 msgid "Utworzenie derywatów" msgstr "Creation of derivatives" -# lexeme-edit.js:593 +#: static/js/lexeme-edit.js:593 msgid "Przeładowanie klasyfikacji" msgstr "Classification reload" -# lexeme-edit.js:610 +#: static/js/lexeme-edit.js:610 msgid "Przeładowanie atrybutów" msgstr "Attributes reload" -# lexeme-edit.js:644 +#: static/js/lexeme-edit.js:644 msgid "Wzór nie pasuje do rodzaju — na pewno zapisać?" msgstr "The pattern doesn't match the gender — save anyway?" -# lexeme-edit.js:688 +#: static/js/lexeme-edit.js:688 msgid "Na pewno usunąć leksem?" msgstr "Do you want to delete this lexeme?" -# lexeme-edit.js:693 +#: static/js/lexeme-edit.js:693 msgid "Usunięcie leksemu" msgstr "Lexeme deletion" -# lexeme-edit.js:889 +#: static/js/lexeme-edit.js:889 msgid "wszystkie sposoby odmiany" msgstr "all inflections" -# lexeme-edit.js:892 +#: static/js/lexeme-edit.js:892 msgid "wszystkie odsyłacze" msgstr "all cross-references" -# lexeme-edit.js:896 +#: static/js/lexeme-edit.js:896 msgid "atrybuty" msgstr "attributes" -# lexeme-edit.js:901 +#: static/js/lexeme-edit.js:901 msgid "klasyfikacje" msgstr "classifications" -# lexeme-edit.js:905 +#: static/js/lexeme-edit.js:905 msgid "Zostaną usunięte:" msgstr "Those will be removed:" -# lexeme-edit.js:959 +#: static/js/lexeme-edit.js:959 msgid "Zapisanie domyślnego słownika" msgstr "Default dictionary record" -# lexeme-edit.js:969 +#: static/js/lexeme-edit.js:969 msgid "Utworzenie leksemu" msgstr "Creation of a new lexeme" -# lexeme-edit.js:983 +#: static/js/lexeme-edit.js:983 msgid "Sklonowanie leksemu" msgstr "Lexeme cloning" -# lexeme-edit.js:998 +#: static/js/lexeme-edit.js:998 msgid "Pobranie liczby homonimów" msgstr "Homonym query" -# lexeme-edit.js:1054 +#: static/js/lexeme-edit.js:1054 msgid "Sprawdzenie homonimów" msgstr "Homonym check" -# lexeme-edit.js:1063 +#: static/js/lexeme-edit.js:1063 msgid "Brak pasujących leksemów." msgstr "No matching lexemes." -# lexeme-view.js:12 +#: static/js/lexeme-view.js:12 msgid "Atrybut" msgstr "Attribute" -# lexeme-view.js:67 +#: static/js/lexeme-view.js:67 msgid "Leksemy" msgstr "Lexemes" -# lexeme-view.js:73 +#: static/js/lexeme-view.js:73 msgid "Nr" msgstr "№" -# lexeme-view.js:74 +#: static/js/lexeme-view.js:74 static/js/lexeme-view.js.c:92 msgid "Hasło" msgstr "Entry" -# lexeme-view.js:75 +#: static/js/lexeme-view.js:75 static/js/lexeme-view.js.c:94 msgid "Część mowy" msgstr "Part of speech" -# lexeme-view.js:76 +#: static/js/lexeme-view.js:76 msgid "Wzory" msgstr "Patterns" -# lexeme-view.js:79 +#: static/js/lexeme-view.js:79 msgid "Rodzaj/aspekt" msgstr "Gender/aspect" -# lexeme-view.js:82 +#: static/js/lexeme-view.js:82 msgid "Słowniki" msgstr "Dictionaries" -# lexeme-view.js:83 +#: static/js/lexeme-view.js:83 msgid "Sł. właściciel" msgstr "Owner dict." -# lexeme-view.js:84 +#: static/js/lexeme-view.js:84 static/js/lexeme-view.js.c:132 msgid "Status" msgstr "Status" -# lexeme-view.js:87 +#: static/js/lexeme-view.js:87 msgid "Kwal." msgstr "Qual." -# lexeme-view.js:99 +#: static/js/lexeme-view.js:99 msgid "Wzór" msgstr "Pattern" -# lexeme-view.js:101 +#: static/js/lexeme-view.js:101 msgid "Liczba wzorów" msgstr "Pattern count" -# lexeme-view.js:106 +#: static/js/lexeme-view.js:106 msgid "Typ wzoru" msgstr "Pattern type" -# lexeme-view.js:112 +#: static/js/lexeme-view.js:112 msgid "Rodzaj" msgstr "Gender" -# lexeme-view.js:117 +#: static/js/lexeme-view.js:117 msgid "Liczba rodzajów" msgstr "Gender count" -# lexeme-view.js:118 +#: static/js/lexeme-view.js:118 msgid "Forma" msgstr "Form" -# lexeme-view.js:120 +#: static/js/lexeme-view.js:120 msgid "Słownik" msgstr "Dictionary" -# lexeme-view.js:126 +#: static/js/lexeme-view.js:126 msgid "Słownik właściciel" msgstr "Owner dictionary" -# lexeme-view.js:137 +#: static/js/lexeme-view.js:137 msgid "Komentarz" msgstr "Comment" -# lexeme-view.js:139 +#: static/js/lexeme-view.js:139 msgid "Kwal. leksemu" msgstr "Lexeme qual." -# lexeme-view.js:145 +#: static/js/lexeme-view.js:145 msgid "Kwal. odmieniasia" msgstr "Inflection qual." -# lexeme-view.js:151 +#: static/js/lexeme-view.js:151 msgid "Kwal. przy dow. formie" msgstr "Any qualifier" -# lexeme-view.js:157 +#: static/js/lexeme-view.js:157 msgid "Kwal. z Dor." msgstr "Dor. qual." -# lexeme-view.js:159 +#: static/js/lexeme-view.js:159 msgid "Kwal. styl." msgstr "Styl. qual." -# lexeme-view.js:161 +#: static/js/lexeme-view.js:161 msgid "Kwal. zakr." msgstr "Scope qual." -# lexeme-view.js:163 +#: static/js/lexeme-view.js:163 msgid "Wartość klasyfikacji" msgstr "Classification value" -# lexeme-view.js:169 +#: static/js/lexeme-view.js:169 msgid "Źródło zapożyczenia" msgstr "Borrowing source" -# lexeme-view.js:174 +#: static/js/lexeme-view.js:174 msgid "Glosa" msgstr "Gloss" -# lexeme-view.js:175 +#: static/js/lexeme-view.js:175 msgid "Nota" msgstr "Note" -# lexeme-view.js:177 +#: static/js/lexeme-view.js:177 msgid "Nota rozszerzona" msgstr "Extended note" -# lexeme-view.js:181 +#: static/js/lexeme-view.js:181 msgid "Wymowa" msgstr "Pronunciation" -# lexeme-view.js:182 +#: static/js/lexeme-view.js:182 msgid "Łączliwość" msgstr "Valence" -# lexeme-view.js:184 +#: static/js/lexeme-view.js:184 msgid "Typ odsyłacza" msgstr "Cross-reference type" -# lexeme-view.js:190 +#: static/js/lexeme-view.js:190 msgid "Autor ostatniej zmiany" msgstr "Last change's author" -# slickgrid.js:12 +#: static/js/slickgrid.js:12 msgid "równy|równa|równe" msgstr "equal to" -# slickgrid.js:13 +#: static/js/slickgrid.js:13 msgid "różny od|różna od|różne od" msgstr "not equal to" -# slickgrid.js:14 +#: static/js/slickgrid.js:14 msgid "mniejszy lub równy|mniejsza lub równa|mniejsze lub równe" msgstr "less than" -# slickgrid.js:15 +#: static/js/slickgrid.js:15 msgid "większy lub równy|większa lub równa|większe lub równe" msgstr "greater than" -# slickgrid.js:16 +#: static/js/slickgrid.js:16 msgid "zaczyna się od" msgstr "starts with" -# slickgrid.js:17 +#: static/js/slickgrid.js:17 msgid "nie zaczyna się od" msgstr "doesn't start with" -# slickgrid.js:18 +#: static/js/slickgrid.js:18 msgid "kończy się na" msgstr "ends with" -# slickgrid.js:19 +#: static/js/slickgrid.js:19 msgid "nie kończy się na" msgstr "doesn't end with" -# slickgrid.js:20 +#: static/js/slickgrid.js:20 msgid "zawiera" msgstr "contains" -# slickgrid.js:21 +#: static/js/slickgrid.js:21 msgid "nie zawiera" msgstr "doesn't contain" -# slickgrid.js:22 +#: static/js/slickgrid.js:22 msgid "pasuje do wzorca" msgstr "matched by pattern" -# slickgrid.js:23 +#: static/js/slickgrid.js:23 msgid "nie pasuje do wzorca" msgstr "not matched by pattern" -# slickgrid.js:367 +#: static/js/slickgrid.js:367 msgid "Załadowanie strony nie powiodło się." msgstr "Page load failed." -# slickgrid.js:401 +#: static/js/slickgrid.js:401 msgid "Czyść" msgstr "Clear" -# slickgrid.js:409 +#: static/js/slickgrid.js:409 msgid "Zapisz filtr" msgstr "Save filter" -# slickgrid.js:413 +#: static/js/slickgrid.js:413 msgid "Załaduj filtr" msgstr "Load filter" -# slickgrid.js:426 +#: static/js/slickgrid.js:426 msgid "Filtruj" msgstr "Apply" -# slickgrid.js:472 +#: static/js/slickgrid.js:472 msgid "Zatwierdź" msgstr "Confirm" - -# edit.js:14 -msgid "Edycja" -msgstr "Edit" - -# edit.js:14 -msgid "niezapisane" -msgstr "not saved" - -# edit.js:17 -msgid "Są niezapisane zmiany." -msgstr "There are unsaved changes." - -# edit.js:79 -msgid "Czy chcesz porzucić niezapisane zmiany?" -msgstr "Do you want to discard changes?" - -# edit.js:86 -msgid "kwalifikatorów" -msgstr "qualifiers" \ No newline at end of file diff --git a/dictionary/locale/pl/LC_MESSAGES/django.po b/dictionary/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..fd7ca89 --- /dev/null +++ b/dictionary/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,552 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: ajax_lexeme_view.py:226 +msgid "Nieokreślona część mowy." +msgstr "" + +#: ajax_lexeme_view.py:345 +msgid "Niepasujące zakończenie formy podstawowej." +msgstr "" + +#: ajax_lexeme_view.py:360 +msgid "Wybierz odmianę lub ustaw status „kandydat”." +msgstr "" + +#: ajax_lexeme_view.py:428 +msgid "Nie wpisano hasła" +msgstr "" + +#: ajax_lexeme_view.py:523 +msgid "Nie wybrano słownika właściciela" +msgstr "" + +#: ajax_lexeme_view.py:589 ajax_lexeme_view.py:596 ajax_lexeme_view.py:600 +#: templates/lexeme_view.html:126 +msgid "Nr hom." +msgstr "" + +#: ajax_lexeme_view.py:589 +msgid "Aspekt" +msgstr "" + +#: ajax_lexeme_view.py:589 ajax_lexeme_view.py:596 ajax_lexeme_view.py:600 +#: forms.py:205 templates/lexeme_view.html:128 +msgid "Wzór" +msgstr "" + +#: ajax_lexeme_view.py:596 templates/lexeme_view.html:127 +msgid "Rodzaj" +msgstr "" + +#: forms.py:74 models.py:479 +msgid "kwal. styl." +msgstr "" + +#: forms.py:77 models.py:480 +msgid "kwal. zakr." +msgstr "" + +#: forms.py:111 +msgid "niedozwolona spacja" +msgstr "" + +#: forms.py:207 +msgid "Kwal." +msgstr "" + +#: forms.py:235 +msgid "Niepoprawna nazwa wzoru." +msgstr "" + +#: forms.py:238 +msgid "Wzór nie pasuje do części mowy." +msgstr "" + +#: forms.py:280 models.py:451 +msgid "hasło" +msgstr "" + +#: forms.py:285 +msgid "hom." +msgstr "" + +#: forms.py:312 +msgid "Wybrany leksem nie istnieje." +msgstr "" + +#: forms.py:315 +msgid "Niejednoznaczny numer homonimu!" +msgstr "" + +#: forms.py:319 +msgid "Nieprawidłowa część mowy w odsyłaczu." +msgstr "" + +#: forms.py:342 +msgid "Dodaj" +msgstr "" + +#: forms.py:343 +msgid "Usuń" +msgstr "" + +#: forms.py:349 +msgid "ustaw" +msgstr "" + +#: forms.py:396 +msgid "Status" +msgstr "" + +#: forms.py:400 +msgid "Słownik używający" +msgstr "" + +#: forms.py:406 +msgid "Kwalifikator leksemu" +msgstr "" + +#: models.py:68 models.py:101 models.py:325 +msgid "nazwa" +msgstr "" + +#: models.py:70 models.py:105 +msgid "słownik" +msgstr "" + +#: models.py:96 +msgid "stylistyczny" +msgstr "" + +#: models.py:97 +msgid "zakresowy" +msgstr "" + +#: models.py:98 +msgid "przy formach" +msgstr "" + +#: models.py:103 models.py:329 models.py:1117 +msgid "typ" +msgstr "" + +#: models.py:109 +msgid "klasa wykluczania" +msgstr "" + +#: models.py:153 +msgid "nazwa klasyfikacji" +msgstr "" + +#: models.py:188 +msgid "nazwa wartości" +msgstr "" + +#: models.py:193 +msgid "rodzic wartości" +msgstr "" + +#: models.py:287 +msgid "typ odmiany" +msgstr "" + +#: models.py:291 +msgid "typ wzoru" +msgstr "" + +#: models.py:321 +msgid "nowy" +msgstr "" + +#: models.py:322 +msgid "tymczasowy" +msgstr "" + +#: models.py:327 +msgid "stara nazwa" +msgstr "" + +#: models.py:332 +msgid "przykład" +msgstr "" + +#: models.py:336 +msgid "zakończenie formy podstawowej" +msgstr "" + +#: models.py:338 +msgid "status" +msgstr "" + +#: models.py:340 models.py:484 +msgid "komentarz" +msgstr "" + +#: models.py:374 +msgid "Może oglądać wzory" +msgstr "" + +#: models.py:444 +msgid "kandydat" +msgstr "" + +#: models.py:445 +msgid "wprowadzony" +msgstr "" + +#: models.py:446 +msgid "zatwierdzony" +msgstr "" + +#: models.py:457 +msgid "sufiks hasła" +msgstr "" + +#: models.py:458 +msgid "glosa" +msgstr "" + +#: models.py:459 +msgid "nota" +msgstr "" + +#: models.py:460 +msgid "nota rozszerzona" +msgstr "" + +#: models.py:462 models.py:867 +msgid "wymowa" +msgstr "" + +#: models.py:463 +msgid "łączliwość" +msgstr "" + +#: models.py:466 +msgid "cz. mowy" +msgstr "" + +#: models.py:471 +msgid "źródło" +msgstr "" + +#: models.py:474 +msgid "źródło zapożyczenia" +msgstr "" + +#: models.py:478 +msgid "kwal. z Dor." +msgstr "" + +#: models.py:482 templates/lexeme_edit_form.html:104 +msgid "specjalistyczny" +msgstr "" + +#: models.py:760 +msgid "Może oglądać leksemy" +msgstr "" + +#: models.py:761 +msgid "Może oglądać wszystkie leksemy" +msgstr "" + +#: models.py:763 +msgid "Ważniejszy głos przy modyfikowaniu leksemów" +msgstr "" + +#: models.py:764 +msgid "Może eksportować leksemy" +msgstr "" + +#: models.py:860 +msgid "wzór" +msgstr "" + +#: models.py:862 +msgid "rodzaj" +msgstr "" + +#: models.py:1040 +msgid "Może zarządzać słownikami" +msgstr "" + +#: models.py:1041 +msgid "Zarządza wszystkimi słownikami" +msgstr "" + +#: models.py:1115 +msgid "nr docelowy" +msgstr "" + +#: reports.py:20 +msgid "Brak odsyłacza do czasownika" +msgstr "" + +#: reports.py:63 +msgid "Brak imiesłowu biernego" +msgstr "" + +#: reports.py:64 +msgid "Brak quasi-imiesłowu biernego" +msgstr "" + +#: reports.py:65 +msgid "Brak imiesłowu czynnego" +msgstr "" + +#: reports.py:66 +msgid "Brak odsłownika" +msgstr "" + +#: views.py:48 views.py:49 views.py:50 views.py:156 views.py:157 views.py:158 +#: views.py:187 +msgid "(puste)" +msgstr "" + +#: templates/classification_forms.html:4 +msgid "Klasyfikacje" +msgstr "" + +#: templates/classification_value_tree.html:15 +msgid "usuń" +msgstr "" + +#: templates/classification_value_tree.html:25 +msgid "zmień nazwę" +msgstr "" + +#: templates/inflection_tables.html:26 +msgid "n. wł." +msgstr "" + +#: templates/inflection_tables.html:39 +msgid "rozwinięcie" +msgstr "" + +#: templates/inflection_tables.html:71 templates/lexeme_edit_form.html:137 +msgid "Odsyłacze" +msgstr "" + +#: templates/lexeme_edit_form.html:5 templates/lexeme_edit_form.html.py:170 +msgid "Zapisz" +msgstr "" + +#: templates/lexeme_edit_form.html:8 templates/lexeme_edit_form.html.py:173 +#: templates/sort_dialog.html:23 +msgid "Anuluj" +msgstr "" + +#: templates/lexeme_edit_form.html:12 templates/lexeme_edit_form.html:177 +msgid "Usuń leksem" +msgstr "" + +#: templates/lexeme_edit_form.html:17 +msgid "Słownik właściciel" +msgstr "" + +#: templates/lexeme_edit_form.html:18 +msgid "Słowniki używające" +msgstr "" + +#: templates/lexeme_edit_form.html:78 +msgid "Sposoby odmiany" +msgstr "" + +#: templates/lexeme_edit_form.html:91 +msgid "Kwalifikatory" +msgstr "" + +#: templates/lexeme_edit_form.html:98 +msgid "stylistyczne" +msgstr "" + +#: templates/lexeme_edit_form.html:101 +msgid "zakresowe" +msgstr "" + +#: templates/lexeme_view.html:47 +msgid "Widok leksemów" +msgstr "" + +#: templates/lexeme_view.html:52 templates/lexeme_view.html.py:53 +#: templates/reader_view.html:44 templates/reader_view.html.py:45 +msgid "sortuj" +msgstr "" + +#: templates/lexeme_view.html:55 templates/lexeme_view.html.py:56 +#: templates/reader_view.html:47 templates/reader_view.html.py:48 +msgid "filtruj" +msgstr "" + +#: templates/lexeme_view.html:58 templates/lexeme_view.html.py:59 +#: templates/reader_view.html:50 templates/reader_view.html.py:51 +msgid "pokaż/ukryj" +msgstr "" + +#: templates/lexeme_view.html:62 templates/lexeme_view.html.py:63 +#: templates/reader_view.html:54 templates/reader_view.html.py:55 +msgid "szukaj" +msgstr "" + +#: templates/lexeme_view.html:66 templates/lexeme_view.html.py:67 +msgid "akcje grupowe" +msgstr "" + +#: templates/lexeme_view.html:69 templates/lexeme_view.html.py:70 +msgid "dodaj leksem" +msgstr "" + +#: templates/lexeme_view.html:73 +msgid "więcej" +msgstr "" + +#: templates/lexeme_view.html:82 +msgid "Edycja" +msgstr "" + +#: templates/lexeme_view.html:83 templates/reader_view.html:64 +msgid "Formy bazowe" +msgstr "" + +#: templates/lexeme_view.html:84 templates/reader_view.html:63 +msgid "Wszystkie formy" +msgstr "" + +#: templates/lexeme_view.html:86 +msgid "Historia" +msgstr "" + +#: templates/lexeme_view.html:98 templates/reader_view.html:73 +msgid "Wybierz kolumny" +msgstr "" + +#: templates/lexeme_view.html:101 templates/reader_view.html:76 +msgid "Filtrowanie" +msgstr "" + +#: templates/lexeme_view.html:104 templates/reader_view.html:79 +msgid "oraz" +msgstr "" + +#: templates/lexeme_view.html:105 templates/reader_view.html:80 +msgid "lub" +msgstr "" + +#: templates/lexeme_view.html:107 templates/reader_view.html:82 +msgid "Dodaj filtr" +msgstr "" + +#: templates/lexeme_view.html:112 +msgid "Wybierz filtr" +msgstr "" + +#: templates/lexeme_view.html:115 +msgid "Wybierz akcję grupową" +msgstr "" + +#: templates/lexeme_view.html:116 templates/lexeme_view.html.py:117 +msgid "dodaj akcję" +msgstr "" + +#: templates/lexeme_view.html:122 +msgid "Wybierz homonim" +msgstr "" + +#: templates/lexeme_view.html:135 +msgid "Podpowiadacz wzorów" +msgstr "" + +#: templates/lexeme_view.html:142 +msgid "Uwzględniaj rodzaj" +msgstr "" + +#: templates/lexeme_view.html:146 +msgid "Uwzględniaj pospolitość" +msgstr "" + +#: templates/lexeme_view.html:150 +msgid "Pomijaj wzory nietypowe" +msgstr "" + +#: templates/lexeme_view.html:157 +msgid "Wybór domyślnego słownika" +msgstr "" + +#: templates/lexeme_view.html:159 +msgid "" +"\n" +" Wybierz słownik domyślnie ustawiany jako właściciel przy\n" +" dodawaniu leksemów.\n" +" " +msgstr "" + +#: templates/lexeme_view.html:165 +msgid "Wybór można będzie zmienić w Ustawieniach." +msgstr "" + +#: templates/lexeme_view.html:176 +msgid "Inne działania" +msgstr "" + +#: templates/lexeme_view.html:178 +msgid "Eksport aktualnie filtrowanej listy" +msgstr "" + +#: templates/lexeme_view.html:181 +msgid "Przeładowanie listy" +msgstr "" + +#: templates/lexeme_view.html:184 +msgid "Sklonowanie aktywnego leksemu" +msgstr "" + +#: templates/lexeme_view.html:187 +msgid "Tworzenie derywatów" +msgstr "" + +#: templates/lexeme_view.html:188 +msgid "Wybierz hasła do utworzenia" +msgstr "" + +#: templates/lexeme_view.html:192 templates/reader_view.html:87 +msgid "Szukanie według formy" +msgstr "" + +#: templates/reader_view.html:39 +msgid "Słownik gramatyczny języka polskiego" +msgstr "" + +#: templates/sort_dialog.html:2 +msgid "Porządek sortowania" +msgstr "" + +#: templates/sort_dialog.html:9 +msgid "Rosnąco" +msgstr "" + +#: templates/sort_dialog.html:10 +msgid "Malejąco" +msgstr "" + +#: templates/sort_dialog.html:22 +msgid "Zatwierdź" +msgstr "" diff --git a/dictionary/locale/pl/LC_MESSAGES/djangojs.po b/dictionary/locale/pl/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..09323fb --- /dev/null +++ b/dictionary/locale/pl/LC_MESSAGES/djangojs.po @@ -0,0 +1,369 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: static/js/edit.js:14 static/js/edit.js.c:26 +msgid "Edycja" +msgstr "" + +#: static/js/edit.js:14 +msgid "niezapisane" +msgstr "" + +#: static/js/edit.js:17 +msgid "Są niezapisane zmiany." +msgstr "" + +#: static/js/edit.js:79 +msgid "Czy chcesz porzucić niezapisane zmiany?" +msgstr "" + +#: static/js/edit.js:86 +msgid "kwalifikatorów" +msgstr "" + +#: static/js/lexeme-edit.js:86 static/js/lexeme-edit.js.c:277 +#, c-format +msgid "Atrybut: %s zostanie usunięty." +msgid_plural "Atrybuty: %s zostaną usunięte." +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: static/js/lexeme-edit.js:89 static/js/lexeme-edit.js.c:261 +#: static/js/lexeme-edit.js:281 static/js/lexeme-edit.js.c:906 +msgid "Kontynuować?" +msgstr "" + +#: static/js/lexeme-edit.js:170 static/js/lexeme-edit.js.c:187 +#: static/js/lexeme-edit.js:229 static/js/slickgrid.js:466 +msgid "Anuluj" +msgstr "" + +#: static/js/lexeme-edit.js:176 static/js/lexeme-edit.js.c:235 +msgid "Wybierz" +msgstr "" + +#: static/js/lexeme-edit.js:193 +msgid "Utwórz" +msgstr "" + +#: static/js/lexeme-edit.js:213 +msgid "Wykonaj" +msgstr "" + +#: static/js/lexeme-edit.js:256 +msgid "Zostanie usunięta klasyfikacja:" +msgid_plural "Zostaną usunięte klasyfikacje:" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: static/js/lexeme-edit.js:320 +msgid "Wybierz słowniki" +msgstr "" + +#: static/js/lexeme-edit.js:321 +msgid "# słowników" +msgstr "" + +#: static/js/lexeme-edit.js:413 +msgid "Zapisanie zmian" +msgstr "" + +#: static/js/lexeme-edit.js:493 +msgid "Utworzenie derywatów" +msgstr "" + +#: static/js/lexeme-edit.js:593 +msgid "Przeładowanie klasyfikacji" +msgstr "" + +#: static/js/lexeme-edit.js:610 +msgid "Przeładowanie atrybutów" +msgstr "" + +#: static/js/lexeme-edit.js:644 +msgid "Wzór nie pasuje do rodzaju — na pewno zapisać?" +msgstr "" + +#: static/js/lexeme-edit.js:688 +msgid "Na pewno usunąć leksem?" +msgstr "" + +#: static/js/lexeme-edit.js:693 +msgid "Usunięcie leksemu" +msgstr "" + +#: static/js/lexeme-edit.js:889 +msgid "wszystkie sposoby odmiany" +msgstr "" + +#: static/js/lexeme-edit.js:892 +msgid "wszystkie odsyłacze" +msgstr "" + +#: static/js/lexeme-edit.js:896 +msgid "atrybuty" +msgstr "" + +#: static/js/lexeme-edit.js:901 +msgid "klasyfikacje" +msgstr "" + +#: static/js/lexeme-edit.js:905 +msgid "Zostaną usunięte:" +msgstr "" + +#: static/js/lexeme-edit.js:959 +msgid "Zapisanie domyślnego słownika" +msgstr "" + +#: static/js/lexeme-edit.js:969 +msgid "Utworzenie leksemu" +msgstr "" + +#: static/js/lexeme-edit.js:983 +msgid "Sklonowanie leksemu" +msgstr "" + +#: static/js/lexeme-edit.js:998 +msgid "Pobranie liczby homonimów" +msgstr "" + +#: static/js/lexeme-edit.js:1054 +msgid "Sprawdzenie homonimów" +msgstr "" + +#: static/js/lexeme-edit.js:1063 +msgid "Brak pasujących leksemów." +msgstr "" + +#: static/js/lexeme-view.js:12 +msgid "Atrybut" +msgstr "" + +#: static/js/lexeme-view.js:67 +msgid "Leksemy" +msgstr "" + +#: static/js/lexeme-view.js:73 +msgid "Nr" +msgstr "" + +#: static/js/lexeme-view.js:74 static/js/lexeme-view.js.c:92 +msgid "Hasło" +msgstr "" + +#: static/js/lexeme-view.js:75 static/js/lexeme-view.js.c:94 +msgid "Część mowy" +msgstr "" + +#: static/js/lexeme-view.js:76 +msgid "Wzory" +msgstr "" + +#: static/js/lexeme-view.js:79 +msgid "Rodzaj/aspekt" +msgstr "" + +#: static/js/lexeme-view.js:82 +msgid "Słowniki" +msgstr "" + +#: static/js/lexeme-view.js:83 +msgid "Sł. właściciel" +msgstr "" + +#: static/js/lexeme-view.js:84 static/js/lexeme-view.js.c:132 +msgid "Status" +msgstr "" + +#: static/js/lexeme-view.js:87 +msgid "Kwal." +msgstr "" + +#: static/js/lexeme-view.js:99 +msgid "Wzór" +msgstr "" + +#: static/js/lexeme-view.js:101 +msgid "Liczba wzorów" +msgstr "" + +#: static/js/lexeme-view.js:106 +msgid "Typ wzoru" +msgstr "" + +#: static/js/lexeme-view.js:112 +msgid "Rodzaj" +msgstr "" + +#: static/js/lexeme-view.js:117 +msgid "Liczba rodzajów" +msgstr "" + +#: static/js/lexeme-view.js:118 +msgid "Forma" +msgstr "" + +#: static/js/lexeme-view.js:120 +msgid "Słownik" +msgstr "" + +#: static/js/lexeme-view.js:126 +msgid "Słownik właściciel" +msgstr "" + +#: static/js/lexeme-view.js:137 +msgid "Komentarz" +msgstr "" + +#: static/js/lexeme-view.js:139 +msgid "Kwal. leksemu" +msgstr "" + +#: static/js/lexeme-view.js:145 +msgid "Kwal. odmieniasia" +msgstr "" + +#: static/js/lexeme-view.js:151 +msgid "Kwal. przy dow. formie" +msgstr "" + +#: static/js/lexeme-view.js:157 +msgid "Kwal. z Dor." +msgstr "" + +#: static/js/lexeme-view.js:159 +msgid "Kwal. styl." +msgstr "" + +#: static/js/lexeme-view.js:161 +msgid "Kwal. zakr." +msgstr "" + +#: static/js/lexeme-view.js:163 +msgid "Wartość klasyfikacji" +msgstr "" + +#: static/js/lexeme-view.js:169 +msgid "Źródło zapożyczenia" +msgstr "" + +#: static/js/lexeme-view.js:174 +msgid "Glosa" +msgstr "" + +#: static/js/lexeme-view.js:175 +msgid "Nota" +msgstr "" + +#: static/js/lexeme-view.js:177 +msgid "Nota rozszerzona" +msgstr "" + +#: static/js/lexeme-view.js:181 +msgid "Wymowa" +msgstr "" + +#: static/js/lexeme-view.js:182 +msgid "Łączliwość" +msgstr "" + +#: static/js/lexeme-view.js:184 +msgid "Typ odsyłacza" +msgstr "" + +#: static/js/lexeme-view.js:190 +msgid "Autor ostatniej zmiany" +msgstr "" + +#: static/js/slickgrid.js:12 +msgid "równy|równa|równe" +msgstr "" + +#: static/js/slickgrid.js:13 +msgid "różny od|różna od|różne od" +msgstr "" + +#: static/js/slickgrid.js:14 +msgid "mniejszy lub równy|mniejsza lub równa|mniejsze lub równe" +msgstr "" + +#: static/js/slickgrid.js:15 +msgid "większy lub równy|większa lub równa|większe lub równe" +msgstr "" + +#: static/js/slickgrid.js:16 +msgid "zaczyna się od" +msgstr "" + +#: static/js/slickgrid.js:17 +msgid "nie zaczyna się od" +msgstr "" + +#: static/js/slickgrid.js:18 +msgid "kończy się na" +msgstr "" + +#: static/js/slickgrid.js:19 +msgid "nie kończy się na" +msgstr "" + +#: static/js/slickgrid.js:20 +msgid "zawiera" +msgstr "" + +#: static/js/slickgrid.js:21 +msgid "nie zawiera" +msgstr "" + +#: static/js/slickgrid.js:22 +msgid "pasuje do wzorca" +msgstr "" + +#: static/js/slickgrid.js:23 +msgid "nie pasuje do wzorca" +msgstr "" + +#: static/js/slickgrid.js:367 +msgid "Załadowanie strony nie powiodło się." +msgstr "" + +#: static/js/slickgrid.js:401 +msgid "Czyść" +msgstr "" + +#: static/js/slickgrid.js:409 +msgid "Zapisz filtr" +msgstr "" + +#: static/js/slickgrid.js:413 +msgid "Załaduj filtr" +msgstr "" + +#: static/js/slickgrid.js:426 +msgid "Filtruj" +msgstr "" + +#: static/js/slickgrid.js:472 +msgid "Zatwierdź" +msgstr "" diff --git a/dictionary/models.py b/dictionary/models.py index c1080ec..f50f066 100644 --- a/dictionary/models.py +++ b/dictionary/models.py @@ -6,6 +6,8 @@ import json from django.contrib.auth.models import User, Permission from django.db.models import Manager, Model, CharField, ForeignKey, \ IntegerField, BooleanField, ManyToManyField, TextField, DateTimeField +from django.utils.translation import ugettext_lazy as _ + from common.util import no_history, GroupDict from accounts.util import users_with_perm @@ -63,9 +65,9 @@ class PartOfSpeech(Model): class QualifierExclusionClass(Model): name = CharField( - unique=True, max_length=64, db_column='nazwa', verbose_name=u'nazwa') + unique=True, max_length=64, db_column='nazwa', verbose_name=_(u'nazwa')) vocabulary = ForeignKey( - 'Vocabulary', db_column='slownik', verbose_name=u'słownik') + 'Vocabulary', db_column='slownik', verbose_name=_(u'słownik')) def __unicode__(self): return self.name @@ -91,20 +93,20 @@ class Qualifier(Model): TYPE_SCOPE = 'zakr' TYPE_FORM = 'form' TYPE_CHOICES = ( - (TYPE_STYLE, 'stylistyczny'), - (TYPE_SCOPE, 'zakresowy'), - (TYPE_FORM, 'przy formach'), + (TYPE_STYLE, _('stylistyczny')), + (TYPE_SCOPE, _('zakresowy')), + (TYPE_FORM, _('przy formach')), ) - label = CharField(max_length=64, db_column='kwal', verbose_name=u'nazwa') + label = CharField(max_length=64, db_column='kwal', verbose_name=_(u'nazwa')) type = CharField( - max_length=4, choices=TYPE_CHOICES, verbose_name=u'typ') + max_length=4, choices=TYPE_CHOICES, verbose_name=_(u'typ')) vocabulary = ForeignKey( - 'Vocabulary', db_column='slownik', verbose_name=u'słownik', + 'Vocabulary', db_column='slownik', verbose_name=_(u'słownik'), related_name='qualifiers') exclusion_class = ForeignKey( QualifierExclusionClass, db_column='klasa', null=True, blank=True, - verbose_name=u'klasa wykluczania') + verbose_name=_(u'klasa wykluczania')) deleted = BooleanField(db_column='usuniety', default=False) objects = NotDeletedManager() @@ -148,7 +150,7 @@ def editable_qualifiers(user): class Classification(Model): name = CharField( unique=True, max_length=64, db_column='nazwa', - verbose_name=u'nazwa klasyfikacji') + verbose_name=_(u'nazwa klasyfikacji')) parts_of_speech = ManyToManyField(PartOfSpeech) def value_tree(self): @@ -183,12 +185,12 @@ def make_choices(tree): class ClassificationValue(Model): label = CharField( unique=True, max_length=64, db_column='nazwa', - verbose_name=u'nazwa wartości') + verbose_name=_(u'nazwa wartości')) classification = ForeignKey( Classification, db_column='klas_id', related_name='values') parent_node = ForeignKey( 'self', db_column='rodzic', null=True, blank=True, - verbose_name=u'rodzic wartości', related_name='child_nodes') + verbose_name=_(u'rodzic wartości'), related_name='child_nodes') lexemes = ManyToManyField('Lexeme', blank=True, through='LexemeCV') deleted = BooleanField(db_column='usunieta', default=False) @@ -282,10 +284,11 @@ class DummyEnding(object): class PatternType(Model): lexical_class = ForeignKey( - LexicalClass, db_column='czm', verbose_name=u'cz. mowy') + LexicalClass, db_column='czm', verbose_name=_(u'typ odmiany')) # typ wzoru (np. dla rzeczowników: odmiana męska, żeńska lub nijaka) symbol = CharField( - max_length=32, blank=True, db_column='wtyp', verbose_name=u'typ wzoru') + max_length=32, blank=True, db_column='wtyp', + verbose_name=_(u'typ wzoru')) base_form_labels = ManyToManyField(BaseFormLabel) def dummy_base_endings(self): @@ -315,24 +318,26 @@ class Pattern(Model): STATUS_NEW = 'nowy' STATUS_TEMP = 'temp' STATUS_CHOICES = ( - (STATUS_NEW, u'nowy'), - (STATUS_TEMP, u'tymczasowy'), + (STATUS_NEW, _(u'nowy')), + (STATUS_TEMP, _(u'tymczasowy')), ) name = CharField( - max_length=32, unique=True, db_column='w_id', verbose_name=u'nazwa') - old_name = CharField(max_length=32, verbose_name=u'stara nazwa', null=True) - type = ForeignKey(PatternType, db_column='typ', verbose_name=u'typ') + max_length=32, unique=True, db_column='w_id', verbose_name=_(u'nazwa')) + old_name = CharField( + max_length=32, verbose_name=_(u'stara nazwa'), null=True) + type = ForeignKey( + PatternType, db_column='typ', verbose_name=_(u'typ')) # rdzeń przykładowej formy hasłowej example = CharField( - max_length=64, db_column='przyklad', verbose_name=u'przykład', + max_length=64, db_column='przyklad', verbose_name=_(u'przykład'), blank=True) basic_form_ending = CharField( max_length=32, db_column='zakp', blank=True, - verbose_name=u'zakończenie formy podstawowej') + verbose_name=_(u'zakończenie formy podstawowej')) status = CharField( - max_length=8, choices=STATUS_CHOICES, verbose_name=u'status') + max_length=8, choices=STATUS_CHOICES, verbose_name=_(u'status')) comment = TextField( - blank=True, db_column='komentarz', verbose_name=u'komentarz') + blank=True, db_column='komentarz', verbose_name=_(u'komentarz')) deleted = BooleanField() objects = NotDeletedManager() @@ -366,7 +371,7 @@ class Pattern(Model): db_table = 'wzory' ordering = ['name'] permissions = ( - ('view_pattern', u'Może oglądać wzory'), + ('view_pattern', _(u'Może oglądać wzory')), ) @@ -436,46 +441,47 @@ class Lexeme(Model): STATUS_DESCRIBED = 'desc' STATUS_CONFIRMED = 'conf' STATUS_CHOICES = ( - (STATUS_CANDIDATE, u'kandydat'), - (STATUS_DESCRIBED, u'wprowadzony'), - (STATUS_CONFIRMED, u'zatwierdzony'), + (STATUS_CANDIDATE, _(u'kandydat')), + (STATUS_DESCRIBED, _(u'wprowadzony')), + (STATUS_CONFIRMED, _(u'zatwierdzony')), ) entry = CharField( max_length=64, db_column='haslo', db_index=True, - verbose_name=u'hasło', blank=True) # dla nowo utworzonych + verbose_name=_(u'hasło'), blank=True) # dla nowo utworzonych # id w źródłowej bazie source_id = IntegerField(blank=True, null=True) # pozostałość historyczna: entry_suffix = CharField( blank=True, max_length=16, db_column='haslosuf', - verbose_name=u'sufiks hasła') - gloss = TextField(blank=True, db_column='glosa', verbose_name=u'glosa') - note = TextField(blank=True, db_column='nota', verbose_name=u'nota') - extended_note = TextField(blank=True, verbose_name=u'nota rozszerzona') + verbose_name=_(u'sufiks hasła')) + gloss = TextField(blank=True, db_column='glosa', verbose_name=_(u'glosa')) + note = TextField(blank=True, db_column='nota', verbose_name=_(u'nota')) + extended_note = TextField(blank=True, verbose_name=_(u'nota rozszerzona')) pronunciation = TextField( - blank=True, db_column='wymowa', verbose_name=u'wymowa') - valence = TextField(blank=True, verbose_name=u'łączliwość') + blank=True, db_column='wymowa', verbose_name=_(u'wymowa')) + valence = TextField(blank=True, verbose_name=_(u'łączliwość')) homonym_number = IntegerField(db_column='hom', default=1) part_of_speech = ForeignKey( - PartOfSpeech, db_column='pos', verbose_name=u'cz. mowy') + PartOfSpeech, db_column='pos', verbose_name=_(u'cz. mowy')) owner_vocabulary = ForeignKey( 'Vocabulary', db_column='slownik', related_name='owned_lexemes') source = CharField( - max_length=64, blank=True, db_column='zrodlo', verbose_name=u'źródło') + max_length=64, blank=True, db_column='zrodlo', + verbose_name=_(u'źródło')) borrowing_source = ForeignKey( BorrowingSource, blank=True, null=True, - verbose_name=u'źródło zapożyczenia') + verbose_name=_(u'źródło zapożyczenia')) status = CharField(max_length=8, db_column='status', choices=STATUS_CHOICES) qualifiers = ManyToManyField( Qualifier, blank=True, db_table='kwalifikatory_leksemow') - qualifiers_dor = TextField(blank=True, verbose_name=u'kwal. z Dor.') - qualifiers_style = TextField(blank=True, verbose_name=u'kwal. styl.') - qualifiers_scope = TextField(blank=True, verbose_name=u'kwal. zakr.') + qualifiers_dor = TextField(blank=True, verbose_name=_(u'kwal. z Dor.')) + qualifiers_style = TextField(blank=True, verbose_name=_(u'kwal. styl.')) + qualifiers_scope = TextField(blank=True, verbose_name=_(u'kwal. zakr.')) # czy termin specjalistyczny - specialist = BooleanField(default=False, verbose_name=u'specjalistyczny') + specialist = BooleanField(default=False, verbose_name=_(u'specjalistyczny')) comment = TextField( - blank=True, db_column='komentarz', verbose_name=u'komentarz') + blank=True, db_column='komentarz', verbose_name=_(u'komentarz')) last_modified = DateTimeField(auto_now=True, db_column='data_modyfikacji') # osoba, ktora ostatnia zmieniala opis leksemu responsible = ForeignKey( @@ -751,10 +757,11 @@ class Lexeme(Model): class Meta: db_table = 'leksemy' permissions = ( - ('view_lexeme', u'Może oglądać leksemy'), - ('view_all_lexemes', u'Może oglądać wszystkie leksemy'), - ('lexeme_priority', u'Ważniejszy głos przy modyfikowaniu leksemów'), - ('export_lexemes', u'Może eksportować leksemy'), + ('view_lexeme', _(u'Może oglądać leksemy')), + ('view_all_lexemes', _(u'Może oglądać wszystkie leksemy')), + ('lexeme_priority', + _(u'Ważniejszy głos przy modyfikowaniu leksemów')), + ('export_lexemes', _(u'Może eksportować leksemy')), ) @@ -850,12 +857,14 @@ class LexemeAV(Model): class LexemeInflectionPattern(Model): lexeme = ForeignKey(Lexeme, db_column='l_id') index = IntegerField(db_column='oind') - pattern = ForeignKey(Pattern, db_column='w_id', verbose_name=u'wzór') - gender = ForeignKey(Gender, verbose_name=u'rodzaj', blank=True, null=True) + pattern = ForeignKey(Pattern, db_column='w_id', verbose_name=_(u'wzór')) + gender = ForeignKey( + Gender, verbose_name=_(u'rodzaj'), blank=True, null=True) root = CharField(max_length=64, db_column='rdzen') qualifiers = ManyToManyField( Qualifier, blank=True, db_table='kwalifikatory_odmieniasiow') - pronunciation = CharField(max_length=64, verbose_name=u'wymowa', blank=True) + pronunciation = CharField( + max_length=64, verbose_name=_(u'wymowa'), blank=True) objects = LexemeNotDeletedManager() all_objects = Manager() @@ -1028,8 +1037,8 @@ class Vocabulary(Model): db_table = 'slowniki' ordering = ['id'] permissions = ( - ('manage_vocabulary', u'Może zarządzać słownikami'), - ('manage_all_vocabularies', u'Zarządza wszystkimi słownikami'), + ('manage_vocabulary', _(u'Może zarządzać słownikami')), + ('manage_all_vocabularies', _(u'Zarządza wszystkimi słownikami')), ) @@ -1103,9 +1112,9 @@ class CrossReference(Model): Lexeme, db_column='l_id_od', related_name='refs_to') to_lexeme = ForeignKey( Lexeme, db_column='l_id_do', related_name='refs_from', - verbose_name=u'nr docelowy') + verbose_name=_(u'nr docelowy')) type = ForeignKey( - CrossReferenceType, db_column='typods_id', verbose_name=u'typ') + CrossReferenceType, db_column='typods_id', verbose_name=_(u'typ')) objects = CRManager() all_objects = Manager() diff --git a/dictionary/reports.py b/dictionary/reports.py index 4529f7d..7df5870 100644 --- a/dictionary/reports.py +++ b/dictionary/reports.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +from django.utils.translation import ugettext as _ + from dictionary.models import Lexeme, LexemeAttributeValue, Pattern, \ CrossReferenceType @@ -15,7 +17,7 @@ def derivatives_without_verb(): derivatives = Lexeme.objects.filter( part_of_speech__symbol__in=('ger', 'pact', 'ppas', 'appas')) return { - u'Brak odsyłacza do czasownika': + _(u'Brak odsyłacza do czasownika'): derivatives.exclude(refs_to__type__symbol__endswith='ver'), } @@ -58,8 +60,8 @@ def verbs_without_derivatives(): proper_11 = proper_verbs.filter(patterns__in=patterns11) no_ger = proper_11.exclude(refs_to__type__symbol='verger') return { - u'Brak imiesłowu biernego': no_ppas, - u'Brak quasi-imiesłowu biernego': no_appas, - u'Brak imiesłowu czynnego': no_pact, - u'Brak odsłownika': no_ger, - } \ No newline at end of file + _(u'Brak imiesłowu biernego'): no_ppas, + _(u'Brak quasi-imiesłowu biernego'): no_appas, + _(u'Brak imiesłowu czynnego'): no_pact, + _(u'Brak odsłownika'): no_ger, + } diff --git a/dictionary/static/js/lexeme-edit.js b/dictionary/static/js/lexeme-edit.js index a027c25..cafb142 100644 --- a/dictionary/static/js/lexeme-edit.js +++ b/dictionary/static/js/lexeme-edit.js @@ -83,8 +83,8 @@ $.extend(edit, { var stale_attrs = check_attrs(genders); if (stale_attrs.length > 0) { var fmt = ngettext( - "Atrybuty: %s zostaną usunięte.", - "Atrybut: %s zostanie usunięty.", stale_attrs.length); + "Atrybut: %s zostanie usunięty.", + "Atrybuty: %s zostaną usunięte.", stale_attrs.length); if (!window.confirm(interpolate(fmt, [stale_attrs]) + ' ' + gettext("Kontynuować?"))) { return; @@ -253,8 +253,8 @@ $.extend(edit, { var stale_classifications = check_classifications(), confirmed; if (stale_classifications.length > 0) { var msg = ngettext( - "Zostaną usunięte klasyfikacje:", "Zostanie usunięta klasyfikacja:", + "Zostaną usunięte klasyfikacje:", stale_classifications.length); confirmed = window.confirm( msg + ' ' + join_classifications(stale_classifications) + @@ -274,8 +274,8 @@ $.extend(edit, { var confirmed; if (stale_attrs.length > 0) { var fmt = ngettext( - "Atrybuty: %s zostaną usunięte.", - "Atrybut: %s zostanie usunięty.", stale_attrs.length); + "Atrybut: %s zostanie usunięty.", + "Atrybuty: %s zostaną usunięte.", stale_attrs.length); confirmed = window.confirm( interpolate(fmt, [join_attrs(stale_attrs)]) + ' ' + gettext("Kontynuować?")); diff --git a/dictionary/templates/classification_forms.html b/dictionary/templates/classification_forms.html index 9face39..6dfa8c7 100644 --- a/dictionary/templates/classification_forms.html +++ b/dictionary/templates/classification_forms.html @@ -1,5 +1,7 @@ +{% load i18n %} + {% if classification_forms %} - <h4>Klasyfikacje</h4> + <h4>{% trans 'Klasyfikacje' %}</h4> {% for form in classification_forms %} {{ form.as_p }} {% endfor %} diff --git a/dictionary/templates/classification_value_tree.html b/dictionary/templates/classification_value_tree.html index bd3ee0b..46f051c 100644 --- a/dictionary/templates/classification_value_tree.html +++ b/dictionary/templates/classification_value_tree.html @@ -1,4 +1,4 @@ -{% load dictionary_extras %} +{% load dictionary_extras i18n %} <ul class="value-tree"> {% for value, subtree in value_tree %} <li> @@ -12,7 +12,7 @@ <input type="hidden" name="det" value="value_remove"/> <input type="hidden" name="id" value="{{ value.pk }}"/> <button type="submit"> - usuń + {% trans 'usuń' %} </button> </form> {% endif %} @@ -22,7 +22,7 @@ <input type="hidden" name="id" value="{{ value.pk }}"/> <input type="text" name="new_name"/> <button type="submit"> - zmień nazwę + {% trans 'zmień nazwę' %} </button> </form> </span> diff --git a/dictionary/templates/inflection_tables.html b/dictionary/templates/inflection_tables.html index 36cc01d..e03300f 100644 --- a/dictionary/templates/inflection_tables.html +++ b/dictionary/templates/inflection_tables.html @@ -1,4 +1,4 @@ -{% load dictionary_extras %} +{% load dictionary_extras i18n %} <div class="entry-article scheme{{ lexeme.part_of_speech.color_scheme }}"> <h1> {{ lexeme.entry }} @@ -23,7 +23,7 @@ <span class="qualifiers"> {{ info.qualifiers|join:" " }} {% if info.commonness %} - n. wł. {{ info.commonness|join:", " }} + {% trans 'n. wł.' %} {{ info.commonness|join:", " }} {% endif %} </span> {% if lexeme.note %} @@ -36,7 +36,7 @@ </p> {% if lexeme|attribute:"rozwinięcie" %} <p> - rozwinięcie: {{ lexeme|attribute:"rozwinięcie" }} + {% trans 'rozwinięcie' %}: {{ lexeme|attribute:"rozwinięcie" }} </p> {% endif %} <p> @@ -68,7 +68,7 @@ {% if cross_references %} <table class="cross-references"> <tr> - <th class="head" colspan="2">Odsyłacze</th> + <th class="head" colspan="2">{% trans 'Odsyłacze' %}</th> </tr> {% for cr in cross_references %} <tr> diff --git a/dictionary/templates/lexeme_edit_form.html b/dictionary/templates/lexeme_edit_form.html index 99ff2c8..e4db885 100644 --- a/dictionary/templates/lexeme_edit_form.html +++ b/dictionary/templates/lexeme_edit_form.html @@ -1,21 +1,21 @@ -{% load dictionary_extras %} +{% load dictionary_extras i18n %} <form action="" method="post" id="lexeme-edit-form"> <p class="lexeme-save"> <button type="submit" disabled="disabled" class="lexeme-edit-submit"> - Zapisz + {% trans 'Zapisz' %} </button> <button type="reset" disabled="disabled" class="lexeme-edit-cancel"> - Anuluj + {% trans 'Anuluj' %} </button> <button type="button" class="lexeme-edit-delete" {% if not editable %}disabled="disabled"{% endif %}> - Usuń leksem + {% trans 'Usuń leksem' %} </button> </p> <table id="vocab-list"> <tr> - <th>Słownik właściciel</th> - <th>Słowniki używające</th> + <th>{% trans 'Słownik właściciel' %}</th> + <th>{% trans 'Słowniki używające' %}</th> </tr> <tr> <td> @@ -75,7 +75,7 @@ {% endfor %} </div> <p> - Sposoby odmiany: + {% trans 'Sposoby odmiany' %}: <input type="hidden" name="id" value="{{ id }}"/> {% if editable %} <button type="button" id="add-row"> @@ -88,20 +88,20 @@ {% include 'lexeme_edit_form_row.html' %} {% endfor %} </ul> - <p>Kwalifikatory:</p> + <p>{% trans 'Kwalifikatory' %}:</p> <p> {% if ro_qualifiers %} {{ owner.id }}: {{ ro_qualifiers|join:", " }}; {% endif %} </p> <p> - stylistyczne: {{ form.style_qualifiers.as_widget }} + {% trans 'stylistyczne' %}: {{ form.style_qualifiers.as_widget }} </p> <p> - zakresowe: {{ form.scope_qualifiers.as_widget }} + {% trans 'zakresowe' %}: {{ form.scope_qualifiers.as_widget }} </p> <p id="specialist" style="display: none;"> - {{ form.specialist.as_widget }} specjalistyczny + {{ form.specialist.as_widget }} {% trans 'specjalistyczny' %} </p> <p class="main-field"> {{ form.qualifiers_dor.label_tag }} {{ form.qualifiers_dor.as_widget }} @@ -133,7 +133,7 @@ </p> {% if editable or cross_references %} <p> - Odsyłacze: + {% trans 'Odsyłacze' %}: {% if editable %} <button type="button" id="add-cr-row"> <span class="ui-icon ui-icon-plus"></span> @@ -166,14 +166,14 @@ {% endif %} <p class="lexeme-save"> <button type="submit" disabled="disabled" class="lexeme-edit-submit"> - Zapisz + {% trans 'Zapisz' %} </button> <button type="reset" disabled="disabled" class="lexeme-edit-cancel"> - Anuluj + {% trans 'Anuluj' %} </button> <button type="button" class="lexeme-edit-delete" {% if not editable %}disabled="disabled"{% endif %}> - Usuń leksem + {% trans 'Usuń leksem' %} </button> </p> </form> diff --git a/dictionary/templates/lexeme_view.html b/dictionary/templates/lexeme_view.html index e221088..bda4535 100644 --- a/dictionary/templates/lexeme_view.html +++ b/dictionary/templates/lexeme_view.html @@ -44,33 +44,33 @@ src="{% static 'js/lexeme-edit.js' %}"></script> {% endblock %} -{% block title %}Widok leksemów{% endblock %} +{% block title %}{% trans 'Widok leksemów' %}{% endblock %} {% block content %} <div id="left"> <div id="search-panel"> - <button id="sort-button" title="sortuj"> - <span class="ui-icon ui-icon-sort">sortuj</span> + <button id="sort-button" title="{% trans 'sortuj' %}"> + <span class="ui-icon ui-icon-sort">{% trans 'sortuj' %}</span> </button> - <button id="filter-button" title="filtruj"> - <span class="ui-icon ui-icon-filter">filtruj</span> + <button id="filter-button" title="{% trans 'filtruj' %}"> + <span class="ui-icon ui-icon-filter">{% trans 'filtruj' %}</span> </button> - <button id="show-columns-button" title="pokaż/ukryj"> - <span class="ui-icon ui-icon-columns">pokaż/ukryj</span> + <button id="show-columns-button" title="{% trans 'pokaż/ukryj' %}"> + <span class="ui-icon ui-icon-columns">{% trans 'pokaż/ukryj' %}</span> </button> <input type="text" id="text-search"/> - <button id="search-button" title="szukaj"> - <span class="ui-icon ui-icon-search">szukaj</span> + <button id="search-button" title="{% trans 'szukaj' %}"> + <span class="ui-icon ui-icon-search">{% trans 'szukaj' %}</span> </button> {% if perms.dictionary.change_lexeme %} - <!--button id="action-button" title="akcje grupowe"> - <span class="ui-icon ui-icon-star">akcje grupowe</span> + <!--button id="action-button" title="{% trans 'akcje grupowe' %}"> + <span class="ui-icon ui-icon-star">{% trans 'akcje grupowe' %}</span> </button--> - <button id="add-button" title="dodaj leksem"> - <span class="ui-icon ui-icon-plus">dodaj leksem</span> + <button id="add-button" title="{% trans 'dodaj leksem' %}"> + <span class="ui-icon ui-icon-plus">{% trans 'dodaj leksem' %}</span> </button> {% endif %} - <button id="more-button" title="więcej"> + <button id="more-button" title="{% trans 'więcej' %}"> <span class="ellipsis-icon">...</span> </button> </div> @@ -79,11 +79,11 @@ <div id="right"> <div class="tabs" id="lexeme-tabs"> <ul> - <li><a href="#edit" id="edit-tab">Edycja</a></li> - <li><a href="#variant0">Formy bazowe</a></li> - <li><a href="#variant1">Wszystkie formy</a></li> + <li><a href="#edit" id="edit-tab">{% trans 'Edycja' %}</a></li> + <li><a href="#variant0">{% trans 'Formy bazowe' %}</a></li> + <li><a href="#variant1">{% trans 'Wszystkie formy' %}</a></li> <!--li><a href="#odm">Formy z sjp.pl</a></li--> - <li><a href="#history">Historia</a></li> + <li><a href="#history">{% trans 'Historia' %}</a></li> </ul> <div id="edit"></div> <div id="variant0"></div> @@ -95,74 +95,74 @@ {% endblock %} {% block modal_elements %} - <div id="choose-columns-dialog" title="Wybierz kolumny"> + <div id="choose-columns-dialog" title="{% trans 'Wybierz kolumny' %}"> <select id="column-list" multiple=multiple></select> </div> - <div id="choose-filter-dialog" title="Filtrowanie"> + <div id="choose-filter-dialog" title="{% trans 'Filtrowanie' %}"> <p> <select id="group-op"> - <option value="AND" selected="selected">oraz</option> - <option value="OR">lub</option> + <option value="AND" selected="selected">{% trans 'oraz' %}</option> + <option value="OR">{% trans 'lub' %}</option> </select> - <input type="button" value="+" title="Dodaj filtr" + <input type="button" value="+" title="{% trans 'Dodaj filtr' %}" id="add-filter-button"> </p> <table id="filter-table"></table> </div> - <div id="load-filter-dialog" title="Wybierz filtr"> + <div id="load-filter-dialog" title="{% trans 'Wybierz filtr' %}"> <ul id="filter-list" class="load-dialog-list"></ul> </div> - <div id="group-action-dialog" title="Wybierz akcję grupową"> - <button id="add-action" title="dodaj akcję"> - <span class="ui-icon ui-icon-plus">dodaj akcję</span> + <div id="group-action-dialog" title="{% trans 'Wybierz akcję grupową' %}"> + <button id="add-action" title="{% trans 'dodaj akcję' %}"> + <span class="ui-icon ui-icon-plus">{% trans 'dodaj akcję' %}</span> </button> <table id="action-list" class="group-action-list"> </table> </div> - <div id="choose-homonym-dialog" title="Wybierz homonim"> + <div id="choose-homonym-dialog" title="{% trans 'Wybierz homonim' %}"> <table id="homonym-list" class="choose-homonym-list"> <thead> <tr> - <th>Nr hom.</th> - <th>Rodzaj</th> - <th>Wzór</th> + <th>{% trans 'Nr hom.' %}</th> + <th>{% trans 'Rodzaj' %}</th> + <th>{% trans 'Wzór' %}</th> </tr> </thead> <tbody> </tbody> </table> </div> - <div id="prompter-dialog" title="Podpowiadacz wzorów"> + <div id="prompter-dialog" title="{% trans 'Podpowiadacz wzorów' %}"> <div id="prompter-dialog-left"> <table id="prompter-list"> </table> <ul id="prompter-checkboxes"> <li> <input type="checkbox" id="prompter-gender"/> - <label for="prompter-gender">Uwzględniaj rodzaj</label> + <label for="prompter-gender">{% trans 'Uwzględniaj rodzaj' %}</label> </li> <li> <input type="checkbox" id="prompter-commonness"/> - <label for="prompter-commonness">Uwzględniaj - pospolitość</label> + <label for="prompter-commonness">{% trans 'Uwzględniaj pospolitość' %}</label> </li> <li> <input type="checkbox" id="prompter-blacklist"/> - <label for="prompter-blacklist">Pomijaj wzory - nietypowe</label> + <label for="prompter-blacklist">{% trans 'Pomijaj wzory nietypowe' %}</label> </li> </ul> </div> <div id="prompter-table-preview"> </div> </div> - <div id="default-owner-dialog" title="Wybór domyślnego słownika"> + <div id="default-owner-dialog" title="{% trans 'Wybór domyślnego słownika' %}"> <p> - Wybierz słownik domyślnie ustawiany jako właściciel przy dodawaniu - leksemów. + {% blocktrans %} + Wybierz słownik domyślnie ustawiany jako właściciel przy + dodawaniu leksemów. + {% endblocktrans %} </p> <p> - Wybór można będzie zmienić w Ustawieniach. + {% trans 'Wybór można będzie zmienić w Ustawieniach.' %} </p> <ul id="default-owner"> {% for vocab in editable_vocabularies %} @@ -173,23 +173,23 @@ {% endfor %} </ul> </div> - <div id="more-actions-dialog" title="Inne działania"> + <div id="more-actions-dialog" title="{% trans 'Inne działania' %}"> <p><button type="button" id="export-list-button"> - Eksport aktualnie filtrowanej listy + {% trans 'Eksport aktualnie filtrowanej listy' %} </button></p> <p><button type="button" id="reload-list-button"> - Przeładowanie listy + {% trans 'Przeładowanie listy' %} </button></p> <p><button type="button" id="clone-lexeme-button"> - Sklonowanie aktywnego leksemu + {% trans 'Sklonowanie aktywnego leksemu' %} </button></p> </div> - <div id="auto-derivatives-dialog" title="Tworzenie derywatów"> - <p>Wybierz hasła do utworzenia:</p> + <div id="auto-derivatives-dialog" title="{% trans 'Tworzenie derywatów' %}"> + <p>{% trans 'Wybierz hasła do utworzenia' %}:</p> <ul id="auto-derivatives-list"> </ul> </div> - <div id="search-by-form-dialog" title="Szukanie według formy"> + <div id="search-by-form-dialog" title="{% trans 'Szukanie według formy' %}"> <table id="search-by-form-table"> </table> </div> diff --git a/dictionary/templates/reader_view.html b/dictionary/templates/reader_view.html index 07fc395..66d54c6 100644 --- a/dictionary/templates/reader_view.html +++ b/dictionary/templates/reader_view.html @@ -36,23 +36,23 @@ src="{% static 'js/reader-view.js' %}"></script> {% endblock %} -{% block title %}Słownik gramatyczny języka polskiego{% endblock %} +{% block title %}{% trans 'Słownik gramatyczny języka polskiego' %}{% endblock %} {% block content %} <div id="left"> <div id="search-panel"> - <button id="sort-button" title="sortuj"> - <span class="ui-icon ui-icon-sort">sortuj</span> + <button id="sort-button" title="{% trans 'sortuj' %}"> + <span class="ui-icon ui-icon-sort">{% trans 'sortuj' %}</span> </button> - <button id="filter-button" title="filtruj"> - <span class="ui-icon ui-icon-filter">filtruj</span> + <button id="filter-button" title="{% trans 'filtruj' %}"> + <span class="ui-icon ui-icon-filter">{% trans 'filtruj' %}</span> </button> - <button id="show-columns-button" title="pokaż/ukryj"> - <span class="ui-icon ui-icon-columns">pokaż/ukryj</span> + <button id="show-columns-button" title="{% trans 'pokaż/ukryj' %}"> + <span class="ui-icon ui-icon-columns">{% trans 'pokaż/ukryj' %}</span> </button> <input type="text" id="text-search"/> - <button id="search-button" title="szukaj"> - <span class="ui-icon ui-icon-search">szukaj</span> + <button id="search-button" title="{% trans 'szukaj' %}"> + <span class="ui-icon ui-icon-search">{% trans 'szukaj' %}</span> </button> </div> <div id="lexeme-grid"></div> @@ -60,8 +60,8 @@ <div id="right"> <div class="tabs" id="lexeme-tabs"> <ul> - <li><a href="#variant1">Wszystkie formy</a></li> - <li><a href="#variant0">Formy bazowe</a></li> + <li><a href="#variant1">{% trans 'Wszystkie formy' %}</a></li> + <li><a href="#variant0">{% trans 'Formy bazowe' %}</a></li> </ul> <div id="variant1"></div> <div id="variant0"></div> @@ -70,21 +70,21 @@ {% endblock %} {% block modal_elements %} - <div id="choose-columns-dialog" title="Wybierz kolumny"> + <div id="choose-columns-dialog" title="{% trans 'Wybierz kolumny' %}"> <select id="column-list" multiple=multiple></select> </div> - <div id="choose-filter-dialog" title="Filtrowanie"> + <div id="choose-filter-dialog" title="{% trans 'Filtrowanie' %}"> <p> <select id="group-op"> - <option value="AND" selected="selected">oraz</option> - <option value="OR">lub</option> + <option value="AND" selected="selected">{% trans 'oraz' %}</option> + <option value="OR">{% trans 'lub' %}</option> </select> - <input type="button" value="+" title="Dodaj filtr" + <input type="button" value="+" title="{% trans 'Dodaj filtr' %}" id="add-filter-button"> </p> <table id="filter-table"></table> </div> - <div id="search-by-form-dialog" title="Szukanie według formy"> + <div id="search-by-form-dialog" title="{% trans 'Szukanie według formy' %}"> <table id="search-by-form-table"> </table> </div> diff --git a/dictionary/templates/sort_dialog.html b/dictionary/templates/sort_dialog.html index 6b8d7c9..534432d 100644 --- a/dictionary/templates/sort_dialog.html +++ b/dictionary/templates/sort_dialog.html @@ -1,23 +1,24 @@ -<div id="sort-dialog-form" title="Porządek sortowania"> +{% load i18n %} +<div id="sort-dialog-form" title="{% trans 'Porządek sortowania' %}"> <ul id='sort-rule-list'> {% for rule in sort_rules %} <li id="{{ rule.code_name }}" class="ui-state-default"> <span class="sort-column">{{ rule.ui_name }}</span> - <span class="sort-dir"> - <select id="order-{{ rule.code_name }}"> - <option value="asc">Rosnąco</option> - <option value="desc">Malejąco</option> - </select> - </span> + <span class="sort-dir"> + <select id="order-{{ rule.code_name }}"> + <option value="asc">{% trans 'Rosnąco' %}</option> + <option value="desc">{% trans 'Malejąco' %}</option> + </select> + </span> {% if rule.code_name == "entry" %} <span class="sort-a-tergo"> - <input type="checkbox" id="entries_a_tergo"/> a tergo - </span> + <input type="checkbox" id="entries_a_tergo"/> a tergo + </span> {% endif %} </li> {% endfor %} </ul> - <input type="button" id="save-sort-order" value="Zatwierdź"/> - <input type="button" id="cancel-sort-order" value="Anuluj"/> + <input type="button" id="save-sort-order" value="{% trans 'Zatwierdź' %}"/> + <input type="button" id="cancel-sort-order" value="{% trans 'Anuluj' %}"/> </div> diff --git a/dictionary/urls.py b/dictionary/urls.py index 9c0fb7f..411d29c 100644 --- a/dictionary/urls.py +++ b/dictionary/urls.py @@ -29,9 +29,6 @@ urlpatterns += patterns( url(r'^ajax/table-preview/$', 'table_preview'), url(r'^ajax/new-lip-row/$', 'new_lip_edit_row'), url(r'^ajax/save-columns/$', 'save_columns'), - url(r'^ajax/add-vocabulary/$', 'add_vocabulary'), - url(r'^ajax/get-privileges/$', 'vocabulary_permissions'), - url(r'^ajax/set-privilege$', 'set_vocabulary_permission'), url(r'^ajax/new-cr-row/$', 'new_cross_reference_row'), url(r'^ajax/delete-lexeme/$', 'delete_lexeme'), url(r'^ajax/check-pos/$', 'check_pos'), diff --git a/dictionary/views.py b/dictionary/views.py index 6ef8f77..10a20a6 100644 --- a/dictionary/views.py +++ b/dictionary/views.py @@ -6,6 +6,7 @@ from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.models import User, AnonymousUser from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse +from django.utils.translation import ugettext as _ from common.decorators import render from common.util import json_decode @@ -44,9 +45,9 @@ def lexeme_view(request): vocabs = {} for v in editable_vocabs: vocabs.update(dict((str(q.pk), v.id) for q in v.qualifiers.all())) - qualifier_options = [(0, u'(puste)')] - lexeme_qualifier_options = [(0, u'(puste)')] - form_qualifier_options = [(0, u'(puste)')] + qualifier_options = [(0, _(u'(puste)'))] + lexeme_qualifier_options = [(0, _(u'(puste)'))] + form_qualifier_options = [(0, _(u'(puste)'))] for vocab in visible: qualifiers = vocab.qualifiers.all() if qualifiers: @@ -126,7 +127,8 @@ def lexeme_view(request): 'form_qualifier_options': form_qualifier_options, 'qualifier_options': qualifier_options, 'cv_options': cv_options, - 'status_options': Lexeme.STATUS_CHOICES, + 'status_options': [ + (key, unicode(value)) for key, value in Lexeme.STATUS_CHOICES], 'cr_type_options': cr_type_options, 'gender_options': [(g.id, g.symbol) for g in Gender.objects.all()], 'pattern_type_options': PatternType.options(), @@ -151,9 +153,9 @@ def lexeme_view(request): def reader_view(request): visible = visible_vocabularies(AnonymousUser()) vocabs = {} - qualifier_options = [(0, u'(puste)')] - lexeme_qualifier_options = [(0, u'(puste)')] - form_qualifier_options = [(0, u'(puste)')] + qualifier_options = [(0, _(u'(puste)'))] + lexeme_qualifier_options = [(0, _(u'(puste)'))] + form_qualifier_options = [(0, _(u'(puste)'))] for vocab in visible: qualifiers = vocab.qualifiers.all() if qualifiers: @@ -182,7 +184,7 @@ def reader_view(request): for la in LexemeAttribute.objects.all(): attr = {'id': la.id, 'name': la.name, 'closed': la.closed} if attr['closed']: - attr['options'] = [(0, u'(puste)')] + [ + attr['options'] = [(0, _(u'(puste)'))] + [ (v.id, v.value) for v in la.values.all()] extra_attrs.append(attr) js_vars = { @@ -204,7 +206,8 @@ def reader_view(request): 'form_qualifier_options': form_qualifier_options, 'qualifier_options': qualifier_options, 'cv_options': cv_options, - 'status_options': Lexeme.STATUS_CHOICES, + 'status_options': [ + (key, unicode(value)) for key, value in Lexeme.STATUS_CHOICES], 'cr_type_options': cr_type_options, 'gender_options': [(g.id, g.symbol) for g in Gender.objects.all()], 'pattern_type_options': PatternType.options(), @@ -317,4 +320,4 @@ def wsjp_table(request, entry): data = make_data(entry) result = '\n'.join( '\t'.join(['%s'] * len(data_row)) % data_row for data_row in data) - return HttpResponse(result, content_type="text/plain; charset=utf-8") \ No newline at end of file + return HttpResponse(result, content_type="text/plain; charset=utf-8") diff --git a/export/forms.py b/export/forms.py index 2940c94..bcef0e7 100644 --- a/export/forms.py +++ b/export/forms.py @@ -1,26 +1,28 @@ # -*- coding: utf-8 -*- from django.forms import Form, ModelMultipleChoiceField, ModelChoiceField, \ BooleanField, CharField, Textarea +from django.utils.translation import ugettext_lazy as _ + from dictionary.forms import QualifierField from dictionary.models import Vocabulary, Variant class ExportForm(Form): vocabs = ModelMultipleChoiceField( - queryset=Vocabulary.objects.all(), label=u'słowniki') + queryset=Vocabulary.objects.all(), label=_(u'słowniki')) antivocabs = ModelMultipleChoiceField( - queryset=Vocabulary.objects.all(), label=u'antysłowniki', + queryset=Vocabulary.objects.all(), label=_(u'antysłowniki'), required=False) variant = ModelChoiceField( queryset=Variant.objects.filter(type=Variant.TYPE_EXPORT), - label=u'wariant') - refl = BooleanField(label=u'tagi z "refl"', required=False) - commonness = BooleanField(label=u'etykiety pospolitości', required=False) + label=_(u'wariant')) + refl = BooleanField(label=_(u'tagi z "refl"'), required=False) + commonness = BooleanField(label=_(u'etykiety pospolitości'), required=False) copyright = CharField(widget=Textarea(attrs={'cols': 80, 'rows': 40})) # excluding_qualifiers = QualifiersField( - # required=False, label=u'kwal. wykluczające') + # required=False, label=_(u'kwal. wykluczające')) class MagicQualifierForm(Form): - qualifier = QualifierField(label=u'kwal. leksemu') - regex = CharField(label=u'wzorzec tagu', required=False) \ No newline at end of file + qualifier = QualifierField(label=_(u'kwal. leksemu')) + regex = CharField(label=_(u'wzorzec tagu'), required=False) diff --git a/export/locale/en/LC_MESSAGES/django.po b/export/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..8aee4f1 --- /dev/null +++ b/export/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:12 +msgid "słowniki" +msgstr "dictionaries" + +#: forms.py:14 +msgid "antysłowniki" +msgstr "antidictionaries" + +#: forms.py:18 +msgid "wariant" +msgstr "variant" + +#: forms.py:19 +msgid "tagi z \"refl\"" +msgstr "tags with \"refl\"" + +#: forms.py:20 +msgid "etykiety pospolitości" +msgstr "commonness labels" + +#: forms.py:27 +msgid "kwal. leksemu" +msgstr "lexeme qual." + +#: forms.py:28 +msgid "wzorzec tagu" +msgstr "tag pattern" + +#: templates/export.html:8 +msgid "Definiowanie parametrów eksportu" +msgstr "Define export parameters" + +#: templates/export.html:11 +msgid "Definiowanie parametrów eksportu leksemów" +msgstr "Define lexeme export parameters" + +#: templates/export.html:14 +msgid "Kwalifikatory do wykluczenia (pusty wzorzec wyklucza cały kwalifikator)" +msgstr "Qualifiers to exclude (empty pattern excluded the whole qualifier)" + +#: templates/export.html:19 +msgid "Zapisz ustawienia" +msgstr "Save parameters" + +#: templates/export.html:20 +msgid "Wczytaj ustawienia" +msgstr "Load parameters" + +#: templates/export.html:26 +msgid "Wybierz ustawienia eksportu" +msgstr "Choose export parameters" diff --git a/export/locale/en/LC_MESSAGES/djangojs.po b/export/locale/en/LC_MESSAGES/djangojs.po index 05a6ad3..56e86c3 100644 --- a/export/locale/en/LC_MESSAGES/djangojs.po +++ b/export/locale/en/LC_MESSAGES/djangojs.po @@ -1,35 +1,54 @@ -# export.js:7 +# English translation of the export module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: static/js/export.js:7 msgid "kwalifikatorów" msgstr "qualifiers" -# export.js:55 +#: static/js/export.js:55 msgid "Wybierz nazwę" msgstr "Enter name" -# export.js:65 +#: static/js/export.js:65 msgid "Zapisanie ustawień" msgstr "Settings save" -# export.js:70 +#: static/js/export.js:70 msgid "Ta nazwa jest zajęta. Nadpisać?" msgstr "This name is already used. Overwrite?" -# export.js:130 +#: static/js/export.js:130 msgid "Usunąć eksport" msgstr "Delete export settings" -# export.js:135 +#: static/js/export.js:135 msgid "Usunięcie ustawień eksportu" msgstr "Export settings deletion" -# export.js:160 +#: static/js/export.js:160 msgid "Pobranie zapisanych eksportów" msgstr "Export settings load" -# export.js:169 +#: static/js/export.js:169 msgid "Wybierz słowniki" msgstr "Choose dictionaries" -# export.js:170 +#: static/js/export.js:170 msgid "# słowników" -msgstr "# dictionaries" \ No newline at end of file +msgstr "# dictionaries" diff --git a/export/locale/pl/LC_MESSAGES/django.po b/export/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..3626811 --- /dev/null +++ b/export/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,72 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: forms.py:12 +msgid "słowniki" +msgstr "" + +#: forms.py:14 +msgid "antysłowniki" +msgstr "" + +#: forms.py:18 +msgid "wariant" +msgstr "" + +#: forms.py:19 +msgid "tagi z \"refl\"" +msgstr "" + +#: forms.py:20 +msgid "etykiety pospolitości" +msgstr "" + +#: forms.py:27 +msgid "kwal. leksemu" +msgstr "" + +#: forms.py:28 +msgid "wzorzec tagu" +msgstr "" + +#: templates/export.html:8 +msgid "Definiowanie parametrów eksportu" +msgstr "" + +#: templates/export.html:11 +msgid "Definiowanie parametrów eksportu leksemów" +msgstr "" + +#: templates/export.html:14 +msgid "Kwalifikatory do wykluczenia (pusty wzorzec wyklucza cały kwalifikator)" +msgstr "" + +#: templates/export.html:19 +msgid "Zapisz ustawienia" +msgstr "" + +#: templates/export.html:20 +msgid "Wczytaj ustawienia" +msgstr "" + +#: templates/export.html:26 +msgid "Wybierz ustawienia eksportu" +msgstr "" diff --git a/export/locale/pl/LC_MESSAGES/djangojs.po b/export/locale/pl/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..e74277d --- /dev/null +++ b/export/locale/pl/LC_MESSAGES/djangojs.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: static/js/export.js:7 +msgid "kwalifikatorów" +msgstr "" + +#: static/js/export.js:55 +msgid "Wybierz nazwę" +msgstr "" + +#: static/js/export.js:65 +msgid "Zapisanie ustawień" +msgstr "" + +#: static/js/export.js:70 +msgid "Ta nazwa jest zajęta. Nadpisać?" +msgstr "" + +#: static/js/export.js:130 +msgid "Usunąć eksport" +msgstr "" + +#: static/js/export.js:135 +msgid "Usunięcie ustawień eksportu" +msgstr "" + +#: static/js/export.js:160 +msgid "Pobranie zapisanych eksportów" +msgstr "" + +#: static/js/export.js:169 +msgid "Wybierz słowniki" +msgstr "" + +#: static/js/export.js:170 +msgid "# słowników" +msgstr "" diff --git a/export/templates/export.html b/export/templates/export.html index 446aff7..69c301e 100644 --- a/export/templates/export.html +++ b/export/templates/export.html @@ -1,30 +1,29 @@ {% extends "base.html" %} -{% load url from future %} -{% load staticfiles %} +{% load staticfiles i18n %} {% block extrahead %} <script type="text/javascript" src="{% static 'js/export.js' %}"></script> {% endblock %} -{% block title %}Definiowanie parametrów eksportu{% endblock %} +{% block title %}{% trans 'Definiowanie parametrów eksportu' %}{% endblock %} {% block content %} - <h3>Definiowanie parametrów eksportu leksemów</h3> + <h3>{% trans 'Definiowanie parametrów eksportu leksemów' %}</h3> <form method="get" action="" id="export-form"> {{ form.as_p }} - Kwalifikatory do wykluczenia (pusty wzorzec wyklucza cały kwalifikator): + {% trans 'Kwalifikatory do wykluczenia (pusty wzorzec wyklucza cały kwalifikator)' %}: <button type="button" id="add-magic-qualifier-row"> <span class="ui-icon ui-icon-plus"></span> </button> <ul id="magic-qualifiers"></ul> - <button type="button" class="save">Zapisz ustawienia</button> - <button type="button" class="load">Wczytaj ustawienia</button> + <button type="button" class="save">{% trans 'Zapisz ustawienia' %}</button> + <button type="button" class="load">{% trans 'Wczytaj ustawienia' %}</button> {#<button type="submit">Generuj eksport</button>#} </form> {% endblock %} {% block modal_elements %} - <div id="load-data-dialog" title="Wybierz ustawienia eksportu"> + <div id="load-data-dialog" title="{% trans 'Wybierz ustawienia eksportu' %}"> <ul id="data-list" class="load-dialog-list"> </ul> </div> diff --git a/history/lexeme_history.py b/history/lexeme_history.py index a2ade72..73c42cc 100644 --- a/history/lexeme_history.py +++ b/history/lexeme_history.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- from django.core.exceptions import ObjectDoesNotExist +from django.utils.translation import ugettext_lazy as _ + from common.util import GroupDict from dictionary.models import Lexeme, LexemeInflectionPattern, \ Pattern, InflectionCharacteristic, ClassificationValue, Qualifier, History, \ @@ -8,24 +10,24 @@ from dictionary.models import Lexeme, LexemeInflectionPattern, \ attribute_translation_list = [ # Leksem - ('leksemy', 'haslo', u'hasło'), - ('leksemy', 'haslosuf', u'sufiks hasła'), - ('leksemy', 'glosa', u'glosa'), - ('leksemy', 'nota', u'nota'), - ('leksemy', 'extended_note', u'nota rozszerzona'), - ('leksemy', 'wymowa', u'wymowa'), - ('leksemy', 'valence', u'łączliwość'), - ('leksemy', 'pos', u'część mowy'), - ('leksemy', 'slownik', u'słownik właściciel'), - ('leksemy', 'status', u'status'), - ('leksemy', 'komentarz', u'komentarz'), - ('leksemy', 'specialist', u'specjalistyczny'), - ('leksemy', 'borrowing_source_id', u'źródło zapożyczenia'), + ('leksemy', 'haslo', _(u'hasło')), + ('leksemy', 'haslosuf', _(u'sufiks hasła')), + ('leksemy', 'glosa', _(u'glosa')), + ('leksemy', 'nota', _(u'nota')), + ('leksemy', 'extended_note', _(u'nota rozszerzona')), + ('leksemy', 'wymowa', _(u'wymowa')), + ('leksemy', 'valence', _(u'łączliwość')), + ('leksemy', 'pos', _(u'część mowy')), + ('leksemy', 'slownik', _(u'słownik właściciel')), + ('leksemy', 'status', _(u'status')), + ('leksemy', 'komentarz', _(u'komentarz')), + ('leksemy', 'specialist', _(u'specjalistyczny')), + ('leksemy', 'borrowing_source_id', _(u'źródło zapożyczenia')), # Odmiana - ('odmieniasie', 'oind', u'kolejność'), - ('odmieniasie', 'charfl', u'charakterystyka fleksyjna'), - ('odmieniasie', 'gender_id', u'rodzaj'), - ('odmieniasie', 'w_id', u'wzór'), + ('odmieniasie', 'oind', _(u'kolejność')), + ('odmieniasie', 'charfl', _(u'charakterystyka fleksyjna')), + ('odmieniasie', 'gender_id', _(u'rodzaj')), + ('odmieniasie', 'w_id', _(u'wzór')), ] attribute_translation = dict( @@ -33,31 +35,31 @@ attribute_translation = dict( for table, column, label in attribute_translation_list) lexeme_attribute_order = [ - u'hasło', - u'sufiks hasła', - u'glosa', - u'nota', - u'nota rozszerzona', - u'wymowa', - u'łączliwość', - u'część mowy', - u'słownik właściciel', - u'status', - u'komentarz', - u'specjalistyczny', - u'źródło zapożyczenia', - # u'kwalifikator', - # u'klasyfikacja', - # u'slownik', - # u'odsyłacz', + _(u'hasło'), + _(u'sufiks hasła'), + _(u'glosa'), + _(u'nota'), + _(u'nota rozszerzona'), + _(u'wymowa'), + _(u'łączliwość'), + _(u'część mowy'), + _(u'słownik właściciel'), + _(u'status'), + _(u'komentarz'), + _(u'specjalistyczny'), + _(u'źródło zapożyczenia'), + # _(u'kwalifikator'), + # _(u'klasyfikacja'), + # _(u'slownik'), + # _(u'odsyłacz'), ] lip_attribute_order = [ - u'kolejność', - u'charakterystyka fleksyjna', - u'rodzaj', - u'wzór', - # u'kwalifikator', + _(u'kolejność'), + _(u'charakterystyka fleksyjna'), + _(u'rodzaj'), + _(u'wzór'), + # _(u'kwalifikator'), ] @@ -216,15 +218,15 @@ def transaction_table(transaction_data): rows.append( (attr, (', '.join(before) or None, ', '.join(after) or None))) for before_after in qualifiers: - rows.append((u'kwalifikator', before_after)) + rows.append((_(u'kwalifikator'), before_after)) for name, (before, after) in classifications.iteritems(): - attr = u'klasyfikacja: %s' % name + attr = _(u'klasyfikacja: %s') % name rows.append( (attr, (', '.join(before) or None, ', '.join(after) or None))) for before_after in vocabs: - rows.append((u'słownik', before_after)) + rows.append((_(u'słownik'), before_after)) for cr_data in crs.itervalues(): - attr = u'odsyłacz' + attr = _(u'odsyłacz') before_after = [] for i in (0, 1): try: @@ -247,7 +249,7 @@ def transaction_table(transaction_data): lip_dict.add(lip_id, (attr, lip_data[attr])) for q_data in lip_qualifiers.itervalues(): if q_data: # stare DELETE... - attr = u'kwalifikator' + attr = _(u'kwalifikator') lip_data = q_data['lexemeinflectionpattern_id'] lip_id = int(lip_data[0] or lip_data[1]) lip_dict.add(lip_id, (attr, q_data['qualifier_id'])) @@ -268,7 +270,7 @@ def transaction_table(transaction_data): header = lip_header(gender, pattern) except ObjectDoesNotExist: # stare DELETE... header = '' - header += u'(usunięta)' + header += _(u'(usunięta)') lip_tables.append((header, lip_data)) return rows, lip_tables @@ -283,16 +285,16 @@ def deleted_lexeme_table(lexeme): column, get_lexeme_attr(column, lexeme)), None) )) for q in lexeme.qualifiers.all(): - rows.append((u'kwalifikator', (q.label, None))) + rows.append((_(u'kwalifikator'), (q.label, None))) for classification in lexeme.owner_vocabulary.classifications.all(): - attr = u'klasyfikacja: %s' % classification.name + attr = _(u'klasyfikacja: %s') % classification.name cvs = lexeme.classification_values(classification) for cv in cvs: rows.append((attr, (cv.label, None))) for vocab in lexeme.vocabularies.all(): - rows.append((u'słownik', (vocab.id, None))) + rows.append((_(u'słownik'), (vocab.id, None))) for cr in lexeme.refs_to.all(): - attr = u'odsyłacz' + attr = _(u'odsyłacz') rows.append((attr, ( ' '.join([ cr.type.symbol, cr.to_lexeme.entry, @@ -308,7 +310,7 @@ def deleted_lexeme_table(lexeme): if table == 'odmieniasie' and column != 'charfl': lip_data.append((attr, (get_lip_attr(column, lip), None))) for q in lip.qualifiers.all(): - attr = u'kwalifikator' + attr = _(u'kwalifikator') lip_data.append((attr, (q.label, None))) header = lip_header(lip.gender, lip.pattern) lip_tables.append((header, lip_data)) @@ -320,7 +322,7 @@ def lexeme_table(transaction_data, last_tb): try: lexeme = transaction_data[0].lexeme except Lexeme.DoesNotExist: - lexeme = u'(usunięty)' # aktualnie niemożliwe + lexeme = _(u'(usunięty)') # aktualnie niemożliwe return { 'rows': rows, 'lip_tables': lip_tables, diff --git a/history/locale/en/LC_MESSAGES/django.po b/history/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..6733259 --- /dev/null +++ b/history/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,191 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: lexeme_history.py:13 lexeme_history.py:38 +msgid "hasło" +msgstr "entry" + +#: lexeme_history.py:14 lexeme_history.py:39 +msgid "sufiks hasła" +msgstr "entry suffix" + +#: lexeme_history.py:15 lexeme_history.py:40 +msgid "glosa" +msgstr "gloss" + +#: lexeme_history.py:16 lexeme_history.py:41 +msgid "nota" +msgstr "note" + +#: lexeme_history.py:17 lexeme_history.py:42 +msgid "nota rozszerzona" +msgstr "extended note" + +#: lexeme_history.py:18 lexeme_history.py:43 +msgid "wymowa" +msgstr "pronunciation" + +#: lexeme_history.py:19 lexeme_history.py:44 +msgid "łączliwość" +msgstr "valence" + +#: lexeme_history.py:20 lexeme_history.py:45 +msgid "część mowy" +msgstr "part of speech" + +#: lexeme_history.py:21 lexeme_history.py:46 +msgid "słownik właściciel" +msgstr "owner dictionary" + +#: lexeme_history.py:22 lexeme_history.py:47 pattern_history.py:17 +#: pattern_history.py:34 +msgid "status" +msgstr "status" + +#: lexeme_history.py:23 lexeme_history.py:48 pattern_history.py:18 +#: pattern_history.py:35 +msgid "komentarz" +msgstr "comment" + +#: lexeme_history.py:24 lexeme_history.py:49 +msgid "specjalistyczny" +msgstr "specialist" + +#: lexeme_history.py:25 lexeme_history.py:50 +msgid "źródło zapożyczenia" +msgstr "borrowing source" + +#: lexeme_history.py:27 lexeme_history.py:58 pattern_history.py:20 +#: pattern_history.py:39 +msgid "kolejność" +msgstr "index" + +#: lexeme_history.py:28 lexeme_history.py:59 +msgid "charakterystyka fleksyjna" +msgstr "inflection characteristic" + +#: lexeme_history.py:29 lexeme_history.py:60 +msgid "rodzaj" +msgstr "gender" + +#: lexeme_history.py:30 lexeme_history.py:61 +msgid "wzór" +msgstr "pattern" + +#: lexeme_history.py:221 lexeme_history.py:252 lexeme_history.py:288 +#: lexeme_history.py:313 pattern_history.py:142 pattern_history.py:183 +msgid "kwalifikator" +msgstr "qualifier" + +#: lexeme_history.py:223 lexeme_history.py:290 +#, python-format +msgid "klasyfikacja: %s" +msgstr "classification: %s" + +#: lexeme_history.py:227 lexeme_history.py:295 +msgid "słownik" +msgstr "dictionary" + +#: lexeme_history.py:229 lexeme_history.py:297 +msgid "odsyłacz" +msgstr "cross-reference" + +#: lexeme_history.py:273 +msgid "(usunięta)" +msgstr "(deleted)" + +#: lexeme_history.py:325 +msgid "(usunięty)" +msgstr "(deleted)" + +#: pagination_types.py:26 pagination_types.py:51 +msgid "%d.%m.%Y" +msgstr "%Y/%m/%d" + +#: pattern_history.py:13 pattern_history.py:30 +msgid "nazwa" +msgstr "name" + +#: pattern_history.py:14 pattern_history.py:31 +msgid "typ" +msgstr "type" + +#: pattern_history.py:15 pattern_history.py:32 +msgid "przykład" +msgstr "example" + +#: pattern_history.py:16 pattern_history.py:33 +msgid "zakończenie formy podstawowej" +msgstr "basic form ending" + +#: pattern_history.py:21 pattern_history.py:40 +msgid "efobaz" +msgstr "base form label" + +#: pattern_history.py:22 pattern_history.py:41 +#: templates/pattern_history_table.html:11 +msgid "zakończenie" +msgstr "ending" + +#: pattern_history.py:159 pattern_history.py:161 +msgid "(usunięte)" +msgstr "(deleted)" + +#: templates/history_row.html:7 +msgid "dodano" +msgstr "added" + +#: templates/history_row.html:14 +msgid "usunięto" +msgstr "deleted" + +#: templates/history_view.html:13 +msgid "Historia" +msgstr "History" + +#: templates/history_view.html:16 +msgid "Historia zmian" +msgstr "Change history" + +#: templates/history_view.html:19 +msgid "Leksemy" +msgstr "Lexemes" + +#: templates/history_view.html:20 +msgid "Wzory" +msgstr "Patterns" + +#: templates/lexeme_history_table.html:4 +#: templates/pattern_history_table.html:4 +msgid "atrybut" +msgstr "attribute" + +#: templates/lexeme_history_table.html:5 +#: templates/pattern_history_table.html:5 +msgid "przed" +msgstr "before" + +#: templates/lexeme_history_table.html:6 +#: templates/pattern_history_table.html:6 +msgid "po" +msgstr "after" + +#: templates/lexeme_history_table.html:11 +msgid "odmiana" +msgstr "inflection" diff --git a/history/locale/en/LC_MESSAGES/djangojs.po b/history/locale/en/LC_MESSAGES/djangojs.po index 44e47d0..98c3ee7 100644 --- a/history/locale/en/LC_MESSAGES/djangojs.po +++ b/history/locale/en/LC_MESSAGES/djangojs.po @@ -1,3 +1,22 @@ -# history-view.js:7 +# English translation of the history module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: static/js/history-view.js:7 static/js/history-view.js.c:15 msgid "pl" -msgstr "en" \ No newline at end of file +msgstr "en" diff --git a/history/locale/pl/LC_MESSAGES/django.po b/history/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..6f1f761 --- /dev/null +++ b/history/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,193 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: lexeme_history.py:13 lexeme_history.py:38 +msgid "hasło" +msgstr "" + +#: lexeme_history.py:14 lexeme_history.py:39 +msgid "sufiks hasła" +msgstr "" + +#: lexeme_history.py:15 lexeme_history.py:40 +msgid "glosa" +msgstr "" + +#: lexeme_history.py:16 lexeme_history.py:41 +msgid "nota" +msgstr "" + +#: lexeme_history.py:17 lexeme_history.py:42 +msgid "nota rozszerzona" +msgstr "" + +#: lexeme_history.py:18 lexeme_history.py:43 +msgid "wymowa" +msgstr "" + +#: lexeme_history.py:19 lexeme_history.py:44 +msgid "łączliwość" +msgstr "" + +#: lexeme_history.py:20 lexeme_history.py:45 +msgid "część mowy" +msgstr "" + +#: lexeme_history.py:21 lexeme_history.py:46 +msgid "słownik właściciel" +msgstr "" + +#: lexeme_history.py:22 lexeme_history.py:47 pattern_history.py:17 +#: pattern_history.py:34 +msgid "status" +msgstr "" + +#: lexeme_history.py:23 lexeme_history.py:48 pattern_history.py:18 +#: pattern_history.py:35 +msgid "komentarz" +msgstr "" + +#: lexeme_history.py:24 lexeme_history.py:49 +msgid "specjalistyczny" +msgstr "" + +#: lexeme_history.py:25 lexeme_history.py:50 +msgid "źródło zapożyczenia" +msgstr "" + +#: lexeme_history.py:27 lexeme_history.py:58 pattern_history.py:20 +#: pattern_history.py:39 +msgid "kolejność" +msgstr "" + +#: lexeme_history.py:28 lexeme_history.py:59 +msgid "charakterystyka fleksyjna" +msgstr "" + +#: lexeme_history.py:29 lexeme_history.py:60 +msgid "rodzaj" +msgstr "" + +#: lexeme_history.py:30 lexeme_history.py:61 +msgid "wzór" +msgstr "" + +#: lexeme_history.py:221 lexeme_history.py:252 lexeme_history.py:288 +#: lexeme_history.py:313 pattern_history.py:142 pattern_history.py:183 +msgid "kwalifikator" +msgstr "" + +#: lexeme_history.py:223 lexeme_history.py:290 +#, python-format +msgid "klasyfikacja: %s" +msgstr "" + +#: lexeme_history.py:227 lexeme_history.py:295 +msgid "słownik" +msgstr "" + +#: lexeme_history.py:229 lexeme_history.py:297 +msgid "odsyłacz" +msgstr "" + +#: lexeme_history.py:273 +msgid "(usunięta)" +msgstr "" + +#: lexeme_history.py:325 +msgid "(usunięty)" +msgstr "" + +#: pagination_types.py:26 pagination_types.py:51 +msgid "%d.%m.%Y" +msgstr "" + +#: pattern_history.py:13 pattern_history.py:30 +msgid "nazwa" +msgstr "" + +#: pattern_history.py:14 pattern_history.py:31 +msgid "typ" +msgstr "" + +#: pattern_history.py:15 pattern_history.py:32 +msgid "przykład" +msgstr "" + +#: pattern_history.py:16 pattern_history.py:33 +msgid "zakończenie formy podstawowej" +msgstr "" + +#: pattern_history.py:21 pattern_history.py:40 +msgid "efobaz" +msgstr "" + +#: pattern_history.py:22 pattern_history.py:41 +#: templates/pattern_history_table.html:11 +msgid "zakończenie" +msgstr "" + +#: pattern_history.py:159 pattern_history.py:161 +msgid "(usunięte)" +msgstr "" + +#: templates/history_row.html:7 +msgid "dodano" +msgstr "" + +#: templates/history_row.html:14 +msgid "usunięto" +msgstr "" + +#: templates/history_view.html:13 +msgid "Historia" +msgstr "" + +#: templates/history_view.html:16 +msgid "Historia zmian" +msgstr "" + +#: templates/history_view.html:19 +msgid "Leksemy" +msgstr "" + +#: templates/history_view.html:20 +msgid "Wzory" +msgstr "" + +#: templates/lexeme_history_table.html:4 +#: templates/pattern_history_table.html:4 +msgid "atrybut" +msgstr "" + +#: templates/lexeme_history_table.html:5 +#: templates/pattern_history_table.html:5 +msgid "przed" +msgstr "" + +#: templates/lexeme_history_table.html:6 +#: templates/pattern_history_table.html:6 +msgid "po" +msgstr "" + +#: templates/lexeme_history_table.html:11 +msgid "odmiana" +msgstr "" diff --git a/history/locale/pl/LC_MESSAGES/djangojs.po b/history/locale/pl/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..88938e9 --- /dev/null +++ b/history/locale/pl/LC_MESSAGES/djangojs.po @@ -0,0 +1,24 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: static/js/history-view.js:7 static/js/history-view.js.c:15 +msgid "pl" +msgstr "" diff --git a/history/pagination_types.py b/history/pagination_types.py index 3d4ac15..a744e0d 100644 --- a/history/pagination_types.py +++ b/history/pagination_types.py @@ -4,6 +4,7 @@ from datetime import datetime from django.contrib.auth.models import User from django.forms import Form, ChoiceField, Select, ModelChoiceField, \ DateField, DateInput +from django.utils.translation import ugettext_lazy as _ from dictionary.models import History, Lexeme, filter_visible, Pattern @@ -22,7 +23,7 @@ def lexeme_history_list(params, user): objects = objects.exclude(user__username=value) if field == 'time': try: - date = datetime.strptime(value, '%d.%m.%Y') + date = datetime.strptime(value, _('%d.%m.%Y')) if lookup == 'from': objects = objects.filter(transaction_began__gte=date) elif lookup == 'to': @@ -47,7 +48,7 @@ def pattern_history_list(params, user): objects = objects.exclude(user__username=value) if field == 'time': try: - date = datetime.strptime(value, '%d.%m.%Y') + date = datetime.strptime(value, _('%d.%m.%Y')) if lookup == 'from': objects = objects.filter(transaction_began__gte=date) elif lookup == 'to': diff --git a/history/pattern_history.py b/history/pattern_history.py index 5f97fd0..38a3e64 100644 --- a/history/pattern_history.py +++ b/history/pattern_history.py @@ -1,22 +1,25 @@ # -*- coding: utf-8 -*- from django.core.exceptions import ObjectDoesNotExist +from django.utils.translation import ugettext_lazy as _ + from common.util import GroupDict -from dictionary.models import Qualifier, Pattern, PatternType, BaseFormLabel, Ending, History +from dictionary.models import Qualifier, Pattern, PatternType, BaseFormLabel,\ + Ending, History # FIXME dużo copypasty, można kiedyś zrefaktoryzować attribute_translation_list = [ # Wzór - ('wzory', 'w_id', u'nazwa'), - ('wzory', 'typ', u'typ'), - ('wzory', 'przyklad', u'przykład'), - ('wzory', 'zakp', u'zakończenie formy podstawowej'), - ('wzory', 'status', u'status'), - ('wzory', 'komentarz', u'komentarz'), + ('wzory', 'w_id', _(u'nazwa')), + ('wzory', 'typ', _(u'typ')), + ('wzory', 'przyklad', _(u'przykład')), + ('wzory', 'zakp', _(u'zakończenie formy podstawowej')), + ('wzory', 'status', _(u'status')), + ('wzory', 'komentarz', _(u'komentarz')), # Zakończenie - ('zakonczenia', 'zind', u'kolejność'), - ('zakonczenia', 'efobaz', u'efobaz'), - ('zakonczenia', 'zak', u'zakończenie'), + ('zakonczenia', 'zind', _(u'kolejność')), + ('zakonczenia', 'efobaz', _(u'efobaz')), + ('zakonczenia', 'zak', _(u'zakończenie')), ] attribute_translation = dict( @@ -24,19 +27,19 @@ attribute_translation = dict( for table, column, label in attribute_translation_list) pattern_attribute_order = [ - u'nazwa', - u'typ', - u'przykład', - u'zakończenie formy podstawowej', - u'status', - u'komentarz', + _(u'nazwa'), + _(u'typ'), + _(u'przykład'), + _(u'zakończenie formy podstawowej'), + _(u'status'), + _(u'komentarz'), ] ending_attribute_order = [ - u'kolejność', - u'efobaz', - u'zakończenie', - # u'kwalifikator', + _(u'kolejność'), + _(u'efobaz'), + _(u'zakończenie'), + # _(u'kwalifikator'), ] @@ -136,7 +139,7 @@ def transaction_table(transaction_data): ending_dict.add(ending_id, (attr, ending_data[attr])) for q_data in ending_qualifiers.itervalues(): if q_data: - attr = u'kwalifikator' + attr = _(u'kwalifikator') ending_data = q_data['ending_id'] ending_id = int(ending_data[0] or ending_data[1]) ending_dict.add(ending_id, (attr, q_data['qualifier_id'])) @@ -153,9 +156,9 @@ def transaction_table(transaction_data): index = records.get(column_name='zind').old_value try: bfl = BaseFormLabel.objects.get(id=bfl_id) - header = ending_header(bfl, index) + u' (usunięte)' + header = ending_header(bfl, index) + u' ' + _(u'(usunięte)') except BaseFormLabel.DoesNotExist: - header = u'(usunięte) %s (usunięte)' % index + header = _(u'(usunięte)') + u' %s ' + _(u'(usunięte)') % index ending_tables.append((header, ending_data)) return rows, ending_tables @@ -177,7 +180,7 @@ def deleted_pattern_table(pattern): ending_data.append( (attr, (get_ending_attr(column, ending), None))) for q in ending.qualifiers.all(): - attr = u'kwalifikator' + attr = _(u'kwalifikator') ending_data.append((attr, (q.label, None))) header = ending_header(ending.base_form_label, ending.index) ending_tables.append((header, ending_data)) diff --git a/history/templates/history_row.html b/history/templates/history_row.html new file mode 100644 index 0000000..813e47d --- /dev/null +++ b/history/templates/history_row.html @@ -0,0 +1,20 @@ +{% load i18n %} +{% for header, values in rows %} + <tr> + <td>{{ header }}</td> + <td> + {% if values.0 == None %} + <em>{% trans 'dodano' %}</em> + {% else %} + {{ values.0 }} + {% endif %} + </td> + <td> + {% if values.1 == None %} + <em>{% trans 'usunięto' %}</em> + {% else %} + {{ values.1 }} + {% endif %} + </td> + </tr> +{% endfor %} \ No newline at end of file diff --git a/history/templates/history_view.html b/history/templates/history_view.html index fc9102d..b4cee6e 100644 --- a/history/templates/history_view.html +++ b/history/templates/history_view.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load format_date pagination_tags staticfiles %} +{% load format_date pagination_tags staticfiles i18n %} {% block extrahead %} <link rel="stylesheet" type="text/css" @@ -10,14 +10,14 @@ src="{% static 'js/history-view.js' %}"></script> {% endblock %} -{% block title %}Historia{% endblock %} +{% block title %}{% trans 'Historia' %}{% endblock %} {% block content %} - <h3>Historia zmian</h3> + <h3>{% trans 'Historia zmian' %}</h3> <div class="tabs"> <ul> - <li><a href="#lexeme_items">Leksemy</a></li> - <li><a href="#pattern_items">Wzory</a></li> + <li><a href="#lexeme_items">{% trans 'Leksemy' %}</a></li> + <li><a href="#pattern_items">{% trans 'Wzory' %}</a></li> </ul> <div id="lexeme_items"> {% paginated_list_panel "lexeme_items" %} diff --git a/history/templates/lexeme_history_table.html b/history/templates/lexeme_history_table.html index c9a3ded..b6a1413 100644 --- a/history/templates/lexeme_history_table.html +++ b/history/templates/lexeme_history_table.html @@ -1,51 +1,15 @@ +{% load i18n %} <table class="transaction-table"> <tr> - <th>atrybut</th> - <th>przed</th> - <th>po</th> + <th>{% trans 'atrybut' %}</th> + <th>{% trans 'przed' %}</th> + <th>{% trans 'po' %}</th> </tr> - {% for header, values in table.rows %} - <tr> - <td>{{ header }}</td> - <td> - {% if values.0 == None %} - <em>dodano</em> - {% else %} - {{ values.0 }} - {% endif %} - </td> - <td> - {% if values.1 == None %} - <em>usunięto</em> - {% else %} - {{ values.1 }} - {% endif %} - </td> - </tr> - {% endfor %} + {% include "history_row.html" with rows=table.rows %} {% for header, lip_rows in table.lip_tables %} <tr> - <th colspan="3" class="lip-header">odmiana {{ header }}:</th> + <th colspan="3" class="lip-header">{% trans 'odmiana' %} {{ header }}:</th> </tr> - {% for header, values in lip_rows %} - <tr> - {# fuj, copypasta #} - <td>{{ header }}</td> - <td> - {% if values.0 == None %} - <em>dodano</em> - {% else %} - {{ values.0 }} - {% endif %} - </td> - <td> - {% if values.1 == None %} - <em>usunięto</em> - {% else %} - {{ values.1 }} - {% endif %} - </td> - </tr> - {% endfor %} + {% include "history_row.html" with rows=lip_rows %} {% endfor %} </table> diff --git a/history/templates/pattern_history_table.html b/history/templates/pattern_history_table.html index 485d394..007491b 100644 --- a/history/templates/pattern_history_table.html +++ b/history/templates/pattern_history_table.html @@ -1,51 +1,15 @@ +{% load i18n %} <table class="transaction-table"> <tr> - <th>atrybut</th> - <th>przed</th> - <th>po</th> + <th>{% trans 'atrybut' %}</th> + <th>{% trans 'przed' %}</th> + <th>{% trans 'po' %}</th> </tr> - {% for header, values in table.rows %} - <tr> - <td>{{ header }}</td> - <td> - {% if values.0 == None %} - <em>dodano</em> - {% else %} - {{ values.0 }} - {% endif %} - </td> - <td> - {% if values.1 == None %} - <em>usunięto</em> - {% else %} - {{ values.1 }} - {% endif %} - </td> - </tr> - {% endfor %} + {% include "history_row.html" with rows=table.rows %} {% for header, ending_rows in table.ending_tables %} <tr> - <th colspan="3" class="ending-header">zakończenie {{ header }}:</th> + <th colspan="3" class="ending-header">{% trans 'zakończenie' %} {{ header }}:</th> </tr> - {% for header, values in ending_rows %} - <tr> - {# fuj, copypasta #} - <td>{{ header }}</td> - <td> - {% if values.0 == None %} - <em>dodano</em> - {% else %} - {{ values.0 }} - {% endif %} - </td> - <td> - {% if values.1 == None %} - <em>usunięto</em> - {% else %} - {{ values.1 }} - {% endif %} - </td> - </tr> - {% endfor %} + {% include "history_row.html" with rows=ending_rows %} {% endfor %} </table> diff --git a/makemessages.sh b/makemessages.sh new file mode 100755 index 0000000..457159a --- /dev/null +++ b/makemessages.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +echo "django domain:" +for app in accounts common dictionary export history management patterns paginer; do + cd "$app" + echo "Processing: $app" + ../manage.py makemessages -a + cd .. +done + +echo +echo "djangojs domain:" +for app in common dictionary export history management patterns paginer; do + cd "$app" + echo "Processing: $app" + ../manage.py makemessages -d djangojs -a + cd .. +done \ No newline at end of file diff --git a/management/ajax.py b/management/ajax.py new file mode 100644 index 0000000..120f341 --- /dev/null +++ b/management/ajax.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +from django.contrib.auth.models import User +from django.utils.translation import ugettext as _ +from common.decorators import ajax, AjaxError +from dictionary.models import Vocabulary + + +@ajax(method='post') +def add_vocabulary(request, name): + if not request.user.has_perm('dictionary.manage_vocabulary'): + raise AjaxError('access denied') + if not name: + raise AjaxError(_(u'nazwa słownika nie może być pusta!')) + if Vocabulary.objects.filter(id=name): + raise AjaxError(_(u'słownik o tej nazwie już istnieje!')) + vocab = Vocabulary.objects.create(id=name) + vocab.managers.add(request.user) # add + return {} + + +# nieużywane +@ajax(method='get') +def vocabulary_permissions(request, vocab_id): + if not request.user.has_perm('dictionary.manage_vocabulary'): + raise AjaxError('access denied') + vocab = Vocabulary.objects.get(id=vocab_id) + return { + 'managers': list(vocab.all_managers().values_list('pk', flat=True)), + 'viewers': list(vocab.all_viewers().values_list('pk', flat=True)), + 'editors': list(vocab.editors.values_list('pk', flat=True)), + } + + +@ajax(method='post') +def set_vocabulary_permission(request, name, user_id, perm, on): + if not request.user.has_perm('dictionary.manage_vocabulary'): + raise AjaxError('access denied') + vocab = Vocabulary.objects.get(id=name) + user = User.objects.get(pk=user_id) + if perm == 'view': + related_manager = vocab.viewers + elif perm == 'change': + related_manager = vocab.editors + else: # type == 'manage' + related_manager = vocab.managers + if on: + related_manager.add(user) # add + else: + related_manager.remove(user) # add + return {} \ No newline at end of file diff --git a/management/forms.py b/management/forms.py index 93340e2..834df6f 100644 --- a/management/forms.py +++ b/management/forms.py @@ -2,6 +2,8 @@ from django.core.exceptions import ValidationError from django.forms import ModelForm, HiddenInput, Form, ModelChoiceField, \ ModelMultipleChoiceField, SelectMultiple, Select, ChoiceField +from django.utils.translation import ugettext_lazy as _ + from common.forms import hidden_id from common.util import GroupDict from dictionary.models import Classification, ClassificationValue, \ @@ -10,10 +12,10 @@ from dictionary.models import Classification, ClassificationValue, \ BaseFormLabel CSS_CLASS_CHOICES = ( - ('header', u'nagł.'), - ('header-c', u'wyśr.'), - ('data', u'dane'), - ('blank', u'blank'), + ('header', _(u'nagł.')), + ('header-c', _(u'wyśr.')), + ('data', _(u'dane')), + ('blank', _(u'blank')), ) @@ -30,7 +32,8 @@ class AddClassificationValueForm(ModelForm): def __init__(self, classification=None, **kwargs): super(AddClassificationValueForm, self).__init__(**kwargs) if classification is not None: - parent_choices = [('', u'<brak>')] + classification.make_choices() + parent_choices = ( + [('', _(u'<brak>'))] + classification.make_choices()) self.fields['parent_node'].choices = parent_choices self.fields['classification'].initial = classification.pk @@ -85,7 +88,7 @@ class AddQualifierForm(ModelForm): ec_vocab = ec.vocabulary if ec_vocab and ec_vocab != cleaned_data['vocabulary']: raise ValidationError( - u'Klasa wykluczania niezgodna ze słownikiem.') + _(u'Klasa wykluczania niezgodna ze słownikiem.')) return cleaned_data class Meta: @@ -110,13 +113,13 @@ class ChangeClassForm(ModelForm): ec_qualifiers = ec.qualifier_set.all() if Lexeme.objects.filter(qualifiers=q).filter( qualifiers__in=ec_qualifiers): - raise ValidationError(u'Kolizja w klasie wykluczania') + raise ValidationError(_(u'Kolizja w klasie wykluczania')) if LexemeInflectionPattern.objects.filter( qualifiers=q).filter(qualifiers__in=ec_qualifiers): - raise ValidationError(u'Kolizja w klasie wykluczania') + raise ValidationError(_(u'Kolizja w klasie wykluczania')) if Ending.objects.filter(qualifiers=q).filter( qualifiers__in=ec_qualifiers): - raise ValidationError(u'Kolizja w klasie wykluczania') + raise ValidationError(_(u'Kolizja w klasie wykluczania')) return self.cleaned_data class Meta: @@ -127,7 +130,7 @@ class ChangeClassForm(ModelForm): class VocabularyForm(Form): det = hidden_id('vocabulary_form') vocabulary = ModelChoiceField( - label=u"dodaj słownik", queryset=Vocabulary.objects.none()) + label=_(u"dodaj słownik"), queryset=Vocabulary.objects.none()) classification = ModelChoiceField( widget=HiddenInput(), queryset=Classification.objects.all()) @@ -140,7 +143,7 @@ class VocabularyForm(Form): class TemplateChoiceForm(Form): table_template = ModelChoiceField( - TableTemplate.objects.none(), label=u'Szablon tabel') + TableTemplate.objects.none(), label=_(u'Szablon tabel')) def __init__(self, **kwargs): super(TemplateChoiceForm, self).__init__(**kwargs) @@ -204,7 +207,7 @@ class BaseFormLabelForm(Form): class CSSClassForm(Form): css_class = ChoiceField( - choices=CSS_CLASS_CHOICES, label='klasa', + choices=CSS_CLASS_CHOICES, label=_(u'klasa'), widget=Select(attrs={'class': 'css-class-select'})) def __init__(self, initial=None, **kwargs): @@ -214,7 +217,7 @@ class CSSClassForm(Form): class TemplatePreviewForm(Form): pattern_type = ModelChoiceField( - queryset=PatternType.objects.none(), label=u'typ wzoru', + queryset=PatternType.objects.none(), label=_(u'typ wzoru'), widget=Select(attrs={'class': 'pattern-type-select'})) def __init__(self, pattern_types, **kwargs): @@ -224,5 +227,5 @@ class TemplatePreviewForm(Form): class TemplatePreviewGenderForm(Form): gender = ModelChoiceField( - queryset=Gender.objects.all(), label=u'rodzaj', + queryset=Gender.objects.all(), label=_(u'rodzaj'), widget=Select(attrs={'class': 'gender-select'})) \ No newline at end of file diff --git a/management/locale/en/LC_MESSAGES/django.po b/management/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..d6a18b3 --- /dev/null +++ b/management/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,222 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ajax.py:13 +msgid "nazwa słownika nie może być pusta!" +msgstr "dictionary name can't be empty!" + +#: ajax.py:15 +msgid "słownik o tej nazwie już istnieje!" +msgstr "a dictionary with this name already exists!" + +#: forms.py:15 +msgid "nagł." +msgstr "head." + +#: forms.py:16 +msgid "wyśr." +msgstr "cent." + +#: forms.py:17 +msgid "dane" +msgstr "data" + +#: forms.py:18 +msgid "blank" +msgstr "blank" + +#: forms.py:36 +msgid "<brak>" +msgstr "<none>" + +#: forms.py:91 +msgid "Klasa wykluczania niezgodna ze słownikiem." +msgstr "Exclusion class doesn't match the dictionary" + +#: forms.py:116 forms.py:119 forms.py:122 +msgid "Kolizja w klasie wykluczania" +msgstr "Collision in the exclusion class" + +#: forms.py:133 +msgid "dodaj słownik" +msgstr "add dictionary" + +#: forms.py:146 +msgid "Szablon tabel" +msgstr "Table template" + +#: forms.py:210 +msgid "klasa" +msgstr "class" + +#: forms.py:220 +msgid "typ wzoru" +msgstr "pattern type" + +#: forms.py:230 +msgid "rodzaj" +msgstr "gender" + +#: templates/manage_classifications.html:11 templates/management_menu.html:11 +msgid "Klasyfikacje" +msgstr "Classifications" + +#: templates/manage_classifications.html:18 +msgid "Dodaj klasyfikację" +msgstr "Add classification" + +#: templates/manage_classifications.html:28 +msgid "Dodaj wartość" +msgstr "Add value" + +#: templates/manage_classifications.html:32 +msgid "Używające słowniki" +msgstr "Using dictionaries" + +#: templates/manage_classifications.html:40 +msgid "brak" +msgstr "none" + +#: templates/manage_classifications.html:46 +msgid "Dodaj słownik" +msgstr "Add dictionary" + +#: templates/manage_classifications.html:53 +msgid "Wartości" +msgstr "Values" + +#: templates/manage_qualifiers.html:11 templates/management_menu.html:13 +msgid "Kwalifikatory" +msgstr "Qualifiers" + +#: templates/manage_qualifiers.html:22 +msgid "dodaj klasę wykluczania" +msgstr "add exclusion class" + +#: templates/manage_qualifiers.html:30 +msgid "usuń klasę wykluczania" +msgstr "delete exclusion class" + +#: templates/manage_qualifiers.html:38 +msgid "dodaj kwalifikator" +msgstr "add qualifier" + +#: templates/manage_qualifiers.html:56 +msgid "usuń" +msgstr "delete" + +#: templates/manage_qualifiers.html:64 +msgid "zmień" +msgstr "change" + +#: templates/management_menu.html:4 +msgid "Administracja" +msgstr "Administration" + +#: templates/management_menu.html:10 +msgid "Słowniki" +msgstr "Dictionaries" + +#: templates/management_menu.html:14 +msgid "Szablony" +msgstr "Templates" + +#: templates/management_menu.html:15 +msgid "Parametry eksportu" +msgstr "Export parameters" + +#: templates/management_menu.html:18 +msgid "Role" +msgstr "Roles" + +#: templates/management_menu.html:19 +msgid "Dodaj użytkownika" +msgstr "Add user" + +#: templates/table_edit_form.html:3 templates/table_edit_form.html.py:5 +msgid "Dodaj komórkę" +msgstr "Add a cell" + +#: templates/table_edit_form.html:6 +msgid "Dodaj nagłówek" +msgstr "Add a header" + +#: templates/table_edit_form.html:12 +msgid "w." +msgstr "r." + +#: templates/table_edit_form.html:13 +msgid "k." +msgstr "c." + +#: templates/table_edit_form.html:19 +msgid "tag" +msgstr "tag" + +#: templates/table_edit_form.html:21 +msgid "typy wzorów" +msgstr "pattern types" + +#: templates/table_edit_form.html:23 +msgid "rodzaje" +msgstr "genders" + +#: templates/table_edit_form.html:34 +msgid "Zapisz" +msgstr "Save" + +#: templates/table_edit_form.html:35 +msgid "Anuluj" +msgstr "Cancel" + +#: templates/table_edit_row.html:11 +msgid "ind" +msgstr "ind" + +#: templates/table_edit_row.html:15 +msgid "pre" +msgstr "pre" + +#: templates/table_edit_row.html:16 +msgid "suf" +msgstr "suf" + +#: templates/table_edit_row.html:19 +msgid "nagł" +msgstr "head" + +#: templates/table_view.html:13 templates/table_view.html.py:16 +msgid "Edycja szablonów tabel" +msgstr "Edit table templates" + +#: templates/table_view.html:19 +msgid "Wybierz" +msgstr "Choose" + +#: templates/table_view.html:23 +msgid "Edycja szablonu" +msgstr "Edit template" + +#: templates/table_view.html:24 +msgid "Podgląd" +msgstr "Preview" + +#: templates/template_preview_form.html:8 +msgid "Pokaż" +msgstr "Show" diff --git a/management/locale/en/LC_MESSAGES/djangojs.po b/management/locale/en/LC_MESSAGES/djangojs.po index dc76c54..081eb61 100644 --- a/management/locale/en/LC_MESSAGES/djangojs.po +++ b/management/locale/en/LC_MESSAGES/djangojs.po @@ -1,3 +1,22 @@ -# manager-view.js:16 +# English translation of the management module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: static/js/manager-view.js:16 msgid "Dodanie słownika" -msgstr "Dictionary creation" \ No newline at end of file +msgstr "Dictionary creation" diff --git a/management/locale/pl/LC_MESSAGES/django.po b/management/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..4ba980f --- /dev/null +++ b/management/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,224 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: ajax.py:13 +msgid "nazwa słownika nie może być pusta!" +msgstr "" + +#: ajax.py:15 +msgid "słownik o tej nazwie już istnieje!" +msgstr "" + +#: forms.py:15 +msgid "nagł." +msgstr "" + +#: forms.py:16 +msgid "wyśr." +msgstr "" + +#: forms.py:17 +msgid "dane" +msgstr "" + +#: forms.py:18 +msgid "blank" +msgstr "" + +#: forms.py:36 +msgid "<brak>" +msgstr "" + +#: forms.py:91 +msgid "Klasa wykluczania niezgodna ze słownikiem." +msgstr "" + +#: forms.py:116 forms.py:119 forms.py:122 +msgid "Kolizja w klasie wykluczania" +msgstr "" + +#: forms.py:133 +msgid "dodaj słownik" +msgstr "" + +#: forms.py:146 +msgid "Szablon tabel" +msgstr "" + +#: forms.py:210 +msgid "klasa" +msgstr "" + +#: forms.py:220 +msgid "typ wzoru" +msgstr "" + +#: forms.py:230 +msgid "rodzaj" +msgstr "" + +#: templates/manage_classifications.html:11 templates/management_menu.html:11 +msgid "Klasyfikacje" +msgstr "" + +#: templates/manage_classifications.html:18 +msgid "Dodaj klasyfikację" +msgstr "" + +#: templates/manage_classifications.html:28 +msgid "Dodaj wartość" +msgstr "" + +#: templates/manage_classifications.html:32 +msgid "Używające słowniki" +msgstr "" + +#: templates/manage_classifications.html:40 +msgid "brak" +msgstr "" + +#: templates/manage_classifications.html:46 +msgid "Dodaj słownik" +msgstr "" + +#: templates/manage_classifications.html:53 +msgid "Wartości" +msgstr "" + +#: templates/manage_qualifiers.html:11 templates/management_menu.html:13 +msgid "Kwalifikatory" +msgstr "" + +#: templates/manage_qualifiers.html:22 +msgid "dodaj klasę wykluczania" +msgstr "" + +#: templates/manage_qualifiers.html:30 +msgid "usuń klasę wykluczania" +msgstr "" + +#: templates/manage_qualifiers.html:38 +msgid "dodaj kwalifikator" +msgstr "" + +#: templates/manage_qualifiers.html:56 +msgid "usuń" +msgstr "" + +#: templates/manage_qualifiers.html:64 +msgid "zmień" +msgstr "" + +#: templates/management_menu.html:4 +msgid "Administracja" +msgstr "" + +#: templates/management_menu.html:10 +msgid "Słowniki" +msgstr "" + +#: templates/management_menu.html:14 +msgid "Szablony" +msgstr "" + +#: templates/management_menu.html:15 +msgid "Parametry eksportu" +msgstr "" + +#: templates/management_menu.html:18 +msgid "Role" +msgstr "" + +#: templates/management_menu.html:19 +msgid "Dodaj użytkownika" +msgstr "" + +#: templates/table_edit_form.html:3 templates/table_edit_form.html.py:5 +msgid "Dodaj komórkę" +msgstr "" + +#: templates/table_edit_form.html:6 +msgid "Dodaj nagłówek" +msgstr "" + +#: templates/table_edit_form.html:12 +msgid "w." +msgstr "" + +#: templates/table_edit_form.html:13 +msgid "k." +msgstr "" + +#: templates/table_edit_form.html:19 +msgid "tag" +msgstr "" + +#: templates/table_edit_form.html:21 +msgid "typy wzorów" +msgstr "" + +#: templates/table_edit_form.html:23 +msgid "rodzaje" +msgstr "" + +#: templates/table_edit_form.html:34 +msgid "Zapisz" +msgstr "" + +#: templates/table_edit_form.html:35 +msgid "Anuluj" +msgstr "" + +#: templates/table_edit_row.html:11 +msgid "ind" +msgstr "" + +#: templates/table_edit_row.html:15 +msgid "pre" +msgstr "" + +#: templates/table_edit_row.html:16 +msgid "suf" +msgstr "" + +#: templates/table_edit_row.html:19 +msgid "nagł" +msgstr "" + +#: templates/table_view.html:13 templates/table_view.html.py:16 +msgid "Edycja szablonów tabel" +msgstr "" + +#: templates/table_view.html:19 +msgid "Wybierz" +msgstr "" + +#: templates/table_view.html:23 +msgid "Edycja szablonu" +msgstr "" + +#: templates/table_view.html:24 +msgid "Podgląd" +msgstr "" + +#: templates/template_preview_form.html:8 +msgid "Pokaż" +msgstr "" diff --git a/management/locale/pl/LC_MESSAGES/djangojs.po b/management/locale/pl/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..0b03417 --- /dev/null +++ b/management/locale/pl/LC_MESSAGES/djangojs.po @@ -0,0 +1,24 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: static/js/manager-view.js:16 +msgid "Dodanie słownika" +msgstr "" diff --git a/management/templates/manage_classifications.html b/management/templates/manage_classifications.html index cf1bbd3..04a33fc 100644 --- a/management/templates/manage_classifications.html +++ b/management/templates/manage_classifications.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load dictionary_extras staticfiles %} +{% load dictionary_extras staticfiles i18n %} {% block extrahead %} <link rel="stylesheet" type="text/css" @@ -8,14 +8,14 @@ src="{% static 'js/manage-classifications.js' %}"></script> {% endblock %} -{% block title %}Klasyfikacje{% endblock %} +{% block title %}{% trans 'Klasyfikacje' %}{% endblock %} {% block content %} <form action="" method="post" class="add-classification"> {% csrf_token %} {{ add_form.as_p }} <p> - <button type="submit">Dodaj klasyfikację</button> + <button type="submit">{% trans 'Dodaj klasyfikację' %}</button> </p> </form> {% for classification, value_form, vocab_form, using in classification_forms %} @@ -25,11 +25,11 @@ {% csrf_token %} {{ value_form.as_p }} <p> - <button type="submit">Dodaj wartość</button> + <button type="submit">{% trans 'Dodaj wartość' %}</button> </p> </form> <div class="vocabs"> - <p>Używające słowniki:</p> + <p>{% trans 'Używające słowniki' %}:</p> {% if using %} <ul> {% for vocab in using %} @@ -37,20 +37,20 @@ {% endfor %} </ul> {% else %} - <p>brak</p> + <p>{% trans 'brak' %}</p> {% endif %} <form action="" method="post"> {% csrf_token %} {{ vocab_form.as_p }} <p> - <button type="submit">Dodaj słownik</button> + <button type="submit">{% trans 'Dodaj słownik' %}</button> </p> </form> </div> </div> <h4>{{ classification.name }}</h4> - <p>Wartości:</p> + <p>{% trans 'Wartości' %}:</p> {% with tree=classification.value_tree %} {% if tree %} {% value_tree tree %} diff --git a/management/templates/manage_qualifiers.html b/management/templates/manage_qualifiers.html index 105cc96..7416232 100644 --- a/management/templates/manage_qualifiers.html +++ b/management/templates/manage_qualifiers.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load staticfiles i18n %} {% block extrahead %} <link rel="stylesheet" type="text/css" @@ -8,7 +8,7 @@ src="{% static 'js/manage-qualifiers.js' %}"></script> {% endblock %} -{% block title %}Kwalifikatory{% endblock %} +{% block title %}{% trans 'Kwalifikatory' %}{% endblock %} {% block content %} <div id="vocab-accordion"> @@ -19,7 +19,7 @@ {% csrf_token %} {{ add_exclusion_class_form.as_table }} <button type="submit"> - dodaj klasę wykluczania + {% trans 'dodaj klasę wykluczania' %} </button> </form> {% if remove_exclusion_class_form %} @@ -27,7 +27,7 @@ {% csrf_token %} {{ remove_exclusion_class_form.as_table }} <button type="submit"> - usuń klasę wykluczania + {% trans 'usuń klasę wykluczania' %} </button> </form> {% endif %} @@ -35,7 +35,7 @@ {% csrf_token %} {{ add_qualifier_form.as_table }} <button type="submit"> - dodaj kwalifikator + {% trans 'dodaj kwalifikator' %} </button> </form> <ul> @@ -53,7 +53,7 @@ <input type="hidden" name="id" value="{{ qualifier.pk }}"/> <button type="submit"> - usuń + {% trans 'usuń' %} </button> </form> {% endif %} @@ -61,7 +61,7 @@ {% csrf_token %} {{ form.as_table }} <button type="submit"> - zmień + {% trans 'zmień' %} </button> </form> </span> diff --git a/management/templates/management_menu.html b/management/templates/management_menu.html index 984d636..1f79df0 100644 --- a/management/templates/management_menu.html +++ b/management/templates/management_menu.html @@ -1,22 +1,22 @@ {% extends "base.html" %} -{% load url from future %} +{% load i18n %} -{% block title %}Administracja{% endblock %} +{% block title %}{% trans 'Administracja' %}{% endblock %} {% block content %} <h3>Administracja</h3> <ul> {% if perms.dictionary.manage_vocabulary %} - <li><a href="{% url 'manager_view' %}">Słowniki</a></li> - <li><a href="{% url 'manage_classifications' %}">Klasyfikacje</a> + <li><a href="{% url 'manager_view' %}">{% trans 'Słowniki' %}</a></li> + <li><a href="{% url 'manage_classifications' %}">{% trans 'Klasyfikacje' %}</a> </li> - <li><a href="{% url 'manage_qualifiers' %}">Kwalifikatory</a></li> - <li><a href="{% url 'table_view' %}">Szablony</a></li> - <li><a href="{% url 'export' %}">Parametry eksportu</a></li> + <li><a href="{% url 'manage_qualifiers' %}">{% trans 'Kwalifikatory' %}</a></li> + <li><a href="{% url 'table_view' %}">{% trans 'Szablony' %}</a></li> + <li><a href="{% url 'export' %}">{% trans 'Parametry eksportu' %}</a></li> {% endif %} {% if perms.auth.add_user %} - <li><a href="{% url 'manage_groups' %}">Role</a></li> - <li><a href="{% url 'register' %}">Dodaj użytkownika</a></li> + <li><a href="{% url 'manage_groups' %}">{% trans 'Role' %}</a></li> + <li><a href="{% url 'register' %}">{% trans 'Dodaj użytkownika' %}</a></li> {% endif %} </ul> {% endblock %} diff --git a/management/templates/table_edit_form.html b/management/templates/table_edit_form.html index cd84477..11b117a 100644 --- a/management/templates/table_edit_form.html +++ b/management/templates/table_edit_form.html @@ -1,25 +1,26 @@ +{% load i18n %} {% if export %} - <button type="button" id="add-export-cell">Dodaj komórkę</button> + <button type="button" id="add-export-cell">{% trans 'Dodaj komórkę' %}</button> {% else %} - <button type="button" id="add-table-cell">Dodaj komórkę</button> - <button type="button" id="add-header">Dodaj nagłówek</button> + <button type="button" id="add-table-cell">{% trans 'Dodaj komórkę' %}</button> + <button type="button" id="add-header">{% trans 'Dodaj nagłówek' %}</button> {% endif %} <table class="scheme{{ color_scheme }}"> <thead> <tr> {% if template_type != 'export' %} - <th>w.</th> - <th>k.</th> + <th>{% trans 'w.' %}</th> + <th>{% trans 'k.' %}</th> <th>↕</th> <th>↔</th> {% endif %} <th></th> {% if template_type == 'export' %} - <th>tag</th> + <th>{% trans 'tag' %}</th> {% endif %} - <th>typy wzorów</th> + <th>{% trans 'typy wzorów' %}</th> {% if takes_gender %} - <th>rodzaje</th> + <th>{% trans 'rodzaje' %}</th> {% endif %} {% for attr in template_attrs %} <th>{{ attr.name }}</th> @@ -30,5 +31,5 @@ {% include 'table_edit_row.html' %} {% endfor %} </table> -<button type="button" id="save-template">Zapisz</button> -<button type="button" id="cancel">Anuluj</button> \ No newline at end of file +<button type="button" id="save-template">{% trans 'Zapisz' %}</button> +<button type="button" id="cancel">{% trans 'Anuluj' %}</button> \ No newline at end of file diff --git a/management/templates/table_edit_row.html b/management/templates/table_edit_row.html index 9a56187..73c9cb9 100644 --- a/management/templates/table_edit_row.html +++ b/management/templates/table_edit_row.html @@ -1,3 +1,4 @@ +{% load i18n %} <tr class="{{ params.0 }}"> {% if params.0 != 'export' %} <td><input type="text" class="row" value="{{ coord.0 }}" size="1"/></td> @@ -7,15 +8,15 @@ {% endif %} <td> {% if params.0 == 'table' %} - ind:<input type="text" class="ind" value="{{ coord.4 }}" size="1"/> + {% trans 'ind' %}:<input type="text" class="ind" value="{{ coord.4 }}" size="1"/> {% endif %} {% if params.0 == 'table' or params.0 == 'export' %} {{ params.1.base_form_label.as_widget }} - pre:<input type="text" class="pre" value="{{ params.2 }}" size="3"/> - suf:<input type="text" class="suf" value="{{ params.3 }}" size="3"/> + {% trans 'pre' %}:<input type="text" class="pre" value="{{ params.2 }}" size="3"/> + {% trans 'suf' %}:<input type="text" class="suf" value="{{ params.3 }}" size="3"/> {% endif %} {% if params.0 == 'header' %} - nagł:<input type="text" class="label" value="{{ params.1 }}" size="10"/> + {% trans 'nagł' %}:<input type="text" class="label" value="{{ params.1 }}" size="10"/> {{ params.2.css_class }} {% endif %} </td> diff --git a/management/templates/table_view.html b/management/templates/table_view.html index 07181cf..bfbdb6d 100644 --- a/management/templates/table_view.html +++ b/management/templates/table_view.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load format_date pagination_tags staticfiles %} +{% load format_date pagination_tags staticfiles i18n %} {% block extrahead %} <link rel="stylesheet" type="text/css" @@ -10,18 +10,18 @@ src="{% static 'js/table-view.js' %}"></script> {% endblock %} -{% block title %}Edycja szablonów tabel{% endblock %} +{% block title %}{% trans 'Edycja szablonów tabel' %}{% endblock %} {% block content %} - <h3>Edycja szablonów tabel</h3> + <h3>{% trans 'Edycja szablonów tabel' %}</h3> <div id="template-choice"> {{ form.as_p }} - <button type="button" id="load-template">Wybierz</button> + <button type="button" id="load-template">{% trans 'Wybierz' %}</button> </div> <div class="tabs"> <ul> - <li><a href="#table-edit">Edycja szablonu</a></li> - <li><a href="#template-preview">Podgląd</a></li> + <li><a href="#table-edit">{% trans 'Edycja szablonu' %}</a></li> + <li><a href="#template-preview">{% trans 'Podgląd' %}</a></li> </ul> <div id="table-edit"> <div id="template-edit-form"></div> diff --git a/management/templates/template_preview_form.html b/management/templates/template_preview_form.html index 1316725..e752204 100644 --- a/management/templates/template_preview_form.html +++ b/management/templates/template_preview_form.html @@ -5,7 +5,7 @@ {{ attr_form.as_p }} {% endfor %} <p> - <button type="button" id="load-preview">Pokaż</button> + <button type="button" id="load-preview">{% trans 'Pokaż' %}</button> </p> </div> <div id="preview-table"></div> \ No newline at end of file diff --git a/management/urls.py b/management/urls.py index f6ae078..7713b1b 100644 --- a/management/urls.py +++ b/management/urls.py @@ -13,6 +13,13 @@ urlpatterns = patterns( ) urlpatterns += patterns( + 'management.ajax', + url(r'^ajax/add-vocabulary/$', 'add_vocabulary'), + url(r'^ajax/get-privileges/$', 'vocabulary_permissions'), + url(r'^ajax/set-privilege$', 'set_vocabulary_permission'), +) + +urlpatterns += patterns( 'management.ajax_table_view', url(r'^ajax/table-edit-form/$', 'table_edit_form'), url(r'^ajax/new-table-form/$', 'new_template_row'), diff --git a/paginer/locale/de/LC_MESSAGES/django.po b/paginer/locale/de/LC_MESSAGES/django.po index d2cf07c..86cb500 100644 --- a/paginer/locale/de/LC_MESSAGES/django.po +++ b/paginer/locale/de/LC_MESSAGES/django.po @@ -8,20 +8,35 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-24 00:41-0700\n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: templates/pagination/pagination.html:5 -#: templates/pagination/pagination.html:7 +#: templates/filter_panel.html:6 +msgid "Show" +msgstr "" + +#: templates/paginated_list_panel.html:25 +msgid "Add filter" +msgstr "" + +#: templates/paginated_list_panel.html:29 +msgid "Apply filters" +msgstr "" + +#: templates/paginated_list_rows.html:15 +msgid "No data to display" +msgstr "" + +#: templates/pagination.html:8 templates/pagination.html.py:11 msgid "previous" msgstr "zurück" -#: templates/pagination/pagination.html:21 -#: templates/pagination/pagination.html:23 +#: templates/pagination.html:28 templates/pagination.html.py:31 msgid "next" msgstr "weiter" diff --git a/paginer/locale/de/LC_MESSAGES/djangojs.po b/paginer/locale/de/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..5a424e2 --- /dev/null +++ b/paginer/locale/de/LC_MESSAGES/djangojs.po @@ -0,0 +1,27 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: static/js/paginer.js:90 +msgid "No selection" +msgstr "" + +#: static/js/paginer.js:155 +msgid "Page load" +msgstr "" diff --git a/paginer/locale/fr/LC_MESSAGES/django.po b/paginer/locale/fr/LC_MESSAGES/django.po index 85086d2..af56752 100644 --- a/paginer/locale/fr/LC_MESSAGES/django.po +++ b/paginer/locale/fr/LC_MESSAGES/django.po @@ -7,20 +7,35 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-24 00:41-0700\n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" "PO-Revision-Date: 2008-10-19 10:19+0200\n" "Last-Translator: Julien Demoor <julien@jdemoor.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: templates/pagination/pagination.html:5 -#: templates/pagination/pagination.html:7 +#: templates/filter_panel.html:6 +msgid "Show" +msgstr "" + +#: templates/paginated_list_panel.html:25 +msgid "Add filter" +msgstr "" + +#: templates/paginated_list_panel.html:29 +msgid "Apply filters" +msgstr "" + +#: templates/paginated_list_rows.html:15 +msgid "No data to display" +msgstr "" + +#: templates/pagination.html:8 templates/pagination.html.py:11 msgid "previous" msgstr "précédente" -#: templates/pagination/pagination.html:21 -#: templates/pagination/pagination.html:23 +#: templates/pagination.html:28 templates/pagination.html.py:31 msgid "next" msgstr "suivante" diff --git a/paginer/locale/fr/LC_MESSAGES/djangojs.po b/paginer/locale/fr/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..50abb55 --- /dev/null +++ b/paginer/locale/fr/LC_MESSAGES/djangojs.po @@ -0,0 +1,27 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: static/js/paginer.js:90 +msgid "No selection" +msgstr "" + +#: static/js/paginer.js:155 +msgid "Page load" +msgstr "" diff --git a/paginer/locale/pl/LC_MESSAGES/django.po b/paginer/locale/pl/LC_MESSAGES/django.po index 84b41e3..3697b22 100644 --- a/paginer/locale/pl/LC_MESSAGES/django.po +++ b/paginer/locale/pl/LC_MESSAGES/django.po @@ -8,20 +8,35 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-24 00:41-0700\n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" "PO-Revision-Date: 2008-10-20 20:52+0200\n" -"Last-Translator: Jarek Zgoda <jarek.zgoda@gmail.com>\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" "Language-Team: PL <pl@li.org>\n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: templates/pagination/pagination.html:5 -#: templates/pagination/pagination.html:7 +#: templates/filter_panel.html:6 +msgid "Show" +msgstr "Pokaż" + +#: templates/paginated_list_panel.html:25 +msgid "Add filter" +msgstr "Dodaj filtr" + +#: templates/paginated_list_panel.html:29 +msgid "Apply filters" +msgstr "Filtruj" + +#: templates/paginated_list_rows.html:15 +msgid "No data to display" +msgstr "Brak pozycji do wyświetlenia" + +#: templates/pagination.html:8 templates/pagination.html.py:11 msgid "previous" msgstr "poprzednia" -#: templates/pagination/pagination.html:21 -#: templates/pagination/pagination.html:23 +#: templates/pagination.html:28 templates/pagination.html.py:31 msgid "next" msgstr "następna" diff --git a/paginer/locale/pl/LC_MESSAGES/djangojs.po b/paginer/locale/pl/LC_MESSAGES/djangojs.po index cf16c07..f98452d 100644 --- a/paginer/locale/pl/LC_MESSAGES/djangojs.po +++ b/paginer/locale/pl/LC_MESSAGES/djangojs.po @@ -1,7 +1,26 @@ -# paginer.js:90 +# Polish translation of the paginer module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: static/js/paginer.js:90 msgid "No selection" msgstr "Niczego nie zaznaczono" -# paginer.js:155 +#: static/js/paginer.js:155 msgid "Page load" -msgstr "Pobranie strony" \ No newline at end of file +msgstr "Pobranie strony" diff --git a/paginer/static/css/paginer.css b/paginer/static/css/paginer.css index b00de3b..d8241ab 100644 --- a/paginer/static/css/paginer.css +++ b/paginer/static/css/paginer.css @@ -5,10 +5,6 @@ margin-bottom: 20px; } -.paginer-links .page_nr { - display: none; -} - .paginer-links .link { cursor: pointer; } @@ -41,7 +37,7 @@ border: 1px solid #8282ce; background-color: #a9a9cd; padding: 0.25em; - margin: 0em 0.25em; + margin: 0 0.25em; } .paginer-links .current { diff --git a/paginer/templates/filter_panel.html b/paginer/templates/filter_panel.html index f9dd2da..02728f2 100644 --- a/paginer/templates/filter_panel.html +++ b/paginer/templates/filter_panel.html @@ -3,6 +3,6 @@ <form action="" class="{{ list_id }}_filter_list"> <ul> {{ form.as_ul }} - <input type="submit" value="{% trans "Pokaż" %}"/> + <input type="submit" value="{% trans "Show" %}"/> </ul> </form> \ No newline at end of file diff --git a/paginer/templates/paginated_list_panel.html b/paginer/templates/paginated_list_panel.html index 017a72d..3b3f508 100644 --- a/paginer/templates/paginated_list_panel.html +++ b/paginer/templates/paginated_list_panel.html @@ -22,11 +22,11 @@ <p> <button type="button" id="{{ id }}-add_filter_row" class="add-filter-row"> - {% trans "Dodaj filtr" %} + {% trans "Add filter" %} </button> <button type="button" id="{{ id }}-filter_button" class="filter-button"> - {% trans "Filtruj" %} + {% trans "Apply filters" %} </button> </p> {% endif %} diff --git a/paginer/templates/paginated_list_rows.html b/paginer/templates/paginated_list_rows.html index 66934e8..26fc824 100644 --- a/paginer/templates/paginated_list_rows.html +++ b/paginer/templates/paginated_list_rows.html @@ -12,7 +12,7 @@ {% include paginer_obj.template %} {% endfor %} {% if not paginer_obj.list %} - {% trans "Brak pozycji do wyświetlenia" %} + {% trans "No data to display" %} {% else %} {% for action in paginer_obj.group_actions %} <button id="{{ id }}-{{ action }}" diff --git a/paginer/templates/pagination.html b/paginer/templates/pagination.html index bf035a2..defa752 100644 --- a/paginer/templates/pagination.html +++ b/paginer/templates/pagination.html @@ -15,8 +15,8 @@ {% ifequal page page_obj.number %} <span class="current page">{{ page }}</span> {% else %} - <a class="link page"><span - class="page_nr">{{ page }}</span>{{ page }}</a> + <a class="link page"> + <span class="page_nr">{{ page }}</span></a> {% endifequal %} {% else %} ... diff --git a/paginer/templatetags/pagination_tags.py b/paginer/templatetags/pagination_tags.py index cfd6a51..c48cd81 100644 --- a/paginer/templatetags/pagination_tags.py +++ b/paginer/templatetags/pagination_tags.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from django import template -#from django.http import Http404 from django.core.paginator import Paginator, InvalidPage from django.conf import settings from paginer import types diff --git a/patterns/ajax_pattern_view.py b/patterns/ajax_pattern_view.py index 122ccfb..d1b91f6 100644 --- a/patterns/ajax_pattern_view.py +++ b/patterns/ajax_pattern_view.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +from django.utils.translation import ugettext as _ + from collections import OrderedDict import datetime from common.util import error_messages, format_date @@ -7,8 +9,8 @@ from common.decorators import render, ajax, AjaxError, render_ajax from dictionary.models import Pattern, Ending, BaseFormLabel, PatternType, \ editable_qualifiers, readonly_vocabularies, visible_vocabularies, Gender, \ LexicalClass -from patterns.forms import PatternEditForm, QualifierForm from dictionary.ajax_slickgrid import SlickGridQuery +from patterns.forms import PatternEditForm, QualifierForm COLOR_SCHEMES = dict(LexicalClass.objects.values_list('symbol', 'color_scheme')) @@ -69,7 +71,7 @@ def pattern_preview(request, id): try: pattern = Pattern.all_objects.get(id=id) except Pattern.DoesNotExist: - raise AjaxError('Wzór nie istnieje') + raise AjaxError(_(u'Wzór nie istnieje')) lips = pattern.lexemeinflectionpattern_set.filter( lexeme__vocabularies__in=visible_vocabularies(request.user)) detailed_counts = [] @@ -185,10 +187,8 @@ def create_pattern(request): return {'id': p.id} -@ajax(method='post') +@ajax(method='post', permission_required='dictionary.change_pattern') def clone_pattern(request, pattern_id): - if not request.user.has_perm('dictionary.change_pattern'): - raise AjaxError(u'Brak uprawnień') pattern = Pattern.objects.get(id=pattern_id) comment = u'Wzór sklonowany %s' % (format_date(datetime.datetime.now())) i = 1 diff --git a/patterns/locale/en/LC_MESSAGES/django.po b/patterns/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..69d1cb0 --- /dev/null +++ b/patterns/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ajax_pattern_view.py:74 +msgid "Wzór nie istnieje" +msgstr "Pattern doesn't exist" + +#: templates/pattern_view.html:52 +msgid "filtruj" +msgstr "filter" + +#: templates/pattern_view.html:55 +msgid "pokaż/ukryj" +msgstr "show/hide" + +#: templates/pattern_view.html:59 +msgid "szukaj" +msgstr "search" + +#: templates/pattern_view.html:63 +msgid "dodaj wzór" +msgstr "create pattern" + +#: templates/pattern_view.html:66 +msgid "więcej" +msgstr "more" + +#: templates/pattern_view.html:91 +msgid "Wybierz kolumny" +msgstr "Choose columns" + +#: templates/pattern_view.html:94 +msgid "Filtrowanie" +msgstr "Filters" + +#: templates/pattern_view.html:100 +msgid "Dodaj filtr" +msgstr "Add filter" + +#: templates/pattern_view.html:105 +msgid "Inne działania" +msgstr "Other actions" diff --git a/patterns/locale/en/LC_MESSAGES/djangojs.po b/patterns/locale/en/LC_MESSAGES/djangojs.po index 3e34eab..e67e8be 100644 --- a/patterns/locale/en/LC_MESSAGES/djangojs.po +++ b/patterns/locale/en/LC_MESSAGES/djangojs.po @@ -1,47 +1,66 @@ -# pattern-view.js:7 +# English translation of the patterns module. +# Copyright (C) 2015 +# This file is distributed under the same license as the Lexeme Forge package. +# Jan Szejko <jan.szejko@ipipan.waw.pl>, 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Jan Szejko <jan.szejko@ipipan.waw.pl>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: static/js/pattern-edit.js:133 +msgid "Zapisanie zmian" +msgstr "Save" + +#: static/js/pattern-edit.js:158 +msgid "Utworzenie wzoru" +msgstr "Pattern creation" + +#: static/js/pattern-edit.js:171 +msgid "Sklonowanie wzoru" +msgstr "Pattern cloning" + +#: static/js/pattern-view.js:7 msgid "Wzory" msgstr "Patterns" -# pattern-view.js:13 +#: static/js/pattern-view.js:13 msgid "Id" msgstr "Id" -# pattern-view.js:14 +#: static/js/pattern-view.js:14 static/js/pattern-view.js.c:28 msgid "Typ" msgstr "Type" -# pattern-view.js:15 +#: static/js/pattern-view.js:15 msgid "Cz. mowy" msgstr "Infl. type" -# pattern-view.js:16 +#: static/js/pattern-view.js:16 msgid "Przykład" msgstr "Example" -# pattern-view.js:19 +#: static/js/pattern-view.js:19 msgid "Nazwa" msgstr "Name" -# pattern-view.js:20 +#: static/js/pattern-view.js:20 msgid "Stara nazwa" msgstr "Old name" -# pattern-view.js:22 +#: static/js/pattern-view.js:22 msgid "Część mowy" msgstr "Inflection type" -# pattern-view.js:33 +#: static/js/pattern-view.js:33 msgid "Efobaz" msgstr "Base form label" - -# pattern-edit.js:133 -msgid "Zapisanie zmian" -msgstr "Save" - -# pattern-edit.js:158 -msgid "Utworzenie wzoru" -msgstr "Pattern creation" - -# pattern-edit.js:171 -msgid "Sklonowanie wzoru" -msgstr "Pattern cloning" \ No newline at end of file diff --git a/patterns/locale/pl/LC_MESSAGES/django.po b/patterns/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 0000000..a643d5a --- /dev/null +++ b/patterns/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: ajax_pattern_view.py:74 +msgid "Wzór nie istnieje" +msgstr "" + +#: templates/pattern_view.html:52 +msgid "filtruj" +msgstr "" + +#: templates/pattern_view.html:55 +msgid "pokaż/ukryj" +msgstr "" + +#: templates/pattern_view.html:59 +msgid "szukaj" +msgstr "" + +#: templates/pattern_view.html:63 +msgid "dodaj wzór" +msgstr "" + +#: templates/pattern_view.html:66 +msgid "więcej" +msgstr "" + +#: templates/pattern_view.html:91 +msgid "Wybierz kolumny" +msgstr "" + +#: templates/pattern_view.html:94 +msgid "Filtrowanie" +msgstr "" + +#: templates/pattern_view.html:100 +msgid "Dodaj filtr" +msgstr "" + +#: templates/pattern_view.html:105 +msgid "Inne działania" +msgstr "" diff --git a/patterns/locale/pl/LC_MESSAGES/djangojs.po b/patterns/locale/pl/LC_MESSAGES/djangojs.po new file mode 100644 index 0000000..077b5e4 --- /dev/null +++ b/patterns/locale/pl/LC_MESSAGES/djangojs.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-15 16:59+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: static/js/pattern-edit.js:133 +msgid "Zapisanie zmian" +msgstr "" + +#: static/js/pattern-edit.js:158 +msgid "Utworzenie wzoru" +msgstr "" + +#: static/js/pattern-edit.js:171 +msgid "Sklonowanie wzoru" +msgstr "" + +#: static/js/pattern-view.js:7 +msgid "Wzory" +msgstr "" + +#: static/js/pattern-view.js:13 +msgid "Id" +msgstr "" + +#: static/js/pattern-view.js:14 static/js/pattern-view.js.c:28 +msgid "Typ" +msgstr "" + +#: static/js/pattern-view.js:15 +msgid "Cz. mowy" +msgstr "" + +#: static/js/pattern-view.js:16 +msgid "Przykład" +msgstr "" + +#: static/js/pattern-view.js:19 +msgid "Nazwa" +msgstr "" + +#: static/js/pattern-view.js:20 +msgid "Stara nazwa" +msgstr "" + +#: static/js/pattern-view.js:22 +msgid "Część mowy" +msgstr "" + +#: static/js/pattern-view.js:33 +msgid "Efobaz" +msgstr "" diff --git a/patterns/templates/pattern_view.html b/patterns/templates/pattern_view.html index c7ba46e..a4cc9e2 100644 --- a/patterns/templates/pattern_view.html +++ b/patterns/templates/pattern_view.html @@ -49,21 +49,21 @@ {% block content %} <div id="left"> <div id="search-panel"> - <button id="filter-button" title="filtruj"> + <button id="filter-button" title="{% trans 'filtruj' %}"> <span class="ui-icon ui-icon-filter">filtruj</span> </button> - <button id="show-columns-button" title="pokaż/ukryj"> + <button id="show-columns-button" title="{% trans 'pokaż/ukryj' %}"> <span class="ui-icon ui-icon-columns">pokaż/ukryj</span> </button> <input type="text" id="text-search"/> - <button id="search-button" title="szukaj"> + <button id="search-button" title="{% trans 'szukaj' %}"> <span class="ui-icon ui-icon-search">szukaj</span> </button> {% if perms.dictionary.change_pattern %} - <button id="add-button" title="dodaj wzór"> + <button id="add-button" title="{% trans 'dodaj wzór' %}"> <span class="ui-icon ui-icon-plus">dodaj wzór</span> </button> - <button id="more-button" title="więcej"> + <button id="more-button" title="{% trans 'więcej' %}"> <span class="ellipsis-icon">...</span> </button> {% endif %} @@ -88,21 +88,21 @@ {% endblock %} {% block modal_elements %} - <div id="choose-columns-dialog" title="Wybierz kolumny"> + <div id="choose-columns-dialog" title="{% trans 'Wybierz kolumny' %}"> <select id="column-list" multiple=multiple></select> </div> - <div id="choose-filter-dialog" title="Filtrowanie"> + <div id="choose-filter-dialog" title="{% trans 'Filtrowanie' %}"> <p> <select id="group-op"> <option value="AND" selected="selected">oraz</option> <option value="OR">lub</option> </select> - <input type="button" value="+" title="Dodaj filtr" + <input type="button" value="+" title="{% trans 'Dodaj filtr' %}" id="add-filter-button"> </p> <table id="filter-table"></table> </div> - <div id="more-actions-dialog" title="Inne działania"> + <div id="more-actions-dialog" title="{% trans 'Inne działania' %}"> <p><button type="button" id="clone-pattern-button"> Sklonowanie aktywnego wzoru </button></p> diff --git a/settings.py b/settings.py index 0de1c02..9d910fe 100644 --- a/settings.py +++ b/settings.py @@ -62,7 +62,7 @@ USE_I18N = True USE_L10N = True LOCALE_PATHS = ( - # os.path.join(BASE_DIR, "locale"), + os.path.join(BASE_DIR, "accounts/locale"), os.path.join(BASE_DIR, "common/locale"), os.path.join(BASE_DIR, "dictionary/locale"), os.path.join(BASE_DIR, "export/locale"), @@ -92,8 +92,9 @@ TEMPLATE_LOADERS = ( ) MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', diff --git a/templates/404.html b/templates/404.html deleted file mode 100644 index f65932e..0000000 --- a/templates/404.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.html" %} -{% load staticfiles %} - -{% block title %}Błąd 404: nie znaleziono pliku{% endblock %} - -{% block content %} - <p style="font-size: large;">Błąd: wybrano błędny adres.</p> -{% endblock %} diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index 7a4ace7..0000000 --- a/templates/base.html +++ /dev/null @@ -1,109 +0,0 @@ -{% load url from future %}{% load staticfiles %}<!DOCTYPE HTML> -<html> -<head> - <title>{% block title %}{% endblock %}</title> - <meta http-equiv="content-type" content="text/html; charset=utf-8"/> - <link rel="shortcut icon" href="{% static 'forge.ico' %}" - type="image/x-icon"/> - <script type="text/javascript" - src="{% static 'js/lib/jquery-1.10.2.js' %}"></script> - <script type="text/javascript" - src="{% static 'js/lib/jquery.json-2.2.min.js' %}"></script> - <script type="text/javascript" - src="{% static 'js/lib/jquery-ui-1.11.2.custom.min.js' %}"></script> - <script type="text/javascript" - src="{% static 'js/lib/jquery.ui.datepicker-pl.js' %}"></script> - <script type="text/javascript" - src="{% static 'js/lib/jquery.multiselect.js' %}"></script> - <script type="text/javascript"> - $.fn.multiselect2 = $.fn.multiselect; - </script> - <script type="text/javascript" src="{% url 'jsi18n' %}"></script> - <script type="text/javascript" - src="{% static 'js/base-layout.js' %}"></script> - <script type="text/javascript" src="{% static 'js/common.js' %}"></script> - {% if paginer %} - <script type="text/javascript" - src="{% static 'js/paginer.js' %}"></script> - {% endif %} - {% load script jsonify %} - {% script %} - var $dj = {}; - {% for name,var in js_vars.iteritems %} - $dj.{{ name }} = {{ var|jsonify }}; - {% endfor %} - {% endscript %} - <link rel="stylesheet" - href="{% static 'css/lib/smoothness/jquery-ui-1.11.2.custom.css' %}" - type="text/css" media="screen" charset="utf-8"/> - <link rel="stylesheet" type="text/css" - href="{% static 'css/lib/jquery.multiselect.css' %}"/> - <link rel="stylesheet" href="{% static 'css/general.css' %}" type="text/css" - media="screen" charset="utf-8"/> - <link rel="stylesheet" href="{% static 'css/inflection_table.css' %}" - type="text/css" media="screen" charset="utf-8"/> - {% block extrahead %}{% endblock %} -</head> -{% load i18n %} - -<body> - -<!-- Container --> -<!--div id="container"--> - -<!-- Header --> -<div id="header"> - <div id="branding"> - {% block branding %}{% endblock %} - </div> - {% if user.is_active %} - <div id="user-tools"> - {# if debug #} - <span id="show-debug">debug <span id="hide-debug">⨯</span></span> - {# endif #} - <strong>{% filter force_escape %} - {{ user.username }}{% endfilter %}</strong> - {% block userlinks %} - <a href="{% url 'settings' %}"> - Ustawienia</a> / - <a href="{% url 'auth_logout' %}"> - {% trans 'Log out' %}</a> - {% endblock %} - </div> - {% endif %} - {% include 'main_menu.html' %} - {% block nav-global %}{% endblock %} - - {% if messages %} - <ul class="messagelist">{% for message in messages %} - <li{% if message.tags %} - class="{{ message.tags }}"{% endif %}>{{ message }}</li> - {% endfor %}</ul> - {% endif %} -</div> -<!-- END Header --> -<!-- Content --> -<div id="content"> - {% block pretitle %}{% endblock %} - {% block content_title %}{% if title %}<h1>{{ title }}</h1> - {% endif %}{% endblock %} - {% block content %} - {% block object-tools %}{% endblock %} - {{ content }} - {% endblock %} - {% block sidebar %}{% endblock %} -</div> -<!-- END Content --> - -{% block footer %} - <div id="footer"></div>{% endblock %} -{% block modal_elements %}{% endblock %} -{# if debug #} -<iframe id="debug"> -</iframe> -{# endif #} -<!--/div--> -<!-- END Container --> - -</body> -</html> diff --git a/templates/main_menu.html b/templates/main_menu.html deleted file mode 100644 index 33401bb..0000000 --- a/templates/main_menu.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load url from future %} -<ul id="main_menu"> - {% if not user.is_authenticated %} - <li><a href="{% url 'reader_view' %}">Leksemy</a></li> - {% endif %} - {% if perms.dictionary.view_lexeme %} - <li><a href="{% url 'lexeme_view' %}">Leksemy</a></li> - {% endif %} - {% if perms.dictionary.view_pattern %} - <li><a href="{% url 'pattern_view' %}">Wzory</a></li> - {% endif %} - {% if user.is_authenticated %} - <li><a href="{% url 'tasks' %}">Zadania</a></li> - <li><a href="{% url 'reports' %}">Raporty</a></li> - <li><a href="{% url 'history_view' %}">Historia</a></li> - {% endif %} - {% comment %} - {% if perms.dictionary.export_lexemes %} - <li><a href="{% url 'export' %}">Eksport</a></li> - {% endif %} - {% endcomment %} - {% if perms.dictionary.manage_vocabulary or perms.auth.add_user %} - <li><a href="{% url 'management_menu' %}">Administracja</a></li> - {% endif %} -</ul> diff --git a/templates/registration/activate.html b/templates/registration/activate.html deleted file mode 100644 index 155e119..0000000 --- a/templates/registration/activate.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block content %} - - {% blocktrans %} - <h1>Activation</h1> - <p>Your account is now activated. Go <a href="{% url 'main' %}">here</a> - to continue.</p> - - {% endblocktrans %} - -{% endblock %} diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt deleted file mode 100644 index b90fe09..0000000 --- a/templates/registration/activation_email.txt +++ /dev/null @@ -1,5 +0,0 @@ -Hi, - -Thank you for your registration. To activate your account click on the link below : - -<a href="{% url registration_activate activation_key %}">{% url registration_activate activation_key %}</a>. diff --git a/templates/registration/activation_email_subject.txt b/templates/registration/activation_email_subject.txt deleted file mode 100644 index ed8a3a9..0000000 --- a/templates/registration/activation_email_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{{ site }}. Confirm your registration \ No newline at end of file diff --git a/templates/registration/login.html b/templates/registration/login.html deleted file mode 100644 index 5a79af6..0000000 --- a/templates/registration/login.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block content %} - {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %} - <p class="errornote"> - {% blocktrans count form.errors.items|length as counter %}Please - correct the error below.{% plural %}Please correct the errors - below.{% endblocktrans %} - </p> - {% endif %} - - {% if form.non_field_errors or form.this_is_the_login_form.errors %} - {% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} - <p class="errornote"> - {{ error }} - </p> - {% endfor %} - {% endif %} - - <div id="content-main"> - <div id="login-box"> - <form action="" method="post" id="login-form">{% csrf_token %} - <table> - {{ form.as_table }} - </table> - <div class="submit-row"> - <label> </label> - <input type="submit" value="{% trans 'Log in' %}"/> - </div> - </form> - - <a href="{% url 'auth_password_reset' %}">Nie pamiętam hasła</a> - </div> - - <script type="text/javascript"> - document.getElementById('id_username').focus() - </script> - </div> -{% endblock %} diff --git a/templates/registration/logout.html b/templates/registration/logout.html deleted file mode 100644 index ae611f5..0000000 --- a/templates/registration/logout.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block content %} - - <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> - - <p><a href="{% url 'auth_login' %}">{% trans 'Log in again' %}</a></p> - -{% endblock %} diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html deleted file mode 100644 index 3747246..0000000 --- a/templates/registration/password_change_done.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block userlinks %}{% trans 'Change password' %} / - <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} - -{% block title %}{% trans 'Password change successful' %}{% endblock %} - -{% block content %} - - <h1>{% trans 'Password change successful' %}</h1> - - <p>{% trans 'Your password was changed.' %}</p> - -{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html deleted file mode 100644 index 8790991..0000000 --- a/templates/registration/password_change_form.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} -{% block userlinks %}{% trans 'Change password' %} / - <a href="{% url 'auth_logout' %}">{% trans 'Log out' %}</a>{% endblock %} - -{% block title %}{% trans 'Password change' %}{% endblock %} - -{% block content %} - <div id="content-main"> - - <form action="" method="post">{% csrf_token %} - <div> - {% if form.errors %} - <p class="errornote"> - {% blocktrans count form.errors.items|length as counter %} - Please correct the error below.{% plural %}Please - correct the errors below.{% endblocktrans %} - </p> - {% endif %} - - <h1>{% trans 'Password change' %}</h1> - - <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> - - <fieldset class="module aligned wide"> - - <div class="form-row"> - {{ form.old_password.errors }} - <label for="id_old_password" - class="required">{% trans 'Old password' %}:</label>{{ form.old_password }} - </div> - - <div class="form-row"> - {{ form.new_password1.errors }} - <label for="id_new_password1" - class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }} - </div> - - <div class="form-row"> - {{ form.new_password2.errors }} - <label for="id_new_password2" - class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }} - </div> - - </fieldset> - - <div class="submit-row"> - <input type="submit" - value="{% trans 'Change my password' %}" - class="default"/> - </div> - - <script type="text/javascript">document.getElementById("id_old_password").focus();</script> - </div> - </form> - </div> - -{% endblock %} diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html deleted file mode 100644 index 63565a3..0000000 --- a/templates/registration/password_reset_complete.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans 'Password reset complete' %}{% endblock %} - -{% block content %} - - <h1>{% trans 'Password reset complete' %}</h1> - - <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p> - - <p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p> - -{% endblock %} diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html deleted file mode 100644 index 41d22ee..0000000 --- a/templates/registration/password_reset_confirm.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans 'Password reset' %}{% endblock %} - -{% block content %} - - {% if validlink %} - - <h1>{% trans 'Enter new password' %}</h1> - - <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> - - <form action="" method="post">{% csrf_token %} - {{ form.new_password1.errors }} - <p class="aligned wide"><label - for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }} - </p> - {{ form.new_password2.errors }} - <p class="aligned wide"><label - for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }} - </p> - - <p><input type="submit" value="{% trans 'Change my password' %}"/> - </p> - </form> - - {% else %} - - <h1>{% trans 'Password reset unsuccessful' %}</h1> - - <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> - - {% endif %} - -{% endblock %} diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html deleted file mode 100644 index bd14f94..0000000 --- a/templates/registration/password_reset_done.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans 'Password reset successful' %}{% endblock %} - -{% block content %} - - <h1>{% trans 'Password reset successful' %}</h1> - - <p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p> - -{% endblock %} diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html deleted file mode 100644 index c4b4c3f..0000000 --- a/templates/registration/password_reset_email.html +++ /dev/null @@ -1,19 +0,0 @@ -{% load i18n %}{% load url from future %}{% autoescape off %} -Szanowny Użytkowniku! - -Ten list jest częścią procedury ustanawiania lub zmiany hasła w systemie -Kuźnia. -Jeżeli fakt, że masz konto w systemie Kuźnia jest dla Ciebie -zaskoczeniem, zechciej ten list uznać za doniesienie, że właśnie -założyliśmy Ci konto. - -Aby wprowadzić nowe hasło, przejdź na następującą stronę: -{% block reset_link %} -{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} -{% endblock %} - -Twoja nazwa użytkownika: {{ user.username }} - -Z wyrazami szacunku -Zespół Kuźni -{% endautoescape %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html deleted file mode 100644 index bdf9f1b..0000000 --- a/templates/registration/password_reset_form.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans "Password reset" %}{% endblock %} - -{% block content %} - - <h1>{% trans "Password reset" %}</h1> - - <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p> - - <form action="" method="post">{% csrf_token %} - {{ form.email.errors }} - <p><label - for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} - <input type="submit" value="{% trans 'Reset my password' %}"/></p> - </form> - -{% endblock %} diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html deleted file mode 100644 index a460c34..0000000 --- a/templates/registration/registration_complete.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block content %} - <h1>Rejestracja zakończona</h1> - <p>Pomyślnie dodano użytkownika, wysłano email.</p> -{% endblock %} diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html deleted file mode 100644 index fd7d89f..0000000 --- a/templates/registration/registration_form.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load url from future %} - -{% block extrahead %} - <style> - label { - vertical-align: top; - width: 100px; - display: inline-block; - } - </style> -{% endblock %} - -{% block title %}{% trans 'Registration' %}{% endblock %} - -{% block content %} - <div id="content-main"> - - <form action="" method="post">{% csrf_token %} - <div> - {% if form.errors %} - <p class="errornote"> - {% blocktrans count form.errors.items|length as counter %} - Please correct the error below.{% plural %}Please - correct the errors below.{% endblocktrans %} - </p> - {% endif %} - - <h1>{% trans 'Registration' %}</h1> - - {{ form.as_p }} - - <div class="submit-row"> - <input type="submit" value="{% trans 'Add user' %}" - class="default"/> - </div> - - </div> - </form> - </div> - -{% endblock %} -- libgit2 0.22.2