Commits

Yohan Boniface  committed e3be64a

Add prefix "clone of" for cloned maps

  • Participants
  • Parent commits 2ba6fb1

Comments (0)

Files changed (11)

File leaflet_storage/base_models.py

     def clone(self, **kwargs):
         new = self.__class__.objects.get(pk=self.pk)
         new.pk = None
+        new.name = u"%s %s" % (_("Clone of"), self.name)
         if "owner" in kwargs:
             # can be None in case of anonymous cloning
             new.owner = kwargs["owner"]

File leaflet_storage/locale/de/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: 0.0.8\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12: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"
 msgid "Only owner can edit"
 msgstr "Nur der Ersteller kann bearbeiten"
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr "Beschreibung"
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr ""
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr ""
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr "pictogram"
 
-#: base_models.py:252
+#: base_models.py:253
 msgid "icon type"
 msgstr ""
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr ""
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr ""
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr "Bei dem Laden anzeigen"
 
-#: base_models.py:289
+#: base_models.py:290
 #, fuzzy
 msgid "Display this layer on load."
 msgstr "Diese Katergorie bereits beim Laden einblenden."
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr ""
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr ""
 

File leaflet_storage/locale/en/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12:08+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 msgid "Only owner can edit"
 msgstr ""
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr ""
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr ""
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr ""
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr ""
 
-#: base_models.py:252
+#: base_models.py:253
 msgid "icon type"
 msgstr ""
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr ""
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr ""
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr ""
 
-#: base_models.py:289
+#: base_models.py:290
 msgid "Display this layer on load."
 msgstr ""
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr ""
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr ""
 

File leaflet_storage/locale/es/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12:08+0100\n"
 "PO-Revision-Date: 2013-06-24 22:44-0500\n"
 "Last-Translator: Igor Támara <igor@tamarapatino.org>\n"
 "Language-Team: Traducción de umap al español\n"
 msgid "Only owner can edit"
 msgstr "Solamente el propietario puede editar"
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr "descripción"
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr "Tu mapa anónimo se ha adjuntado a tu cuenta %s"
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr ""
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr "pictograma"
 
-#: base_models.py:252
+#: base_models.py:253
 msgid "icon type"
 msgstr "tipo de ícono"
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr "Elegir el estilo del marcador."
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr "opciones"
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr "mostrar al cargar"
 
-#: base_models.py:289
+#: base_models.py:290
 msgid "Display this layer on load."
 msgstr "Mostrar esta capa al cargar."
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr "Capa 1"
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr "capa"
 

File leaflet_storage/locale/fi/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12:08+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 msgid "Only owner can edit"
 msgstr ""
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr ""
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr ""
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr ""
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr ""
 
-#: base_models.py:252
+#: base_models.py:253
 msgid "icon type"
 msgstr ""
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr ""
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr ""
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr ""
 
-#: base_models.py:289
+#: base_models.py:290
 msgid "Display this layer on load."
 msgstr ""
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr ""
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr ""
 

File leaflet_storage/locale/fr/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: 0.0.8\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12: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"
 msgid "Only owner can edit"
 msgstr "Seul le créateur peut modifier"
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr "description"
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr "La carte a été associée à votre compte %s"
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr "Clone de"
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr "picto"
 
-#: base_models.py:252
+#: base_models.py:253
 msgid "icon type"
 msgstr "Type d'icone"
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr "Choisir le style du marqueur"
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr "options"
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr "afficher au chargement."
 
-#: base_models.py:289
+#: base_models.py:290
 msgid "Display this layer on load."
 msgstr "Afficher ce calque au chargement."
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr "Calque 1"
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr "calque"
 
 
 #: views.py:87
 msgid "An error occured."
-msgstr ""
+msgstr "Une erreur est survenue."
 
 #: views.py:207
 #, python-format
 
 #: views.py:235
 msgid "Map has been updated!"
-msgstr ""
+msgstr "La carte a été mise à jour!"
 
 #: views.py:259
 msgid "Map editors updated with success!"

File leaflet_storage/locale/it/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: 0.0.8\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12:08+0100\n"
 "PO-Revision-Date: 2013-01-07 01:14+0100\n"
 "Last-Translator: Stefano\n"
 "Language-Team: FR <LL@li.org>\n"
 msgid "Only owner can edit"
 msgstr "Solo il proprietario può modificare"
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr "descrizione"
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr ""
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr ""
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr "pittogramma"
 
