[pve-devel] [PATCH manager] Reduce the number of translations needed

Emmanuel Kasper e.kasper at proxmox.com
Wed Jan 18 16:25:05 CET 2017


Mostly split out technical term who don't need to be translated
outside of the gettext function paramater.
---
 www/manager6/ceph/Status.js          |  4 ++--
 www/manager6/dc/Health.js            |  2 +-
 www/manager6/dc/Summary.js           |  2 +-
 www/manager6/grid/FirewallOptions.js | 10 +++++-----
 www/manager6/ha/ResourceEdit.js      |  3 ++-
 www/manager6/lxc/Options.js          |  6 +++---
 www/manager6/qemu/ProcessorEdit.js   |  2 +-
 7 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
index ff71078..dc45dbe 100644
--- a/www/manager6/ceph/Status.js
+++ b/www/manager6/ceph/Status.js
@@ -123,14 +123,14 @@ Ext.define('PVE.node.CephStatus', {
 			    itemId: 'readiops',
 			    xtype: 'pveRunningChart',
 			    hidden: true,
-			    title: gettext('Read IOPS'),
+			    title: 'IOPS: ' + gettext('Reads'),
 			    renderer: Ext.util.Format.numberRenderer('0,000')
 			},
 			{
 			    itemId: 'writeiops',
 			    xtype: 'pveRunningChart',
 			    hidden: true,
-			    title: gettext('Write IOPS'),
+			    title: 'IOPS: ' + gettext('Writes'),
 			    renderer: Ext.util.Format.numberRenderer('0,000')
 			}
 		    ]
diff --git a/www/manager6/dc/Health.js b/www/manager6/dc/Health.js
index c99c576..61bee69 100644
--- a/www/manager6/dc/Health.js
+++ b/www/manager6/dc/Health.js
@@ -2,7 +2,7 @@ Ext.define('PVE.dc.Health', {
     extend: 'Ext.panel.Panel',
     alias: 'widget.pveDcHealth',
 
-    title: gettext('Datacenter Health'),
+    title: gettext('Health'),
 
     bodyPadding: '0 20 0 20',
     height: 200,
diff --git a/www/manager6/dc/Summary.js b/www/manager6/dc/Summary.js
index fb69ecc..041c914 100644
--- a/www/manager6/dc/Summary.js
+++ b/www/manager6/dc/Summary.js
@@ -23,7 +23,7 @@ Ext.define('PVE.dc.Summary', {
 	    xtype: 'pveDcGuests'
 	},
 	{
-	    title: gettext('Cluster Resources'),
+	    title: gettext('Resources'),
 	    xtype: 'panel',
 	    height: 250,
 	    bodyPadding: '0 0 10 0',
diff --git a/www/manager6/grid/FirewallOptions.js b/www/manager6/grid/FirewallOptions.js
index 859dc1f..7aa7587 100644
--- a/www/manager6/grid/FirewallOptions.js
+++ b/www/manager6/grid/FirewallOptions.js
@@ -103,10 +103,10 @@ Ext.define('PVE.FirewallOptions', {
 
 
 	if (me.fwtype === 'node') {
-	    add_boolean_row('enable', gettext('Enable Firewall'), 1);
+	    add_boolean_row('enable', gettext('Enable') + ': ' + gettext('Firewall'), 1);
 	    add_boolean_row('nosmurfs', gettext('SMURFS filter'), 1);
 	    add_boolean_row('tcpflags', gettext('TCP flags filter'), 0);
-	    add_boolean_row('ndp', gettext('Enable NDP'), 1);
+	    add_boolean_row('ndp', gettext('Enable') + ': ' + 'NDP', 1);
 	    add_integer_row('nf_conntrack_max', 'nf_conntrack_max', 120, 32768);
 	    add_integer_row('nf_conntrack_tcp_timeout_established', 
 			    'nf_conntrack_tcp_timeout_established', 250, 7875);
@@ -116,15 +116,15 @@ Ext.define('PVE.FirewallOptions', {
 	    add_log_row('smurf_log_level');
 	} else if (me.fwtype === 'vm') {
 	    add_boolean_row('enable', gettext('Enable Firewall'), 0);
-	    add_boolean_row('dhcp', gettext('Enable DHCP'), 0);
-	    add_boolean_row('ndp', gettext('Enable NDP'), 1);
+	    add_boolean_row('dhcp', gettext('Enable') + ': ' + 'DHCP', 0);
+	    add_boolean_row('ndp', gettext('Enable') + ': ' + 'NDP', 1);
 	    add_boolean_row('radv', gettext('Allow Router Advertisement'), 0);
 	    add_boolean_row('macfilter', gettext('MAC filter'), 1);
 	    add_boolean_row('ipfilter', gettext('IP filter'), 0);
 	    add_log_row('log_level_in');
 	    add_log_row('log_level_out');
 	} else if (me.fwtype === 'dc') {
-	    add_boolean_row('enable', gettext('Enable Firewall'), 0);
+	    add_boolean_row('enable', gettext('Enable') + ': ' + gettext('Firewall'), 0);
 	} 
  
 	if (me.fwtype === 'dc' || me.fwtype === 'vm') {
diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js
index bbb2314..596cdb5 100644
--- a/www/manager6/ha/ResourceEdit.js
+++ b/www/manager6/ha/ResourceEdit.js
@@ -168,7 +168,8 @@ Ext.define('PVE.ha.VMResourceEdit', {
 	});
 
 	Ext.apply(me, {
-            subject: gettext('CT/VM Resource'),
+	    subject: gettext('Resource') + ': ' + gettext('Container') +
+	    '/' + gettext('Virtual Machine'),
 	    isAdd: true,
 	    items: [ ipanel ]
 	});
diff --git a/www/manager6/lxc/Options.js b/www/manager6/lxc/Options.js
index 1c39b4b..efeb1f7 100644
--- a/www/manager6/lxc/Options.js
+++ b/www/manager6/lxc/Options.js
@@ -57,12 +57,12 @@ Ext.define('PVE.lxc.Options', {
 		defaultValue: PVE.Utils.unknownText
 	    },
 	    console: {
-		header: gettext('Enable /dev/console'),
+		header: gettext('Enable') + ': ' + '/dev/console',
 		defaultValue: 1,
 		renderer: PVE.Utils.format_boolean,
 		editor: caps.vms['VM.Config.Options'] ? {
 		    xtype: 'pveWindowEdit',
-		    subject: gettext('Enable /dev/console'),
+		    subject: gettext('Enable') + ': ' + '/dev/console',
 		    items: {
 			xtype: 'pvecheckbox',
 			name: 'console',
@@ -70,7 +70,7 @@ Ext.define('PVE.lxc.Options', {
 			defaultValue: 1,
 			deleteDefaultValue: true,
 			checked: true,
-			fieldLabel: gettext('Enable /dev/console')
+			fieldLabel: gettext('Enable') + ': ' + '/dev/console'
 		    }
 		} : undefined
 	    },
diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js
index 01da703..c596d7b 100644
--- a/www/manager6/qemu/ProcessorEdit.js
+++ b/www/manager6/qemu/ProcessorEdit.js
@@ -75,7 +75,7 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
 	    },
 	    {
 		xtype: 'pvecheckbox',
-		fieldLabel: gettext('Enable NUMA'),
+		fieldLabel: 'NUMA', // do not localize
 		name: 'numa',
 		uncheckedValue: 0
 	    }
-- 
2.1.4





More information about the pve-devel mailing list