diff --git a/amiibofindr/apps/amiibo/urls.py b/amiibofindr/apps/amiibo/urls.py index 33b4ab0..db576c1 100644 --- a/amiibofindr/apps/amiibo/urls.py +++ b/amiibofindr/apps/amiibo/urls.py @@ -15,10 +15,10 @@ urlpatterns = patterns( '', url(_('^cards$'), CollectionCardView.as_view(), - name='cards-list'), + name='cards-all'), url(_(r'^figures$'), CollectionFigureView.as_view(), - name='figures-list'), + name='figures-all'), url(_(r'^cards/(?P[\w\d\-]+)$'), CollectionCardView.as_view(), @@ -27,9 +27,6 @@ urlpatterns = patterns( CollectionFigureView.as_view(), name='figures-list'), - url(_(r'^(?P[\w\d\-]+)/(?P[\w\d\-]+)$'), - AmiiboView.as_view(), - name='amiibo'), url(_(r'^cards/(?P[\w\d\-]+)/(?P[\w\d\-]+)$'), AmiiboCardView.as_view(), name='card-detail'), diff --git a/amiibofindr/apps/amiibo/views.py b/amiibofindr/apps/amiibo/views.py index dfd8ccd..f5bbd2f 100644 --- a/amiibofindr/apps/amiibo/views.py +++ b/amiibofindr/apps/amiibo/views.py @@ -20,8 +20,8 @@ class CollectionView(View): type = Amiibo.FIGURE model = AmiiboFigure - def get(self, request, collection='all'): - if collection != _('all'): + def get(self, request, collection=None): + if collection: collection = get_object_or_404(Collection, slug=collection) if self.type == self.model.FIGURE: amiibo_list = collection.figures @@ -31,7 +31,7 @@ class CollectionView(View): amiibo_list = collection.amiibo else: collection = None - amiibo_list = self.model.objects.all().order_by('name_eu') + amiibo_list = self.model.objects.all() return render(request, self.template, { 'selected_collection': collection, diff --git a/amiibofindr/apps/core/context_processors.py b/amiibofindr/apps/core/context_processors.py index 0e7d2da..918f614 100644 --- a/amiibofindr/apps/core/context_processors.py +++ b/amiibofindr/apps/core/context_processors.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals from django.utils.translation import activate, deactivate, get_language -from django.core.urlresolvers import resolve, reverse +from django.core.urlresolvers import resolve, reverse_lazy from django.conf import settings @@ -29,7 +29,7 @@ def i18n(request): this = { 'code': lang_code, 'name': name, - # 'url': reverse(res.url_name, args=res.args, kwargs=res.kwargs) + 'url': reverse_lazy(res.view_name, args=res.args, kwargs=res.kwargs) } result.append(this) deactivate() diff --git a/amiibofindr/apps/home/urls.py b/amiibofindr/apps/home/urls.py index 1e7e33a..48ef40a 100644 --- a/amiibofindr/apps/home/urls.py +++ b/amiibofindr/apps/home/urls.py @@ -9,5 +9,5 @@ from .views import HomeView urlpatterns = patterns( '', - url(r'^$', HomeView.as_view(), name='redirect'), + url(r'^$', HomeView.as_view(), name='home'), ) diff --git a/amiibofindr/locale/es/LC_MESSAGES/django.po b/amiibofindr/locale/es/LC_MESSAGES/django.po index d2451e4..c3833d4 100644 --- a/amiibofindr/locale/es/LC_MESSAGES/django.po +++ b/amiibofindr/locale/es/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-07 22:33+0200\n" -"PO-Revision-Date: 2015-09-07 22:33+0200\n" +"POT-Creation-Date: 2015-09-08 23:54+0200\n" +"PO-Revision-Date: 2015-09-08 23:55+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: es\n" @@ -18,21 +18,33 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.8.4\n" -#: apps/amiibo/urls.py:13 -msgid "^(?P[\\w\\d\\-]+)/$" -msgstr "^(?P[\\w\\d\\-]+)/$" - #: apps/amiibo/urls.py:16 -msgid "^cards/(?P[\\w\\d\\-]+)/$" -msgstr "^tarjetas/(?P[\\w\\d\\-]+)/$" +msgid "^cards$" +msgstr "^tarjetas$" #: apps/amiibo/urls.py:19 -msgid "^figures/(?P[\\w\\d\\-]+)/$" +msgid "^figures$" +msgstr "^figuras$" + +#: apps/amiibo/urls.py:23 +msgid "^cards/(?P[\\w\\d\\-]+)$" +msgstr "^tarjetas/(?P[\\w\\d\\-]+)$" + +#: apps/amiibo/urls.py:26 +msgid "^figures/(?P[\\w\\d\\-]+)$" msgstr "^figuras/(?P[\\w\\d\\-]+)/$" -#: apps/amiibo/views.py:15 apps/amiibo/views.py:19 templates/_layout.html:5 -msgid "all" -msgstr "todas" +#: apps/amiibo/urls.py:30 +msgid "^cards/(?P[\\w\\d\\-]+)/(?P[\\w\\d\\-]+)$" +msgstr "^tarjetas/(?P[\\w\\d\\-]+)/(?P[\\w\\d\\-]+)$" + +#: apps/amiibo/urls.py:33 +msgid "^figures/(?P[\\w\\d\\-]+)/(?P[\\w\\d\\-]+)$" +msgstr "^figuras/(?P[\\w\\d\\-]+)/(?P[\\w\\d\\-]+)$" + +#: apps/amiibo/urls.py:37 +msgid "^amiibo/(?P\\d+)/(?P[\\w\\+\\-\\=]+)$" +msgstr "^amiibo/(?P\\d+)/(?P[\\w\\+\\-\\=]+)$" #: templates/404.html:10 msgid "Not found!" @@ -68,39 +80,48 @@ msgstr "" "informados. Por favor, prueba refrescando la página o vuelve a la home." -#: templates/_layout.html:36 templates/_layout.html.py:94 +#: templates/_layout.html:5 +msgid "all" +msgstr "todas" + +#: templates/_layout.html:36 templates/_layout.html.py:91 msgid "Figures" msgstr "Figuras" -#: templates/_layout.html:39 templates/_layout.html.py:96 +#: templates/_layout.html:39 templates/_layout.html.py:51 +#: templates/_layout.html:93 templates/_layout.html.py:102 msgid "All" msgstr "Todas" -#: templates/_layout.html:66 templates/account/password_reset_from_key.html:49 +#: templates/_layout.html:48 templates/_layout.html.py:100 +msgid "Cards" +msgstr "Tarjetas" + +#: templates/_layout.html:63 templates/account/password_reset_from_key.html:49 msgid "Change password" msgstr "Cambiar contraseña" -#: templates/_layout.html:67 +#: templates/_layout.html:64 msgid "Emails" msgstr "Emails" -#: templates/_layout.html:69 +#: templates/_layout.html:66 msgid "Log out" msgstr "Cerrar sesión" -#: templates/_layout.html:74 +#: templates/_layout.html:71 msgid "Login" msgstr "Iniciar sesión" -#: templates/_layout.html:77 +#: templates/_layout.html:74 msgid "Register" msgstr "Registrarse" -#: templates/_layout.html:141 +#: templates/_layout.html:130 msgid "Select desired currency" msgstr "Seleccionar moneda" -#: templates/_layout.html:149 +#: templates/_layout.html:138 msgid "Language" msgstr "Idioma" @@ -287,31 +308,70 @@ msgid "" "Already have an account? Then please sign in." msgstr "¿Ya tienes una cuenta? Inicia sesión." -#: templates/amiibo/amiibo.html:4 templates/amiibo/amiibo.html.py:6 -#: templates/amiibo/amiibo.html:7 +#: templates/amiibo/amiibo-figure.html:9 templates/amiibo/amiibo-figure.html:11 +#: templates/amiibo/amiibo-figure.html:12 #, python-format msgid "%(amiibo)s amiibo from %(collection)s in " msgstr "%(amiibo)s amiibo de %(collection)s en " -#: templates/amiibo/amiibo.html:60 -msgid "Shop" -msgstr "Tienda" +#: templates/amiibo/amiibo-figure.html:44 +msgid "Available for trade" +msgstr "Disponible para cambio" -#: templates/amiibo/amiibo.html:61 -msgid "Price" -msgstr "Precio" +#: templates/amiibo/amiibo-figure.html:46 +msgid "I do not have it" +msgstr "No lo tengo" -#: templates/amiibo/amiibo.html:76 +#: templates/amiibo/amiibo-figure.html:50 +msgid "I do not want this" +msgstr "No lo quiero" + +#: templates/amiibo/amiibo-figure.html:52 +#: templates/amiibo/amiibo-figure.html:61 +msgid "I want this" +msgstr "Lo quiero" + +#: templates/amiibo/amiibo-figure.html:54 +#: templates/amiibo/amiibo-figure.html:62 +msgid "or" +msgstr "o" + +#: templates/amiibo/amiibo-figure.html:55 +#: templates/amiibo/amiibo-figure.html:63 +msgid "I have this" +msgstr "Lo tengo" + +#: templates/amiibo/amiibo-figure.html:66 +msgid "Register and star collecting amiibo!" +msgstr "¡Regístrate y empieza a coleccionar Amiibo!" + +#: templates/amiibo/amiibo-figure.html:85 +msgid "Shops" +msgstr "Tiendas" + +#: templates/amiibo/amiibo-figure.html:99 +msgid "Buy now for" +msgstr "Comprar ahora por" + +#: templates/amiibo/amiibo-figure.html:106 +msgid "No stock" +msgstr "Sin stock" + +#: templates/amiibo/amiibo-figure.html:114 msgid "Updated " msgstr "Actualizado" -#: templates/amiibo/amiibo.html:82 +#: templates/amiibo/amiibo-figure.html:117 +msgid "This item had never been in stock" +msgstr "Este articulo nunca ha estado en stock" + +#: templates/amiibo/amiibo-figure.html:123 msgid "This is a pack of various items" msgstr "Este es un pack que contiene varios artículos" -#: templates/amiibo/amiibo.html:93 -msgid "No stock" -msgstr "Sin stock" +#: templates/amiibo/collection-cards.html:9 templates/amiibo/collection.html:29 +msgid "Search..." +msgstr "Buscar…" #: templates/amiibo/collection.html:4 templates/amiibo/collection.html.py:6 #: templates/amiibo/collection.html:7 @@ -323,9 +383,9 @@ msgstr "Amiibos de %(collection)s en " msgid "All amiibo" msgstr "Todos los amiibo" -#: templates/amiibo/collection.html:29 -msgid "Search..." -msgstr "Buscar…" +#: templates/home/home.html:9 +msgid "Welcome to amiibofindr!" +msgstr "¡Bienvenido a Amiibofindr!" #: templates/socialaccount/connections.html:5 #: templates/socialaccount/connections.html:10 @@ -352,3 +412,9 @@ msgstr "Asociar una red social" #: urls.py:36 msgid "^account/" msgstr "^mi-cuenta/" + +#~ msgid "^(?P[\\w\\d\\-]+)/(?P[\\w\\d\\-]+)$" +#~ msgstr "^(?P[\\w\\d\\-]+)/(?P[\\w\\d\\-]+)$" + +#~ msgid "Price" +#~ msgstr "Precio" diff --git a/amiibofindr/templates/_layout.html b/amiibofindr/templates/_layout.html index 35006c1..290c0bf 100644 --- a/amiibofindr/templates/_layout.html +++ b/amiibofindr/templates/_layout.html @@ -31,12 +31,12 @@