Просмотр исходного кода

fix #521: added tokens to singular strings

Rafał Pitoń 10 лет назад
Родитель
Сommit
9ba1c5748e
2 измененных файлов с 5 добавлено и 5 удалено
  1. 2 2
      misago/conf/forms.py
  2. 3 3
      misago/users/validators.py

+ 2 - 2
misago/conf/forms.py

@@ -15,7 +15,7 @@ class ValidateChoicesNum(object):
 
         if self.min_choices and self.min_choices > data_len:
             message = ungettext(
-                'You have to select at least one option.',
+                'You have to select at least %(choices)d option.',
                 'You have to select at least %(choices)d options.',
                 self.min_choices)
             message = message % {'choices': self.min_choices}
@@ -23,7 +23,7 @@ class ValidateChoicesNum(object):
 
         if self.max_choices and self.max_choices < data_len:
             message = ungettext(
-                'You cannot select more than one option.',
+                'You cannot select more than %(choices)d option.',
                 'You cannot select more than %(choices)d options.',
                 self.max_choices)
             message = message % {'choices': self.max_choices}

+ 3 - 3
misago/users/validators.py

@@ -53,7 +53,7 @@ Password validators
 def validate_password(value):
     if len(value) < settings.password_length_min:
         message = ungettext(
-            'Valid password must be at least one character long.',
+            'Valid password must be at least %(limit)s character long.',
             'Valid password must be at least %(limit)s characters long.',
             settings.password_length_min)
         message = message % {'limit': settings.password_length_min}
@@ -92,7 +92,7 @@ def validate_username_content(value):
 def validate_username_length(value):
     if len(value) < settings.username_length_min:
         message = ungettext(
-            "Username must be at least one character long.",
+            "Username must be at least %(limit)s character long.",
             "Username must be at least %(limit)s characters long.",
             settings.username_length_min)
         message = message % {'limit': settings.username_length_min}
@@ -100,7 +100,7 @@ def validate_username_length(value):
 
     if len(value) > settings.username_length_max:
         message = ungettext(
-            "Username cannot be longer than one characters.",
+            "Username cannot be longer than %(limit)s characters.",
             "Username cannot be longer than %(limit)s characters.",
             settings.username_length_max)
         message = message % {'limit': settings.username_length_max}