From a575465a8081b59098c86166aae1d1672e4256e9 Mon Sep 17 00:00:00 2001 From: Levi Date: Sat, 9 Apr 2016 13:00:16 -0500 Subject: [PATCH] added translation text for form contact form fields --- digitalglarus/forms.py | 7 +++ digitalglarus/locale/de/LC_MESSAGES/django.mo | Bin 512 -> 661 bytes digitalglarus/locale/de/LC_MESSAGES/django.po | 54 +++++++++++++++++- 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/digitalglarus/forms.py b/digitalglarus/forms.py index da789c9c..b482779e 100644 --- a/digitalglarus/forms.py +++ b/digitalglarus/forms.py @@ -2,6 +2,7 @@ from django import forms from .models import Message from django.template.loader import render_to_string from django.core.mail import EmailMultiAlternatives +from django.utils.translation import ugettext_lazy as _ class ContactUsForm(forms.ModelForm): @@ -16,6 +17,12 @@ class ContactUsForm(forms.ModelForm): 'phone_number': forms.TextInput(attrs={'class': u'form-control'}), 'message': forms.Textarea(attrs={'class': u'form-control'}), } + labels = { + 'name': _('Name'), + 'email': _('Email'), + 'phone_number': _('Phone number'), + 'message': _('Message'), + } def send_email(self): text_content = render_to_string('emails/contact.txt', {'data': self.cleaned_data}) diff --git a/digitalglarus/locale/de/LC_MESSAGES/django.mo b/digitalglarus/locale/de/LC_MESSAGES/django.mo index f3f8d216bc1f432de021bb93ff97704efed87626..0313fcfddb01f21b760073928747884894e374d2 100644 GIT binary patch delta 291 zcmZo*naWy!Pl#nI0}!wSu?!H005LZZ_W&^n>;Pg`Al?bYAT|4em<5QB12GQ}p8;Yn zAifF2yg>W}h_e|P7(M}MkiIx31_n+bodTpm`tpD@$edyz4b&IOPz_}80R`HCG*BM{ zkOBiXC=D_Mq!FYE2ADw%*WAR+90uRi;^M^gR0hAq+*F2ujQqS*g}l<-q|~B`3B|02 zMphl@^uf7nP(I Gfw%yqKrl@J delta 119 zcmbQr+Q5=\n" "Language-Team: LANGUAGE \n" @@ -26,6 +26,58 @@ msgstr "" msgid "Digital Glarus Supporters" msgstr "" +#: forms.py:21 +msgid "Name" +msgstr "Name" + +#: forms.py:22 +msgid "Email" +msgstr "Email" + +#: forms.py:23 +msgid "Phone number" +msgstr "Telefon" + +#: forms.py:24 +msgid "Message" +msgstr "Nachricht" + +#: templates/glarus_blog/includes/blog_item.html:32 +msgid "read more" +msgstr "" + +#: templates/glarus_blog/includes/blog_meta.html:6 +msgid "by" +msgstr "" + +#: templates/glarus_blog/post_list.html:15 +msgid "No article found." +msgstr "" + +#: templates/glarus_blog/post_list.html:18 +msgid "Back" +msgstr "" + +#: templates/glarus_blog/post_list.html:23 +msgid "previous" +msgstr "" + +#: templates/glarus_blog/post_list.html:26 +msgid "Page" +msgstr "" + +#: templates/glarus_blog/post_list.html:26 +msgid "of" +msgstr "" + +#: templates/glarus_blog/post_list.html:29 +msgid "next" +msgstr "" + +#: templates/language_chooser.html:8 +msgid "Change to language:" +msgstr "" + #: urls.py:8 msgid "contact/?$" msgstr "kontakt/?$"