[Top][All Lists]

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

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

From: David Decotigny
Subject: Re: [Maposmatic-dev] A proposal to solve the translation problem
Date: Tue, 03 Apr 2012 18:35:54 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20120313 Thunderbird/3.1.20

Hash: SHA1


How about freedesktop-ing the ocitysmap ini file:

For example:

stylesheets.osm.description: The default OpenStreetMap style
stylesheets.osm.description[fr]: Le defaut OuverteRueCarte style
stylesheets.osm.description[zz_ZZ]: Zzz zzzzzzz zzzzzzzzzzzzz zzzzz
address@hidden: Mmm mmmmmmm mmmmmmmmmmmmm mmmmm

(looks Ok with ConfigParser)

Then, as you suggested, it should be possible to pass the locale info to
ocitysmap. Maybe it's already done. Not sure it makes sense to localize
the paper sizes, though (I don't like the idea of reading "A4 (8.26 in x
11.69 in)" with en locale for example).

Also, I don't mind about "12 x 34 cm²" being written as "12 cm x 34 cm".

BTW, Thomas, for patch "forms: translate stylesheet and layout
descriptions, and paper sizes", are you sure you want to localize the
html tags [_("Best fit <em class=\"papersize\"></em>")]?


On 04/03/2012 03:19 PM, Thomas Petazzoni wrote:
> Le Wed, 4 Apr 2012 00:05:52 +0200,
> Jeroen van Rijn <address@hidden> a écrit :
>> Maybe I'm missing something, but why would ocitysmap need a translated
>> paper size, or translated layout name for that matter?
>> If that particular machinery were moved to maposmatic, along with the
>> needed translations, then ocitysmap could be supplied - at run-time -
>> with the relevant information:
>> - relation id / bounding box
>> - title
>> - language for index
>> - paper size in some unit it understands (no need to translate units, I 
>> assume)
>> - layout name (the hardcoded one from the ocitysmap code that takes
>> care of the layout)
>> - pointer to location of stylesheet
>> - translated name of stylesheet for the footer
>> In turn MapOSmatic would have a dictionary of the canonical name of
>> the layout (given to ocitysmap on the command line) which is
>> translated for the websites's purpose.
>> All of that information might even be passed as a pickle and ocitysmap
>> invoked with --runjob /var/tmp/maposmatic/job-[id]-pickle
>> But I'll admit I might be missing something obvious which requires
>> these particular translations to be part of ocitysmap :)
> The layouts are implemented in OcitySMap, the stylesheets are managed
> by OcitySMap, and the paper sizes are defiend in OcitySMap. MapOSMatic
> is merely a web client for OcitySMap, all the logic (rendering layouts,
> Mapnik stylesheets, paper sizes that are suitable for a given
> rendering) is implemented in OcitySMap.
> Regards,
> Thomas

- --
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


reply via email to

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