[pve-devel] [PATCH manager v2 3/3] Add a proper confirmation message when we detach an used disk
Dominik Csapak
d.csapak at proxmox.com
Mon Nov 27 09:49:36 CET 2017
On 11/15/2017 11:54 AM, Emmanuel Kasper wrote:
> Signed-off-by: Emmanuel Kasper <e.kasper at proxmox.com>
> ---
> www/manager6/qemu/HardwareView.js | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
> index 2cd0c940..e6bc0231 100644
> --- a/www/manager6/qemu/HardwareView.js
> +++ b/www/manager6/qemu/HardwareView.js
> @@ -402,9 +402,16 @@ Ext.define('PVE.qemu.HardwareView', {
> disabled: true,
> dangerous: true,
> confirmMsg: function(rec) {
> - var msg = Ext.String.format(gettext('Are you sure you want to remove entry {0}'),
> - "'" + me.renderKey(rec.data.key, {}, rec) + "'");
> - if (rec.data.key.match(/^unused\d+$/)) {
> + var warn = 'Are you sure you want to remove entry {0}';
> + if (this.text === this.altText) {
> + warn = 'Are you sure you want to detach entry {0}';
> + }
> +
> + var entry = rec.data.key;
> + var msg = Ext.String.format(gettext(warn), "'"
this trips up the po-file generator, since it does not know what string
to write
better to wrap the two strings in a gettext and use the warn variable
directly
> + + me.renderKey(entry, {}, rec) + "'");
> +
> + if (entry.match(/^unused\d+$/)) {
> msg += " " + gettext('This will permanently erase all data.');
> }
>
>
More information about the pve-devel
mailing list