[services-systemd] Make user-visible messages translatable

This commit is contained in:
Adriaan de Groot 2019-02-14 18:52:19 +01:00
parent 544c1b708c
commit b7c77e7323

View File

@ -58,17 +58,16 @@ def systemctl(targets, command, suffix):
)
if ec != 0:
if mandatory:
return ("Cannot {} systemd {} {}".format(command, suffix, name),
"systemctl {} call in chroot returned error code {}".format(command, ec)
)
else:
libcalamares.utils.warning(
"Cannot {} systemd {} {}".format(command, suffix, name)
)
libcalamares.utils.warning(
"systemctl {} call in chroot returned error code {}".format(command, ec)
)
if mandatory:
return (_("Cannot {} systemd {} {}").format(command, suffix, name),
_("systemctl {} call in chroot returned error code {}").format(command, ec)
)
return None
@ -103,6 +102,4 @@ def run():
if r is not None:
return r
# This could have just been return r
return None