Automatically send an email to the configured admins with a traceback of
the rendering exception when a rendering fails.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Updated the django.po files to add the 'nynorsk' string.
Translated the 'nynorsk' string into Dutch, French, German, Italian and Portuguese.
Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
Until now, the stylesheet description strings were coming from the
OcitySMap configuration file, the layout description strings from the
OcitySMap source code, and the paper sizes from the OcitySMap code as
well.
Unfortunately, when MapOSMatic queries the list of stylesheets,
layouts and paper sizes, OcitySMap has no idea of which language the
web site is in. OcitySMap cares about the language in which the map
will be rendered, not the language in which the website is displayed.
Therefore, in order to properly translate the stylesheet descriptions,
layout descriptions and paper sizes, we have to do it from MapOSMatic
itself. The drawback is that MapOSMatic now needs to know the list of
layouts and stylesheets, but there doesn't seem to be other reasonable
solutions.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
To integrate the translation for ocitysmap provided by Guttorm Flatabø,
we have to add it to MAP_LANGUAGES in settings.py as well so it's available
to choose upon creating a new map rendering.
CC: Guttorm Flatabø <post@guttormflatabo.com>
Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
The Ctrl+drag command cannot be used on Mac platform. Use Alt+drag
instead.
Original patch submitted by Sébastien Tanguy.
Signed-off-by: David MENTRE <dmentre@linux-france.org>
Signed-off-by: Sébastien Tanguy
Simone Cortesi updated the Italian translation for MapOSMatic.
I'm (Jeroen) sending this off with a little fix-up applied.
Signed-off-by: Simone Cortesi <simone@cortesi.com>
Signed-off-by: Jeroen van Rijn <jvrnix@gmail.com>
We display a message saying that an index has not been generated if no
CSV was found, and in this case we encourage users to contribute to
OpenStreetMap. However, with the multi-page layout, we never generate
a CSV, so this message was always displayed. This commit handles this
case properly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
The language selection drop-down was not working anymore after the
rework of the navigation bar because the ul#nav was over the
form#langsel and prevented clicks on the select widget.
Also fixes the navigation bar in RTL mode, which was forgotten during
the navigation bar fixes previously.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Fixed missing logger, added copyright notice and followed Python
variable naming convention for the module-global _DB variable.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
The settings_local.py file defines the RENDERING_RESULT_FORMATS which
contains the formats (PNG, SVGZ, PDF, CSV) in which the maps should be
rendered. However, depending on the selected rendering layout, some
formats may not be supported: typically, PNG and SVGZ are not
supported by the multi-page rendering layout.
Therefore, the daemon automatically renders the map only in the
formats that are the intersection of the formats choosen in
RENDERING_RESULT_FORMATS and the formats compatible with the rendering
layout.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
For multi-page renderings, the thumbnail was useless: it was the last
page of the index. Instead, we create with ImageMagick a small
thumbnail thats displays the cover page and overview page of the
multi-page PDF. We take into account landscape/portrait renderings to
combine those two images into a single thumbnail with a good ratio.
We directly use subprocess to run the ImageMagick commands, because
the Python ImageMagick API is so poorly documented that after spending
several hours trying to figure out which method to use, switching to
subprocess with ImageMagick commands turned out to be a more
reasonable solution.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
We want the Paypal donation button to be translated, and the user to
be redirected to a page in his/her language when making a donation.
Unfortunately, Paypal does not seem to have translations for all the
languages we support, so we default to English when the language is
not available from Paypal.
This new mechanism requires translators to add a new entry in the
PAYPAL_LANGUAGES dictionary if Paypal provides a button and a site in
their language.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
The problem was noticed by Jeroen van Rijn <jvrnix@gmail.com>, but a
different fix was needed to make things work properly.
Thanks Jeroen for noticing and reporting the problem!
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>