mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix i18n key tests
This commit is contained in:
parent
1a0ef94109
commit
9e032b04bc
1 changed files with 6 additions and 2 deletions
|
@ -29,8 +29,8 @@ def find_expected_string_keys():
|
|||
# # i18n: foo
|
||||
p1 = re.compile(r"m18n\.n\(\n*\s*[\"\'](\w+)[\"\']")
|
||||
p2 = re.compile(r"YunohostError\(\n*\s*[\'\"](\w+)[\'\"]")
|
||||
p2 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]")
|
||||
p3 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?")
|
||||
p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]")
|
||||
p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?")
|
||||
|
||||
python_files = glob.glob("src/yunohost/*.py")
|
||||
python_files.extend(glob.glob("src/yunohost/utils/*.py"))
|
||||
|
@ -49,6 +49,10 @@ def find_expected_string_keys():
|
|||
continue
|
||||
yield m
|
||||
for m in p3.findall(content):
|
||||
if m.endswith("_"):
|
||||
continue
|
||||
yield m
|
||||
for m in p4.findall(content):
|
||||
yield m
|
||||
|
||||
# For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries)
|
||||
|
|
Loading…
Add table
Reference in a new issue