From 1ed475e2a74ef49b475551ff1802c33055e7a5ac Mon Sep 17 00:00:00 2001 From: Thomas Hipp Date: Fri, 3 Nov 2023 13:22:40 +0100 Subject: [PATCH 1/2] lxc/delete: Include instance name in error message When deleting multiple instances at once, it's not clear which deletion failed as the instance name is not included in the error message. This adds the instance name to the error message. Signed-off-by: Thomas Hipp --- lxc/delete.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lxc/delete.go b/lxc/delete.go index bcca37bd679f..49cf8b4ede4e 100644 --- a/lxc/delete.go +++ b/lxc/delete.go @@ -92,6 +92,11 @@ func (c *cmdDelete) Run(cmd *cobra.Command, args []string) error { // Process with deletion. for _, resource := range resources { + connInfo, err := resource.server.GetConnectionInfo() + if err != nil { + return err + } + if c.flagInteractive { err := c.promptDelete(resource.name) if err != nil { @@ -102,7 +107,7 @@ func (c *cmdDelete) Run(cmd *cobra.Command, args []string) error { if shared.IsSnapshot(resource.name) { err := c.doDelete(resource.server, resource.name) if err != nil { - return err + return fmt.Errorf(i18n.G("Failed deleting instance snapshot %q in project %q: %w"), resource.name, connInfo.Project, err) } continue @@ -160,7 +165,7 @@ func (c *cmdDelete) Run(cmd *cobra.Command, args []string) error { err = c.doDelete(resource.server, resource.name) if err != nil { - return err + return fmt.Errorf(i18n.G("Failed deleting instance %q in project %q: %w"), resource.name, connInfo.Project, err) } } return nil From 091045c848f6c74c71c7f3a1aadc6203ee00b328 Mon Sep 17 00:00:00 2001 From: Thomas Hipp Date: Tue, 7 Nov 2023 10:34:11 +0100 Subject: [PATCH 2/2] Update translations Signed-off-by: Thomas Hipp --- po/ar.po | 16 +++++++++++++--- po/ber.po | 16 +++++++++++++--- po/bg.po | 16 +++++++++++++--- po/ca.po | 16 +++++++++++++--- po/cs.po | 16 +++++++++++++--- po/de.po | 16 +++++++++++++--- po/el.po | 16 +++++++++++++--- po/eo.po | 16 +++++++++++++--- po/es.po | 16 +++++++++++++--- po/fa.po | 16 +++++++++++++--- po/fi.po | 16 +++++++++++++--- po/fr.po | 16 +++++++++++++--- po/he.po | 16 +++++++++++++--- po/hi.po | 16 +++++++++++++--- po/id.po | 16 +++++++++++++--- po/it.po | 16 +++++++++++++--- po/ja.po | 16 +++++++++++++--- po/ka.po | 16 +++++++++++++--- po/ko.po | 16 +++++++++++++--- po/lxd.pot | 16 +++++++++++++--- po/mr.po | 16 +++++++++++++--- po/nb_NO.po | 16 +++++++++++++--- po/nl.po | 16 +++++++++++++--- po/pa.po | 16 +++++++++++++--- po/pl.po | 16 +++++++++++++--- po/pt.po | 16 +++++++++++++--- po/pt_BR.po | 16 +++++++++++++--- po/ru.po | 16 +++++++++++++--- po/si.po | 16 +++++++++++++--- po/sl.po | 16 +++++++++++++--- po/sr.po | 16 +++++++++++++--- po/sv.po | 16 +++++++++++++--- po/te.po | 16 +++++++++++++--- po/th.po | 16 +++++++++++++--- po/tr.po | 16 +++++++++++++--- po/tzm.po | 16 +++++++++++++--- po/ug.po | 16 +++++++++++++--- po/uk.po | 16 +++++++++++++--- po/zh_Hans.po | 16 +++++++++++++--- po/zh_Hant.po | 16 +++++++++++++--- 40 files changed, 520 insertions(+), 120 deletions(-) diff --git a/po/ar.po b/po/ar.po index 4bf9fe88a94e..c19d40c2a542 100644 --- a/po/ar.po +++ b/po/ar.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: lxd\n" "Report-Msgid-Bugs-To: lxd@lists.canonical.com\n" -"POT-Creation-Date: 2023-11-05 22:14+0000\n" +"POT-Creation-Date: 2023-11-07 10:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -2061,6 +2061,16 @@ msgstr "" msgid "Failed converting token operation to certificate add token: %w" msgstr "" +#: lxc/delete.go:168 +#, c-format +msgid "Failed deleting instance %q in project %q: %w" +msgstr "" + +#: lxc/delete.go:110 +#, c-format +msgid "Failed deleting instance snapshot %q in project %q: %w" +msgstr "" + #: lxc/file.go:1174 #, c-format msgid "Failed generating SSH host key: %w" @@ -5230,7 +5240,7 @@ msgstr "" msgid "Stopping instance failed!" msgstr "" -#: lxc/delete.go:134 +#: lxc/delete.go:139 #, c-format msgid "Stopping the instance failed: %s" msgstr "" @@ -5394,7 +5404,7 @@ msgstr "" msgid "The direction argument must be one of: ingress, egress" msgstr "" -#: lxc/delete.go:118 +#: lxc/delete.go:123 msgid "The instance is currently running, stop it first or pass --force" msgstr "" diff --git a/po/ber.po b/po/ber.po index 02274024a9f2..c7c070866bcf 100644 --- a/po/ber.po +++ b/po/ber.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: lxd\n" "Report-Msgid-Bugs-To: lxd@lists.canonical.com\n" -"POT-Creation-Date: 2023-11-05 22:14+0000\n" +"POT-Creation-Date: 2023-11-07 10:34+0100\n" "PO-Revision-Date: 2022-03-10 15:10+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Berber \n" "Language-Team: Bulgarian \n" "Language-Team: Catalan \n" "Language-Team: Czech \n" "Language-Team: German \n" "Language-Team: Greek \n" "Language-Team: Esperanto \n" "Language-Team: Spanish \n" "Language-Team: Persian \n" "Language-Team: Finnish \n" "Language-Team: French \n" "Language-Team: Hebrew \n" "Language-Team: Hindi \n" "Language-Team: Indonesian \n" "Language-Team: Italian \n" "Language-Team: Japanese \n" "Language-Team: Korean \n" "Language-Team: LANGUAGE \n" @@ -1849,6 +1849,16 @@ msgstr "" msgid "Failed converting token operation to certificate add token: %w" msgstr "" +#: lxc/delete.go:168 +#, c-format +msgid "Failed deleting instance %q in project %q: %w" +msgstr "" + +#: lxc/delete.go:110 +#, c-format +msgid "Failed deleting instance snapshot %q in project %q: %w" +msgstr "" + #: lxc/file.go:1174 #, c-format msgid "Failed generating SSH host key: %w" @@ -4842,7 +4852,7 @@ msgstr "" msgid "Stopping instance failed!" msgstr "" -#: lxc/delete.go:134 +#: lxc/delete.go:139 #, c-format msgid "Stopping the instance failed: %s" msgstr "" @@ -5003,7 +5013,7 @@ msgstr "" msgid "The direction argument must be one of: ingress, egress" msgstr "" -#: lxc/delete.go:118 +#: lxc/delete.go:123 msgid "The instance is currently running, stop it first or pass --force" msgstr "" diff --git a/po/mr.po b/po/mr.po index cfa23358f006..0c8b29b34eee 100644 --- a/po/mr.po +++ b/po/mr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: lxd\n" "Report-Msgid-Bugs-To: lxd@lists.canonical.com\n" -"POT-Creation-Date: 2023-11-05 22:14+0000\n" +"POT-Creation-Date: 2023-11-07 10:34+0100\n" "PO-Revision-Date: 2022-03-10 15:10+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Marathi \n" "Language-Team: Norwegian Bokmål \n" "Language-Team: Dutch \n" "Language-Team: Punjabi \n" "Language-Team: Polish \n" "Language-Team: Portuguese (Brazil) \n" "Language-Team: Russian \n" "Language-Team: Sinhala \n" "Language-Team: Slovenian \n" "Language-Team: Serbian \n" "Language-Team: Swedish \n" "Language-Team: Telugu \n" "Language-Team: Turkish \n" "Language-Team: Tamazight (Central Atlas) \n" "Language-Team: Uyghur \n" "Language-Team: Ukrainian \n" "Language-Team: Chinese (Simplified) \n" "Language-Team: Chinese (Traditional)