fix #14 - Figurines : ajout de nouveaux types, parmi :
* Battle pack * Level pack (anciennement world) * Expansion pack * Trophy (pour les trophés Skylanders) * Trap (pour les pièges de cristal de Skylanders)
This commit is contained in:
parent
bb9869df73
commit
2db9340f3d
@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-02-04 13:26+0000\n"
|
||||
"PO-Revision-Date: 2018-02-04 14:07+0100\n"
|
||||
"POT-Creation-Date: 2018-02-04 20:18+0000\n"
|
||||
"PO-Revision-Date: 2018-02-04 19:02+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
@ -45,11 +45,11 @@ msgstr "état"
|
||||
msgid "date"
|
||||
msgstr "date"
|
||||
|
||||
#: figurines/admin.py:10
|
||||
#: figurines/admin.py:9
|
||||
msgid "Information"
|
||||
msgstr "Information"
|
||||
|
||||
#: figurines/admin.py:12 games/admin.py:65
|
||||
#: figurines/admin.py:11 games/admin.py:65
|
||||
msgid "Progress"
|
||||
msgstr "Progression"
|
||||
|
||||
@ -65,47 +65,63 @@ msgstr "collections"
|
||||
msgid "Usual name of figurines set."
|
||||
msgstr "Nom habituel de la collection de figurines."
|
||||
|
||||
#: figurines/models.py:40
|
||||
#: figurines/models.py:44
|
||||
msgid "Character"
|
||||
msgstr "Personnage"
|
||||
|
||||
#: figurines/models.py:41
|
||||
#: figurines/models.py:45
|
||||
msgid "Vehicle"
|
||||
msgstr "Véhicule"
|
||||
|
||||
#: figurines/models.py:42
|
||||
msgid "World"
|
||||
msgstr "Monde"
|
||||
#: figurines/models.py:46
|
||||
msgid "Level pack"
|
||||
msgstr "Niveau supplémentaire"
|
||||
|
||||
#: figurines/models.py:43
|
||||
#: figurines/models.py:47
|
||||
msgid "Gadget"
|
||||
msgstr "Gadget"
|
||||
|
||||
#: figurines/models.py:48
|
||||
msgid "Battle pack"
|
||||
msgstr "Arène supplémentaire"
|
||||
|
||||
#: figurines/models.py:49
|
||||
msgid "Expansion pack"
|
||||
msgstr "Extension"
|
||||
|
||||
#: figurines/models.py:50
|
||||
msgid "Trophy"
|
||||
msgstr "Trophé"
|
||||
|
||||
#: figurines/models.py:51
|
||||
msgid "Trap"
|
||||
msgstr "Piège"
|
||||
|
||||
#: figurines/models.py:57
|
||||
msgid "kind"
|
||||
msgstr "sorte"
|
||||
|
||||
#: figurines/models.py:53 games/models.py:67
|
||||
#: figurines/models.py:61 games/models.py:67
|
||||
msgid "wish?"
|
||||
msgstr "envie de l'avoir ?"
|
||||
|
||||
#: figurines/models.py:54
|
||||
#: figurines/models.py:62
|
||||
msgid "You need this figurine."
|
||||
msgstr "Vous avez besoin de cette figurine."
|
||||
|
||||
#: figurines/models.py:58
|
||||
#: figurines/models.py:66
|
||||
msgid "coins"
|
||||
msgstr "monnaie"
|
||||
|
||||
#: figurines/models.py:65
|
||||
#: figurines/models.py:73
|
||||
msgid "Figurine denomination"
|
||||
msgstr "Dénomination de la figurine"
|
||||
|
||||
#: figurines/models.py:66
|
||||
#: figurines/models.py:74
|
||||
msgid "Becoming set"
|
||||
msgstr "Collection d'où cela provient"
|
||||
|
||||
#: figurines/models.py:67
|
||||
#: figurines/models.py:75
|
||||
msgid "Figurine progression"
|
||||
msgstr "Progression de la figurine"
|
||||
|
||||
|
35
collection/figurines/migrations/0007_new_kinds.py
Normal file
35
collection/figurines/migrations/0007_new_kinds.py
Normal file
@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.9 on 2018-02-04 19:34
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('figurines', '0006_add_coins'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='figurine',
|
||||
name='kind',
|
||||
field=models.CharField(
|
||||
choices=[('character', 'Character'), ('vehicle', 'Vehicle'),
|
||||
('world', 'Level pack'), ('gadget', 'Gadget'),
|
||||
('battle', 'Battle pack'), ('expansion',
|
||||
'Expansion pack'),
|
||||
('trophy', 'Trophy'), ('trap', 'Trap')],
|
||||
default='character',
|
||||
max_length=30,
|
||||
verbose_name='kind'), ),
|
||||
migrations.AlterField(
|
||||
model_name='figurine',
|
||||
name='name',
|
||||
field=models.CharField(
|
||||
help_text='Figurine denomination',
|
||||
max_length=255,
|
||||
verbose_name='name'), ),
|
||||
]
|
@ -1,4 +1,5 @@
|
||||
from core.models import Collection, Item, Timeline
|
||||
from core.models import Collection
|
||||
from core.models import Item
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
@ -7,14 +8,16 @@ class Set(Collection):
|
||||
"""
|
||||
Common name used to describe a set of characters, objects or vehicles
|
||||
"""
|
||||
|
||||
def __str__(self):
|
||||
return '%s' % self.name
|
||||
|
||||
class Meta:
|
||||
ordering = ('name',)
|
||||
ordering = ('name', )
|
||||
verbose_name = _('set')
|
||||
verbose_name_plural = _('sets')
|
||||
|
||||
|
||||
# Redefine help_text (for documentation, API, etc.)
|
||||
Set._meta.get_field('name').help_text = _('Usual name of figurines set.')
|
||||
|
||||
@ -36,12 +39,19 @@ class Figurine(Item):
|
||||
VEHICLE = 'vehicle'
|
||||
WORLD = 'world'
|
||||
GADGET = 'gadget'
|
||||
BATTLE = 'battle'
|
||||
EXPANSION = 'expansion'
|
||||
TROPHY = 'trophy'
|
||||
TRAP = 'trap'
|
||||
KIND_CHOICES = (
|
||||
(CHARACTER, _('Character')),
|
||||
(VEHICLE, _('Vehicle')),
|
||||
(WORLD, _('World')),
|
||||
(WORLD, _('Level pack')),
|
||||
(GADGET, _('Gadget')),
|
||||
)
|
||||
(BATTLE, _('Battle pack')),
|
||||
(EXPANSION, _('Expansion pack')),
|
||||
(TROPHY, _('Trophy')),
|
||||
(TRAP, _('Trap')), )
|
||||
kind = models.CharField(
|
||||
max_length=30,
|
||||
choices=KIND_CHOICES,
|
||||
@ -54,11 +64,11 @@ class Figurine(Item):
|
||||
help_text=_('You need this figurine.'))
|
||||
|
||||
# How money does your figurine have?
|
||||
coins = models.PositiveIntegerField(default=0, null=True, blank=True,
|
||||
verbose_name=_('coins'))
|
||||
coins = models.PositiveIntegerField(
|
||||
default=0, null=True, blank=True, verbose_name=_('coins'))
|
||||
|
||||
class Meta:
|
||||
ordering = ('name',)
|
||||
ordering = ('name', )
|
||||
|
||||
|
||||
# Redefine help_text (for documentation, API, etc.)
|
||||
|
Loading…
Reference in New Issue
Block a user