-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello, How about freedesktop-ing the ocitysmap ini file: http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html 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 stylesheets.osm.description[zz_ZZ@rot13]: 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>")]? Regards, On 04/03/2012 03:19 PM, Thomas Petazzoni wrote: > Le Wed, 4 Apr 2012 00:05:52 +0200, > Jeroen van Rijn <jvr...@gmail.com> 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 - -- http://david.decotigny.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk97pXYACgkQld7vhusVrCHZxACgmjNHBwneqBju9LPJEjymVMm/ /fMAn1qdBI71AzQEFOydB8oe17qrL1o0 =vlyK -----END PGP SIGNATURE-----