Add translations check script (#34272)

This commit is contained in:
Paulus Schoutsen
2020-04-15 16:58:20 -07:00
committed by GitHub
parent d011b46985
commit 1ffc3a00e7
13 changed files with 106 additions and 40 deletions

View File

@@ -21,9 +21,7 @@ def main():
args = get_arguments()
module = importlib.import_module(f".{args.action}", "script.translations")
module.run()
return 0
return module.run()
if __name__ == "__main__":

View File

@@ -68,3 +68,5 @@ def run():
print("Deleting keys:", ", ".join(map(str, to_delete)))
print(lokalise.keys_delete_multiple(to_delete))
return 0

View File

@@ -61,3 +61,5 @@ def run():
)
download.write_integration_translations()
return 0

View File

@@ -149,3 +149,5 @@ def run():
run_download_docker()
write_integration_translations()
return 0

View File

@@ -48,3 +48,5 @@ def run():
print()
print("Updating keys")
pprint(lokalise.keys_bulk_update(updates).json())
return 0

View File

@@ -82,3 +82,5 @@ def run():
LOCAL_FILE.write_text(json.dumps(translations, indent=4, sort_keys=True))
run_upload_docker()
return 0

View File

@@ -13,7 +13,7 @@ def get_base_arg_parser():
parser.add_argument(
"action",
type=str,
choices=["download", "clean", "upload", "develop", "migrate"],
choices=["clean", "develop", "download", "migrate", "upload"],
)
parser.add_argument("--debug", action="store_true", help="Enable log output")
return parser