add more gettext markers

This commit is contained in:
Dietmar Maurer 2011-11-25 12:42:37 +01:00
parent 46a53f1b77
commit 86d09374be
3 changed files with 50 additions and 36 deletions

View File

@ -86,7 +86,7 @@ Ext.define('PVE.storage.IScsiInputPanel', {
name: 'storage', name: 'storage',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: me.storageId || '', value: me.storageId || '',
fieldLabel: 'Storage ID', fieldLabel: 'ID',
vtype: 'StorageId', vtype: 'StorageId',
allowBlank: false allowBlank: false
}, },
@ -121,8 +121,9 @@ Ext.define('PVE.storage.IScsiInputPanel', {
{ {
xtype: 'PVE.form.NodeSelector', xtype: 'PVE.form.NodeSelector',
name: 'nodes', name: 'nodes',
fieldLabel: 'Nodes', fieldLabel: gettext('Nodes'),
emptyText: 'All (no restrictions)', emptyText: gettext('All') + ' (' +
gettext('No restrictions') +')',
multiSelect: true, multiSelect: true,
autoSelect: false autoSelect: false
}, },
@ -131,13 +132,13 @@ Ext.define('PVE.storage.IScsiInputPanel', {
name: 'enable', name: 'enable',
checked: true, checked: true,
uncheckedValue: 0, uncheckedValue: 0,
fieldLabel: 'Enable' fieldLabel: gettext('Enable')
}, },
{ {
xtype: 'checkbox', xtype: 'checkbox',
name: 'luns', name: 'luns',
checked: true, checked: true,
fieldLabel: 'Use LUNs directly' fieldLabel: gettext('Use LUNs directly')
} }
]; ];
@ -166,11 +167,14 @@ Ext.define('PVE.storage.IScsiEdit', {
storageId: me.storageId storageId: me.storageId
}); });
Ext.apply(me, { me.items = [ ipanel ];
title: me.create ? "Create iSCSI storage" :
"Edit iSCSI storage '" + me.storageId + "'", if (me.create) {
items: [ ipanel ] me.title = gettext('Create iSCSI storage');
}); } else {
me.title = Ext.String.format(gettext('Edit iSCSI storage {0}'),
"'" + me.storageId + "'");
}
me.callParent(); me.callParent();

View File

