]> git.proxmox.com Git - pve-manager.git/commitdiff
add more gettext markers
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 25 Nov 2011 11:42:37 +0000 (12:42 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 25 Nov 2011 11:42:37 +0000 (12:42 +0100)
www/manager/storage/IScsiEdit.js
www/manager/storage/LVMEdit.js
www/manager/storage/NFSEdit.js

index 6cc8c7731f49a4abdd5ce4ec95cf97576a9a03f0..00014197982b742b72678bf5340d32329214f339 100644 (file)
@@ -86,7 +86,7 @@ Ext.define('PVE.storage.IScsiInputPanel', {
                name: 'storage',
                height: 22, // hack: set same height as text fields
                value: me.storageId || '',
-               fieldLabel: 'Storage ID',
+               fieldLabel: 'ID',
                vtype: 'StorageId',
                allowBlank: false
            },
@@ -121,8 +121,9 @@ Ext.define('PVE.storage.IScsiInputPanel', {
            {
                xtype: 'PVE.form.NodeSelector',
                name: 'nodes',
-               fieldLabel: 'Nodes',
-               emptyText: 'All (no restrictions)',
+               fieldLabel: gettext('Nodes'),
+               emptyText: gettext('All') + ' (' + 
+                   gettext('No restrictions') +')',
                multiSelect: true,
                autoSelect: false
            },
@@ -131,13 +132,13 @@ Ext.define('PVE.storage.IScsiInputPanel', {
                name: 'enable',
                checked: true,
                uncheckedValue: 0,
-               fieldLabel: 'Enable'
+               fieldLabel: gettext('Enable')
            },
            {
                xtype: 'checkbox',
                name: 'luns',
                checked: true,
-               fieldLabel: 'Use LUNs directly'
+               fieldLabel: gettext('Use LUNs directly')
            }
        ];
 
@@ -166,11 +167,14 @@ Ext.define('PVE.storage.IScsiEdit', {
            storageId: me.storageId
        });
        
-       Ext.apply(me, {
-           title: me.create ? "Create iSCSI storage" :
-               "Edit iSCSI storage '" + me.storageId + "'",
-           items: [ ipanel ]
-       });
+       me.items = [ ipanel ];
+
+       if (me.create) {
+           me.title = gettext('Create iSCSI storage');
+       } else {
+           me.title = Ext.String.format(gettext('Edit iSCSI storage {0}'),
+                                        "'" + me.storageId + "'");
+       }
 
        me.callParent();
 
index 99f10e9b90e6265f86207ec9774a997f0e0366e8..7aae749ac34845db84fef35dbd9bc9a475cf1121 100644 (file)
@@ -37,6 +37,8 @@ Ext.define('PVE.storage.BaseStorageSelector', {
     extend: 'Ext.form.field.ComboBox',
     alias: 'widget.pveBaseStorageSelector',
 
+    existingGroupsText: gettext("Existing volume groups"),
+
     initComponent : function() {
        var me = this;
 
@@ -54,7 +56,7 @@ Ext.define('PVE.storage.BaseStorageSelector', {
                              if (record.data.storage) {
                                  return record.data.storage + " (iSCSI)";
                              } else {
-                                 return "Existing volume groups";
+                                 return me.existingGroupsText;
                              }
                          }
                      }],
@@ -107,7 +109,7 @@ Ext.define('PVE.storage.LVMInputPanel', {
                name: 'storage',
                height: 22, // hack: set same height as text fields
                value: me.storageId || '',
-               fieldLabel: 'Storage ID',
+               fieldLabel: 'ID',
                vtype: 'StorageId',
                submitValue: !!me.create,
                allowBlank: false
@@ -120,14 +122,14 @@ Ext.define('PVE.storage.LVMInputPanel', {
            hidden: !!me.create,
            disabled: !!me.create,
            value: '',
-           fieldLabel: 'VG name',
+           fieldLabel: gettext('Volume group'),
            allowBlank: false
        });
 
        if (me.create) {
            var vgField = Ext.create('PVE.storage.VgSelector', {
                name: 'vgname',
-               fieldLabel: 'Volume group',
+               fieldLabel: gettext('Volume group'),
                allowBlank: false
            });
 
@@ -137,14 +139,14 @@ Ext.define('PVE.storage.LVMInputPanel', {
                disabled: true,
                nodename: 'localhost',
                storageContent: 'images',
-               fieldLabel: 'Base volume',
+               fieldLabel: gettext('Base volume'),
                allowBlank: false
            });
 
            me.column1.push({
                xtype: 'pveBaseStorageSelector',
                name: 'basesel',
-               fieldLabel: 'Base storage',
+               fieldLabel: gettext('Base storage'),
                submitValue: false,
                listeners: {
                    change: function(f, value) {
@@ -179,8 +181,9 @@ Ext.define('PVE.storage.LVMInputPanel', {
            {
                xtype: 'PVE.form.NodeSelector',
                name: 'nodes',
-               fieldLabel: 'Nodes',
-               emptyText: 'All (no restrictions)',
+               fieldLabel: gettext('Nodes'),
+               emptyText: gettext('All') + ' (' + 
+                   gettext('No restrictions') +')',
                multiSelect: true,
                autoSelect: false
            },
@@ -189,13 +192,13 @@ Ext.define('PVE.storage.LVMInputPanel', {
                name: 'enable',
                checked: true,
                uncheckedValue: 0,
-               fieldLabel: 'Enable'
+               fieldLabel: gettext('Enable')
            },
            {
                xtype: 'pvecheckbox',
                name: 'shared',
                uncheckedValue: 0,
-               fieldLabel: 'Shared'
+               fieldLabel: gettext('Shared')
            }
        ];
 
@@ -224,11 +227,14 @@ Ext.define('PVE.storage.LVMEdit', {
            storageId: me.storageId
        });
        
-       Ext.apply(me, {
-           title: me.create ? "Create LVM storage" :
-               "Edit LVM storage '" + me.storageId + "'",
-           items: [ ipanel ]
-       });
+       me.items = [ ipanel ];
+
+       if (me.create) {
+           me.title = gettext('Create LVM storage');
+       } else {
+           me.title = Ext.String.format(gettext('Edit LVM storage {0}'),
+                                        "'" + me.storageId + "'");
+       }
 
        me.callParent();
 
index b23dca76d66e47eb28dca5be4f94c51799eba681..570ff9027be4c3713f2ac8c52dfad5a7862f60a5 100644 (file)
@@ -83,7 +83,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
                name: 'storage',
                height: 22, // hack: set same height as text fields
                value: me.storageId || '',
-               fieldLabel: 'Storage ID',
+               fieldLabel: 'ID',
                vtype: 'StorageId',
                allowBlank: false
            },
@@ -92,7 +92,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
                height: 22, // hack: set same height as text fields
                name: 'server',
                value: '',
-               fieldLabel: 'Server',
+               fieldLabel: gettext('Server'),
                allowBlank: false,
                listeners: {
                    change: function(f, value) {
@@ -117,7 +117,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
                name: 'content',
                value: 'images',
                multiSelect: true,
-               fieldLabel: 'Content',
+               fieldLabel: gettetx('Content'),
                allowBlank: false
            }
        ];
@@ -126,8 +126,9 @@ Ext.define('PVE.storage.NFSInputPanel', {
            {
                xtype: 'PVE.form.NodeSelector',
                name: 'nodes',
-               fieldLabel: 'Nodes',
-               emptyText: 'All (no restrictions)',
+               fieldLabel: gettext('Nodes'),
+               emptyText: gettext('All') + ' (' + 
+                   gettext('No restrictions') +')',
                multiSelect: true,
                autoSelect: false
            },
@@ -136,7 +137,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
                name: 'enable',
                checked: true,
                uncheckedValue: 0,
-               fieldLabel: 'Enable'
+               fieldLabel: gettext('Enable')
            }
        ];
 
@@ -165,11 +166,14 @@ Ext.define('PVE.storage.NFSEdit', {
            storageId: me.storageId
        });
        
-       Ext.apply(me, {
-           title: me.create ? "Create NFS storage" :
-               "Edit NFS storage '" + me.storageId + "'",
-           items: [ ipanel ]
-       });
+       me.items = [ ipanel ];
+
+       if (me.create) {
+           me.title = gettext('Create NFS storage');
+       } else {
+           me.title = Ext.String.format(gettext('Edit NFS storage {0}'),
+                                        "'" + me.storageId + "'");
+       }
 
        me.callParent();