Browse Source

Even more translations consistency

sh4nks 10 years ago
parent
commit
c1ba1f3466

+ 3 - 3
flaskbb/auth/forms.py

@@ -21,7 +21,7 @@ from flaskbb.user.models import User
 
 USERNAME_RE = r'^[\w.+-]+$'
 is_username = regexp(USERNAME_RE,
-                     message=_("You can only use letters, numbers or dashes"))
+                     message=_("You can only use letters, numbers or dashes."))
 
 
 class LoginForm(Form):
@@ -59,12 +59,12 @@ class RegisterForm(Form):
     def validate_username(self, field):
         user = User.query.filter_by(username=field.data).first()
         if user:
-            raise ValidationError(_("This Username is taken."))
+            raise ValidationError(_("This Username is already taken."))
 
     def validate_email(self, field):
         email = User.query.filter_by(email=field.data).first()
         if email:
-            raise ValidationError(_("This E-Mail is taken."))
+            raise ValidationError(_("This E-Mail Address is already taken."))
 
     def save(self):
         user = User(username=self.username.data,

+ 1 - 1
flaskbb/auth/views.py

@@ -119,7 +119,7 @@ def forgot_password():
             return redirect(url_for("auth.forgot_password"))
         else:
             flash(_("You have entered a Username or E-Mail Address that is "
-                    "not linked with your account"), "danger")
+                    "not linked with your account."), "danger")
     return render_template("auth/forgot_password.html", form=form)
 
 

+ 1 - 1
flaskbb/forum/views.py

@@ -429,7 +429,7 @@ def report_post(post_id):
     form = ReportForm()
     if form.validate_on_submit():
         form.save(current_user, post)
-        flash(_("Thanks for reporting!"), "success")
+        flash(_("Thanks for reporting."), "success")
 
     return render_template("forum/report_post.html", form=form)
 

+ 20 - 18
flaskbb/management/forms.py

@@ -24,7 +24,7 @@ from flaskbb.user.models import User, Group
 
 USERNAME_RE = r'^[\w.+-]+$'
 is_username = regexp(USERNAME_RE,
-                     message=_("You can only use letters, numbers or dashes"))
+                     message=_("You can only use letters, numbers or dashes."))
 
 
 def selectable_forums():
@@ -101,7 +101,7 @@ class UserForm(Form):
             user = User.query.filter(User.username.like(field.data)).first()
 
         if user:
-            raise ValidationError(_("This Username is taken."))
+            raise ValidationError(_("This Username is already taken."))
 
     def validate_email(self, field):
         if hasattr(self, "user"):
@@ -115,7 +115,7 @@ class UserForm(Form):
             user = User.query.filter(User.email.like(field.data)).first()
 
         if user:
-            raise ValidationError(_("This E-Mail is taken."))
+            raise ValidationError(_("This E-Mail Address is already taken."))
 
     def save(self):
         user = User(**self.data)
