Ajout de la note de progression pour un jeu donné

This commit is contained in:
Olivier DOSSMANN 2017-08-26 00:23:56 +02:00
parent 6319f24499
commit c55fdf3e38
7 changed files with 100 additions and 31 deletions

View File

@ -1,5 +1,6 @@
Current version (0.2) :
- Nouveau champ 'note' pour la progression dans le jeu
- Omission de l'état "Nouveau" pour les jeux
- Traduction de l'interface en Français
- Aide contextuelle sur l'interface admin d'un jeu vidéo

4
TODO
View File

@ -8,6 +8,7 @@
## Fonctionnalités
* Unplayed ne doit pas s'afficher si on a un état différent de Unfinished
* Gérer les figurines (trouver le nom de l'objet qui permet de les regrouper, par exemple Skylanders, Disney Infinity, etc.)
* API django rest framework
* ajouter une date d'obtention du jeu vidéo (par défaut aujourd'hui) => est-ce vraiment utile si on a la Timeline ?
@ -17,6 +18,9 @@
* Sur Console
* Sur Game
* travis.yml to launch test
* Selenium pour vérifier :
* que Nouveau n'apparaisse pas dans la liste des états possibles
* que Nouveau n'apparaisse pas dans les filtres
## Données

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-24 22:23+0200\n"
"POT-Creation-Date: 2017-08-25 22:18+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Olivier DOSSMANN <git@dossmann.net>\n"
"Language-Team: \n"
@ -17,10 +17,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: collection/settings.py:114
#: collection/components/i18n.py:8
msgid "French"
msgstr "Français"
#: collection/settings.py:115
#: collection/components/i18n.py:9
msgid "English"
msgstr "Anglais"

View File

@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-24 22:23+0200\n"
"PO-Revision-Date: 2017-08-24 22:28+0200\n"
"POT-Creation-Date: 2017-08-25 22:18+0000\n"
"PO-Revision-Date: 2017-08-26 00:21+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 2.0.3\n"
#: core/models.py:7 core/models.py:28
@ -33,70 +33,90 @@ msgstr "état"
msgid "date"
msgstr "date"
#: games/models.py:14 games/models.py:24
#: games/admin.py:11
msgid "state"
msgstr "état"
#: games/admin.py:39
msgid "Game Information"
msgstr "Information du jeu"
#: games/admin.py:42
msgid "Progress"
msgstr "Progression"
#: games/models.py:15 games/models.py:25
msgid "console"
msgstr "console"
#: games/models.py:15
#: games/models.py:16
msgid "consoles"
msgstr "consoles"
#: games/models.py:35
#: games/models.py:36
msgid "Beaten"
msgstr "Terminé (quête principale)"
#: games/models.py:36
#: games/models.py:37
msgid "Completed"
msgstr "Terminé complètement"
#: games/models.py:37
#: games/models.py:38
msgid "Excluded"
msgstr "Exclu"
#: games/models.py:38
#: games/models.py:39
msgid "Mastered"
msgstr "Usé / Épuisé"
#: games/models.py:39
#: games/models.py:40
msgid "Unfinished"
msgstr "Inachevé"
#: games/models.py:46
#: games/models.py:48
msgid "Progress note"
msgstr "Note de progression"
#: games/models.py:49
msgid "Short note displayed to your followers."
msgstr "Courte note affichée à ceux qui vous suive"
#: games/models.py:54
msgid "playing?"
msgstr "en train d'y jouer ?"
#: games/models.py:47
#: games/models.py:55
msgid "You're currently playing this game."
msgstr "Vous jouez actuellement à ce jeu."
#: games/models.py:50
#: games/models.py:58
msgid "unplayed?"
msgstr "jamais joué ?"
#: games/models.py:51
#: games/models.py:59
msgid "You never played this game."
msgstr "Vous n'avez jamais joué à ce jeu."
#: games/models.py:54
#: games/models.py:62
msgid "wish?"
msgstr "envie de l'avoir ?"
#: games/models.py:55
#: games/models.py:63
msgid "You're waiting X-mas father offers you this game."
msgstr "Vous patientez que le père Noël vous offre ce jeu."
#: games/models.py:59
#: games/models.py:67
msgid "game"
msgstr "jeu"
#: games/models.py:60
#: games/models.py:68
msgid "games"
msgstr "jeux"
#: games/models.py:70
#: games/models.py:79
msgid "Timeline"
msgstr "Chronologie"
#: games/models.py:71
#: games/models.py:80
msgid "Timelines"
msgstr "Chronologies"

View File

@ -35,13 +35,17 @@ class GameAdmin(admin.ModelAdmin):
'playing',
'wish']
search_fields = ('name',)
fields = [
'name',
'collection',
'status',
'playing',
'unplayed',
'wish'
fieldsets = [
(_('Game Information'), {
'fields': [
('name', 'collection')]}),
(_('Progress'),
{'fields': [
('status'),
('note')]}),
('',
{'fields': [
('playing'), ('unplayed'), ('wish')]})
]
form = GameForm

View File

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-25 22:11
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('games', '0003_add_verbose_translatable_names'),
]
operations = [
migrations.AlterModelOptions(
name='console',
options={'ordering': ('name',), 'verbose_name': 'console', 'verbose_name_plural': 'consoles'},
),
migrations.AlterModelOptions(
name='game',
options={'ordering': ('-playing', 'name'), 'verbose_name': 'jeu', 'verbose_name_plural': 'jeux'},
),
migrations.AlterModelOptions(
name='timeline',
options={'ordering': ('-date',), 'verbose_name': 'Chronologie', 'verbose_name_plural': 'Chronologies'},
),
migrations.AddField(
model_name='game',
name='note',
field=models.CharField(help_text='Short note displayed to your followers.', max_length=150, null=True, verbose_name='Progress note'),
),
]

View File

@ -41,6 +41,13 @@ class Game(Item):
)
DEFAULT_CHOICE = UNFINISHED
# progression
note = models.CharField(
max_length=150,
null=True,
verbose_name=_('Progress note'),
help_text=_('Short note displayed to your followers.'))
# others
playing = models.BooleanField(
default=False,