1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Dump translations for official languages by default.

I don't really like this but ehhhhhhh, the system for prose
translations seems to be to keep them in csv/translations/, and I can't
figure out how you're supposed to DO that, plus judging by the age of
the single file that's in there, that seems to be where translations go
to die.
This commit is contained in:
Lynn "Zhorken" Vaughan 2014-06-01 11:40:54 -04:00
parent 684f230d66
commit 63dac87a40
2 changed files with 13 additions and 6 deletions
pokedex

View file

@ -111,7 +111,7 @@ def get_csv_directory(options):
def command_dump(*args):
parser = get_parser(verbose=True)
parser.add_option('-d', '--directory', dest='directory', default=None)
parser.add_option('-l', '--langs', dest='langs', default='en',
parser.add_option('-l', '--langs', dest='langs', default=None,
help="Comma-separated list of languages to dump all strings for. "
"Default is English ('en')")
options, tables = parser.parse_args(list(args))
@ -119,7 +119,10 @@ def command_dump(*args):
session = get_session(options)
get_csv_directory(options)
langs = [l.strip() for l in options.langs.split(',')]
if options.langs is not None:
langs = [l.strip() for l in options.langs.split(',')]
else:
langs = None
pokedex.db.load.dump(session, directory=options.directory,
tables=tables,