all lists on 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

* Re: [pve-devel] [PATCH manager] fix #5847: ui: gettextize several strings in ui
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Dominik Csapak @ 2024-11-12  9:16 UTC (permalink / raw)
  To: Proxmox VE development discussion, Timothy Nicholson

one comment inline

On 11/11/24 12:35, Timothy Nicholson wrote:
> 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'),

is it a good idea to translate this? it's mostly a technical term (which we generally don't 
translate), but i'd be swayed if there is an actual example where a language want
to have that translated...



_______________________________________________
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

* Re: [pve-devel] [PATCH manager] fix #5847: ui: gettextize several strings in ui
  2024-11-12  9:16 ` Dominik Csapak
@ 2024-11-12  9:27   ` Shannon Sterz
  2024-11-12  9:28   ` Timothy Nicholson
  1 sibling, 0 replies; 4+ messages in thread
From: Shannon Sterz @ 2024-11-12  9:27 UTC (permalink / raw)
  To: Proxmox VE development discussion, Timothy Nicholson

On Tue Nov 12, 2024 at 10:16 AM CET, Dominik Csapak wrote:
> one comment inline
>
> On 11/11/24 12:35, Timothy Nicholson wrote:
> > 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'),
>
> is it a good idea to translate this? it's mostly a technical term (which we generally don't
> translate), but i'd be swayed if there is an actual example where a language want
> to have that translated...
>

as always, the french abide: apparentelly TFA can sometimes be referred
to as ADF (Authentification à deux facteurs), e.g. [1]

[1]: https://support.firmex.com/hc/fr/articles/204467648-Authentification-%C3%A0-deux-facteurs-ADF

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



_______________________________________________
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

* Re: [pve-devel] [PATCH manager] fix #5847: ui: gettextize several strings in ui
  2024-11-12  9:16 ` Dominik Csapak
  2024-11-12  9:27   ` Shannon Sterz
@ 2024-11-12  9:28   ` Timothy Nicholson
  1 sibling, 0 replies; 4+ messages in thread
From: Timothy Nicholson @ 2024-11-12  9:28 UTC (permalink / raw)
  To: Proxmox VE development discussion


> Dominik Csapak <d.csapak@proxmox.com> hat am 12.11.2024 10:16 CET geschrieben:
> 
>  
> one comment inline
> 
> On 11/11/24 12:35, Timothy Nicholson wrote:
> > 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'),
> 
> is it a good idea to translate this? it's mostly a technical term (which we generally don't 
> translate), but i'd be swayed if there is an actual example where a language want
> to have that translated...

Some languages already translate TFA as 2FA (e.g. German) and TFA is already translated in other parts of the UI.


_______________________________________________
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal