[Sugar-devel] [PATCH Finance v2 2/2] Ability to translate header period SL #3190

Manuel Kaufmann humitos at gmail.com
Mon May 21 09:31:26 EDT 2012


Added the ability to translate the way that the header period is shown
and added some comments to the translatros on the code.

Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
 finance.py |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/finance.py b/finance.py
index 7531acd..a5626b8 100644
--- a/finance.py
+++ b/finance.py
@@ -387,16 +387,20 @@ class Finance(sugar.activity.activity.Activity):
 
     def update_header(self):
         if self.period == _('Day'):
-            text = self.period_start.strftime("%B %d, %Y")
+            # TRANS: representation of the "Day" period
+            text = self.period_start.strftime(_("%B %d, %Y"))
 
         elif self.period == _('Week'):
-            text = _('Week of') + self.period_start.strftime(" %B %d, %Y")
+            # TRANS: representation of the "Week of" period
+            text = _('Week of') + self.period_start.strftime(_(" %B %d, %Y"))
 
         elif self.period == _('Month'):
-            text = self.period_start.strftime("%B, %Y")
+            # TRANS: representation of the "Month" period
+            text = self.period_start.strftime(_("%B, %Y"))
 
         elif self.period == _('Year'):
-            text = self.period_start.strftime("%Y")
+            # TRANS: representation of the "Year" period
+            text = self.period_start.strftime(_("%Y"))
 
         elif self.period == _('Forever'):
             text = _('Forever')
-- 
1.7.10



More information about the Sugar-devel mailing list