From 6c94f7d8b392a0c32ed17e9bbcdbcd1c5ced7bde Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 1 May 2013 18:54:40 -0400 Subject: [PATCH] Display demo message only for demo instance --- umap/locale/fr/LC_MESSAGES/django.mo | Bin 4449 -> 4591 bytes umap/locale/fr/LC_MESSAGES/django.po | 47 +++++++++++++++---------- umap/settings/base.py | 1 + umap/templates/umap/about_summary.html | 7 +++- umap/views.py | 3 +- 5 files changed, 38 insertions(+), 20 deletions(-) diff --git a/umap/locale/fr/LC_MESSAGES/django.mo b/umap/locale/fr/LC_MESSAGES/django.mo index 451de9fc9825e9917dc47314ba284267dc9fae86..39f74c589de83a2b37c86a3304e0ffb492ae3d6a 100644 GIT binary patch delta 1134 zcmYk*O-PhM9LMq57j>U?*EO?tHO*%=GfUUqC^BKga=qlCgOCK<#VqO)M5YA6LWjC^ zsV50LbTE3e;{zQFq9TG=$Wz2h+esp^Lx+N*zQ3m@X?W)O%nY;h{O3Qj)y}o9(sEOH z&QJ!ZZPc3qV@5C*;zdb?jj6#F?8Xkv;wbjv3~t4{*n!Wn9Y3Ls`tc@6V+{9UGZrvn zOvxOhQOm$2HsKje;ibP5%p59~J6MMc*n*4x_zSe?zecU|4mIyRDv&DX@i!`fJd=pc z9L74nZ;sGtU|<3jz$sJ!7jZY?LNgudOLldu|jrWkVF|SamFC(#;CDgnR{`fcCK>s^xohaL06I3@9~kQJ1KK!}tq(@c?;L22P^_o5vnpz>W9@705Dbr(aQl z23T|kTTz$rI_i55Q1hN9$p2MRU1s1G0~4%5cfII7=o0CMv!=HQctru|BC6=0vx}i?o_+EistMQPXF;LqTd_N3p~?yDQEGuQd0oJuGgI(T-~<9{v(^RwBpUAGIq1 zr(lgm_x5LVc5ZNJ&wh8_Dg+{<)Aos;ljokd^A34M3ELjSArN(LjI5fojy zkf1Jf)rF`CE@tDd8yBv`MOKPpTv#cky0oC+|BF-bl9}Jkott~lIdkVne?3w891A=! zT8d*0$8De4UR>~VqJ3#HYsNYb;2b6~957plIb4q?a4p_I2OnV%zQz^!4!iLqw&G80 zF{{`T7cn}t%1Y=$4M-wu*>()#Fs{P9*MAa2+@D4!vT@Y7%cwx6QHeZ61yDnlvN~$q zH;k~pEpnj%{-6TrV73en;c6^k0;iFmJ?1okGuV!AF^o0T#9uLj^BBb??7$EY6-XQp zP~}1V!1{K9bPIGGA{}Kk(`J^&m$(Z*;b!b*H93NDJdXIQfIhOsdu9?7(op@?De0)PVP&niKdXB-Q=_Z@8NNLh0JX<ZPCA+cK@ z_F@86kzv%H84Xka{alRGF@!Hrnb%N(HB-kyj9?e;Km{^}%CvwAbON>6?w}TW;yriq zE|q{ zQIM*TUYnY#>*&I35xsw9xZITGRu1iS_G4pX^`TymHe)}BJ|pdLW&VHDrqm~#@;X&| z?Gshj^2JNnu3ElSa*iDxoy<8CXUiAQl_#s|K#w~WSn#{E!SBA{o?_YAw$G^+gQu#` lLSt>&RA#4>N$0Xz_jl-^&%M(Ayve;EE%;lV<)QKD^}paAVfO$4 diff --git a/umap/locale/fr/LC_MESSAGES/django.po b/umap/locale/fr/LC_MESSAGES/django.po index 9cb04579..a7fc062e 100644 --- a/umap/locale/fr/LC_MESSAGES/django.po +++ b/umap/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-04-27 20:44-0400\n" +"POT-Creation-Date: 2013-05-01 18:49-0400\n" "PO-Revision-Date: 2012-12-27 11:09+0100\n" "Last-Translator: YOHAN BONIFACE \n" "Language-Team: FR \n" @@ -41,11 +41,11 @@ msgid "" "in the \"permissions\" window. If you log in and load the map, it will be " "attached to your account." msgstr "" -"Vous créez une carte sans être authentifié. Un cookie sera enregistré sur " -"ce navigateur, vous permettant d'éditer la map plus tard. Si vous voulez éditer " -"la carte depuis un autre ordinateur, utilisez l'url d'édition, visible dans la " -"fenêtre de gestion des permissions. Si vous vous identifiez par la suite et chargez " -"la carte, celle-ci sera automatiquement associée à votre compte." +"Vous créez une carte sans être authentifié. Un cookie sera enregistré sur ce " +"navigateur, vous permettant d'éditer la map plus tard. Si vous voulez éditer " +"la carte depuis un autre ordinateur, utilisez l'url d'édition, visible dans " +"la fenêtre de gestion des permissions. Si vous vous identifiez par la suite " +"et chargez la carte, celle-ci sera automatiquement associée à votre compte." #: templates/leaflet_storage/map_list.html:6 msgid "Cured by" @@ -111,50 +111,61 @@ msgstr "uMap, c'est quoi" #, python-format msgid "" "uMap let you create maps with OpenStreetMap " -"layers in a minute and embed them in your site.
This is a demo " -"instance, you can host your own, it's open source!" +"layers in a minute and embed them in your site." msgstr "" "uMap permet de créer des cartes personnalisées sur des fonds OpenStreetMap en un instant et les afficher dans votre " -"site
Ceci est une instance de démonstration, vous pouvez héberger la " +"site." + +#: templates/umap/about_summary.html:7 +#, python-format +msgid "" +"This is a demo instance, you can host your own, it's open source!" +msgstr "" +"Ceci est une instance de démonstration, vous pouvez héberger la " "vôtre, c'est open source" #: templates/umap/about_summary.html:9 +#, python-format +msgid "And it's open source!" +msgstr "Et c'est open source!" + +#: templates/umap/about_summary.html:14 msgid "What can you do?" msgstr "Que pouvez-vous faire?" -#: templates/umap/about_summary.html:11 +#: templates/umap/about_summary.html:16 msgid "Choose the layers of your map" msgstr "Choisir les fonds de carte" -#: templates/umap/about_summary.html:12 +#: templates/umap/about_summary.html:17 msgid "Add POIs: markers, lines, polygons..." msgstr "Ajouter des POI: marqueurs, lignes, polygones..." -#: templates/umap/about_summary.html:13 +#: templates/umap/about_summary.html:18 msgid "Manage POIs colours and icons" msgstr "Choisir la couleur et les icônes" -#: templates/umap/about_summary.html:14 +#: templates/umap/about_summary.html:19 msgid "Manage map options: display a minimap, locate user on load…" msgstr "" "Gérer les options de la carte: afficher une minicarte, géolocaliser " "l'utilisateur..." -#: templates/umap/about_summary.html:15 +#: templates/umap/about_summary.html:20 msgid "Batch import geostructured data (GEOJson...)" msgstr "Import des données géographiques en masse (GeoJSON...)" -#: templates/umap/about_summary.html:16 +#: templates/umap/about_summary.html:21 msgid "Choose the licence for your data" msgstr "Choisir la licence de vos données" -#: templates/umap/about_summary.html:17 +#: templates/umap/about_summary.html:22 msgid "Embed and share your map" msgstr "Exporter et partager votre carte" -#: templates/umap/about_summary.html:23 +#: templates/umap/about_summary.html:28 msgid "Play with the demo" msgstr "Tester la démo" diff --git a/umap/settings/base.py b/umap/settings/base.py index c413e932..5c85470b 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -136,6 +136,7 @@ AUTHENTICATION_BACKENDS += ( #============================================================================== LEAFLET_STORAGE_ALLOW_ANONYMOUS = False SITE_URL = "http://umap.org" +UMAP_DEMO_SITE = False #============================================================================== # Third party app settings diff --git a/umap/templates/umap/about_summary.html b/umap/templates/umap/about_summary.html index 8c794d42..2c683131 100644 --- a/umap/templates/umap/about_summary.html +++ b/umap/templates/umap/about_summary.html @@ -2,7 +2,12 @@
{% trans "What is uMap" %}
-

{% blocktrans with osm_url="http://osm.org" repo_url="https://bitbucket.org/yohanboniface/umap" %}uMap let you create maps with OpenStreetMap layers in a minute and embed them in your site.
This is a demo instance, you can host your own, it's open source!{% endblocktrans %} +

{% blocktrans with osm_url="http://osm.org" %}uMap let you create maps with OpenStreetMap layers in a minute and embed them in your site.{% endblocktrans %} + {% if DEMO_SITE %} +
{% blocktrans with repo_url="https://bitbucket.org/yohanboniface/umap" %}This is a demo instance, you can host your own, it's open source!{% endblocktrans %} + {% else %} +
{% blocktrans with repo_url="https://bitbucket.org/yohanboniface/umap" %}And it's open source!{% endblocktrans %} + {% endif %}

diff --git a/umap/views.py b/umap/views.py index 50e40f3c..4f0c79b9 100644 --- a/umap/views.py +++ b/umap/views.py @@ -48,7 +48,8 @@ class Home(TemplateView, PaginatorMixin): return { "maps": maps, - "demo_map": demo_map + "demo_map": demo_map, + "DEMO_SITE": settings.UMAP_DEMO_SITE } def get_template_names(self):