CLI to manage messages
This commit is contained in:
18
main.py
18
main.py
@ -2,8 +2,24 @@
|
||||
|
||||
# Copyright (C) 2020 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from squirrelbattle.bootstrap import Bootstrap
|
||||
from squirrelbattle.translations import Translator
|
||||
|
||||
if __name__ == "__main__":
|
||||
Bootstrap.run_game()
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("--makemessages", "-mm", action="store_true",
|
||||
help="Extract translatable strings")
|
||||
parser.add_argument("--compilemessages", "-cm", action="store_true",
|
||||
help="Compile translatable strings")
|
||||
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
if args.makemessages:
|
||||
Translator.makemessages()
|
||||
elif args.compilemessages:
|
||||
Translator.compilemessages()
|
||||
else:
|
||||
Bootstrap.run_game()
|
||||
|
Reference in New Issue
Block a user