diff --git a/.github/workflows/translate-locale-reusable.yml b/.github/workflows/translate-locale-reusable.yml index a5ed3ae13..98de5d73b 100644 --- a/.github/workflows/translate-locale-reusable.yml +++ b/.github/workflows/translate-locale-reusable.yml @@ -96,12 +96,20 @@ jobs: import re from pathlib import Path - source_hash_re = re.compile(r'^x-i18n:\n(?: .*\n)*? source_hash: ([0-9a-f]{64})$', re.M) + source_hash_re = re.compile(r'^x-i18n:\n(?:[ \t]+.*\n)*?[ \t]+source_hash: ([0-9a-f]{64})$', re.M) locale_dir_re = re.compile(r"^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})?$") + + def is_locale_dir(path: Path) -> bool: + return ( + path.is_dir() + and locale_dir_re.match(path.name) + and (path / ".i18n" / "README.md").exists() + ) + locale_dirs = { path.name for path in Path("docs").iterdir() - if path.is_dir() and locale_dir_re.match(path.name) + if is_locale_dir(path) } locale = os.environ["LOCALE"] pending_path = Path(".openclaw-sync") / f"docs-i18n-{os.environ['LOCALE_SLUG']}.txt" diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 7737a9a2d..cc94a6724 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "bb55e23c67b87f01ccc4c85f302a7cceadf20b44", - "syncedAt": "2026-04-23T05:52:24.970Z" + "sha": "5bd8254f611760e364e95dc6d19810467db8dfcb", + "syncedAt": "2026-04-23T06:16:00.841Z" }