public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: do not split translatable strings
Date: Fri, 28 Feb 2025 11:23:42 +0100	[thread overview]
Message-ID: <20250228102342.163467-1-m.sandoval@proxmox.com> (raw)

Splitting the strings adds extra work to translators as they now have
less context to work with.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 www/manager6/ceph/OSD.js                    | 6 +++---
 www/manager6/dc/OptionView.js               | 2 +-
 www/manager6/panel/BackupAdvancedOptions.js | 2 +-
 www/manager6/qemu/PCIEdit.js                | 8 ++++----
 www/manager6/window/CephInstall.js          | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index d2caafa4a..67ad133f0 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -233,7 +233,7 @@ Ext.define('PVE.CephSetFlags', {
 
     onlineHelp: 'pve_ceph_osds',
     isCreate: true,
-    title: Ext.String.format(gettext('Manage {0}'), 'Global OSD Flags'),
+    title: gettext('Manage Global OSD Flags'),
     submitText: gettext('Apply'),
 
     items: [
@@ -833,11 +833,11 @@ Ext.define('PVE.node.CephOsdTree', {
 	    },
 	    '-',
 	    {
-		text: gettext('Create') + ': OSD',
+		text: gettext('Create: OSD'),
 		handler: 'create_osd',
 	    },
 	    {
-		text: Ext.String.format(gettext('Manage {0}'), 'Global Flags'),
+		text: gettext('Manage Global Flags'),
 		handler: 'set_flags',
 	    },
 	    '->',
diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index bd54d7618..0496f6d5f 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -195,7 +195,7 @@ Ext.define('PVE.dc.OptionView', {
 		xtype: 'box',
 		height: 25,
 		html: `<span class='pmx-hint'>${gettext('Note:')}</span> `
-		    + Ext.String.format(gettext('{0} is deprecated, use {1}'), 'U2F', 'WebAuthn'),
+		    + gettext('U2F is deprecated, use WebAuthn'),
 	    },
 	    {
 		xtype: 'displayfield',
diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js
index a7b0fc2b3..1050cbb1d 100644
--- a/www/manager6/panel/BackupAdvancedOptions.js
+++ b/www/manager6/panel/BackupAdvancedOptions.js
@@ -158,7 +158,7 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 		xtype: 'proxmoxintegerfield',
 		name: 'zstd',
 		reference: 'zstdThreadCount',
-		fieldLabel: Ext.String.format(gettext('{0} Threads'), 'Zstd'),
+		fieldLabel: gettext('Zstd Threads'),
 		fieldStyle: 'text-align: right',
 		emptyText: gettext('Fallback'),
 		minValue: 0,
diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index 8f633cb6e..6ed9918c5 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -288,7 +288,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
 	    {
 		xtype: 'textfield',
 		name: 'vendor-id',
-		fieldLabel: Ext.String.format(gettext('{0} ID'), gettext('Vendor')),
+		fieldLabel: gettext('Vendor ID'),
 		emptyText: gettext('From Device'),
 		vtype: 'PciId',
 		allowBlank: true,
@@ -297,7 +297,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
 	    {
 		xtype: 'textfield',
 		name: 'device-id',
-		fieldLabel: Ext.String.format(gettext('{0} ID'), gettext('Device')),
+		fieldLabel: gettext('Device ID'),
 		emptyText: gettext('From Device'),
 		vtype: 'PciId',
 		allowBlank: true,
@@ -315,7 +315,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
 	    {
 		xtype: 'textfield',
 		name: 'sub-vendor-id',
-		fieldLabel: Ext.String.format(gettext('{0} ID'), gettext('Sub-Vendor')),
+		fieldLabel: gettext('Sub-Vendor ID'),
 		emptyText: gettext('From Device'),
 		vtype: 'PciId',
 		allowBlank: true,
@@ -324,7 +324,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
 	    {
 		xtype: 'textfield',
 		name: 'sub-device-id',
-		fieldLabel: Ext.String.format(gettext('{0} ID'), gettext('Sub-Device')),
+		fieldLabel: gettext('Sub-Device ID'),
 		emptyText: gettext('From Device'),
 		vtype: 'PciId',
 		allowBlank: true,
diff --git a/www/manager6/window/CephInstall.js b/www/manager6/window/CephInstall.js
index 326051291..759536c39 100644
--- a/www/manager6/window/CephInstall.js
+++ b/www/manager6/window/CephInstall.js
@@ -35,11 +35,11 @@ Ext.define('PVE.ceph.Install', {
 	    windowText: function(get) {
 		if (get('isInstalled')) {
 		    return `<p class="install-mask">
-		    ${Ext.String.format(gettext('{0} is not initialized.'), 'Ceph')}
+		    ${gettext('Ceph is not initialized.')}
 		    ${gettext('You need to create an initial config once.')}</p>`;
 		} else {
 		    return '<p class="install-mask">' +
-		    Ext.String.format(gettext('{0} is not installed on this node.'), 'Ceph') + '<br>' +
+		    gettext('Ceph is not installed on this node.') + '<br>' +
 		    gettext('Would you like to install it now?') + '</p>';
 		}
 	    },
-- 
2.39.5



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


             reply	other threads:[~2025-02-28 10:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 10:23 Maximiliano Sandoval [this message]
2025-03-19  8:31 ` Maximiliano Sandoval
2025-04-07 13:17 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250228102342.163467-1-m.sandoval@proxmox.com \
    --to=m.sandoval@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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