Add owner name in "map of the maps" popup

This commit is contained in:
Yohan Boniface 2014-02-10 21:37:12 +01:00
parent d78e817800
commit 0cfd560b26
23 changed files with 121 additions and 67 deletions

Binary file not shown.

View file

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Danish (http://www.transifex.com/projects/p/umap/language/da/)\n" "Language-Team: Danish (http://www.transifex.com/projects/p/umap/language/da/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -18,15 +18,19 @@ msgstr ""
"Language: da\n" "Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Browse %(current_user)s's kort" msgstr "Browse %(current_user)s's kort"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Mere" msgstr "Mere"

Binary file not shown.

View file

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 16:52+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: Klumbumbus <simson.gertrud@gmail.com>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: German (http://www.transifex.com/projects/p/umap/language/de/)\n" "Language-Team: German (http://www.transifex.com/projects/p/umap/language/de/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -18,15 +18,19 @@ msgstr ""
"Language: de\n" "Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr "von"
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Schaue dir %(current_user)s's Karten an" msgstr "Schaue dir %(current_user)s's Karten an"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr "von"
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Mehr" msgstr "Mehr"

Binary file not shown.

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,15 +17,19 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "" msgstr ""
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "" msgstr ""

Binary file not shown.

View file

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Spanish (http://www.transifex.com/projects/p/umap/language/es/)\n" "Language-Team: Spanish (http://www.transifex.com/projects/p/umap/language/es/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -18,15 +18,19 @@ msgstr ""
"Language: es\n" "Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Mapas de %(current_user)s" msgstr "Mapas de %(current_user)s"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Más" msgstr "Más"

Binary file not shown.

View file

@ -9,8 +9,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Finnish (http://www.transifex.com/projects/p/umap/language/fi/)\n" "Language-Team: Finnish (http://www.transifex.com/projects/p/umap/language/fi/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -19,15 +19,19 @@ msgstr ""
"Language: fi\n" "Language: fi\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Selaa %(current_user)s:n karttoja" msgstr "Selaa %(current_user)s:n karttoja"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Lisää" msgstr "Lisää"

Binary file not shown.

View file

@ -11,8 +11,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:53+0000\n" "PO-Revision-Date: 2014-02-10 20:36+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: French (http://www.transifex.com/projects/p/umap/language/fr/)\n" "Language-Team: French (http://www.transifex.com/projects/p/umap/language/fr/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -21,15 +21,19 @@ msgstr ""
"Language: fr\n" "Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr "par"
#: views.py:158
msgid "View the map"
msgstr "Voir la carte"
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Consulter les cartes de %(current_user)s" msgstr "Consulter les cartes de %(current_user)s"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr "par"
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Plus" msgstr "Plus"

Binary file not shown.

View file

@ -10,8 +10,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/umap/language/it/)\n" "Language-Team: Italian (http://www.transifex.com/projects/p/umap/language/it/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -20,15 +20,19 @@ msgstr ""
"Language: it\n" "Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Vedi %(current_user)s delle mappe" msgstr "Vedi %(current_user)s delle mappe"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Altre mappe" msgstr "Altre mappe"

Binary file not shown.

View file

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Japanese (http://www.transifex.com/projects/p/umap/language/ja/)\n" "Language-Team: Japanese (http://www.transifex.com/projects/p/umap/language/ja/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -18,15 +18,19 @@ msgstr ""
"Language: ja\n" "Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "%(current_user)sのマップを閲覧" msgstr "%(current_user)sのマップを閲覧"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "次" msgstr "次"

Binary file not shown.

View file

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Lithuanian (http://www.transifex.com/projects/p/umap/language/lt/)\n" "Language-Team: Lithuanian (http://www.transifex.com/projects/p/umap/language/lt/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -18,15 +18,19 @@ msgstr ""
"Language: lt\n" "Language: lt\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Peržiūrėti %(current_user)s žemėlapius" msgstr "Peržiūrėti %(current_user)s žemėlapius"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Daugiau" msgstr "Daugiau"

Binary file not shown.

View file

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Dutch (http://www.transifex.com/projects/p/umap/language/nl/)\n" "Language-Team: Dutch (http://www.transifex.com/projects/p/umap/language/nl/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -17,15 +17,19 @@ msgstr ""
"Language: nl\n" "Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "" msgstr ""
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "" msgstr ""

Binary file not shown.

View file

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uMap\n" "Project-Id-Version: uMap\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-10 14:50+0100\n" "POT-Creation-Date: 2014-02-10 21:29+0100\n"
"PO-Revision-Date: 2014-02-10 13:50+0000\n" "PO-Revision-Date: 2014-02-10 20:29+0000\n"
"Last-Translator: yohanboniface <yohanboniface@free.fr>\n" "Last-Translator: yohanboniface <yohanboniface@free.fr>\n"
"Language-Team: Portuguese (http://www.transifex.com/projects/p/umap/language/pt/)\n" "Language-Team: Portuguese (http://www.transifex.com/projects/p/umap/language/pt/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -17,15 +17,19 @@ msgstr ""
"Language: pt\n" "Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: views.py:154 templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: views.py:158
msgid "View the map"
msgstr ""
#: templates/auth/user_detail.html:7 #: templates/auth/user_detail.html:7
#, python-format #, python-format
msgid "Browse %(current_user)s's maps" msgid "Browse %(current_user)s's maps"
msgstr "Consulta os mapas de %(current_user)s" msgstr "Consulta os mapas de %(current_user)s"
#: templates/leaflet_storage/map_list.html:7
msgid "by"
msgstr ""
#: templates/leaflet_storage/map_list.html:11 #: templates/leaflet_storage/map_list.html:11
msgid "More" msgid "More"
msgstr "Mais" msgstr "Mais"

View file

@ -8,6 +8,8 @@ from django.contrib.gis.measure import D
from django.conf import settings from django.conf import settings
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponse from django.http import HttpResponse
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from sesql.shortquery import shortquery from sesql.shortquery import shortquery
@ -145,7 +147,15 @@ class MapsShowCase(View):
maps = Map.public.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1))).order_by('-modified_at')[:2000] maps = Map.public.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1))).order_by('-modified_at')[:2000]
def make(m): def make(m):
description = u"{}\n\n[[{}|{}]]".format(m.description or "", m.get_absolute_url(), "View the map") description = m.description or ""
if m.owner:
description = u"{description}\n{by} [[{url}|{name}]]".format(
description=description,
by=_("by"),
url=reverse('user_maps', kwargs={"username": m.owner.username}),
name=m.owner,
)
description = u"{}\n[[{}|{}]]".format(description, m.get_absolute_url(), _("View the map"))
geometry = m.settings['geometry'] if "geometry" in m.settings else simplejson.loads(m.center.geojson) geometry = m.settings['geometry'] if "geometry" in m.settings else simplejson.loads(m.center.geojson)
return { return {
"type": "Feature", "type": "Feature",