[Mpuls-commits] r3450 - in base/trunk: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 25 16:44:03 CEST 2010


Author: bh
Date: 2010-08-25 16:44:01 +0200 (Wed, 25 Aug 2010)
New Revision: 3450

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/case.py
Log:
* mpulsweb/controllers/case.py (COPY_SUCCESS, COPY_SUCCESS_TEXT)
(COPY_CONFIRM, COPY_CONFIRM_TEXT): Removed.  Now inline in the
code.
(CaseController.copy): Move the messages into the method.  Now the
translation happens when the method is executed, not when the
module is imported so that the proper translation is used even in
mpuls applications override the translations provided by the base.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-25 14:24:41 UTC (rev 3449)
+++ base/trunk/ChangeLog	2010-08-25 14:44:01 UTC (rev 3450)
@@ -1,5 +1,15 @@
 2010-08-25  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/case.py (COPY_SUCCESS, COPY_SUCCESS_TEXT)
+	(COPY_CONFIRM, COPY_CONFIRM_TEXT): Removed.  Now inline in the
+	code.
+	(CaseController.copy): Move the messages into the method.  Now the
+	translation happens when the method is executed, not when the
+	module is imported so that the proper translation is used even in
+	mpuls applications override the translations provided by the base.
+
+2010-08-25  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/config/routing.py (make_map): Remove obsolete FIXME
 	comment.
 

Modified: base/trunk/mpulsweb/controllers/case.py
===================================================================
--- base/trunk/mpulsweb/controllers/case.py	2010-08-25 14:24:41 UTC (rev 3449)
+++ base/trunk/mpulsweb/controllers/case.py	2010-08-25 14:44:01 UTC (rev 3450)
@@ -65,11 +65,6 @@
 RESTORE_CONFIRM_TEXT = _("""Do you really want to restore the case? The case
 will be editable afterwards again for the users.""")
 
-COPY_SUCCESS = _('Case copied!') 
-COPY_SUCCESS_TEXT = _('The case was succussfully copied and is now available in the case overview. Click on "OK" to open the case overview.')
-COPY_CONFIRM = _('Copy case?')
-COPY_CONFIRM_TEXT = _('Do you really want to copy this case? All data will be copied in the new case.')
-
 IMPORT_XML_SUCCESS = _("Case(s) imported!""")
 IMPORT_XML_SUCCESS_TEXT = _("""The file was imported successfully.
 Click on "OK" to open the case overview.""")
@@ -364,13 +359,16 @@
         case = self._loadCase(id)
         if confirmed: 
             case.copy()
-            c.dialog_title = COPY_SUCCESS
-            c.dialog_text = COPY_SUCCESS_TEXT
+            c.dialog_title = _('Case copied!')
+            c.dialog_text = _('The case was succussfully copied and is now'
+                              ' available in the case overview.'
+                              ' Click on "OK" to open the case overview.')
             c.url_ok = h.url_for(controller="/case_overview")
             return render('/casemanagement/dialogs/success_copy.mako')
         else:
-            c.dialog_title = COPY_CONFIRM
-            c.dialog_text = COPY_CONFIRM_TEXT
+            c.dialog_title = _('Copy case?')
+            c.dialog_text =  _('Do you really want to copy this case?'
+                               ' All data will be copied in the new case.')
             c.url_yes = h.url_for(controller='/case', action='copy',
                                   id=id, confirmed=1)
             c.url_no = h.url_for(controller='/case', action='digest', id=id)



More information about the Mpuls-commits mailing list