mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix stupid encoding issue when fetching service description
This commit is contained in:
parent
8454f2ec12
commit
6ec0e7b6af
1 changed files with 10 additions and 6 deletions
|
@ -346,11 +346,15 @@ def _get_and_format_service_status(service, infos):
|
||||||
'configuration': "unknown",
|
'configuration': "unknown",
|
||||||
}
|
}
|
||||||
|
|
||||||
translation_key = "service_description_%s" % service
|
# Try to get description directly from services.yml
|
||||||
description = infos.get("description")
|
description = infos.get("description")
|
||||||
|
|
||||||
|
# If no description was there, try to get it from the .json locales
|
||||||
if not description:
|
if not description:
|
||||||
|
translation_key = "service_description_%s" % service
|
||||||
description = m18n.n(translation_key)
|
description = m18n.n(translation_key)
|
||||||
|
|
||||||
|
# If descrption is still equal to the translation key,
|
||||||
# that mean that we don't have a translation for this string
|
# that mean that we don't have a translation for this string
|
||||||
# that's the only way to test for that for now
|
# that's the only way to test for that for now
|
||||||
# if we don't have it, uses the one provided by systemd
|
# if we don't have it, uses the one provided by systemd
|
||||||
|
|
Loading…
Add table
Reference in a new issue