correctly translate storage content types

This commit is contained in:
Dietmar Maurer 2014-07-14 10:42:07 +02:00
parent 8e508c84d5
commit 28b0ead345
2 changed files with 13 additions and 8 deletions

View File

@ -891,6 +891,11 @@ Ext.define('PVE.Utils', { statics: {
totalText: gettext('Total'), totalText: gettext('Total'),
usedText: gettext('Used'), usedText: gettext('Used'),
directoryText: gettext('Directory'), directoryText: gettext('Directory'),
imagesText: gettext('Disk image'),
backupFileText: gettext('VZDump backup file'),
vztmplText: gettext('OpenVZ template'),
isoImageText: gettext('ISO image'),
containersText: gettext('OpenVZ Container'),
format_expire: function(date) { format_expire: function(date) {
if (!date) { if (!date) {
@ -943,15 +948,15 @@ Ext.define('PVE.Utils', { statics: {
Ext.each(value.split(',').sort(), function(ct) { Ext.each(value.split(',').sort(), function(ct) {
if (ct === 'images') { if (ct === 'images') {
cta.push('Images'); cta.push(PVE.Utils.imagesText);
} else if (ct === 'backup') { } else if (ct === 'backup') {
cta.push('Backups'); cta.push(PVE.Utils.backupFileText);
} else if (ct === 'vztmpl') { } else if (ct === 'vztmpl') {
cta.push('Templates'); cta.push(PVE.Utils.vztmplText);
} else if (ct === 'iso') { } else if (ct === 'iso') {
cta.push('ISO'); cta.push(PVE.Utils.isoImageText);
} else if (ct === 'rootdir') { } else if (ct === 'rootdir') {
cta.push('Containers'); cta.push(PVE.Utils.containersText);
} }
}); });

View File

@ -185,9 +185,9 @@ Ext.define('PVE.storage.Upload', {
{ {
xtype: 'pveKVComboBox', xtype: 'pveKVComboBox',
data: [ data: [
['iso', gettext('ISO image')], ['iso', PVE.Utils.format_content_types('iso')],
['backup', gettext('VZDump backup file')], ['backup', PVE.Utils.format_content_types('backup')],
['vztmpl', gettext('OpenVZ template')] ['vztmpl', PVE.Utils.format_content_types('vztmpl')]
], ],
fieldLabel: gettext('Content'), fieldLabel: gettext('Content'),
name: 'content', name: 'content',