[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: Thomas Petazzoni
Subject: Re: [Maposmatic-dev] A proposal to solve the translation problem
Date: Wed, 4 Apr 2012 18:27:01 +0200

Le Wed, 4 Apr 2012 17:50:35 +0200,
David MENTRE <address@hidden> a écrit :

> To continue this discussion, it has been privately suggested to put
> ocitysmap.conf content in a .py file (e.g. That way we
> could easily integrate stylesheet names into the set of strings to
> translate.
> One counter argument is that ocitysmap.conf is a configuration file,
> that can be tweaked by the "user". Considering that installation of
> maposmatic is fairly complex and that we are using a scripting
> language, it does seem reasonable to me to tweak a Python file than a
> configuration file.

My point was not that a Python file was harder or easier to modify than
a .conf file. My point is that the configuration file is, at least
currently, *NOT* part of the Git repository. So this makes it currently
impossible to add translations into it, since it wouldn't make sense to
ask the script to parse a file that isn't part of the Git

> Overall, I would:
>   * Put content of ocitysmap.conf into a Python file, with appropriate
> translation markers;
>   * Update INSTALL so that the needed external style sheets
> (mapnik-osm, MapQuest*) should be installed somewhere and pointed to
> in ocitysmap installation through a *well defined* (e.g. mapnik-osm,
> MapQuestEU, MapQuestUS, MapQuestUK) symbolic link into stylesheet/
> directory.
> If at one point we need another style sheet, we will update both
> Python file and README accordingly. We can also document how to add a
> style sheet in a documentation file or on the wiki.

So this means that we no longer have a configuration file, but rather
an exhaustive list of the stylesheets we support. The user is supposed
to make symbolic links to the stylesheet installation directory, as you

I would add something else to this: ocitysmap should gracefully ignore
a stylesheet for which the symbolic link is missing, so that users are
not forced to install *all* stylesheets to get a working
ocitysmap/maposmatic combination.

However, all this requires Django to pass the current website language
when calling the "get stylesheet list", "get layout list" and "get
papersize list" from ocitysmap, but this is certainly doable.


Thomas Petazzoni      
Logiciels Libres à Toulouse
Embedded Linux        

reply via email to

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