Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-05-21 13:31:25 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-05-21 17:18:57 (GMT)
commit5a58b3436ae65c197c540f96ceed735539664b8a (patch)
tree14c0515206844a7c79bb8e1e5d980131e1f335ed
parent94e939533ac9b4add11cb46298f2273f37bfaf83 (diff)
Translate period string properly SL #3190
Removed concatenation of period strings to allow translators to translate the string in the correct way. Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
-rw-r--r--finance.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/finance.py b/finance.py
index 02c2bf5..7531acd 100644
--- a/finance.py
+++ b/finance.py
@@ -451,10 +451,26 @@ class Finance(sugar.activity.activity.Activity):
self.thisperiodbtn.set_sensitive(next_prev)
self.nextperiodbtn.set_sensitive(next_prev)
+ # This is a HACK to translate the string properly
+ # http://bugs.sugarlabs.org/ticket/3190
+ period = self.period.lower()
+ if period == _('Month').lower():
+ text_previous_period = _('Previous Month')
+ text_this_period = _('This Month')
+ text_next_period = _('Next Month')
+ elif period == _('Day').lower():
+ text_previous_period = _('Previous Day')
+ text_this_period = _('This Day')
+ text_next_period = _('Next Day')
+ elif period == _('Year').lower():
+ text_previous_period = _('Previous Year')
+ text_this_period = _('This Year')
+ text_next_period = _('Next Year')
+
# Update the label self.period to reflect the period.
- self.prevperiodbtn.set_tooltip(_('Previous') + ' ' + self.period)
- self.thisperiodbtn.set_tooltip(_('This') + ' ' + self.period)
- self.nextperiodbtn.set_tooltip(_('Next') + ' ' + self.period)
+ self.prevperiodbtn.set_tooltip(text_previous_period)
+ self.thisperiodbtn.set_tooltip(text_this_period)
+ self.nextperiodbtn.set_tooltip(text_next_period)
# Only add and delete transactions on register screen.
add_del = self.screens[-1] == self.register