From e3d6e94589c1356d3f8d1b7fc36d9f21d966e16a Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Fri, 10 Mar 2017 11:46:00 +0100 Subject: [PATCH] stage name translation --- apps/catalogue/constants.py | 14 +++-- .../catalogue/locale/pl/LC_MESSAGES/django.mo | Bin 7975 -> 8224 bytes .../catalogue/locale/pl/LC_MESSAGES/django.po | 57 +++++++++++++----- apps/catalogue/models/document.py | 2 +- apps/catalogue/views.py | 4 +- apps/wiki/forms.py | 2 +- 6 files changed, 53 insertions(+), 26 deletions(-) diff --git a/apps/catalogue/constants.py b/apps/catalogue/constants.py index dbdb5748..03cef603 100644 --- a/apps/catalogue/constants.py +++ b/apps/catalogue/constants.py @@ -3,6 +3,8 @@ # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # +from django.utils.translation import ugettext_lazy as _ + TRIM_BEGIN = " TRIM_BEGIN " TRIM_END = " TRIM_END " @@ -16,9 +18,9 @@ MASTERS = ['powiesc', ] STAGES = [ - 'Draft', - 'Comments', - 'Comments review', - 'Proofreading', - 'Publication', - ] \ No newline at end of file + ('Draft', _('Draft')), + ('Comments', _('Comments')), + ('Comments review', _('Comments review')), + ('Proofreading', _('Proofreading')), + ('Publication', _('Publication')), +] diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo index 45880f7653d5144c236d2e2b125c6f655e38796d..8f6b86e55f5003d222ad16d0883a0851abf301a9 100644 GIT binary patch delta 2171 zcmZA2T})eL9LMp0u|UU*lgitin;n8qY-J3zf`hR!Up7#>f!o+zv_M%(p*4kJfar-! zc4M{+(_kcvhQwqh#zeEmO_!PMVmdAqz0m1}Q=?1F4AD4myfD%4uRSEjC;gw#a}MV` zFaPsAhqpTyyPWU+-g%=OBJLzs3d|h5Sjd6$VX@f({0K|2!e_?MHgG7yd$0^c*of`O z&te?bViME%5)R=XsCEX{m{qB(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zAgaBesP`Ro;-r5wmWmomMzUtoZ~ z6Sc;X^zOlnSc3iN-$Nyqyr0KroQ>n-jY-E+T!b~KHNAwIVO&BeBPp23y&Lts6xDGB zY9f{P^DU@M)Sw2u8yS*A#^+&P!npyDcFIu?>CRBXarciLsLk7sjW~ds;VS+}lcoxF4C_#vu>~DE{{j2K1=I)E?E9Oj zRNX-~zPXP|@l({yU!gKKjLOV6)Mou*-~UE^_ZKz6c&5!yhe^XQ+(>Mo|6rr+qu|T> zMN`oTwGs6@p!HT!`c$;xyo5Sep}pXesjiI8AhHN`I*ZW$(STKyVHFKn#qZ`)Oe`Yu ziKT=J`zE-NwDx6$b~_U>^9f}|OEQnprW{!^N8GRi!DFUJ+Vx8RNs?52^n+`x^e!V*w3IqxDmwEj=|r_ElvTt+vpD!) zNSI0@m+%q)OO9PBveiy6Cv;*;0^Lzvf$z@3K!1|g`sMr(W(`L-g;_^pY8}zp^RhhY dp8P^jw)MqzINUm!)EaJ0PB|B5JxSf{_y>QrsQ~~0 diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.po b/apps/catalogue/locale/pl/LC_MESSAGES/django.po index dd0b15e5..111b0e12 100644 --- a/apps/catalogue/locale/pl/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Platforma Redakcyjna\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-01 17:12+0100\n" +"POT-Creation-Date: 2017-03-09 17:34+0100\n" "PO-Revision-Date: 2014-04-01 11:29+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: Fundacja Nowoczesna Polska =20) ? 1 : 2);\n" "X-Generator: Poedit 1.5.4\n" -#: forms.py:57 +#: constants.py:21 +msgid "Draft" +msgstr "Szkic" + +#: constants.py:22 +msgid "Comments" +msgstr "Komentarze" + +#: constants.py:23 +msgid "Comments review" +msgstr "Przegląd komentarzy" + +#: constants.py:24 +msgid "Proofreading" +msgstr "Korekta" + +#: constants.py:25 +msgid "Publication" +msgstr "Publikacja" + +#: forms.py:36 msgid "The cover should be an image file (jpg/png/gif)" msgstr "Okładka powinna być plikiem graficznym (jpg/png/gif)" -#: forms.py:65 +#: forms.py:95 msgid "ZIP file" msgstr "Plik ZIP" -#: forms.py:67 +#: forms.py:97 msgid "Directories are documents in chunks" msgstr "Katalogi zawierają dokumenty w częściach" @@ -64,14 +84,28 @@ msgstr "zapis publikacji książki" msgid "book publish records" msgstr "zapisy publikacji książek" -#: models/tag.py:13 +#: models/tag.py:13 models/tag.py:20 msgid "category" msgstr "kategoria" -#: models/tag.py:22 +#: models/tag.py:15 +msgid "multiple choice" +msgstr "" + +#: models/tag.py:21 +#, fuzzy +#| msgid "category" +msgid "categories" +msgstr "kategoria" + +#: models/tag.py:28 models/tag.py:35 msgid "tag" msgstr "tag" +#: models/tag.py:36 +msgid "tags" +msgstr "" + #: templates/catalogue/book_delete.html:5 #: templates/catalogue/book_owner.html:5 #: templates/catalogue/book_schedule.html:10 @@ -373,7 +407,7 @@ msgstr "Podsumowanie" msgid "You can provide a short description of the document here." msgstr "Możesz tu dodać krótki opis dokumentu." -#: templates/catalogue/document_create_missing.html:79 +#: templates/catalogue/document_create_missing.html:84 msgid "Create resource" msgstr "Utwórz zasób" @@ -531,12 +565,6 @@ msgstr "puste" #~ msgid "Related edit" #~ msgstr "Powiązana zmiana" -#~ msgid "Publication" -#~ msgstr "Publikacja" - -#~ msgid "Comment" -#~ msgstr "Komentarz" - #~ msgid "Slug already used for %s" #~ msgstr "Slug taki sam jak dla pliku %s" @@ -864,9 +892,6 @@ msgstr "puste" #~ msgid "Tagging" #~ msgstr "Tagowanie" -#~ msgid "Initial Proofreading" -#~ msgstr "Korekta" - #~ msgid "Annotation Proofreading" #~ msgstr "Sprawdzenie przypisów źródła" diff --git a/apps/catalogue/models/document.py b/apps/catalogue/models/document.py index 4f084804..6d9cb732 100755 --- a/apps/catalogue/models/document.py +++ b/apps/catalogue/models/document.py @@ -22,7 +22,7 @@ class Document(Ref): owner_user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True) owner_organization = models.ForeignKey(Organization, null=True) - stage = models.CharField(_('stage'), max_length=128, blank=True, default=STAGES[0]) + stage = models.CharField(_('stage'), max_length=128, blank=True, default=STAGES[0][0]) assigned_to = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, related_name='assignments') deleted = models.BooleanField(default=False) tags = models.ManyToManyField(Tag, blank=True) diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index b8b6b89e..a11eadb9 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -321,7 +321,7 @@ def book_schedule(request, pk): book = get_object_or_404(Document, pk=pk, deleted=False) if request.method == 'POST': Plan.objects.filter(document=book).delete() - for i, s in enumerate(STAGES): + for i, (s, name) in enumerate(STAGES): user_id = request.POST.get('s%d-user' % i) deadline = request.POST.get('s%d-deadline' % i) or None Plan.objects.create(document=book, stage=s, user_id=user_id, deadline=deadline) @@ -333,7 +333,7 @@ def book_schedule(request, pk): for p in Plan.objects.filter(document=book): current[p.stage] = (getattr(p.user, 'pk', None), (p.deadline.isoformat() if p.deadline else None)) - schedule = [(i, s, current.get(s, ())) for (i, s) in enumerate(STAGES)] + schedule = [(i, s, current.get(s, ())) for i, (s, name) in enumerate(STAGES)] if book.owner_organization: people = [m.user for m in book.owner_organization.membership_set.exclude(status='pending')] diff --git a/apps/wiki/forms.py b/apps/wiki/forms.py index ac219b17..c2cb0eef 100644 --- a/apps/wiki/forms.py +++ b/apps/wiki/forms.py @@ -44,7 +44,7 @@ class DocumentTextSaveForm(forms.Form): ) stage = forms.ChoiceField( - choices=[(s, s) for s in STAGES], + choices=STAGES, required=False, label=_(u"Stage"), help_text=_(u"If completed a work stage, change to another one."), -- 2.20.1