forked from activist-org/activist
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request activist-org#995 from zeus2611/990-i18n-local-test
feat: Function to run all i18n tests locally
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import subprocess | ||
|
||
|
||
def run_check(script_name): | ||
try: | ||
subprocess.run(["python", f"./frontend/i18n/check/{script_name}"], check=True) | ||
print(f"{script_name} ran successfully.") | ||
except subprocess.CalledProcessError as e: | ||
print(f"Error running {script_name}: {e}") | ||
raise | ||
|
||
|
||
def main(): | ||
checks = [ | ||
"i18n_check_key_identifiers.py", | ||
"i18n_check_non_source_keys.py", | ||
"i18n_check_repeat_values.py", | ||
"i18n_check_unused_keys.py", | ||
] | ||
|
||
for check in checks: | ||
run_check(check) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |