From c1409d5ca1717c1719868a8a2e044be312975494 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 1 Aug 2017 00:01:19 +0530 Subject: [PATCH] Improved validation error message texts and their DE translations --- .../locale/de/LC_MESSAGES/django.po | 25 +++++++++++++------ datacenterlight/views.py | 6 ++--- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index ebaf1707..7cfa18ca 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/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-07-30 18:57+0000\n" +"POT-Creation-Date: 2017-07-31 18:27+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -230,7 +230,7 @@ msgstr "Home" #: templates/datacenterlight/includes/_footer.html:40 msgid "Pricing" -msgstr "Preise" +msgstr "Preis" #: templates/datacenterlight/includes/_footer.html:49 msgid "All Rights Reserved" @@ -501,16 +501,16 @@ msgid "Actions speak louder than words. Let's do it, try our VM now." msgstr "Tagen sagen mehr als Worte – Teste jetzt unsere VM!" #: views.py:199 -msgid "Not a proper cores number" -msgstr "ist kein gültiger cores number" +msgid "Invalid number of cores" +msgstr "Ungültige Anzahle CPU-Kerne" #: views.py:203 -msgid "Not a proper ram number" -msgstr "ist kein gültiger ram number" +msgid "Invalid RAM size" +msgstr "Ungültige RAM-Grösse" #: views.py:207 -msgid "Not a proper storage number" -msgstr "ist kein gültiger storage number" +msgid "Invalid storage size" +msgstr "Ungültige Speicher-Grösse" #: views.py:262 msgid "is not a proper name" @@ -520,6 +520,15 @@ msgstr "ist kein gültiger Name" msgid "is not a proper email" msgstr "ist keine gültige E-Mailadresse" +#~ msgid "Not a proper cores number" +#~ msgstr "ist kein gültiger cores number" + +#~ msgid "Not a proper ram number" +#~ msgstr "ist kein gültiger ram number" + +#~ msgid "Not a proper storage number" +#~ msgstr "ist kein gültiger storage number" + #~ msgid "Please enter a value greater than or equal to 1." #~ msgstr "Bitte gib einen Wert größer oder gleich 1 ein." diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 10e2d791..ac4621b9 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -196,15 +196,15 @@ class IndexView(CreateView): def validate_cores(self, value): if (value > 48) or (value < 1): - raise ValidationError(_('Not a proper cores number')) + raise ValidationError(_('Invalid number of cores')) def validate_memory(self, value): if (value > 200) or (value < 2): - raise ValidationError(_('Not a proper ram number')) + raise ValidationError(_('Invalid RAM size')) def validate_storage(self, value): if (value > 2000) or (value < 10): - raise ValidationError(_('Not a proper storage number')) + raise ValidationError(_('Invalid storage size')) @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs):