Card i18n
This commit is contained in:
parent
40fde99d15
commit
8332888d5c
|
@ -7,7 +7,7 @@ from django.conf import settings
|
|||
from django.core.urlresolvers import reverse
|
||||
from django.db import models
|
||||
from django.utils.text import slugify
|
||||
from django.utils.translation import activate, deactivate, get_language
|
||||
from django.utils.translation import ugettext_lazy as _, get_language
|
||||
|
||||
from amazonify import amazonify
|
||||
|
||||
|
@ -205,9 +205,48 @@ class AmiiboCard(Amiibo):
|
|||
PAPER = 'paper'
|
||||
SCISSORS = 'scissors'
|
||||
RPS_CHOICES = (
|
||||
(ROCK, 'Rock'),
|
||||
(PAPER, 'Paper'),
|
||||
(SCISSORS, 'Scissors'),
|
||||
(ROCK, _('Rock')),
|
||||
(PAPER, _('Paper')),
|
||||
(SCISSORS, _('Scissors')),
|
||||
)
|
||||
|
||||
CARD_TYPE_CHOICES = (
|
||||
('alligator', _('Alligator')),
|
||||
('anteater', _('Anteater')),
|
||||
('bear', _('Bear')),
|
||||
('bird', _('Bird')),
|
||||
('bull', _('Bull')),
|
||||
('cat', _('Cat')),
|
||||
('chicken', _('Chicken')),
|
||||
('cow', _('Cow')),
|
||||
('cub', _('Cub')),
|
||||
('deer', _('Deer')),
|
||||
('dog', _('Dog')),
|
||||
('duck', _('Duck')),
|
||||
('eagle', _('Eagle')),
|
||||
('elephant', _('Elephant')),
|
||||
('frog', _('Frog')),
|
||||
('goat', _('Goat')),
|
||||
('gorilla', _('Gorilla')),
|
||||
('hamster', _('Hamster')),
|
||||
('hippo', _('Hippo')),
|
||||
('horse', _('Horse')),
|
||||
('kangaroo', _('Kangaroo')),
|
||||
('koala', _('Koala')),
|
||||
('lion', _('Lion')),
|
||||
('monkey', _('Monkey')),
|
||||
('mouse', _('Mouse')),
|
||||
('octopus', _('Octopus')),
|
||||
('ostrich', _('Ostrich')),
|
||||
('penguin', _('Penguin')),
|
||||
('pig', _('Pig')),
|
||||
('rabbit', _('Rabbit')),
|
||||
('rhino', _('Rhino')),
|
||||
('sheep', _('Sheep')),
|
||||
('special', _('Special')),
|
||||
('squirrel', _('Squirrel')),
|
||||
('tiger', _('Tiger')),
|
||||
('wolf', _('Wolf')),
|
||||
)
|
||||
|
||||
image = models.ImageField(upload_to=image_card_upload)
|
||||
|
@ -219,6 +258,9 @@ class AmiiboCard(Amiibo):
|
|||
class Meta:
|
||||
ordering = ('collection', 'collection_number', 'name_eu', )
|
||||
|
||||
def get_card_type_display(self):
|
||||
return dict(self.CARD_TYPE_CHOICES)[self.card_type]
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return ('amiibo:card-detail',
|
||||
|
|
|
@ -7,8 +7,8 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-10 21:02+0200\n"
|
||||
"PO-Revision-Date: 2015-09-10 21:10+0200\n"
|
||||
"POT-Creation-Date: 2015-09-10 21:36+0200\n"
|
||||
"PO-Revision-Date: 2015-09-10 21:38+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: es\n"
|
||||
|
@ -18,6 +18,162 @@ msgstr ""
|
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 1.8.4\n"
|
||||
|
||||
#: apps/amiibo/models.py:208
|
||||
msgid "Rock"
|
||||
msgstr "Piedra"
|
||||
|
||||
#: apps/amiibo/models.py:209
|
||||
msgid "Paper"
|
||||
msgstr "Papel"
|
||||
|
||||
#: apps/amiibo/models.py:210
|
||||
msgid "Scissors"
|
||||
msgstr "Tijera"
|
||||
|
||||
#: apps/amiibo/models.py:214
|
||||
msgid "Alligator"
|
||||
msgstr "Caimán"
|
||||
|
||||
#: apps/amiibo/models.py:215
|
||||
msgid "Anteater"
|
||||
msgstr "Oso hormiguero"
|
||||
|
||||
#: apps/amiibo/models.py:216
|
||||
msgid "Bear"
|
||||
msgstr "Oso"
|
||||
|
||||
#: apps/amiibo/models.py:217
|
||||
msgid "Bird"
|
||||
msgstr "Pájaro"
|
||||
|
||||
#: apps/amiibo/models.py:218
|
||||
msgid "Bull"
|
||||
msgstr "Toro"
|
||||
|
||||
#: apps/amiibo/models.py:219
|
||||
msgid "Cat"
|
||||
msgstr "Gato"
|
||||
|
||||
#: apps/amiibo/models.py:220
|
||||
msgid "Chicken"
|
||||
msgstr "Gallina"
|
||||
|
||||
#: apps/amiibo/models.py:221
|
||||
msgid "Cow"
|
||||
msgstr "Vaca"
|
||||
|
||||
#: apps/amiibo/models.py:222
|
||||
msgid "Cub"
|
||||
msgstr "Cachorro"
|
||||
|
||||
#: apps/amiibo/models.py:223
|
||||
msgid "Deer"
|
||||
msgstr "Ciervo"
|
||||
|
||||
#: apps/amiibo/models.py:224
|
||||
msgid "Dog"
|
||||
msgstr "Perro"
|
||||
|
||||
#: apps/amiibo/models.py:225
|
||||
msgid "Duck"
|
||||
msgstr "Pato"
|
||||
|
||||
#: apps/amiibo/models.py:226
|
||||
msgid "Eagle"
|
||||
msgstr "Águila"
|
||||
|
||||
#: apps/amiibo/models.py:227
|
||||
msgid "Elephant"
|
||||
msgstr "Elefante"
|
||||
|
||||
#: apps/amiibo/models.py:228
|
||||
msgid "Frog"
|
||||
msgstr "Rana"
|
||||
|
||||
#: apps/amiibo/models.py:229
|
||||
msgid "Goat"
|
||||
msgstr "Cabra"
|
||||
|
||||
#: apps/amiibo/models.py:230
|
||||
msgid "Gorilla"
|
||||
msgstr "Gorila"
|
||||
|
||||
#: apps/amiibo/models.py:231
|
||||
msgid "Hamster"
|
||||
msgstr "Hamster"
|
||||
|
||||
#: apps/amiibo/models.py:232
|
||||
msgid "Hippo"
|
||||
msgstr "Hipopótamo"
|
||||
|
||||
#: apps/amiibo/models.py:233
|
||||
msgid "Horse"
|
||||
msgstr "Caballo"
|
||||
|
||||
#: apps/amiibo/models.py:234
|
||||
msgid "Kangaroo"
|
||||
msgstr "Canguro"
|
||||
|
||||
#: apps/amiibo/models.py:235
|
||||
msgid "Koala"
|
||||
msgstr "Koala"
|
||||
|
||||
#: apps/amiibo/models.py:236
|
||||
msgid "Lion"
|
||||
msgstr "León"
|
||||
|
||||
#: apps/amiibo/models.py:237
|
||||
msgid "Monkey"
|
||||
msgstr "Mono"
|
||||
|
||||
#: apps/amiibo/models.py:238
|
||||
msgid "Mouse"
|
||||
msgstr "Ratón"
|
||||
|
||||
#: apps/amiibo/models.py:239
|
||||
msgid "Octopus"
|
||||
msgstr "Pulpo"
|
||||
|
||||
#: apps/amiibo/models.py:240
|
||||
msgid "Ostrich"
|
||||
msgstr "Avestruz"
|
||||
|
||||
#: apps/amiibo/models.py:241
|
||||
msgid "Penguin"
|
||||
msgstr "Pinguino"
|
||||
|
||||
#: apps/amiibo/models.py:242
|
||||
msgid "Pig"
|
||||
msgstr "Cerdo"
|
||||
|
||||
#: apps/amiibo/models.py:243
|
||||
msgid "Rabbit"
|
||||
msgstr "Conejo"
|
||||
|
||||
#: apps/amiibo/models.py:244
|
||||
msgid "Rhino"
|
||||
msgstr "Rinoceronte"
|
||||
|
||||
#: apps/amiibo/models.py:245
|
||||
msgid "Sheep"
|
||||
msgstr "Oveja"
|
||||
|
||||
#: apps/amiibo/models.py:246
|
||||
msgid "Special"
|
||||
msgstr "Especial"
|
||||
|
||||
#: apps/amiibo/models.py:247
|
||||
msgid "Squirrel"
|
||||
msgstr "Ardilla"
|
||||
|
||||
#: apps/amiibo/models.py:248
|
||||
msgid "Tiger"
|
||||
msgstr "Tigre"
|
||||
|
||||
#: apps/amiibo/models.py:249
|
||||
msgid "Wolf"
|
||||
msgstr "Lobo"
|
||||
|
||||
#: apps/amiibo/urls.py:16
|
||||
msgid "^cards$"
|
||||
msgstr "^tarjetas$"
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
</div>
|
||||
<div class="ui label">
|
||||
{% trans "Type" %}
|
||||
<div class="detail">{{ amiibo.card_type }}</div>
|
||||
<div class="detail">{{ amiibo.get_card_type_display }}</div>
|
||||
</div>
|
||||
<div class="ui label">
|
||||
{% trans "RPS" %}
|
||||
<div class="detail">{% trans amiibo.get_rps_display %}</div>
|
||||
<div class="detail">{{ amiibo.get_rps_display }}</div>
|
||||
</div>
|
||||
<div class="ui label">
|
||||
{% trans "Dice" %}
|
||||
|
|
Loading…
Reference in New Issue