Since some languages translate byte units like 'GiB' or write them in their
own script, this patch wraps units in the `gettext` function.
While most occurrences of byte strings can be translated within the
`format_size` function in `proxmox-widget-toolkit/src/Utils.js`, this patch
catches those instances that are not translated.
Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
{
xtype: 'numberfield',
name: 'db_dev_size',
- fieldLabel: gettext('DB size') + ' (GiB)',
+ fieldLabel: `${gettext('DB size')} (${gettext('GiB')})`,
minValue: 1,
maxValue: 128*1024,
decimalPrecision: 2,
{
xtype: 'numberfield',
name: 'wal_dev_size',
- fieldLabel: gettext('WAL size') + ' (GiB)',
+ fieldLabel: `${gettext('WAL size')} (${gettext('GiB')})`,
minValue: 0.5,
maxValue: 128*1024,
decimalPrecision: 2,
xtype: 'numberfield',
itemId: 'disksize',
name: 'disksize',
- fieldLabel: gettext('Disk size') + ' (GiB)',
+ fieldLabel: `${gettext('Disk size')} (${gettext('GiB')})`,
hidden: me.hideSize,
disabled: me.hideSize,
minValue: 0.001,
maxValue: 128*1024,
decimalPrecision: 3,
value: '0',
- fieldLabel: gettext('Size Increment') + ' (GiB)',
+ fieldLabel: `${gettext('Size Increment')} (${gettext('GiB')})`,
allowBlank: false,
});
maxValue: 128*1024,
decimalPrecision: 3,
value: '0',
- fieldLabel: gettext('Size Increment') + ' (GiB)',
+ fieldLabel: `${gettext('Size Increment')} (${gettext('GiB')})`,
allowBlank: false,
});