mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Update the pokedex.db.tables docs.
This commit is contained in:
parent
825d40c51e
commit
db466bbebf
1 changed files with 3 additions and 8 deletions
|
@ -16,13 +16,8 @@ Columns have a info dictionary with these keys:
|
||||||
for translation.
|
for translation.
|
||||||
- latex: A formula in LaTeX syntax.
|
- latex: A formula in LaTeX syntax.
|
||||||
|
|
||||||
A localizable text column is visible as two properties:
|
See `pokedex.db.multilang` for how localizable text columns work. The session
|
||||||
The plural-name property (e.g. Pokemon.names) is a language-to-name dictionary:
|
classes in that module can be used to change the default language.
|
||||||
bulbasaur.names['en'] == "Bulbasaur" and bulbasaur.names['de'] == "Bisasam".
|
|
||||||
You can use Pokemon.names['en'] to filter a query.
|
|
||||||
The singular-name property returns the name in the default language, English.
|
|
||||||
For example bulbasaur.name == "Bulbasaur"
|
|
||||||
Setting pokedex.db.tables.default_lang changes the default language.
|
|
||||||
"""
|
"""
|
||||||
# XXX: Check if "gametext" is set correctly everywhere
|
# XXX: Check if "gametext" is set correctly everywhere
|
||||||
|
|
||||||
|
@ -72,7 +67,7 @@ TableBase = declarative_base(metadata=metadata, cls=TableSuperclass)
|
||||||
### Need Language first, to create the partial() below
|
### Need Language first, to create the partial() below
|
||||||
|
|
||||||
class Language(TableBase):
|
class Language(TableBase):
|
||||||
u"""A language the Pokémon games have been transleted into
|
u"""A language the Pokémon games have been translated into
|
||||||
"""
|
"""
|
||||||
__tablename__ = 'languages'
|
__tablename__ = 'languages'
|
||||||
__singlename__ = 'language'
|
__singlename__ = 'language'
|
||||||
|
|
Loading…
Reference in a new issue