Skip to content

Commit

Permalink
messages: add gettext to new purge messages
Browse files Browse the repository at this point in the history
Signed-off-by: Renan Rodrigo <[email protected]>
  • Loading branch information
renanrodrigo committed Oct 3, 2023
1 parent 427a6eb commit 9376e7a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions uaclient/messages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,20 @@ class TxtColor:
)

# Kernel checks for Purge
PURGE_KERNEL_REMOVAL = (
PURGE_KERNEL_REMOVAL = t.gettext(
"Purging the {service} packages would uninstall the following kernel(s):"
)
PURGE_CURRENT_KERNEL = "{kernel_version} is the current running kernel."
PURGE_NO_ALTERNATIVE_KERNEL = """\
PURGE_CURRENT_KERNEL = t.gettext(
"{kernel_version} is the current running kernel."
)
PURGE_NO_ALTERNATIVE_KERNEL = t.gettext(
"""\
No other valid Ubuntu kernel was found in the system.
Removing the package would potentially make the system unbootable.
Aborting.
"""
PURGE_KERNEL_CONFIRMATION = (
)
PURGE_KERNEL_CONFIRMATION = t.gettext(
"""\
If you cannot guarantee that other kernels in this system are bootable and
working properly, *do not proceed*. You may end up with an unbootable system.
Expand Down Expand Up @@ -1016,7 +1020,9 @@ class TxtColor:
CLI_DISABLE_SERVICE = t.gettext(
"the name(s) of the Ubuntu Pro services to disable." " One of: {options}"
)
CLI_PURGE = "disable the service and remove/downgrade related packages"
CLI_PURGE = t.gettext(
"disable the service and remove/downgrade related packages"
)

CLI_SYSTEM_DESC = t.gettext(
"Output system related information related to Pro services"
Expand Down Expand Up @@ -1568,7 +1574,9 @@ def __repr__(self):
)
REPO_PURGE_FAIL_NO_ORIGIN = FormattedNamedMessage(
"repo-purge-fail-no-origin",
"Cannot disable {entitlement_name} with purge: no origin value defined"
t.gettext(
"Cannot disable {entitlement_name} with purge: no origin value defined"
)
+ "\n"
+ DISABLE_FAILED_TMPL,
)
Expand Down

0 comments on commit 9376e7a

Please sign in to comment.