From 64ffca6ded510643c7c3b595efc31f3df84eb954 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 26 Oct 2017 03:24:29 +0530 Subject: [PATCH 1/3] signup form placeholder translation --- hosting/forms.py | 10 ++++++---- hosting/locale/de/LC_MESSAGES/django.po | 11 ++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hosting/forms.py b/hosting/forms.py index 7be7a588..d1c9d03a 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -50,15 +50,17 @@ class HostingUserLoginForm(forms.Form): class HostingUserSignupForm(forms.ModelForm): - confirm_password = forms.CharField(widget=forms.PasswordInput()) - password = forms.CharField(widget=forms.PasswordInput()) + confirm_password = forms.CharField(label=_("Confirm Password"), + widget=forms.PasswordInput()) + password = forms.CharField(label=_("Password"), + widget=forms.PasswordInput()) class Meta: model = CustomUser fields = ['name', 'email', 'password'] widgets = { 'name': forms.TextInput( - attrs={'placeholder': 'Enter your name or company name'}), + attrs={'placeholder': _('Enter your name or company name')}), } def clean_confirm_password(self): @@ -106,7 +108,7 @@ class UserHostingKeyForm(forms.ModelForm): public_key=openssh_pubkey_str).first().name KEY_EXISTS_MESSAGE = _( "This key exists already with the name \"%(name)s\"") % { - 'name': key_name} + 'name': key_name} raise forms.ValidationError(KEY_EXISTS_MESSAGE) with tempfile.NamedTemporaryFile(delete=True) as tmp_public_key_file: diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index fa24637a..9bb4a7be 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-10-16 01:06+0530\n" +"POT-Creation-Date: 2017-10-26 03:21+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,6 +27,15 @@ msgstr "Dein Account wurde noch nicht aktiviert." msgid "User does not exist" msgstr "Der Benutzer existiert nicht" +msgid "Confirm Password" +msgstr "Passwort Bestätigung" + +msgid "Password" +msgstr "Passwort" + +msgid "Enter your name or company name" +msgstr "Geben Sie Ihren Namen oder der Ihrer Firma ein" + msgid "Paste here your public key" msgstr "Füge Deinen Public Key ein" From 372f015760891a6442c67bdcb10ad8cb1b24205d Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 31 Oct 2017 20:50:15 +0530 Subject: [PATCH 2/3] translation fix --- hosting/locale/de/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 9bb4a7be..2be2ae6d 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -34,7 +34,7 @@ msgid "Password" msgstr "Passwort" msgid "Enter your name or company name" -msgstr "Geben Sie Ihren Namen oder der Ihrer Firma ein" +msgstr "Gib Deinen Namen oder den Name Deines Unternehmens ein" msgid "Paste here your public key" msgstr "Füge Deinen Public Key ein" From b8d0ca17d77770a6a6b5bd1c21cac78d561d37f2 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 31 Oct 2017 21:01:54 +0530 Subject: [PATCH 3/3] translation fix in utils.forms --- utils/locale/de/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/locale/de/LC_MESSAGES/django.po b/utils/locale/de/LC_MESSAGES/django.po index 8a961e7a..f18fc9c2 100644 --- a/utils/locale/de/LC_MESSAGES/django.po +++ b/utils/locale/de/LC_MESSAGES/django.po @@ -736,7 +736,7 @@ msgid "Unknown or unspecified country" msgstr "" msgid "Enter your name or company name" -msgstr "Geben Sie Ihren Namen oder der Ihrer Firma ein" +msgstr "Gib Deinen Namen oder den Name Deines Unternehmens ein" msgid "Your username and/or password were incorrect." msgstr "Dein Benutzername und/oder Dein Passwort ist falsch."