From: Jan Szejko Date: Fri, 10 Mar 2017 10:46:00 +0000 (+0100) Subject: stage name translation X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/e3d6e94589c1356d3f8d1b7fc36d9f21d966e16a?ds=inline stage name translation --- 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 45880f76..8f6b86e5 100644 Binary files a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo and b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo differ 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."),