Commit 519e3933 authored by Dietmar Maurer's avatar Dietmar Maurer

try to minimize number of gettext strings

parent ab3b37d8
...@@ -19,6 +19,8 @@ Ext.define('PVE.openvz.Options', { ...@@ -19,6 +19,8 @@ Ext.define('PVE.openvz.Options', {
var caps = Ext.state.Manager.get('GuiCap'); var caps = Ext.state.Manager.get('GuiCap');
var quotaDisabledText = gettext('User quotas disabled.');
var rows = { var rows = {
onboot: { onboot: {
header: gettext('Start at boot'), header: gettext('Start at boot'),
...@@ -65,17 +67,19 @@ Ext.define('PVE.openvz.Options', { ...@@ -65,17 +67,19 @@ Ext.define('PVE.openvz.Options', {
defaultValue: '0', defaultValue: '0',
renderer: function(value) { renderer: function(value) {
if (value == 0) { if (value == 0) {
return 'User quotas disabled.'; return quotaDisabledText;
} }
return value; return value;
}, },
editor: caps.vms['VM.Config.Disk'] ? { editor: caps.vms['VM.Config.Disk'] ? {
xtype: 'pveWindowEdit', xtype: 'pveWindowEdit',
subject: gettext('Quota UGID limit (0 to disable user quotas)'), subject: gettext('Quota UGID limit') + ' (0 ==> ' +
quotaDisabledText + ')',
fieldDefaults: { labelWidth: 130 },
items: { items: {
xtype: 'numberfield', xtype: 'numberfield',
name: 'quotaugidlimit', name: 'quotaugidlimit',
fieldLabel: gettext('UGID limit'), fieldLabel: gettext('Quota UGID limit'),
minValue: 0, minValue: 0,
allowBlank: false allowBlank: false
} }
...@@ -86,13 +90,15 @@ Ext.define('PVE.openvz.Options', { ...@@ -86,13 +90,15 @@ Ext.define('PVE.openvz.Options', {
defaultValue: '0', defaultValue: '0',
editor: caps.vms['VM.Config.Disk'] ? { editor: caps.vms['VM.Config.Disk'] ? {
xtype: 'pveWindowEdit', xtype: 'pveWindowEdit',
subject: gettext('Quota Grace period (seconds)'), subject: gettext('Quota Grace period') + ' (' +
gettext('seconds') + ')',
fieldDefaults: { labelWidth: 130 },
items: { items: {
xtype: 'numberfield', xtype: 'numberfield',
name: 'quotatime', name: 'quotatime',
minValue: 0, minValue: 0,
allowBlank: false, allowBlank: false,
fieldLabel: 'Grace period' fieldLabel: gettext('Quota Grace period')
} }
} : undefined } : undefined
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment