maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] A proposal to solve the translation problem


From: Thomas Petazzoni
Subject: Re: [Maposmatic-dev] A proposal to solve the translation problem
Date: Thu, 5 Apr 2012 23:07:49 +0200

Le Thu, 05 Apr 2012 10:13:33 -0700,
David Decotigny <address@hidden> a écrit :

>    class MaposmaticPrintableStyleSheet(ocitysmap2.Stylesheet):
>      def __init__(self):
>       ocitysmap2.Stylesheet.__init__(self)
>         self.name = _('maposmatic printable stulesheet')
>         self.path = os.path.join(os.path.dirname(__file__), 'osm.xml')
>         self.description = _('blah')
>         ....etc...

So we would have to actually instantiate each of the stylesheet classes
in order to just get their name and description? Sounds odd.

On the other hand, the way we currently do it for renderers, where the
name and description are defined as class variables looks better to me,
but doesn't play well with translation: the _() function is not
available until a gettext context has been put in place, so _() cannot
be used on class variables.

I had a quick look at that tonight, and I don't see how to solve the
problem. Would anyone have a bit of time to work on this? I will be
offline this week-end and will therefore not be able to work on this.

Thanks,

Thomas
-- 
Thomas Petazzoni                http://thomas.enix.org
MapOSMatic                      http://www.maposmatic.org
Logiciels Libres à Toulouse     http://www.toulibre.org
Embedded Linux                  http://www.free-electrons.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]