@ -37,6 +37,8 @@ Ext.define('PVE.storage.BaseStorageSelector', {
extend: 'Ext.form.field.ComboBox', extend: 'Ext.form.field.ComboBox',
alias: 'widget.pveBaseStorageSelector', alias: 'widget.pveBaseStorageSelector',
existingGroupsText: gettext("Existing volume groups"),
initComponent : function() { initComponent : function() {
var me = this; var me = this;
@ -54,7 +56,7 @@ Ext.define('PVE.storage.BaseStorageSelector', {
if (record.data.storage) { if (record.data.storage) {
return record.data.storage + " (iSCSI)"; return record.data.storage + " (iSCSI)";
} else { } else {
return "Existing volume groups"; return me.existingGroupsText;
} }
} }
}], }],
@ -107,7 +109,7 @@ Ext.define('PVE.storage.LVMInputPanel', {
name: 'storage', name: 'storage',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: me.storageId || '', value: me.storageId || '',
fieldLabel: 'Storage ID', fieldLabel: 'ID',
vtype: 'StorageId', vtype: 'StorageId',
submitValue: !!me.create, submitValue: !!me.create,
allowBlank: false allowBlank: false
@ -120,14 +122,14 @@ Ext.define('PVE.storage.LVMInputPanel', {
hidden: !!me.create, hidden: !!me.create,
disabled: !!me.create, disabled: !!me.create,
value: '', value: '',
fieldLabel: 'VG name', fieldLabel: gettext('Volume group'),
allowBlank: false allowBlank: false
}); });
if (me.create) { if (me.create) {
var vgField = Ext.create('PVE.storage.VgSelector', { var vgField = Ext.create('PVE.storage.VgSelector', {
name: 'vgname', name: 'vgname',
fieldLabel: 'Volume group', fieldLabel: gettext('Volume group'),
allowBlank: false allowBlank: false
}); });
@ -137,14 +139,14 @@ Ext.define('PVE.storage.LVMInputPanel', {
disabled: true, disabled: true,
nodename: 'localhost', nodename: 'localhost',
storageContent: 'images', storageContent: 'images',
fieldLabel: 'Base volume', fieldLabel: gettext('Base volume'),
allowBlank: false allowBlank: false
}); });
me.column1.push({ me.column1.push({
xtype: 'pveBaseStorageSelector', xtype: 'pveBaseStorageSelector',
name: 'basesel', name: 'basesel',
fieldLabel: 'Base storage', fieldLabel: gettext('Base storage'),
submitValue: false, submitValue: false,
listeners: { listeners: {
change: function(f, value) { change: function(f, value) {
@ -179,8 +181,9 @@ Ext.define('PVE.storage.LVMInputPanel', {
{ {
xtype: 'PVE.form.NodeSelector', xtype: 'PVE.form.NodeSelector',
name: 'nodes', name: 'nodes',
fieldLabel: 'Nodes', fieldLabel: gettext('Nodes'),
emptyText: 'All (no restrictions)', emptyText: gettext('All') + ' (' +
gettext('No restrictions') +')',
multiSelect: true, multiSelect: true,
autoSelect: false autoSelect: false
}, },
@ -189,13 +192,13 @@ Ext.define('PVE.storage.LVMInputPanel', {
name: 'enable', name: 'enable',
checked: true, checked: true,
uncheckedValue: 0, uncheckedValue: 0,
fieldLabel: 'Enable' fieldLabel: gettext('Enable')
}, },
{ {
xtype: 'pvecheckbox', xtype: 'pvecheckbox',
name: 'shared', name: 'shared',
uncheckedValue: 0, uncheckedValue: 0,
fieldLabel: 'Shared' fieldLabel: gettext('Shared')
} }
]; ];
@ -224,11 +227,14 @@ Ext.define('PVE.storage.LVMEdit', {
storageId: me.storageId storageId: me.storageId
}); });
Ext.apply(me, { me.items = [ ipanel ];
title: me.create ? "Create LVM storage" :
"Edit LVM storage '" + me.storageId + "'", if (me.create) {
items: [ ipanel ] me.title = gettext('Create LVM storage');
}); } else {
me.title = Ext.String.format(gettext('Edit LVM storage {0}'),
"'" + me.storageId + "'");
}
me.callParent(); me.callParent();

View File

@ -83,7 +83,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
name: 'storage', name: 'storage',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: me.storageId || '', value: me.storageId || '',
fieldLabel: 'Storage ID', fieldLabel: 'ID',
vtype: 'StorageId', vtype: 'StorageId',
allowBlank: false allowBlank: false
}, },
@ -92,7 +92,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
name: 'server', name: 'server',
value: '', value: '',
fieldLabel: 'Server', fieldLabel: gettext('Server'),
allowBlank: false, allowBlank: false,
listeners: { listeners: {
change: function(f, value) { change: function(f, value) {
@ -117,7 +117,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
name: 'content', name: 'content',
value: 'images', value: 'images',
multiSelect: true, multiSelect: true,
fieldLabel: 'Content', fieldLabel: gettetx('Content'),
allowBlank: false allowBlank: false
} }
]; ];
@ -126,8 +126,9 @@ Ext.define('PVE.storage.NFSInputPanel', {
{ {
xtype: 'PVE.form.NodeSelector', xtype: 'PVE.form.NodeSelector',
name: 'nodes', name: 'nodes',
fieldLabel: 'Nodes', fieldLabel: gettext('Nodes'),
emptyText: 'All (no restrictions)', emptyText: gettext('All') + ' (' +
gettext('No restrictions') +')',
multiSelect: true, multiSelect: true,
autoSelect: false autoSelect: false
}, },
@ -136,7 +137,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
name: 'enable', name: 'enable',
checked: true, checked: true,
uncheckedValue: 0, uncheckedValue: 0,
fieldLabel: 'Enable' fieldLabel: gettext('Enable')
} }
]; ];
@ -165,11 +166,14 @@ Ext.define('PVE.storage.NFSEdit', {
storageId: me.storageId storageId: me.storageId
}); });
Ext.apply(me, { me.items = [ ipanel ];
title: me.create ? "Create NFS storage" :
"Edit NFS storage '" + me.storageId + "'", if (me.create) {
items: [ ipanel ] me.title = gettext('Create NFS storage');
}); } else {
me.title = Ext.String.format(gettext('Edit NFS storage {0}'),
"'" + me.storageId + "'");
}
me.callParent(); me.callParent();