-#: base_models.py:252
+#: base_models.py:253
 #, fuzzy
 msgid "icon type"
 msgstr "Tipo del contenuto"
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr ""
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr ""
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr "mostra al caricamento"
 
-#: base_models.py:289
+#: base_models.py:290
 #, fuzzy
 msgid "Display this layer on load."
 msgstr "Mostra questa categoria al caricamento."
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr ""
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr ""
 

File leaflet_storage/locale/nl/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12:08+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 msgid "Only owner can edit"
 msgstr ""
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr ""
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr ""
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr ""
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr ""
 
-#: base_models.py:252
+#: base_models.py:253
 msgid "icon type"
 msgstr ""
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr ""
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr ""
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr ""
 
-#: base_models.py:289
+#: base_models.py:290
 msgid "Display this layer on load."
 msgstr ""
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr ""
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr ""
 

File leaflet_storage/locale/pt/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: 0.2.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-21 22:36+0100\n"
+"POT-Creation-Date: 2013-11-22 12:08+0100\n"
 "PO-Revision-Date: 2013-03-10 20:00+0100\n"
 "Last-Translator: Francisco DOS SANTOS <f.dos.santos@free.fr>\n"
 "Language-Team: PT <LL@li.org>\n"
 msgid "Only owner can edit"
 msgstr "Só o proprietário pode editar"
 
-#: base_models.py:113 base_models.py:282 base_models.py:348
+#: base_models.py:113 base_models.py:283 base_models.py:349
 msgid "description"
 msgstr "descrição"
 
 msgid "Your anonymous map has been attached to your account %s"
 msgstr ""
 
-#: base_models.py:245
+#: base_models.py:205
+msgid "Clone of"
+msgstr ""
+
+#: base_models.py:246
 msgid "pictogram"
 msgstr "pictograma"
 
-#: base_models.py:252
+#: base_models.py:253
 msgid "icon type"
 msgstr "tipo de ícone"
 
-#: base_models.py:253
+#: base_models.py:254
 msgid "Choose the style of the marker."
 msgstr "Escolha marco estilo."
 
-#: base_models.py:284 base_models.py:351
+#: base_models.py:285 base_models.py:352
 msgid "options"
 msgstr "opções"
 
-#: base_models.py:288
+#: base_models.py:289
 msgid "display on load"
 msgstr "mostrar de início"
 
-#: base_models.py:289
+#: base_models.py:290
 #, fuzzy
 msgid "Display this layer on load."
 msgstr "Mostrar esta categoria de início."
 
-#: base_models.py:329
+#: base_models.py:330
 msgid "Layer 1"
 msgstr ""
 
-#: base_models.py:350
+#: base_models.py:351
 msgid "layer"
 msgstr ""
 

File leaflet_storage/tests/base_models.py

     def test_clone_should_return_new_instance(self):
         clone = self.map.clone()
         self.assertNotEqual(self.map.pk, clone.pk)
-        self.assertEqual(self.map.name, clone.name)
+        self.assertEqual(u"Clone of " + self.map.name, clone.name)
         self.assertEqual(self.map.settings, clone.settings)
         self.assertEqual(self.map.center, clone.center)
         self.assertEqual(self.map.zoom, clone.zoom)

File leaflet_storage/tests/views.py

         self.assertEqual(Map.objects.count(), 2)
         clone = Map.objects.latest('pk')
         self.assertNotEqual(clone.pk, self.map.pk)
-        self.assertEqual(clone.name, self.map.name)
+        self.assertEqual(clone.name, u"Clone of " + self.map.name)
 
     def test_clone_map_should_not_be_possible_if_user_is_not_allowed(self):
         self.assertEqual(Map.objects.count(), 1)
         self.assertEqual(Map.objects.count(), 2)
         clone = Map.objects.latest('pk')
         self.assertNotEqual(clone.pk, self.map.pk)
-        self.assertEqual(clone.name, self.map.name)
+        self.assertEqual(clone.name, u"Clone of " + self.map.name)
         self.assertEqual(clone.owner, other_user)
 
 
         self.assertEqual(Map.objects.count(), 3)
         clone = Map.objects.latest('pk')
         self.assertNotEqual(clone.pk, self.map.pk)
-        self.assertEqual(clone.name, self.map.name)
+        self.assertEqual(clone.name, u"Clone of " + self.map.name)
         self.assertEqual(clone.owner, None)