Change arg to disable translation, rather than to have no effect

- translation output is enabled by default
This commit is contained in:
Daniel Wong
2023-07-14 20:22:31 +10:00
parent a91dac2a3c
commit a8d7b4b710

View File

@@ -267,14 +267,11 @@ parser.add_argument(
choices=["all", "github_actions"] + list(chapter_to_build_variants.keys()),
)
parser.add_argument("--force-download", default=False, action='store_true')
parser.add_argument("--translation", default=False, action='store_true')
parser.add_argument("--disable-translation", default=False, action='store_true')
args = parser.parse_args()
force_download = args.force_download
# NOTE: For now, translation archive output is always enabled, as most of the time this script will be used for translators
translation = args.translation
# Get chapter name from git tag if "github_actions" specified as the chapter
chapter_name = args.chapter
if chapter_name == "github_actions":
@@ -285,13 +282,21 @@ if chapter_name == "github_actions":
)
exit(0)
# NOTE: For now, translation archive output is always enabled, as most of the time this script will be used for translators
# NOTE: For now, translation archive output is enabled by default, as most of the time this script will be used for translators
translation = True
if args.disable_translation:
translation = False
# Get a list of build variants (like 'onikakushi 5.2.2f1 win') depending on commmand line arguments
build_variants = get_build_variants(chapter_name)
build_variants_list = "\n - ".join([b.get_build_command() for b in build_variants])
print(f"For chapter '{chapter_name}' building:\n - {build_variants_list}")
print(f"-------- Build Started --------")
print(f"Chapter: [{chapter_name}] | Translation Archive Output: [{('Enabled' if translation else 'Disabled')}]")
print(f"Variants:")
print(f" - {build_variants_list}")
print(f"-------------------------------")
print()
# Install python dependencies
print("Installing python dependencies")