From dbe887df5fdea564336ffc4f34a496f9468e9d69 Mon Sep 17 00:00:00 2001
From: Yohan Boniface <yb@enix.org>
Date: Thu, 27 Dec 2012 14:16:53 +0100
Subject: [PATCH] i18n and fr translation

---
 youmap/locale/fr/LC_MESSAGES/django.mo        | Bin 0 -> 2308 bytes
 youmap/locale/fr/LC_MESSAGES/django.po        | 121 ++++++++++++++++++
 .../leaflet_storage/category_form.html        |   4 +-
 .../leaflet_storage/feature_form.html         |   4 +-
 .../templates/leaflet_storage/map_form.html   |   6 +-
 .../templates/leaflet_storage/map_list.html   |   4 +-
 .../map_update_tilelayers.html                |   4 +-
 youmap/templates/youmap/home.html             |  26 ++--
 youmap/templates/youmap/navigation.html       |   9 +-
 youmap/templates/youmap/search.html           |   6 +-
 10 files changed, 154 insertions(+), 30 deletions(-)
 create mode 100644 youmap/locale/fr/LC_MESSAGES/django.mo
 create mode 100644 youmap/locale/fr/LC_MESSAGES/django.po

diff --git a/youmap/locale/fr/LC_MESSAGES/django.mo b/youmap/locale/fr/LC_MESSAGES/django.mo
new file mode 100644
index 0000000000000000000000000000000000000000..e6d8eb68700108fb1d4be3a4c957c7a946c0c343
GIT binary patch
literal 2308
zcmaKsO>Y}T7{>=%-pqS>DMEmrfU2fy*0m!L!A(PxG%2a#I5cSs5(mb+ll8Rr%ywor
zi9y`>00^l!E)}N;2`()cZuOy@-~)g_LgLm77Y=aY|LodHT2+j^{_X5MGxNOvcIe<W
zf$<WaSMdCb=Lnv!9>5<)?ZI+h2PZJU1U?Ra4!#P00TTEv_yYJd_&oS0_$c@f_%L|j
zKzT<6d<641K>mJwIG+UhyvA_;0r(W=AA_uq1^M1<;FI8WkahkJJOus-J_G&&eh=OO
zKY|Tk9~2_OoG+UKs^HUL3cd_(fv<yKf_&ahkk9!Ed;<I(d<?t;68JZWpEwL7`1@-h
z%Z-C$;9Fn?yac`ow!x!dAAAnH4n7Os1o{5kAm953$nyV!e}RYKJg6^VMltvf_6Pfx
z_2=<Wi9#RV%Y*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FS?#6X05QW+_^917)NM
zd(Gf}a-#5NtO821*je_4(wz8S7hFIe)E-s94JzYKiU7cN@qVs&zNtQmHf@eLNbS^a
zm&las!6*((dE!1jv4-AlB+e~Tz~fL}E+ct&8$muGOl2PkBR9#74P6?K{2e-;y9f=t
z$h?X*ajRp`jd}>{k_>iwXs^M^fT&DhD-<t{pw3{YtsF<PD`|6Z1JRtI_$VLq{|)9p
DfYpc*

literal 0
HcmV?d00001

diff --git a/youmap/locale/fr/LC_MESSAGES/django.po b/youmap/locale/fr/LC_MESSAGES/django.po
new file mode 100644
index 0000000..20e6c11
--- /dev/null
+++ b/youmap/locale/fr/LC_MESSAGES/django.po
@@ -0,0 +1,121 @@
+# YOUMAP.
+# Copyleft (C) 2012
+# This file is distributed under the same license as the YOUMAP package.
+# YOHAN BONIFACE <yb@enix.org>, 2012.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.0.8\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-12-27 14:08+0100\n"
+"PO-Revision-Date: 2012-12-27 11:09+0100\n"
+"Last-Translator: YOHAN BONIFACE <yb@enix.org>\n"
+"Language-Team: FR <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+
+#: templates/leaflet_storage/category_form.html:26
+#: templates/leaflet_storage/feature_form.html:14
+#: templates/leaflet_storage/map_form.html:17
+msgid "Delete"
+msgstr "Supprimer"
+
+#: templates/leaflet_storage/map_form.html:3
+msgid "Create your map now!"
+msgstr "Créer une carte"
+
+#: templates/leaflet_storage/map_list.html:8
+msgid "Cured by"
+msgstr "Maintenu par"
+
+#: templates/leaflet_storage/map_list.html:8
+msgid "See this map!"
+msgstr "Voir cette carte!"
+
+#: templates/leaflet_storage/map_update_tilelayers.html:2
+msgid "Choose your tilelayer"
+msgstr "Choisir un fond de carte"
+
+#: templates/youmap/home.html:39
+msgid ""
+"u{Map} let you create maps with OpenStreetMap layers in a minute and embed "
+"them in your site.<br /> This is a demo instance, you can host your own, "
+"it's <strong>open source</strong>!"
+msgstr ""
+"u{Map} permet de créer des cartes personnalisées sur des fonds OpenStreetMap "
+"en un instant et les afficher dans votre site <br /> Ceci est une instance "
+"de démonstration, vous pouvez héberger la vôtre, c'est <strong>open source</"
+"strong>!"
+
+#: templates/youmap/home.html:43
+msgid "What you can do?"
+msgstr "Que pouvez-vous faire?"
+
+#: templates/youmap/home.html:45
+msgid "Choose the layers of your map"
+msgstr "Choisir les fonds de carte"
+
+#: templates/youmap/home.html:46
+msgid "Add POIs: markers, lines, polygons..."
+msgstr "Ajouter des POI: markes, lignes, polygones..."
+
+#: templates/youmap/home.html:47
+msgid "Manage POIs colours and icons"
+msgstr "Choisir la couleur et les icônes"
+
+#: templates/youmap/home.html:48
+msgid "Batch import geostructured data (GEOJson...)"
+msgstr "Import des données géographiques en masse (GeoJSON...)"
+
+#: templates/youmap/home.html:49
+msgid "Choose the licence for your data"
+msgstr "Choisir la licence de vos données"
+
+#: templates/youmap/home.html:50
+msgid "Embed and share your map"
+msgstr "Exporter et partager votre carte"
+
+#: templates/youmap/home.html:62
+msgid "Test it and create a map"
+msgstr "Tester et créer une carte"
+
+#: templates/youmap/home.html:68
+msgid "Fork it"
+msgstr "Forker"
+
+#: templates/youmap/home.html:73
+msgid "Users to play with"
+msgstr "Utilisateurs pour tester"
+
+#: templates/youmap/home.html:87
+msgid "Browse maps"
+msgstr "Voir des cartes"
+
+#: templates/youmap/navigation.html:11
+msgid "My maps"
+msgstr "Mes cartes"
+
+#: templates/youmap/navigation.html:12
+msgid "Log out"
+msgstr "Déconnexion"
+
+#: templates/youmap/navigation.html:14
+msgid "Log in"
+msgstr "Connexion"
+
+#: templates/youmap/navigation.html:21
+msgid "Search maps"
+msgstr "Chercher des cartes"
+
+#: templates/youmap/search.html:19
+#, python-format
+msgid "Search for maps containing «%(q)s» "
+msgstr "Chercher des cartes contenant «%(q)s»"
+
+#: templates/youmap/search.html:29
+msgid "Not map found."
+msgstr "Aucune carte trouvée."
diff --git a/youmap/templates/leaflet_storage/category_form.html b/youmap/templates/leaflet_storage/category_form.html
index f0b3cf6..b5eaf08 100644
--- a/youmap/templates/leaflet_storage/category_form.html
+++ b/youmap/templates/leaflet_storage/category_form.html
@@ -1,4 +1,4 @@
-{% load youmap_tags %}
+{% load youmap_tags i18n %}
 <form action="{{ action_url }}" method="post" id="category_edit">
     {% csrf_token %}
     {% for error in form.errors %}
@@ -23,6 +23,6 @@
     {{ form.map }}
     <input type="submit" class="button" />
     {% if delete_url %}
-        <a href="{{ delete_url }}" id="delete_category_button" >Delete</a>
+        <a href="{{ delete_url }}" id="delete_category_button" >{% trans "Delete" %}</a>
     {% endif %}
 </form>
\ No newline at end of file
diff --git a/youmap/templates/leaflet_storage/feature_form.html b/youmap/templates/leaflet_storage/feature_form.html
index a08a71a..323cc56 100644
--- a/youmap/templates/leaflet_storage/feature_form.html
+++ b/youmap/templates/leaflet_storage/feature_form.html
@@ -1,4 +1,4 @@
-{% load youmap_tags %}
+{% load youmap_tags i18n %}
 <form method="post" action="{{ action }}" id="feature_form" onsubmit="return false;" class="custom">
     {% csrf_token %}
     {{ form.no_field_errors }}
@@ -11,6 +11,6 @@
     {{ form.latlng }}
     <input type="submit" class="button" />
     {% if delete_url %}
-        <a href="{{ delete_url }}" id="delete_feature_button" >Delete</a>
+        <a href="{{ delete_url }}" id="delete_feature_button" >{% trans "Delete" %}</a>
     {% endif %}
 </form>
diff --git a/youmap/templates/leaflet_storage/map_form.html b/youmap/templates/leaflet_storage/map_form.html
index b44f425..4bcff5c 100644
--- a/youmap/templates/leaflet_storage/map_form.html
+++ b/youmap/templates/leaflet_storage/map_form.html
@@ -1,6 +1,6 @@
-{% load youmap_tags %}
+{% load youmap_tags i18n %}
 {% if not map %}
-    <h3>Create your map now!</h3>
+    <h3>{% trans "Create your map now!" %}</h3>
 {% endif %}
 <form action="{{ action_url }}" method="post" id="map_edit">
     {% for error in form.non_field_errors %}
@@ -14,6 +14,6 @@
     {{ form.center }}
     <input type="submit" class="button" />
     {% if delete_url and map and user == map.owner %}
-        <a href="{{ delete_url }}" id="delete_map_button" >Delete</a>
+        <a href="{{ delete_url }}" id="delete_map_button" >{% trans "Delete" %}</a>
     {% endif %}
 </form>
\ No newline at end of file
diff --git a/youmap/templates/leaflet_storage/map_list.html b/youmap/templates/leaflet_storage/map_list.html
index 1d742f6..b20a9b7 100644
--- a/youmap/templates/leaflet_storage/map_list.html
+++ b/youmap/templates/leaflet_storage/map_list.html
@@ -1,11 +1,11 @@
-{% load leaflet_storage_tags endless %}
+{% load leaflet_storage_tags endless i18n %}
 
 {% paginate 5 maps %}
 
 {% for map_inst in maps %}
 <div class="twelve mobile-six columns">
     {% map_fragment map_inst %}
-    <div class="panel"><strong>{{ map_inst.name }}</strong> — «{{ map_inst.description }}» <em>Cured by <a href="{% url user_maps map_inst.owner.username %}">{{ map_inst.owner }}</a></em> — <a href="{{ map_inst.get_absolute_url }}">See this map!</a></div>
+    <div class="panel"><strong>{{ map_inst.name }}</strong> — «{{ map_inst.description }}» <em>{% trans "Cured by" %} <a href="{% url user_maps map_inst.owner.username %}">{{ map_inst.owner }}</a></em> — <a href="{{ map_inst.get_absolute_url }}">{% trans "See this map!" %}</a></div>
 </div>
 {% endfor %}
 
diff --git a/youmap/templates/leaflet_storage/map_update_tilelayers.html b/youmap/templates/leaflet_storage/map_update_tilelayers.html
index 823380b..a1a6c77 100644
--- a/youmap/templates/leaflet_storage/map_update_tilelayers.html
+++ b/youmap/templates/leaflet_storage/map_update_tilelayers.html
@@ -1,5 +1,5 @@
-{% load leaflet_storage_tags %}
-<h3>Choose your tilelayer</h3>
+{% load leaflet_storage_tags i18n %}
+<h3>{% trans "Choose your tilelayer" %}</h3>
 <form action="{% url map_update_tilelayers map.pk %}" method="post" id="map_edit">
     {% csrf_token %}
     <ul class="block-grid two-up mobile">
diff --git a/youmap/templates/youmap/home.html b/youmap/templates/youmap/home.html
index 480102a..e9147db 100644
--- a/youmap/templates/youmap/home.html
+++ b/youmap/templates/youmap/home.html
@@ -1,6 +1,6 @@
 {% extends "base.html" %}
 
-{% load leaflet_storage_tags compress %}
+{% load leaflet_storage_tags compress i18n %}
 
 {% block extra_head %}
     {% compress css %}
@@ -36,18 +36,18 @@
           <div class="row">
           <div class="six mobile-two columns">
             <h4>u{Map} <em>alpha</em></h4><hr/>
-            <h5 class="subheader">u{Map} let you create maps with OpenStreetMap layers in a minute and embed them in your site.<br /> This is a demo instance, you can host your own, it's <strong>open source</strong>!
+            <h5 class="subheader">{% blocktrans %}u{Map} let you create maps with OpenStreetMap layers in a minute and embed them in your site.<br /> This is a demo instance, you can host your own, it's <strong>open source</strong>!{% endblocktrans %}
             </h5>
           </div>
           <div class="six mobile-two columns">
-            <h5>What you can do?</h5>
+            <h5>{% trans "What you can do?" %}</h5>
             <ol>
-              <li>Choose the layers of your map</li>
-              <li>Add POIs: markers, lines, polygons...</li>
-              <li>Manage POIs colours and icons</li>
-              <li>Batch import geostructured data (GEOJson...)</li>
-              <li>Choose your licence</li>
-              <li>Embed and share your map</li>
+              <li>{% trans "Choose the layers of your map" %}</li>
+              <li>{% trans "Add POIs: markers, lines, polygons..." %}</li>
+              <li>{% trans "Manage POIs colours and icons" %}</li>
+              <li>{% trans "Batch import geostructured data (GEOJson...)" %}</li>
+              <li>{% trans "Choose the licence for your data" %}</li>
+              <li>{% trans "Embed and share your map" %}</li>
             </ol>
         </div>
 
@@ -59,18 +59,18 @@
 
           <a href="{% url map_add %}" data-listen-form="map_edit" class="reveal">
           <div class="panel radius callout" align="center">
-            <strong>Test it and create a map</strong>
+            <strong>{% trans "Test it and create a map" %}</strong>
           </div>
           </a>
 
           <a href="https://bitbucket.org/yohanboniface/youmap_project">
           <div class="panel radius callout" align="center">
-            <strong>Fork it</strong>
+            <strong>{% trans "Fork it" %}</strong>
           </div>
           </a>
           <div class="panel">
             <p>
-              Users to play with (password: <span class="label">123123</span>): {% for u in users %}<a href="{% url user_maps u.username %}">{{ u }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
+              {% trans "Users to play with" %} (password: <span class="label">123123</span>): {% for u in users %}<a href="{% url user_maps u.username %}">{{ u }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
             </p>
           </div>
 
@@ -84,7 +84,7 @@
   <div class="row">
     <div class="twelve columns">
       <hr />
-      <h2>Browse maps</h2>
+      <h2>{% trans "Browse maps" %}</h2>
     </div>
   </div>
   <div class="row">
diff --git a/youmap/templates/youmap/navigation.html b/youmap/templates/youmap/navigation.html
index 9c1017a..22062bc 100644
--- a/youmap/templates/youmap/navigation.html
+++ b/youmap/templates/youmap/navigation.html
@@ -1,3 +1,4 @@
+{% load i18n %}
 <nav class="top-bar contain-to-grid">
   <ul>
     <li class="name"><h1><a href="/">u{Map} <em>alpha</em></a></h1></li>
@@ -7,17 +8,17 @@
   <section>
     <ul class="left">
       {% if user.is_authenticated %}
-        <li><a href="{% url user_maps user.username %}">My maps ({{ user }})</a></li>
-        <li><a href="{% url logout %}" class="logout_button">Log out</a></li>
+        <li><a href="{% url user_maps user.username %}">{% trans "My maps" %} ({{ user }})</a></li>
+        <li><a href="{% url logout %}" class="logout_button">{% trans "Log out" %}</a></li>
       {% else %}
-        <li><a href="{% url login %}" class="login_button">Log in</a></li>
+        <li><a href="{% url login %}" class="login_button">{% trans "Log in" %}</a></li>
       {% endif %}
     </ul>
 
     <ul class="right">
       <li class="search">
         <form action="{% url search %}" method="GET">
-          <input name="q" type="search" placeholder="Search maps" value="{{ q|default:"" }}" />
+          <input name="q" type="search" placeholder="{% trans 'Search maps' %}" value="{{ q|default:"" }}" />
         </form>
       </li>
     </ul>
diff --git a/youmap/templates/youmap/search.html b/youmap/templates/youmap/search.html
index a51e281..5bfb985 100644
--- a/youmap/templates/youmap/search.html
+++ b/youmap/templates/youmap/search.html
@@ -1,5 +1,7 @@
 {% extends "youmap/home.html" %}
 
+{% load i18n %}
+
 {% block content %}
 <div class="row">
   <div class="twelve columns">
@@ -14,7 +16,7 @@
 
   <div class="row">
     <div class="twelve columns">
-      <h4>Search for maps containing «{{ q }}»</h4>
+      <h4>{% blocktrans %}Search for maps containing «{{ q }}» {% endblocktrans %}</h4>
     </div>
   </div>
   <div class="row">
@@ -24,7 +26,7 @@
           {% include "leaflet_storage/map_list.html" %}
         {% else %}
           <div class="twelve mobile-six columns">
-            Not map found.
+            {% trans "Not map found." %}
           </div>
         {% endif %}
       </div>
-- 
GitLab