mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Port the Markdown value tests from spline-pokedex. Fix remaining strings.
This commit is contained in:
parent
f7a9c28e60
commit
b711edd511
4 changed files with 68 additions and 20 deletions
pokedex/db
|
@ -142,6 +142,8 @@ def create_translation_table(_table_name, foreign_class, relation_name,
|
|||
def getset_factory(underlying_type, instance):
|
||||
def getter(translations):
|
||||
text = getattr(translations, column.name)
|
||||
if text is None:
|
||||
return text
|
||||
session = object_session(translations)
|
||||
language = translations.local_language
|
||||
return string_getter(text, session, language)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue