Browse Source

Fixed translations string with variable

sh4nks 10 years ago
parent
commit
b7de85b611

+ 4 - 5
flaskbb/forum/views.py

@@ -281,13 +281,12 @@ def move_topic(topic_id, forum_id, topic_slug=None, forum_slug=None):
         return redirect(forum_instance.url)
         return redirect(forum_instance.url)
 
 
     if not topic.move(forum_instance):
     if not topic.move(forum_instance):
-        flash(_(
-            "Could not move the topic to forum %(forum_instance.title)s"),
-            "danger"
-        )
+        flash(_("Could not move the topic to forum %(title)s",
+                title=forum_instance.title), "danger")
         return redirect(topic.url)
         return redirect(topic.url)
 
 
-    flash(_("Topic was moved to forum %(forum_instance.title)s"), "success")
+    flash(_("Topic was moved to forum %(title)s",
+            title=forum_instance.title), "success")
     return redirect(topic.url)
     return redirect(topic.url)
 
 
 
 

+ 13 - 11
flaskbb/translations/de/LC_MESSAGES/messages.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version:  0.1-dev\n"
 "Project-Id-Version:  0.1-dev\n"
 "Report-Msgid-Bugs-To: http://github.com/flaskbb/issues\n"
 "Report-Msgid-Bugs-To: http://github.com/flaskbb/issues\n"
-"POT-Creation-Date: 2015-01-03 13:47+0100\n"
+"POT-Creation-Date: 2015-01-03 20:37+0100\n"
 "PO-Revision-Date: 2015-01-03 13:45+0100\n"
 "PO-Revision-Date: 2015-01-03 13:45+0100\n"
 "Last-Translator: Peter Justin <sh4nks7@gmail.com>\n"
 "Last-Translator: Peter Justin <sh4nks7@gmail.com>\n"
 "Language-Team: FlaskBB Team\n"
 "Language-Team: FlaskBB Team\n"
@@ -46,38 +46,40 @@ msgid "You do not have the permissions to move this topic"
 msgstr ""
 msgstr ""
 
 
 #: flaskbb/forum/views.py:284
 #: flaskbb/forum/views.py:284
-msgid "Could not move the topic to forum %(forum_instance.title)s"
+#, python-format
+msgid "Could not move the topic to forum %(title)s"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:290
-msgid "Topic was moved to forum %(forum_instance.title)s"
+#: flaskbb/forum/views.py:288
+#, python-format
+msgid "Topic was moved to forum %(title)s"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:305
+#: flaskbb/forum/views.py:304
 msgid "You do not have the permissions to merge this topic"
 msgid "You do not have the permissions to merge this topic"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:310
+#: flaskbb/forum/views.py:309
 msgid "Could not merge the topic."
 msgid "Could not merge the topic."
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:313
+#: flaskbb/forum/views.py:312
 msgid "Topic succesfully merged."
 msgid "Topic succesfully merged."
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:324
+#: flaskbb/forum/views.py:323
 msgid "You do not have the permissions to post here"
 msgid "You do not have the permissions to post here"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:350
+#: flaskbb/forum/views.py:349
 msgid "You do not have the permissions to post in this topic"
 msgid "You do not have the permissions to post in this topic"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:376 flaskbb/forum/views.py:406
+#: flaskbb/forum/views.py:375 flaskbb/forum/views.py:405
 msgid "You do not have the permissions to edit this post"
 msgid "You do not have the permissions to edit this post"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:429
+#: flaskbb/forum/views.py:428
 msgid "Thanks for reporting!"
 msgid "Thanks for reporting!"
 msgstr ""
 msgstr ""
 
 

+ 13 - 11
flaskbb/translations/en/LC_MESSAGES/messages.po

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version:  0.1-dev\n"
 "Project-Id-Version:  0.1-dev\n"
 "Report-Msgid-Bugs-To: http://github.com/flaskbb/issues\n"
 "Report-Msgid-Bugs-To: http://github.com/flaskbb/issues\n"
-"POT-Creation-Date: 2015-01-03 13:47+0100\n"
+"POT-Creation-Date: 2015-01-03 20:37+0100\n"
 "PO-Revision-Date: 2015-01-03 13:45+0100\n"
 "PO-Revision-Date: 2015-01-03 13:45+0100\n"
 "Last-Translator: Peter Justin <sh4nks7@gmail.com>\n"
 "Last-Translator: Peter Justin <sh4nks7@gmail.com>\n"
 "Language-Team: FlaskBB Team\n"
 "Language-Team: FlaskBB Team\n"
@@ -46,38 +46,40 @@ msgid "You do not have the permissions to move this topic"
 msgstr ""
 msgstr ""
 
 
 #: flaskbb/forum/views.py:284
 #: flaskbb/forum/views.py:284
-msgid "Could not move the topic to forum %(forum_instance.title)s"
+#, python-format
+msgid "Could not move the topic to forum %(title)s"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:290
-msgid "Topic was moved to forum %(forum_instance.title)s"
+#: flaskbb/forum/views.py:288
+#, python-format
+msgid "Topic was moved to forum %(title)s"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:305
+#: flaskbb/forum/views.py:304
 msgid "You do not have the permissions to merge this topic"
 msgid "You do not have the permissions to merge this topic"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:310
+#: flaskbb/forum/views.py:309
 msgid "Could not merge the topic."
 msgid "Could not merge the topic."
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:313
+#: flaskbb/forum/views.py:312
 msgid "Topic succesfully merged."
 msgid "Topic succesfully merged."
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:324
+#: flaskbb/forum/views.py:323
 msgid "You do not have the permissions to post here"
 msgid "You do not have the permissions to post here"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:350
+#: flaskbb/forum/views.py:349
 msgid "You do not have the permissions to post in this topic"
 msgid "You do not have the permissions to post in this topic"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:376 flaskbb/forum/views.py:406
+#: flaskbb/forum/views.py:375 flaskbb/forum/views.py:405
 msgid "You do not have the permissions to edit this post"
 msgid "You do not have the permissions to edit this post"
 msgstr ""
 msgstr ""
 
 
-#: flaskbb/forum/views.py:429
+#: flaskbb/forum/views.py:428
 msgid "Thanks for reporting!"
 msgid "Thanks for reporting!"
 msgstr ""
 msgstr ""