fix: Un-approve Crowdin translations to allow community to vote on them (#8787)

Co-authored-by: mealie-actions[bot] <247473823+mealie-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
authored and GitHub committed 2026-10-18 21:01:59 -05:00
1 parent b5a6f28484
commit f5559876de
4 files changed
+109 -41

No files matched your search

+6 -2
View File
@@ -17,7 +17,7 @@ def main():
parser.add_argument(
"generators",
nargs="*",
help="Specific generators to run (schema, types, locales, unit-systems, data-paths, routes). If none specified, all will run.", # noqa: E501 - long line
help="Specific generators to run (schema, types, locales, unit-systems, data-paths, routes, crowdin-approvals). If none specified, all except crowdin-approvals will run.", # noqa: E501 - long line
)
args = parser.parse_args()
@@ -29,8 +29,12 @@ def main():
"unit-systems": (gen_ts_unit_systems.main, "unit systems"),
"data-paths": (gen_py_pytest_data_paths.main, "test data paths"),
"routes": (gen_py_pytest_routes.main, "pytest routes"),
"crowdin-approvals": (gen_ts_locales.remove_crowdin_approvals, "Crowdin approval removal"),
}
# Changes Crowdin rather than local files, so it only runs when requested
opt_in_generators = {"crowdin-approvals"}
# Determine which generators to run
if args.generators:
# Validate requested generators
@@ -43,7 +47,7 @@ def main():
generators_to_run = [(all_generators[g][0], all_generators[g][1]) for g in args.generators]
else:
# Run all generators (default behavior)
generators_to_run = list(all_generators.values())
generators_to_run = [value for key, value in all_generators.items() if key not in opt_in_generators]
# Run the selected generators
for func, name in generators_to_run: