From edf75472e12f32cbffb5e9b1d255a00238259e29 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 29 Dec 2016 15:48:56 +0100 Subject: [PATCH] translations for admin --- stage2/locale/pl/LC_MESSAGES/django.mo | Bin 0 -> 1083 bytes stage2/locale/pl/LC_MESSAGES/django.po | 79 +++++++++++++++++++++++++ stage2/models.py | 29 +++++---- 3 files changed, 97 insertions(+), 11 deletions(-) create mode 100644 stage2/locale/pl/LC_MESSAGES/django.mo create mode 100644 stage2/locale/pl/LC_MESSAGES/django.po diff --git a/stage2/locale/pl/LC_MESSAGES/django.mo b/stage2/locale/pl/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..f012b7fbe5e7574989d29a4bd1f8db0c968d530f GIT binary patch literal 1083 zcmYk4Jxmlq6vszJkyHGju`zKP34{#p9$;{}LsnSu;(g^fNVGBI-f)h$H@n%H6OK?3 z6I&Y-jTSZ*Ru+_22B@?!vC_hr*i%_q`QF|Jc**SV&71e}-^u(M>U&ARF2TAA>n*G+ z=%0WO*ak2I>;lgLp8@-UFH*h&o`wB8;A!9o;AP-PAl7{bo&tUaV%|640Psh8{s)MC z4}j-^|A5%1|0E&r!5;+Tyd7wQ{FHJxuZPTx;1> zZK2FDR}()}hWjQVo;3t-1X2ki+FS-?O$LHCg!W?@85t@Kkysn5cw3N`=;ERp3j?mr z!zA418#D@~GMYp@Hqw_7hlFFkCPtb-kZK%05x!xC23r-ehW-w%y7TwkC6BIpwdF#k zoT-T@j14R4rfje~ou+2>(4m=XrOxJK!BG@j;6^w!YuPuMon_fu)ShxCrp7GWvLKPw z#8ZjQ)4cnhTVtgPTX5;!ic>0#J*bquOcC_6dd!s$xCvv2F0K@dwCt8Vn)6C-p*ZI* zEY!T^W^RrJAAsV;*Z^@+, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-29 15:35+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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:16 +msgid "contact" +msgstr "kontakt" + +#: models.py:17 +msgid "key" +msgstr "klucz" + +#: models.py:18 +msgid "first name" +msgstr "imię" + +#: models.py:19 +msgid "last_name" +msgstr "nazwisko" + +#: models.py:20 +msgid "email" +msgstr "email" + +#: models.py:21 +msgid "key sent" +msgstr "wysłano klucz" + +#: models.py:24 +msgid "participant" +msgstr "uczestnik" + +#: models.py:25 +msgid "participants" +msgstr "uczestnicy" + +#: models.py:54 +msgid "title" +msgstr "tytuł" + +#: models.py:55 +msgid "content" +msgstr "treść" + +#: models.py:56 +msgid "deadline" +msgstr "termin" + +#: models.py:57 +msgid "max points" +msgstr "max punktów" + +#: models.py:58 +msgid "file descriptions" +msgstr "opisy plików" + +#: models.py:62 +msgid "assignment" +msgstr "zadanie" + +#: models.py:63 +msgid "assignments" +msgstr "zadania" diff --git a/stage2/models.py b/stage2/models.py index 8ffa255..1c6bc49 100644 --- a/stage2/models.py +++ b/stage2/models.py @@ -6,18 +6,23 @@ import string from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import models +from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONField from contact.models import Contact class Participant(models.Model): - contact = models.ForeignKey(Contact, null=True) - key = models.CharField(max_length=30, unique=True) - first_name = models.CharField(max_length=100) - last_name = models.CharField(max_length=100) - email = models.EmailField(max_length=100, unique=True) - key_sent = models.BooleanField(default=False) + contact = models.ForeignKey(Contact, verbose_name=_('contact'), null=True) + key = models.CharField(_('key'), max_length=30, unique=True) + first_name = models.CharField(_('first name'), max_length=100) + last_name = models.CharField(_('last_name'), max_length=100) + email = models.EmailField(_('email'), max_length=100, unique=True) + key_sent = models.BooleanField(_('key sent'), default=False) + + class Meta: + verbose_name = _('participant') + verbose_name_plural = _('participants') def __unicode__(self): return ', '.join((self.last_name, self.first_name, self.email)) @@ -46,14 +51,16 @@ class Participant(models.Model): class Assignment(models.Model): - title = models.CharField(max_length=128) - content = models.TextField() - deadline = models.DateTimeField() - max_points = models.IntegerField() - file_descriptions = JSONField() + title = models.CharField(_('title'), max_length=128) + content = models.TextField(_('content')) + deadline = models.DateTimeField(_('deadline')) + max_points = models.IntegerField(_('max points')) + file_descriptions = JSONField(_('file descriptions')) class Meta: ordering = ['deadline'] + verbose_name = _('assignment') + verbose_name_plural = _('assignments') def __unicode__(self): return self.title -- 2.20.1