[pve-devel] [PATCH manager 3/3] add more verbose warning for node shutdown/reboot
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed May 24 14:53:57 CEST 2017
On Wed, May 24, 2017 at 12:16:39PM +0200, Emmanuel Kasper wrote:
> On 05/12/2017 12:14 PM, Thomas Lamprecht wrote:
> > Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> > ---
> >
> > I'm open for better warning message suggestions :-)
>
> I would reuse the already localized gettext String "Stop all VMs and
> Containers".
That's a different form, though. But, a grep through www/ shows that we
mostly use "VMs and Containers", I can't find "VMs and CTs".
(Personally I'd go for "guests", but meh...)
Actually the entire message is weird. Why can't this be a well
formulated "Are you sure you want to shutdown $node and all its
currently running guests?" text? Reusing bits and pieces for the sake of
reducing the translation workload results in both weird texts and weird
translations. Word order is a thing.
printf(gettext("%s hits %s with a %s\n"), user1, user2, "stick");
--
msgid "%s hits %s with a %s\n"
msgstr "%1$s : <img src=\"icons/%3$s.png\"/> @ %2$s\n"
https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices
>
> There was the bug report #1095 which you can close with your commit.
>
> ACK for the rest.
>
> > www/manager6/node/Config.js | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
> > index be3393bb..e1f2a69f 100644
> > --- a/www/manager6/node/Config.js
> > +++ b/www/manager6/node/Config.js
> > @@ -84,7 +84,8 @@ Ext.define('PVE.node.Config', {
> > text: gettext('Restart'),
> > disabled: !caps.nodes['Sys.PowerMgmt'],
> > dangerous: true,
> > - confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Restart'),
> > + confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Restart')
> > + + '<br /><br />' + gettext('Powers off all VMs and CTs!'),
> > handler: function() {
> > node_command('reboot');
> > },
> > @@ -95,7 +96,8 @@ Ext.define('PVE.node.Config', {
> > text: gettext('Shutdown'),
> > disabled: !caps.nodes['Sys.PowerMgmt'],
> > dangerous: true,
> > - confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Shutdown'),
> > + confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Shutdown')
> > + + '<br /><br />' + gettext('Powers off all VMs and CTs!'),
> > handler: function() {
> > node_command('shutdown');
> > },
> >
More information about the pve-devel
mailing list