@@ -148,40 +148,42 @@ class GroupForm(Form):
     super_mod = BooleanField(
         _("Is Super Moderator Group?"),
         description=_("Check this if the users in this group are allowed to "
-                      "moderate every forum")
+                      "moderate every forum.")
     )
     mod = BooleanField(
         _("Is Moderator Group?"),
         description=_("Check this if the users in this group are allowed to "
-                      "moderate specified forums")
+                      "moderate specified forums.")
     )
     banned = BooleanField(
         _("Is Banned Group?"),
-        description=_("Only one Banned group is allowed")
+        description=_("Only one Banned group is allowed.")
     )
     guest = BooleanField(
         _("Is Guest Group?"),
-        description=_("Only one Guest group is allowed")
+        description=_("Only one Guest group is allowed.")
     )
     editpost = BooleanField(
         _("Can edit posts"),
-        description=_("Check this if the users in this group can edit posts")
+        description=_("Check this if the users in this group can edit posts.")
     )
     deletepost = BooleanField(
         _("Can delete posts"),
-        description=_("Check this is the users in this group can delete posts")
+        description=_("Check this is the users in this group can delete posts.")
     )
     deletetopic = BooleanField(
         _("Can delete topics"),
-        description=_("Check this is the users in this group can delete topics")
+        description=_("Check this is the users in this group can delete "
+                      "topics.")
     )
     posttopic = BooleanField(
         _("Can create topics"),
-        description=_("Check this is the users in this group can create topics")
+        description=_("Check this is the users in this group can create "
+                      "topics.")
     )
     postreply = BooleanField(
         _("Can post replies"),
-        description=_("Check this is the users in this group can post replies")
+        description=_("Check this is the users in this group can post replies.")
     )
 
     mod_edituser = BooleanField(
@@ -192,7 +194,7 @@ class GroupForm(Form):
 
     mod_banuser = BooleanField(
         _("Moderators can ban users"),
-        description=_("Allow moderators to ban other users")
+        description=_("Allow moderators to ban other users.")
     )
 
     submit = SubmitField(_("Save"))
@@ -209,7 +211,7 @@ class GroupForm(Form):
             group = Group.query.filter(Group.name.like(field.data)).first()
 
         if group:
-            raise ValidationError(_("This Group name is taken."))
+            raise ValidationError(_("This Group name is already taken."))
 
     def validate_banned(self, field):
         if hasattr(self, "group"):
@@ -284,7 +286,7 @@ class ForumForm(Form):
     external = StringField(
         _("External Link"),
         validators=[Optional(), URL()],
-        description=_("A link to a website i.e. 'http://flaskbb.org'")
+        description=_("A link to a website i.e. 'http://flaskbb.org'.")
     )
 
     moderators = StringField(
@@ -309,7 +311,7 @@ class ForumForm(Form):
         if hasattr(self, "forum"):
             if self.forum.topics:
                 raise ValidationError(_("You cannot convert a forum that "
-                                        "contain topics in a external link"))
+                                        "contain topics in a external link."))
 
     def validate_show_moderators(self, field):
         if field.data and not self.moderators.data:
@@ -334,13 +336,13 @@ class ForumForm(Form):
                             user.get_permissions()["admin"] or
                             user.get_permissions()["super_mod"]):
                         raise ValidationError(
-                            _("%(user)s is not in a moderators group",
+                            _("%(user)s is not in a moderators group.",
                               user=user.username)
                         )
                     else:
                         approved_moderators.append(user)
                 else:
-                    raise ValidationError(_("User %(moderator)s not found",
+                    raise ValidationError(_("User %(moderator)s not found.",
                                             moderator=moderator))
             field.data = approved_moderators
 

+ 2 - 2
flaskbb/management/views.py

@@ -528,7 +528,7 @@ def uninstall_plugin(plugin):
 
         flash(_("Plugin has been uninstalled."), "success")
     else:
-        flash(_("Cannot uninstall Plugin"), "danger")
+        flash(_("Cannot uninstall Plugin."), "danger")
 
     return redirect(url_for("management.plugins"))
 
@@ -543,6 +543,6 @@ def install_plugin(plugin):
 
         flash(_("Plugin has been installed."), "success")
     else:
-        flash(_("Cannot install Plugin"), "danger")
+        flash(_("Cannot install Plugin."), "danger")
 
     return redirect(url_for("management.plugins"))

+ 2 - 2
flaskbb/user/views.py

@@ -180,7 +180,7 @@ def new_message():
                       unread=False,
                       as_draft=True)
 
-            flash(_("Message saved!"), "success")
+            flash(_("Message saved."), "success")
             return redirect(url_for("user.drafts"))
 
         if "send_message" in request.form and form.validate():
@@ -198,7 +198,7 @@ def new_message():
                       user_id=to_user.id,
                       unread=True)
 
-            flash(_("Message sent!"), "success")
+            flash(_("Message sent."), "success")
             return redirect(url_for("user.sent"))
     else:
         form.to_user.data = to_user