[pve-devel] [PATCH pve-manager v2] Do not turn the strings CT and VM into separate localizable strings

Emmanuel Kasper e.kasper at proxmox.com
Wed Mar 23 13:06:14 CET 2016


According to the PO files, translators keep 'CT' and 'VM' unchanged
---
change since v1:
 * keep CT/VM out of the gettext string, to reduce the amount of translation needed

 www/manager6/lxc/CmdMenu.js  | 10 +++++-----
 www/manager6/qemu/CmdMenu.js |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/www/manager6/lxc/CmdMenu.js b/www/manager6/lxc/CmdMenu.js
index 8758bd4..c9280a7 100644
--- a/www/manager6/lxc/CmdMenu.js
+++ b/www/manager6/lxc/CmdMenu.js
@@ -27,7 +27,7 @@ Ext.define('PVE.lxc.CmdMenu', {
 	    });
 	};
 
-	me.title = gettext('CT') + ' ' + vmid;
+	me.title = 'CT ' + vmid;
 
 	me.items = [
 	    {
@@ -53,7 +53,7 @@ Ext.define('PVE.lxc.CmdMenu', {
 		text: gettext('Suspend'),
 		icon: '/pve2/images/forward.png',
 		handler: function() {
-		    var msg = Ext.String.format(gettext("Do you really want to suspend {0}?"), gettext('CT') + ' ' + vmid);
+		    var msg = Ext.String.format(gettext("Do you really want to suspend {0}?"), 'CT ' + vmid);
 		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 			if (btn !== 'yes') {
 			    return;
@@ -74,7 +74,7 @@ Ext.define('PVE.lxc.CmdMenu', {
 		text: gettext('Shutdown'),
 		icon: '/pve2/images/stop.png',
 		handler: function() {
-		    var msg = Ext.String.format(gettext("Do you really want to shutdown {0}?"), gettext('CT') + ' ' + vmid);
+		    var msg = Ext.String.format(gettext("Do you really want to shutdown {0}?"), 'CT ' + vmid);
 		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 			if (btn !== 'yes') {
 			    return;
@@ -88,7 +88,7 @@ Ext.define('PVE.lxc.CmdMenu', {
 		text: gettext('Stop'),
 		icon: '/pve2/images/gtk-stop.png',
 		handler: function() {
-		    var msg = Ext.String.format(gettext("Do you really want to stop {0}?"), gettext('CT') + ' ' + vmid);
+		    var msg = Ext.String.format(gettext("Do you really want to stop {0}?"), 'CT ' + vmid);
 		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 			if (btn !== 'yes') {
 			    return;
@@ -102,7 +102,7 @@ Ext.define('PVE.lxc.CmdMenu', {
 //		text: gettext('Convert to template'),
 //		icon: '/pve2/images/forward.png',
 //		handler: function() {
-//		    var msg = Ext.String.format(gettext("Do you really want to convert {0} into a template?"), gettext('CT') + ' ' + vmid);
+//		    var msg = Ext.String.format(gettext("Do you really want to convert {0} into a template?"), 'CT ' + vmid);
 //		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 //			if (btn !== 'yes') {
 //			    return;
diff --git a/www/manager6/qemu/CmdMenu.js b/www/manager6/qemu/CmdMenu.js
index 0742d55..5e889c6 100644
--- a/www/manager6/qemu/CmdMenu.js
+++ b/www/manager6/qemu/CmdMenu.js
@@ -53,7 +53,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 		text: gettext('Suspend'),
 		icon: '/pve2/images/forward.png',
 		handler: function() {
-		    var msg = Ext.String.format(gettext("Do you really want to suspend {0}?"), gettext('VM') + ' ' + vmid);
+		    var msg = Ext.String.format(gettext("Do you really want to suspend {0}?"), 'VM ' + vmid);
 		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 			if (btn !== 'yes') {
 			    return;
@@ -73,7 +73,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 		text: gettext('Shutdown'),
 		icon: '/pve2/images/stop.png',
 		handler: function() {
-		    var msg = Ext.String.format(gettext("Do you really want to shutdown {0}?"), gettext('VM') + ' ' + vmid);
+		    var msg = Ext.String.format(gettext("Do you really want to shutdown {0}?"), 'VM ' + vmid);
 		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 			if (btn !== 'yes') {
 			    return;
@@ -87,7 +87,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 		text: gettext('Stop'),
 		icon: '/pve2/images/gtk-stop.png',
 		handler: function() {
-		    var msg = Ext.String.format(gettext("Do you really want to stop {0}?"), gettext('VM') + ' ' + vmid);
+		    var msg = Ext.String.format(gettext("Do you really want to stop {0}?"), 'VM ' + vmid);
 		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 			if (btn !== 'yes') {
 			    return;
@@ -112,7 +112,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 		text: gettext('Convert to template'),
 		icon: '/pve2/images/forward.png',
 		handler: function() {
-		    var msg = Ext.String.format(gettext("Do you really want to convert {0} into a template?"), gettext('VM') + ' ' + vmid);
+		    var msg = Ext.String.format(gettext("Do you really want to convert {0} into a template?"), 'VM ' + vmid);
 		    Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
 			if (btn !== 'yes') {
 			    return;
-- 
2.1.4





More information about the pve-devel mailing list