[pve-devel] [PATCH manager v2 2/3] improve some translatable strings

Shannon Sterz s.sterz at proxmox.com
Wed Jul 30 14:49:08 CEST 2025


On Wed Jul 30, 2025 at 12:38 PM CEST, Maximiliano Sandoval wrote:
> In certain languages (e.g. spanish) CT and VM would have different
> genders, hence it is not possible to use the same string.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
> ---
>  www/manager6/dc/MetricServerView.js |  2 +-
>  www/manager6/window/Restore.js      | 11 +++++------
>  2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/www/manager6/dc/MetricServerView.js b/www/manager6/dc/MetricServerView.js
> index 26e89923..683e91fd 100644
> --- a/www/manager6/dc/MetricServerView.js
> +++ b/www/manager6/dc/MetricServerView.js
> @@ -369,7 +369,7 @@ Ext.define('PVE.dc.InfluxDBEdit', {
>                  {
>                      xtype: 'proxmoxintegerfield',
>                      name: 'max-body-size',
> -                    fieldLabel: gettext('Batch Size (b)'),
> +                    fieldLabel: gettext('Batch Size (bits)'),

nit: this is unrelated to the reasoning above, might be nice to add some
information about this too and/or split it out

>                      minValue: 1,
>                      emptyText: '25000000',
>                      submitEmpty: false,
> diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
> index 690116df..7fb0167b 100644
> --- a/www/manager6/window/Restore.js
> +++ b/www/manager6/window/Restore.js
> @@ -93,13 +93,12 @@ Ext.define('PVE.window.Restore', {
>              };
>
>              if (view.vmid) {
> -                confirmMsg += `. ${Ext.String.format(
> -                    gettext('This will permanently erase current {0} data.'),
> -                    view.vmtype === 'lxc' ? 'CT' : 'VM',
> -                )}`;
> -                if (view.vmtype === 'lxc') {
> +                if (view.vmtype === 'lxc')
> +                    confirmMsg += `. ${gettext('This will permanently erase current CT data.')}`;
>                      confirmMsg += `<br>${gettext('Mount point volumes are also erased.')}`;
> -                }
> +                } else {
> +                    confirmMsg += `. ${gettext('This will permanently erase current VM data.')}`;
> +                };
>                  Ext.Msg.confirm(gettext('Confirm'), confirmMsg, function (btn) {
>                      if (btn === 'yes') {
>                          executeRestore();





More information about the pve-devel mailing list