Ticket #3190: 0002-Ability-to-translate-header-period-SL-3190.patch

File 0002-Ability-to-translate-header-period-SL-3190.patch, 1.9 KB (added by humitos, 12 years ago)

new version - v2

  • finance.py

    From 79e9876f1b5552b8aba0b8bc91bca853218ababa Mon Sep 17 00:00:00 2001
    Message-Id: <79e9876f1b5552b8aba0b8bc91bca853218ababa.1337607059.git.humitos@gmail.com>
    In-Reply-To: <9567f18a440089c272a31308130c708486ccbc99.1337607059.git.humitos@gmail.com>
    References: <9567f18a440089c272a31308130c708486ccbc99.1337607059.git.humitos@gmail.com>
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Wed, 9 May 2012 10:29:43 -0300
    Subject: [PATCH Finance v2 2/2] Ability to translate header period SL #3190
    
    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@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 b class Finance(sugar.activity.activity.Activity): 
    387387
    388388    def update_header(self):
    389389        if self.period == _('Day'):
    390             text = self.period_start.strftime("%B %d, %Y")
     390            # TRANS: representation of the "Day" period
     391            text = self.period_start.strftime(_("%B %d, %Y"))
    391392
    392393        elif self.period == _('Week'):
    393             text = _('Week of') + self.period_start.strftime(" %B %d, %Y")
     394            # TRANS: representation of the "Week of" period
     395            text = _('Week of') + self.period_start.strftime(_(" %B %d, %Y"))
    394396
    395397        elif self.period == _('Month'):
    396             text = self.period_start.strftime("%B, %Y")
     398            # TRANS: representation of the "Month" period
     399            text = self.period_start.strftime(_("%B, %Y"))
    397400
    398401        elif self.period == _('Year'):
    399             text = self.period_start.strftime("%Y")
     402            # TRANS: representation of the "Year" period
     403            text = self.period_start.strftime(_("%Y"))
    400404
    401405        elif self.period == _('Forever'):
    402406            text = _('Forever')