mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Don't dump unofficial translations in pokedex dump
(Translations cannot be dumped properly because the source string hash isn't in the database.) By default, unofficial texts are only dumped for English, but that can be configured if someone wants CSVs for different language(s). Official texts (<thing>_names rows for official languages) are always dumped.
This commit is contained in:
parent
9b7a3dc4c9
commit
817c4c289d
2 changed files with 46 additions and 18 deletions
pokedex
|
@ -108,14 +108,20 @@ 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',
|
||||
help="Comma-separated list of languages to dump all strings for. "
|
||||
"Default is English ('en')")
|
||||
options, tables = parser.parse_args(list(args))
|
||||
|
||||
session = get_session(options)
|
||||
get_csv_directory(options)
|
||||
|
||||
langs = [l.strip() for l in options.langs.split(',')]
|
||||
|
||||
pokedex.db.load.dump(session, directory=options.directory,
|
||||
tables=tables,
|
||||
verbose=options.verbose)
|
||||
verbose=options.verbose,
|
||||
langs=langs)
|
||||
|
||||
def command_load(*args):
|
||||
parser = get_parser(verbose=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue