mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
fix i18n test after format
This commit is contained in:
parent
ba3705bbc6
commit
0c382420d3
1 changed files with 5 additions and 5 deletions
|
@ -24,9 +24,9 @@ def find_expected_string_keys():
|
|||
# m18n.n( "foo"
|
||||
# YunohostError("foo"
|
||||
# # i18n: foo
|
||||
p1 = re.compile(r'm18n\.n\(\s*[\"\'](\w+)[\"\']')
|
||||
p2 = re.compile(r'YunohostError\([\'\"](\w+)[\'\"]')
|
||||
p3 = re.compile(r'# i18n: [\'\"]?(\w+)[\'\"]?')
|
||||
p1 = re.compile(r"m18n\.n\(\n*\s*[\"\'](\w+)[\"\']")
|
||||
p2 = re.compile(r"YunohostError\(\n*\s*[\'\"](\w+)[\'\"]")
|
||||
p3 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?")
|
||||
|
||||
python_files = glob.glob("src/yunohost/*.py")
|
||||
python_files.extend(glob.glob("src/yunohost/utils/*.py"))
|
||||
|
@ -78,7 +78,7 @@ def find_expected_string_keys():
|
|||
for funcname in subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n"):
|
||||
yield "log_" + funcname
|
||||
|
||||
p4 = re.compile(r"OperationLogger\([\"\'](\w+)[\"\']")
|
||||
p4 = re.compile(r"OperationLogger\(\n*\s*[\"\'](\w+)[\"\']")
|
||||
for python_file in python_files:
|
||||
content = open(python_file).read()
|
||||
for m in ("log_" + match for match in p4.findall(content)):
|
||||
|
@ -86,7 +86,7 @@ def find_expected_string_keys():
|
|||
|
||||
# Global settings descriptions
|
||||
# Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ...
|
||||
p5 = re.compile(r" \([\"\'](\w[\w\.]+)[\"\'],")
|
||||
p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],")
|
||||
content = open("src/yunohost/settings.py").read()
|
||||
for m in ("global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content)):
|
||||
yield m
|
||||
|
|
Loading…
Add table
Reference in a new issue