public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix #5847: ui: gettextize several strings in ui
@ 2024-11-11 11:35 Timothy Nicholson
  2024-11-12  9:16 ` Dominik Csapak
  0 siblings, 1 reply; 4+ messages in thread
From: Timothy Nicholson @ 2024-11-11 11:35 UTC (permalink / raw)
  To: pve-devel

Several strings that should probably also be translated now use
the gettext function to be translated.

Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
---
[0]: https://bugzilla.proxmox.com/show_bug.cgi?id=5847

 www/manager6/Workspace.js              |  2 +-
 www/manager6/ceph/OSD.js               |  6 +++---
 www/manager6/ceph/OSDDetails.js        |  2 +-
 www/manager6/form/VMCPUFlagSelector.js | 24 ++++++++++++------------
 www/manager6/qemu/ProcessorEdit.js     |  2 +-
 www/manager6/window/Settings.js        |  6 +++---
 6 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 52c66108..56dde151 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -388,7 +388,7 @@ Ext.define('PVE.StdWorkspace', {
 				    },
 				},
 				{
-				    text: 'TFA',
+				    text: gettext('TFA'),
 				    itemId: 'tfaitem',
 				    iconCls: 'fa fa-fw fa-lock',
 				    handler: function(btn, event, rec) {
diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index d2caafa4..5a32769c 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -268,11 +268,11 @@ Ext.define('PVE.CephSetFlags', {
 			    dataIndex: 'value',
 			},
 			{
-			    text: 'Name',
+			    text: gettext('Name'),
 			    dataIndex: 'name',
 			},
 			{
-			    text: 'Description',
+			    text: gettext('Description'),
 			    flex: 1,
 			    dataIndex: 'description',
 			},
@@ -716,7 +716,7 @@ Ext.define('PVE.node.CephOsdTree', {
     columns: [
 	{
 	    xtype: 'treecolumn',
-	    text: 'Name',
+	    text: gettext('Name'),
 	    dataIndex: 'name',
 	    width: 150,
 	},
diff --git a/www/manager6/ceph/OSDDetails.js b/www/manager6/ceph/OSDDetails.js
index 3b1c1d9c..5c14aa05 100644
--- a/www/manager6/ceph/OSDDetails.js
+++ b/www/manager6/ceph/OSDDetails.js
@@ -220,7 +220,7 @@ Ext.define('PVE.CephOsdDetails', {
 						renderer: Proxmox.Utils.render_size,
 					    },
 					    {
-						text: 'Discard',
+						text: gettext('Discard'),
 						dataIndex: 'support_discard',
 						hidden: true,
 					    },
diff --git a/www/manager6/form/VMCPUFlagSelector.js b/www/manager6/form/VMCPUFlagSelector.js
index ace3c531..48589d3f 100644
--- a/www/manager6/form/VMCPUFlagSelector.js
+++ b/www/manager6/form/VMCPUFlagSelector.js
@@ -21,18 +21,18 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
 	fields: ['flag', { name: 'state', defaultValue: '=' }, 'desc'],
 	data: [
 	    // FIXME: let qemu-server host this and autogenerate or get from API call??
-	    { flag: 'md-clear', desc: 'Required to let the guest OS know if MDS is mitigated correctly' },
-	    { flag: 'pcid', desc: 'Meltdown fix cost reduction on Westmere, Sandy-, and IvyBridge Intel CPUs' },
-	    { flag: 'spec-ctrl', desc: 'Allows improved Spectre mitigation with Intel CPUs' },
-	    { flag: 'ssbd', desc: 'Protection for "Speculative Store Bypass" for Intel models' },
-	    { flag: 'ibpb', desc: 'Allows improved Spectre mitigation with AMD CPUs' },
-	    { flag: 'virt-ssbd', desc: 'Basis for "Speculative Store Bypass" protection for AMD models' },
-	    { flag: 'amd-ssbd', desc: 'Improves Spectre mitigation performance with AMD CPUs, best used with "virt-ssbd"' },
-	    { flag: 'amd-no-ssb', desc: 'Notifies guest OS that host is not vulnerable for Spectre on AMD CPUs' },
-	    { flag: 'pdpe1gb', desc: 'Allow guest OS to use 1GB size pages, if host HW supports it' },
-	    { flag: 'hv-tlbflush', desc: 'Improve performance in overcommitted Windows guests. May lead to guest bluescreens on old CPUs.' },
-	    { flag: 'hv-evmcs', desc: 'Improve performance for nested virtualization. Only supported on Intel CPUs.' },
-	    { flag: 'aes', desc: 'Activate AES instruction set for HW acceleration.' },
+	    { flag: 'md-clear', desc: gettext('Required to let the guest OS know if MDS is mitigated correctly')},
+	    { flag: 'pcid', desc: gettext('Meltdown fix cost reduction on Westmere, Sandy-, and IvyBridge Intel CPUs')},
+	    { flag: 'spec-ctrl', desc: gettext('Allows improved Spectre mitigation with Intel CPUs')},
+	    { flag: 'ssbd', desc: gettext('Protection for "Speculative Store Bypass" for Intel models')},
+	    { flag: 'ibpb', desc: gettext('Allows improved Spectre mitigation with AMD CPUs')},
+	    { flag: 'virt-ssbd', desc: gettext('Basis for "Speculative Store Bypass" protection for AMD models')},
+	    { flag: 'amd-ssbd', desc: gettext('Improves Spectre mitigation performance with AMD CPUs, best used with "virt-ssbd"')},
+	    { flag: 'amd-no-ssb', desc: gettext('Notifies guest OS that host is not vulnerable for Spectre on AMD CPUs')},
+	    { flag: 'pdpe1gb', desc: gettext('Allow guest OS to use 1GB size pages, if host HW supports it')},
+	    { flag: 'hv-tlbflush', desc: gettext('Improve performance in overcommitted Windows guests. May lead to guest bluescreens on old CPUs.')},
+	    { flag: 'hv-evmcs', desc: gettext('Improve performance for nested virtualization. Only supported on Intel CPUs.')},
+	    { flag: 'aes', desc: gettext('Activate AES instruction set for HW acceleration.')},
 	],
 	listeners: {
 	    update: function() {
diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js
index 7aa98eb6..c6498fbe 100644
--- a/www/manager6/qemu/ProcessorEdit.js
+++ b/www/manager6/qemu/ProcessorEdit.js
@@ -234,7 +234,7 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
     advancedColumnB: [
 	{
 	    xtype: 'label',
-	    text: 'Extra CPU Flags:',
+	    text: gettext('Extra CPU Flags:'),
 	},
 	{
 	    xtype: 'vmcpuflagselector',
diff --git a/www/manager6/window/Settings.js b/www/manager6/window/Settings.js
index 9af11850..9fae305a 100644
--- a/www/manager6/window/Settings.js
+++ b/www/manager6/window/Settings.js
@@ -271,9 +271,9 @@ Ext.define('PVE.window.Settings', {
 		stateId: 'guest-notes-collapse',
 		reference: 'guestNotesCollapse',
 		comboItems: [
-		    ['never', 'Show by default'],
-		    ['always', 'Collapse by default'],
-		    ['auto', 'auto (Collapse if empty)'],
+		    ['never', gettext('Show by default')],
+		    ['always', gettext('Collapse by default')],
+		    ['auto', gettext('auto (Collapse if empty)')],
 		],
 	    },
 	    {
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-12  9:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-11 11:35 [pve-devel] [PATCH manager] fix #5847: ui: gettextize several strings in ui Timothy Nicholson
2024-11-12  9:16 ` Dominik Csapak
2024-11-12  9:27   ` Shannon Sterz
2024-11-12  9:28   ` Timothy Nicholson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal