mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
Rename --procent-translations to --report-percentages
Updated both sync_translations.py and counter_translation_v2.py to use the more descriptive --report-percentages flag instead of --procent-translations for reporting translation percentages. https://github.com/Stirling-Tools/Stirling-PDF/pull/4739#discussion_r2468528425
This commit is contained in:
parent
d46cffb00f
commit
07579373f5
4
.github/scripts/sync_translations.py
vendored
4
.github/scripts/sync_translations.py
vendored
@ -12,7 +12,7 @@ It does two things:
|
||||
Also prints a CI-friendly report (intended for PR comments).
|
||||
|
||||
Usage:
|
||||
python sync_translations.py --reference-file <path_to_reference_json> [--branch <branch_root>] [--actor <actor_name>] [--files <list_of_target_jsons>] [--check] [--prune] [--procent-translations] [--dry-run]
|
||||
python sync_translations.py --reference-file <path_to_reference_json> [--branch <branch_root>] [--actor <actor_name>] [--files <list_of_target_jsons>] [--check] [--prune] [--report-percentages] [--dry-run]
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@ -554,7 +554,7 @@ def main() -> None:
|
||||
help="Dry run: do not write changes (useful for local testing).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--procent-translations",
|
||||
"--report-percentages",
|
||||
action="store_true",
|
||||
help="Report percentage of translated values (not same as English).",
|
||||
)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
"""
|
||||
A tiny helper that updates README.md translation progress by asking
|
||||
.sync_translations.py for the per-locale percentage (via --procent-translations).
|
||||
.sync_translations.py for the per-locale percentage (via --report-percentages).
|
||||
|
||||
Author: Ludy87
|
||||
"""
|
||||
@ -32,7 +32,7 @@ def find_locale_files() -> List[Path]:
|
||||
|
||||
def percent_done_for_file(file_path: Path) -> int:
|
||||
"""
|
||||
Calls sync_translations.py --procent-translations for a single locale file.
|
||||
Calls sync_translations.py --report-percentages for a single locale file.
|
||||
Returns an int 0..100.
|
||||
"""
|
||||
# en-GB / en-US are always 100% by definition
|
||||
@ -50,7 +50,7 @@ def percent_done_for_file(file_path: Path) -> int:
|
||||
"--files",
|
||||
str(file_path),
|
||||
"--check",
|
||||
"--procent-translations",
|
||||
"--report-percentages",
|
||||
]
|
||||
res = subprocess.run(cmd, capture_output=True, text=True, check=True)
|
||||
out = res.stdout.strip()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user