mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix i18n string test
This commit is contained in:
parent
c7dd881774
commit
882b003bd7
2 changed files with 10 additions and 7 deletions
|
@ -2103,11 +2103,11 @@ def _set_default_ask_questions(arguments):
|
||||||
# type namei
|
# type namei
|
||||||
# N.B. : this is only for install script ... should be reworked for other
|
# N.B. : this is only for install script ... should be reworked for other
|
||||||
# scripts if we supports args for other scripts in the future...
|
# scripts if we supports args for other scripts in the future...
|
||||||
questions_with_default = [("domain", "domain"),
|
questions_with_default = [("domain", "domain"), # i18n: app_manifest_install_ask_domain
|
||||||
("path", "path"),
|
("path", "path"), # i18n: app_manifest_install_ask_path
|
||||||
("password", "password"),
|
("password", "password"), # i18n: app_manifest_install_ask_password
|
||||||
("user", "admin"),
|
("user", "admin"), # i18n: app_manifest_install_ask_admin
|
||||||
("boolean", "is_public")]
|
("boolean", "is_public")] # i18n: app_manifest_install_ask_is_public
|
||||||
|
|
||||||
for script_name, arg_list in arguments.items():
|
for script_name, arg_list in arguments.items():
|
||||||
|
|
||||||
|
@ -2118,7 +2118,7 @@ def _set_default_ask_questions(arguments):
|
||||||
for arg in arg_list:
|
for arg in arg_list:
|
||||||
|
|
||||||
# Do not override 'ask' field if provided by app ?... Or shall we ?
|
# Do not override 'ask' field if provided by app ?... Or shall we ?
|
||||||
#if "ask" in arg:
|
# if "ask" in arg:
|
||||||
# continue
|
# continue
|
||||||
|
|
||||||
# If this arg corresponds to a question with default ask message...
|
# If this arg corresponds to a question with default ask message...
|
||||||
|
@ -2130,7 +2130,6 @@ def _set_default_ask_questions(arguments):
|
||||||
return arguments
|
return arguments
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _get_git_last_commit_hash(repository, reference='HEAD'):
|
def _get_git_last_commit_hash(repository, reference='HEAD'):
|
||||||
"""
|
"""
|
||||||
Attempt to retrieve the last commit hash of a git repository
|
Attempt to retrieve the last commit hash of a git repository
|
||||||
|
|
|
@ -23,8 +23,10 @@ def find_expected_string_keys():
|
||||||
# Try to find :
|
# Try to find :
|
||||||
# m18n.n( "foo"
|
# m18n.n( "foo"
|
||||||
# YunohostError("foo"
|
# YunohostError("foo"
|
||||||
|
# # i18n: foo
|
||||||
p1 = re.compile(r'm18n\.n\(\s*[\"\'](\w+)[\"\']')
|
p1 = re.compile(r'm18n\.n\(\s*[\"\'](\w+)[\"\']')
|
||||||
p2 = re.compile(r'YunohostError\([\'\"](\w+)[\'\"]')
|
p2 = re.compile(r'YunohostError\([\'\"](\w+)[\'\"]')
|
||||||
|
p3 = re.compile(r'# i18n: [\'\"]?(\w+)[\'\"]?')
|
||||||
|
|
||||||
python_files = glob.glob("src/yunohost/*.py")
|
python_files = glob.glob("src/yunohost/*.py")
|
||||||
python_files.extend(glob.glob("src/yunohost/utils/*.py"))
|
python_files.extend(glob.glob("src/yunohost/utils/*.py"))
|
||||||
|
@ -42,6 +44,8 @@ def find_expected_string_keys():
|
||||||
if m.endswith("_"):
|
if m.endswith("_"):
|
||||||
continue
|
continue
|
||||||
yield m
|
yield m
|
||||||
|
for m in p3.findall(content):
|
||||||
|
yield m
|
||||||
|
|
||||||
# For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries)
|
# For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries)
|
||||||
# Also we expect to have "diagnosis_description_<name>" for each diagnosis
|
# Also we expect to have "diagnosis_description_<name>" for each diagnosis
|
||||||
|
|
Loading…
Add table
Reference in a new issue