diff --git a/merge_i18n.py b/merge_i18n.py index ef390843..37c981c7 100644 --- a/merge_i18n.py +++ b/merge_i18n.py @@ -48,8 +48,11 @@ def parse_build_sh(build_sh_path): def find_module_i18n_dir(module_name): - """查找模块的 i18n 目录""" + """查找模块的 i18n 目录(先查 repos/ 同级目录,再查 sage/pkgs/ 内)""" candidate = REPOS_DIR / module_name / 'i18n' + if candidate.is_dir(): + return candidate + candidate = SAGE_DIR / 'pkgs' / module_name / 'i18n' if candidate.is_dir(): return candidate return None