summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/locale/fr/LC_MESSAGES/django.po249
-rw-r--r--chimere/utils.py10
2 files changed, 146 insertions, 113 deletions
diff --git a/chimere/locale/fr/LC_MESSAGES/django.po b/chimere/locale/fr/LC_MESSAGES/django.po
index b54a53b..ddb0302 100644
--- a/chimere/locale/fr/LC_MESSAGES/django.po
+++ b/chimere/locale/fr/LC_MESSAGES/django.po
@@ -7,18 +7,18 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-01 16:32+0200\n"
+"POT-Creation-Date: 2012-10-04 22:49+0200\n"
"PO-Revision-Date: 2010-03-20 20:00+0100\n"
"Last-Translator: Étienne Loks <etienne.loks@peacefrogs.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: __init__.py:8 models.py:574
+#: __init__.py:8 models.py:576
msgid "Multimedia files"
msgstr "Fichiers multimedias"
-#: __init__.py:9 models.py:631
+#: __init__.py:9 models.py:633
msgid "Picture files"
msgstr "Fichiers d'image"
@@ -111,39 +111,54 @@ msgstr "Courriel (optionnel) "
msgid "Object"
msgstr "Objet"
-#: forms.py:163
+#: forms.py:115
+msgid "Shapefiles must be provided in a zipped archive."
+msgstr ""
+"Les fichiers Shapefiles doivent être fournis regroupés dans une archive zip."
+
+#: forms.py:119
+msgid "You have to set \"source\" or \"source file\" but not both."
+msgstr ""
+"Vous devez spécifier le champ « Source » ou « Fichier source » mais pas les "
+"deux."
+
+#: forms.py:123
+msgid "You have to set \"source\" or \"source file\"."
+msgstr "Vous devez spécifier le champ « Source » ou « Fichier source »."
+
+#: forms.py:182
msgid "End date has been set with no start date"
msgstr "Une date de fin a été donnée sans date de début"
-#: forms.py:174
+#: forms.py:193
msgid "This field is mandatory for the selected categories"
msgstr "Ce champ est obligatoire pour les catégories sélectionnées"
-#: forms.py:379
+#: forms.py:398
msgid "File"
msgstr "Fichier"
-#: forms.py:385
+#: forms.py:404
msgid "Bad file format: this must be a GPX or KML file"
msgstr "Mauvais format de fichier : KML et GPX sont supportés"
-#: forms.py:390 models.py:49 models.py:102 models.py:123 models.py:136
-#: models.py:150 models.py:246 models.py:521 models.py:564 models.py:608
-#: models.py:725 models.py:1018 models.py:1030 models.py:1115 utils.py:444
+#: forms.py:409 models.py:49 models.py:102 models.py:123 models.py:136
+#: models.py:150 models.py:248 models.py:523 models.py:566 models.py:610
+#: models.py:727 models.py:1021 models.py:1033 models.py:1118 utils.py:444
#: templates/chimere/edit.html:39 templates/chimere/edit_route.html:36
msgid "Name"
msgstr "Nom"
-#: forms.py:399 models.py:1067
+#: forms.py:418 models.py:1070
msgid "Area"
msgstr "Zone"
-#: models.py:50 models.py:124 models.py:151 models.py:257 models.py:525
-#: models.py:1036 models.py:1117
+#: models.py:50 models.py:124 models.py:151 models.py:259 models.py:527
+#: models.py:1039 models.py:1120
msgid "Available"
msgstr "Disponible"
-#: models.py:51 models.py:1126
+#: models.py:51 models.py:1129
msgid "Date"
msgstr "Date"
@@ -167,8 +182,8 @@ msgstr "Thème de couleur"
msgid "Code"
msgstr "Code"
-#: models.py:112 models.py:125 models.py:157 models.py:566 models.py:623
-#: models.py:1035 models.py:1104 models.py:1116
+#: models.py:112 models.py:125 models.py:157 models.py:568 models.py:625
+#: models.py:1038 models.py:1107 models.py:1119
msgid "Order"
msgstr "Ordre"
@@ -180,15 +195,15 @@ msgstr "Couleur"
msgid "Category"
msgstr "Catégorie"
-#: models.py:137 models.py:517 models.py:609 models.py:790
+#: models.py:137 models.py:519 models.py:611 models.py:793
msgid "Image"
msgstr "Image"
-#: models.py:139 models.py:611 models.py:792
+#: models.py:139 models.py:613 models.py:795
msgid "Height"
msgstr "Hauteur"
-#: models.py:140 models.py:612 models.py:793
+#: models.py:140 models.py:614 models.py:796
msgid "Width"
msgstr "Largeur"
@@ -204,7 +219,7 @@ msgstr "Disponible pour soumission"
msgid "Marker"
msgstr "Point d'intérêt"
-#: models.py:159 models.py:786 models.py:801
+#: models.py:159 models.py:789 models.py:804
#: templates/chimere/edit_route.html:27
msgid "Route"
msgstr "Trajet"
@@ -229,7 +244,7 @@ msgstr "Sous-catégories"
msgid "Importer type"
msgstr "Type d'import"
-#: models.py:222 models.py:268
+#: models.py:222 models.py:270
msgid "Source"
msgstr "Source"
@@ -257,243 +272,247 @@ msgstr "SRID"
msgid "Zipped file"
msgstr "Fichier zippé"
-#: models.py:236
+#: models.py:234
+msgid "Source file"
+msgstr "Fichier source"
+
+#: models.py:238
msgid "Importer"
msgstr "Import"
-#: models.py:248
+#: models.py:250
msgid "Submitter session key"
msgstr "Clé de session du demandeur"
-#: models.py:250
+#: models.py:252
msgid "Submitter name or nickname"
msgstr "Nom ou pseudo du demandeur"
-#: models.py:252
+#: models.py:254
msgid "Submitter email"
msgstr "Courriel du demandeur"
-#: models.py:254
+#: models.py:256
msgid "Submitter comment"
msgstr "Commentaire du demandeur"
-#: models.py:256
+#: models.py:258
msgid "Submited"
msgstr "Soumis"
-#: models.py:258
+#: models.py:260
msgid "Modified"
msgstr "Modifié"
-#: models.py:259
+#: models.py:261
msgid "Disabled"
msgstr "Désactivé"
-#: models.py:260
+#: models.py:262
msgid "Imported"
msgstr "Importé"
-#: models.py:261
+#: models.py:263
msgid "Excluded"
msgstr "Exclu"
-#: models.py:263
+#: models.py:265
msgid "Status"
msgstr "État"
-#: models.py:264
+#: models.py:266
msgid "Import key"
msgstr "Clé d'import"
-#: models.py:266
+#: models.py:268
msgid "Import version"
msgstr "Version de l'import"
-#: models.py:270
+#: models.py:272
msgid "Modified since last import"
msgstr "Modifié depuis le dernier import"
-#: models.py:272
+#: models.py:274
msgid "Not to be imported inside OSM"
msgstr "À ne pas importer dans OSM"
-#: models.py:275 templates/chimere/edit.html:56
+#: models.py:277 templates/chimere/edit.html:56
#: templates/chimere/edit_route.html:52
msgid "Start date"
msgstr "Date de début"
-#: models.py:276
+#: models.py:278
msgid "Not mandatory. Set it for dated item such as event. Format YYYY-MM-DD"
msgstr ""
"Optionnel. Précisez ce champ pour les éléments datés comme un événement. "
"Format du champ : AAAA-MM-JJ"
-#: models.py:278 templates/chimere/edit.html:62
+#: models.py:280 templates/chimere/edit.html:62
#: templates/chimere/edit_route.html:58
msgid "End date"
msgstr "Date de fin"
-#: models.py:279
+#: models.py:281
msgid ""
"Not mandatory. Set it only if you have a multi-day event. Format YYYY-MM-DD"
msgstr ""
"Optionnel. Précisez ce champ seulement pour des événements durant plusieurs "
"jours. Format du champ : AAAA-MM-JJ"
-#: models.py:315
+#: models.py:317
msgid "Reference marker"
msgstr "Point d'intérêt de référence"
-#: models.py:316 utils.py:449 utils.py:450
+#: models.py:318 utils.py:449 utils.py:450
msgid "Localisation"
msgstr "Localisation"
-#: models.py:318
+#: models.py:320
msgid "Available Date"
msgstr "Date de mise en disponibilité"
-#: models.py:322 utils.py:448 templates/chimere/edit.html:49
+#: models.py:324 utils.py:448 templates/chimere/edit.html:49
#: templates/chimere/edit_route.html:46
msgid "Description"
msgstr "Description"
-#: models.py:377 models.py:1151
+#: models.py:379 models.py:1154
msgid "Point of interest"
msgstr "Point d'intérêt"
-#: models.py:515
+#: models.py:517
msgid "Audio"
msgstr "Audio"
-#: models.py:516
+#: models.py:518
msgid "Video"
msgstr "Vidéo"
-#: models.py:518
+#: models.py:520
msgid "Other"
msgstr "Autre"
-#: models.py:519
+#: models.py:521
msgid "Media type"
msgstr "Type de media"
-#: models.py:522
+#: models.py:524
msgid "Mime type"
msgstr "Type mime"
-#: models.py:524
+#: models.py:526
msgid "Inside an iframe"
msgstr "À l'intérieur d'un iframe"
-#: models.py:528
+#: models.py:530
msgid "Multimedia type"
msgstr "Type de multimedia"
-#: models.py:529
+#: models.py:531
msgid "Multimedia types"
msgstr "Types de multimedia"
-#: models.py:565
+#: models.py:567
msgid "Url"
msgstr "Url"
-#: models.py:568 models.py:613
+#: models.py:570 models.py:615
msgid "Display inside the description?"
msgstr "Apparaît dans la description ?"
-#: models.py:573
+#: models.py:575
msgid "Multimedia file"
msgstr "Fichier multimedia"
-#: models.py:615
+#: models.py:617
msgid "Thumbnail"
msgstr "Miniature"
-#: models.py:619
+#: models.py:621
msgid "Thumbnail height"
msgstr "Hauteur de la miniature"
-#: models.py:621
+#: models.py:623
msgid "Thumbnail width"
msgstr "Largeur de la miniature"
-#: models.py:630
+#: models.py:632
msgid "Picture file"
msgstr "Fichier d'image"
-#: models.py:726
+#: models.py:728
msgid "Raw file (gpx or kml)"
msgstr "Fichier brut (gpx ou kml)"
-#: models.py:727
+#: models.py:730
msgid "Simplified file"
msgstr "Fichier simplifié"
-#: models.py:729
+#: models.py:732
msgid "KML"
msgstr "KML"
-#: models.py:729
+#: models.py:732
msgid "GPX"
msgstr "GPX"
-#: models.py:734
+#: models.py:737
msgid "Route file"
msgstr "Fichier de trajet"
-#: models.py:735
+#: models.py:738
msgid "Route files"
msgstr "Fichiers de trajet"
-#: models.py:785
+#: models.py:788
msgid "Reference route"
msgstr "Trajet de référence"
-#: models.py:789
+#: models.py:792
msgid "Associated file"
msgstr "Fichier associé"
-#: models.py:1019
+#: models.py:1022
msgid "Layer code"
msgstr "Code pour la couche"
-#: models.py:1025
+#: models.py:1028
msgid "Layer"
msgstr "Couche"
-#: models.py:1031
+#: models.py:1034
msgid "Area urn"
msgstr "Urn de la zone"
-#: models.py:1033 templates/chimere/blocks/welcome.html:3
+#: models.py:1036 templates/chimere/blocks/welcome.html:3
msgid "Welcome message"
msgstr "Message d'accueil"
-#: models.py:1037
+#: models.py:1040
msgid "Upper left corner"
msgstr "Coin en haut à gauche"
-#: models.py:1039
+#: models.py:1042
msgid "Lower right corner"
msgstr "Coin en bas à droite"
-#: models.py:1041
+#: models.py:1044
msgid "Default area"
msgstr "Zone par défaut"
-#: models.py:1042
+#: models.py:1045
msgid "Only one area is set by default"
msgstr "Seule une zone est définie par défaut"
-#: models.py:1046
+#: models.py:1049
msgid "Sub-categories checked by default"
msgstr "Sous-catégories cochées par défaut"
-#: models.py:1048
+#: models.py:1051
msgid "Sub-categories dynamicaly displayed"
msgstr "Sous-categories affichées dynamiquement"
-#: models.py:1049
+#: models.py:1052
msgid ""
"If checked, categories are only displayed in the menu if they are available "
"on the current extent."
@@ -501,68 +520,68 @@ msgstr ""
"Si coché, les catégories sont disponibles sur le menu seulement si elles "
"apparaissent sur la zone affichée."
-#: models.py:1053 models.py:1120
+#: models.py:1056 models.py:1123
msgid "Restricted to theses sub-categories"
msgstr "Restreindre à ces sous-categories"
-#: models.py:1054
+#: models.py:1057
msgid "If no sub-category is set all sub-categories are available"
msgstr ""
"Si aucune sous-catégorie n'est définie toutes les sous-catégories sont "
"disponibles"
-#: models.py:1056
+#: models.py:1059
msgid "Link to an external CSS"
msgstr "Lien vers une feuille de style externe"
-#: models.py:1058
+#: models.py:1061
msgid "Restrict to the area extent"
msgstr "Restreindre à l'étendue de la zone"
-#: models.py:1105
+#: models.py:1108
msgid "Default layer"
msgstr "Couche par défaut"
-#: models.py:1109 models.py:1110
+#: models.py:1112 models.py:1113
msgid "Layers"
msgstr "Couches"
-#: models.py:1118
+#: models.py:1121
msgid "Mandatory"
msgstr "Obligatoire"
-#: models.py:1121
+#: models.py:1124
msgid ""
"If no sub-category is set all the property applies to all sub-categories"
msgstr ""
"Si aucune sous-catégorie n'est précisée, cette propriété est disponible pour "
"toutes les sous-catégories"
-#: models.py:1123
+#: models.py:1126
msgid "Text"
msgstr "Texte"
-#: models.py:1124
+#: models.py:1127
msgid "Long text"
msgstr "Texte long"
-#: models.py:1125
+#: models.py:1128
msgid "Password"
msgstr "Mot de passe"
-#: models.py:1131
+#: models.py:1134
msgid "Type"
msgstr "Type"
-#: models.py:1136 models.py:1153
+#: models.py:1139 models.py:1156
msgid "Property model"
msgstr "Modèle de propriété"
-#: models.py:1154
+#: models.py:1157
msgid "Value"
msgstr "Valeur"
-#: models.py:1158
+#: models.py:1161
msgid "Property"
msgstr "Propriété"
@@ -616,24 +635,32 @@ msgstr "Export échoué"
msgid "Export canceled"
msgstr "Export annulé"
-#: utils.py:118 utils.py:166
+#: utils.py:118 utils.py:167
msgid "Bad zip file"
msgstr "Mauvais fichier zip"
-#: utils.py:169
+#: utils.py:170
msgid "Missing file(s) inside the zip file"
msgstr "Fichier(s) manquant(s) dans l'archive zip"
-#: utils.py:301
+#: utils.py:211
+msgid "Bad XML file"
+msgstr "Mauvais fichier XML"
+
+#: utils.py:298
msgid "Error while reading the data source."
msgstr "Erreur lors de la lecture de la source."
-#: utils.py:336
+#: utils.py:333
msgid "Type of geographic item of this shapefile is not managed by Chimère."
msgstr ""
"Les types des éléments géographiques de ce fichier Shapefile ne sont pas "
"gérés par Chimère."
+#: utils.py:353
+msgid "Bad Shapefile"
+msgstr "Mauvais fichier Shapefile"
+
#: utils.py:393
msgid "Could not create file!"
msgstr "Ne peut pas créer le fichier !"
@@ -647,15 +674,15 @@ msgstr "Ne peut pas créer un champ"
msgid "Categories"
msgstr "Catégories"
-#: utils.py:509
+#: utils.py:506
msgid "Nothing to import"
msgstr "Rien à importer"
-#: utils.py:589
+#: utils.py:586
msgid "New items imported - validate them before exporting"
msgstr "Nouveaux éléments importés - valider ceux-ci avant d'exporter"
-#: utils.py:591
+#: utils.py:588
msgid ""
"There are items from a former import not yet validated - validate them "
"before exporting"
@@ -663,15 +690,15 @@ msgstr ""
"Il y a des éléments d'un import précédent pas encore validé - Validez les "
"avant d'exporter"
-#: utils.py:601
+#: utils.py:598
msgid "Bad param"
msgstr "Mauvais paramètre"
-#: utils.py:616
+#: utils.py:613
msgid "No non ambigious tag is defined in the XAPI request"
msgstr "Pas de tag non ambigü définis dans la requête XAPI"
-#: utils.py:618
+#: utils.py:615
msgid ""
"No bounding box is defined in the XAPI request.If you are sure to manage the "
"entire planet set the bounding box to -180,-90,180,90"
@@ -680,19 +707,19 @@ msgstr ""
"vouloir lancer la requête sur la planète entière fixez la « bounding box » "
"à -180,-90,180,90"
-#: views.py:234
+#: views.py:235
msgid "There are missing field(s) and/or errors in the submited form."
msgstr "Il y a des champs manquants ou des erreurs dans ce formulaire."
-#: views.py:316
+#: views.py:317
msgid "Bad file. Please check it with an external software."
msgstr "Fichier incohérent. Merci de le vérifier avec un logiciel externe."
-#: views.py:438
+#: views.py:439
msgid "Comments/request on the map"
msgstr "Commentaires/requètes sur la carte"
-#: views.py:441
+#: views.py:442
msgid ""
"Thank you for your contribution. It will be taken into account. If you have "
"left your email you may be contacted soon for more details."
@@ -701,15 +728,15 @@ msgstr ""
"laissé votre courriel vous serez peut-être contacté bientôt pour plus de "
"détails."
-#: views.py:445
+#: views.py:446
msgid "Temporary error. Renew your message later."
msgstr "Erreur temporaire. Réenvoyez votre message plus tard."
-#: views.py:577
+#: views.py:578
msgid "No category available in this area."
msgstr "Pas de catégorie disponible sur cette zone."
-#: views.py:684
+#: views.py:686
msgid "Incorrect choice in the list"
msgstr "Choix incorrect dans la liste"
diff --git a/chimere/utils.py b/chimere/utils.py
index 4ecf3c4..09901c8 100644
--- a/chimere/utils.py
+++ b/chimere/utils.py
@@ -205,7 +205,10 @@ class KMLManager(ImportManager):
if line.strip():
break
doc = StringIO.StringIO("\n".join(splitted[idx:]))
- tree = etree.parse(doc)
+ try:
+ tree = etree.parse(doc)
+ except:
+ return (0, 0, _(u"Bad XML file"))
# try to get default namespace
if not self.ns:
self.ns = tree.getroot().nsmap[None]
@@ -344,7 +347,10 @@ class ShapefileManager(ImportManager):
name.decode(settings.CHIMERE_SHAPEFILE_ENCODING))
except:
continue
- geoms = [feat.geom.wkt]
+ try:
+ geoms = [feat.geom.wkt]
+ except:
+ return (0, 0, _(u"Bad Shapefile"))
if feat.geom.geom_type == 'MultiLineString':
geoms = [geom.wkt for geom in feat.geom]
import_key = feat.get(id_name) if id_name and len(geoms) == 1 else ''