all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Matthias Heiserer <m.heiserer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 3/3] GUI option for node.cfg default-lang
Date: Wed, 9 Feb 2022 13:53:38 +0100	[thread overview]
Message-ID: <b24380ed-9aea-be86-68f8-630bbf1a5986@proxmox.com> (raw)
In-Reply-To: <20220207111903.1953333-3-m.heiserer@proxmox.com>

On 2/7/22 12:19, Matthias Heiserer wrote:
> Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
> ---
>   www/config/NodeOptionView.js | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/www/config/NodeOptionView.js b/www/config/NodeOptionView.js
> index 64f3d792..24458058 100644
> --- a/www/config/NodeOptionView.js
> +++ b/www/config/NodeOptionView.js
> @@ -42,7 +42,16 @@ Ext.define('PBS.NodeOptionView', {
>   	    vtype: 'proxmoxMail',
>   	    deleteEmpty: true,
>   	},
> -
> +	{
> +	    xtype: 'combobox',
> +	    name: 'default-lang',
> +	    text: gettext('Default language'),
> +	    defaultValue: 'English',
> +	    // skip the 'default' item. It's not possible to delete the default
> +	    // language from the GUI, but setting it to 'en' has the same result
> +	    comboItems: Proxmox.Utils.language_array().slice(1),

we can do better here, namely we can use '__default__' as the defaulValue.
the combobox handles this like an empty one and sends '"delete":"default-lang"' to
the backend

then, we should add the renderer too:

renderer: Proxmox.Utils.render_language

for now, this will not properly render '__default__', but
it should be easy to patch that in proxmox-widget-toolkit ;)

> +	    deleteEmpty: true,
> +	},
>       ],
>   
>       initComponent: function() {





  reply	other threads:[~2022-02-09 12:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 11:19 [pbs-devel] [PATCH proxmox-backup 1/3] API integration for default-lang in node-cfg Matthias Heiserer
2022-02-07 11:19 ` [pbs-devel] [PATCH proxmox-backup 2/3] add english to translation enum for default-lang Matthias Heiserer
2022-02-07 14:35   ` [pbs-devel] applied: " Thomas Lamprecht
2022-02-07 11:19 ` [pbs-devel] [PATCH proxmox-backup 3/3] GUI option for node.cfg default-lang Matthias Heiserer
2022-02-09 12:53   ` Dominik Csapak [this message]
2022-02-07 14:33 ` [pbs-devel] applied: [PATCH proxmox-backup 1/3] API integration for default-lang in node-cfg 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=b24380ed-9aea-be86-68f8-630bbf1a5986@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=m.heiserer@proxmox.com \
    --cc=pbs-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 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