[Sugar-devel] [PATCH finance] Commit from Sugar Labs: Translation System by user aputsiaq.: 31 of 31 messages translated (0 fuzzy).
Chris Leonard
cjlhomeaddress at gmail.com
Sat Mar 17 16:53:25 EDT 2012
The PO or POT files themselves should not be patched. This will cause
the Gitorious repo to get out of synch with the local git copy
maintained by Pootle and this will require manual intervention to fix.
http://wiki.sugarlabs.org/go/Translation_Team/i18n_Best_Practices#Do_not_touch_anything_inside_your_po_directory
Add Unknown to the code as a gettexted string and the potupdater
script will take care of regenerating the POT and the new string will
be rolled out to language projects via "Update from Templates".
cjl
2012/3/17 Kalpa Welivitigoda <callkalpa at gmail.com>:
> hi,
>
> 2012/3/17 Manuel Quiñones <manuq at laptop.org>:
>> Hi,
>>
>> El día 17 de marzo de 2012 15:04, <callkalpa at gmail.com> escribió:
>>> From: Pootle daemon <pootle at pootle.sugarlabs.org>
>>>
>>> expenses with no category specified are displayed as "Unknown"
>>> fix to SL#3097
>>> ---
>>> budgetscreen.py | 6 +++++-
>>> chartscreen.py | 6 +++++-
>>> po/da.po | 8 ++++----
>>> 3 files changed, 14 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/budgetscreen.py b/budgetscreen.py
>>> index 0e2cd98..045a002 100644
>>> --- a/budgetscreen.py
>>> +++ b/budgetscreen.py
>>> @@ -96,7 +96,11 @@ class BudgetScreen(gtk.VBox):
>>>
>>> # Build categories.
>>> for c in self.sorted_categories:
>>> - catbox = gtk.Label(c)
>>> + # If there is no category, display as Unknown
>>> + if c is '':
>>> + catbox = gtk.Label('Unknown')
>>> + else:
>>> + catbox = gtk.Label(c)
>>> catbox.set_padding(10, 0)
>>
>> You can use gettext to make the "Unknown" label translatable. See in
>> the imports at the top of the file you have:
>>
>> from gettext import gettext as _
>>
>> The you can do:
>>
>> catbox = gtk.Label(_('Unknown'))
>>
>>
>>>
>>> color = finance.get_category_color_str(c)
>>> diff --git a/chartscreen.py b/chartscreen.py
>>> index 129be9b..fec333c 100644
>>> --- a/chartscreen.py
>>> +++ b/chartscreen.py
>>> @@ -90,7 +90,11 @@ class ChartScreen(gtk.HBox):
>>> hbox = gtk.HBox()
>>>
>>> catlabel = gtk.Label()
>>> - catlabel.set_markup(c)
>>> + # If there is no category, display as Unknown
>>> + if c is '':
>>> + catlabel.set_markup('Unknown')
>>> + else:
>>> + catlabel.set_markup(c)
>>> catgroup.add_widget(catlabel)
>>
>> Same here.
>>
>> Also I see some trailing whitespacen in both files, would be great to
>> remove them to satisfy PEP8, in a separate patch.
>>
>
> Thanks for your suggestion. I'll follow that way.
>
>> Great to see you revisiting the trac.
>>
>
> I have messed with the subject of this patch. So is it ok if I send
> the new patch as a separate mail?
>
>> Cheers,
>>
>>>
>>> color = finance.get_category_color_str(c)
>>> diff --git a/po/da.po b/po/da.po
>>> index 12a7c34..a325b80 100644
>>> --- a/po/da.po
>>> +++ b/po/da.po
>>> @@ -7,15 +7,15 @@ msgstr ""
>>> "Project-Id-Version: PACKAGE VERSION\n"
>>> "Report-Msgid-Bugs-To: \n"
>>> "POT-Creation-Date: 2011-08-08 08:54-0300\n"
>>> -"PO-Revision-Date: 2011-04-08 03:26+0200\n"
>>> -"Last-Translator: Aputsiaq <aj at isit.gl>\n"
>>> +"PO-Revision-Date: 2012-03-09 11:45+0200\n"
>>> +"Last-Translator: Aputsiaq Niels <aj at isit.gl>\n"
>>> "Language-Team: LANGUAGE <LL at li.org>\n"
>>> -"Language: \n"
>>> +"Language: da\n"
>>> "MIME-Version: 1.0\n"
>>> "Content-Type: text/plain; charset=UTF-8\n"
>>> "Content-Transfer-Encoding: 8bit\n"
>>> "Plural-Forms: nplurals=2; plural=(n != 1);\n"
>>> -"X-Generator: Pootle 2.0.1\n"
>>> +"X-Generator: Pootle 2.0.5\n"
>>>
>>> #: activity/activity.info:2 finance.py:100
>>> msgid "Finance"
>>> --
>>> 1.7.7.6
>>>
>>> _______________________________________________
>>> Sugar-devel mailing list
>>> Sugar-devel at lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>>
>> --
>> .. manuq ..
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
>
> --
> Best Regards,
>
> Kalpa Pathum Welivitigoda
> http://about.me/callkalpa
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
More information about the Sugar-devel
mailing list