From 7dddd70493f12feffa30c014e5a4b4a1425bb008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Tue, 25 Jun 2013 00:59:16 +0200 Subject: [PATCH] Fix whitespaces in translated strings. --- openslides/locale/en/LC_MESSAGES/django.po | 22 +++++++------------- openslides/locale/en/LC_MESSAGES/djangojs.po | 8 ++----- openslides/motion/views.py | 14 ++++++------- tests/motion/test_views.py | 10 ++++----- 4 files changed, 21 insertions(+), 33 deletions(-) diff --git a/openslides/locale/en/LC_MESSAGES/django.po b/openslides/locale/en/LC_MESSAGES/django.po index 8285170f0..7270eab6e 100644 --- a/openslides/locale/en/LC_MESSAGES/django.po +++ b/openslides/locale/en/LC_MESSAGES/django.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-06-21 23:28+0200\n" +"POT-Creation-Date: 2013-06-25 00:58+0200\n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1182,7 +1182,7 @@ msgid "General" msgstr "" #: core/templates/core/version.html:5 core/templates/core/version.html.py:8 -#: core/templates/core/version.html:11 motion/pdf.py:105 +#: core/templates/core/version.html:11 motion/pdf.py:105 motion/views.py:358 #: motion/templates/motion/motion_detail.html:26 #: motion/templates/motion/motion_diff.html:35 #: motion/templates/motion/motion_diff.html:39 @@ -1543,7 +1543,7 @@ msgstr "" msgid "published" msgstr "" -#: motion/signals.py:166 +#: motion/signals.py:166 motion/views.py:360 msgid "permitted" msgstr "" @@ -1608,15 +1608,15 @@ msgid "All supporters removed" msgstr "" #: motion/views.py:245 -msgid "Motion version " +msgid "Motion version" msgstr "" #: motion/views.py:247 -msgid " created" +msgid "created" msgstr "" #: motion/views.py:247 -msgid " updated" +msgid "updated" msgstr "" #: motion/views.py:292 utils/views.py:380 @@ -1633,14 +1633,6 @@ msgstr "" msgid "Are you sure you want permit version %s?" msgstr "" -#: motion/views.py:358 -msgid "Version " -msgstr "" - -#: motion/views.py:360 -msgid " permitted" -msgstr "" - #: motion/views.py:386 msgid "At least one version number is not valid." msgstr "" @@ -1698,7 +1690,7 @@ msgid "Poll" msgstr "" #: motion/views.py:658 -msgid "State changed to " +msgid "State changed to" msgstr "" #: motion/views.py:661 diff --git a/openslides/locale/en/LC_MESSAGES/djangojs.po b/openslides/locale/en/LC_MESSAGES/djangojs.po index 8f0396a19..6f43c5c15 100644 --- a/openslides/locale/en/LC_MESSAGES/djangojs.po +++ b/openslides/locale/en/LC_MESSAGES/djangojs.po @@ -4,13 +4,9 @@ # This file is distributed under the same license as the OpenSlides package. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-06-21 23:35+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"POT-Creation-Date: 2013-06-25 00:58+0200\n" +"Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/openslides/motion/views.py b/openslides/motion/views.py index 78d0c2058..771d94e1d 100644 --- a/openslides/motion/views.py +++ b/openslides/motion/views.py @@ -242,9 +242,9 @@ class MotionUpdateView(MotionEditMixin, UpdateView): number = self.version.version_number created = self.used_new_version self.object.write_log( - [ugettext_noop('Motion version '), - str(number), - ugettext_noop(' created') if created else ugettext_noop(' updated')], + [ugettext_noop('Motion version'), + ' %d ' % number, + ugettext_noop('created') if created else ugettext_noop('updated')], self.request.user) def get_initial(self): @@ -355,9 +355,9 @@ class VersionPermitView(SingleObjectMixin, QuestionMixin, RedirectView): self.object.active_version = self.version self.object.save(update_fields=['active_version']) self.object.write_log( - message_list=[ugettext_noop('Version '), - str(self.version.version_number), - ugettext_noop(' permitted')], + message_list=[ugettext_noop('Version'), + ' %d ' % self.version.version_number, + ugettext_noop('permitted')], person=self.request.user) version_permit = VersionPermitView.as_view() @@ -655,7 +655,7 @@ class MotionSetStateView(SingleObjectMixin, RedirectView): else: self.object.save(update_fields=['state', 'identifier']) self.object.write_log( - message_list=[ugettext_noop('State changed to '), self.object.state.name], + message_list=[ugettext_noop('State changed to'), ' %s' % self.object.state.name], person=self.request.user) messages.success(request, _('The state of the motion was set to %s.') diff --git a/tests/motion/test_views.py b/tests/motion/test_views.py index ecfcc9444..e3be2e3c5 100644 --- a/tests/motion/test_views.py +++ b/tests/motion/test_views.py @@ -331,7 +331,7 @@ class TestMotionUpdateView(MotionViewTestCase): response = self.admin_client.post(self.url, {'title': 'new motion_title', 'text': 'motion text', 'workflow': 2}) - self.assertEqual(MotionLog.objects.get(pk=1).message_list, ['Motion version ', '1', ' updated']) + self.assertEqual(MotionLog.objects.get(pk=1).message_list, ['Motion version', ' 1 ', 'updated']) # Update motion by creating a new version self.motion1.set_state(6) # Set to state 'permitted' which has versioning=True @@ -340,7 +340,7 @@ class TestMotionUpdateView(MotionViewTestCase): response = self.admin_client.post(self.url, {'title': 'new motion_title', 'text': 'new motion text', 'workflow': 2}) - self.assertEqual(MotionLog.objects.get(pk=2).message_list, ['Motion version ', '2', ' created']) + self.assertEqual(MotionLog.objects.get(pk=2).message_list, ['Motion version', ' 2 ', 'created']) # Update motion with so called 'trivial changes' config['motion_allow_disable_versioning'] = True @@ -348,20 +348,20 @@ class TestMotionUpdateView(MotionViewTestCase): 'text': 'more new motion text', 'disable_versioning': 'on', 'workflow': 2}) - self.assertEqual(MotionLog.objects.get(pk=3).message_list, ['Motion version ', '2', ' updated']) + self.assertEqual(MotionLog.objects.get(pk=3).message_list, ['Motion version', ' 2 ', 'updated']) # Update motion without changes in the version data response = self.admin_client.post(self.url, {'title': 'new motion_title', 'text': 'more new motion text', 'workflow': 2}) - self.assertEqual(MotionLog.objects.get(pk=4).message_list, ['Motion version ', '2', ' updated']) + self.assertEqual(MotionLog.objects.get(pk=4).message_list, ['Motion version', ' 2 ', 'updated']) # Update motion without changes in the version data but also with the 'trivial changes' flag response = self.admin_client.post(self.url, {'title': 'new motion_title', 'text': 'more new motion text', 'disable_versioning': 'on', 'workflow': 2}) - self.assertEqual(MotionLog.objects.get(pk=5).message_list, ['Motion version ', '2', ' updated']) + self.assertEqual(MotionLog.objects.get(pk=5).message_list, ['Motion version', ' 2 ', 'updated']) class TestMotionDeleteView(MotionViewTestCase):