public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup v2] GUI: add support for default language
@ 2022-02-10 11:57 Matthias Heiserer
  2022-02-10 11:57 ` [pbs-devel] [PATCH proxmox-widget-toolkit v2] utils: render default value correctly Matthias Heiserer
  2022-02-14 10:38 ` [pbs-devel] applied: [PATCH proxmox-backup v2] GUI: add support for default language Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Matthias Heiserer @ 2022-02-10 11:57 UTC (permalink / raw)
  To: pbs-devel

Allows setting the default language in Configuration/Other/General

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
 Sorry for the many mails!

 Without the proxmox-widget-toolkit patch, '__default__' will be shown
 when no default language is set in the config file.

 Changes from v1:
 use `__default__` as default value
 squash commits 
 
 www/config/NodeOptionView.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/www/config/NodeOptionView.js b/www/config/NodeOptionView.js
index 64f3d792..506768d9 100644
--- a/www/config/NodeOptionView.js
+++ b/www/config/NodeOptionView.js
@@ -42,7 +42,15 @@ Ext.define('PBS.NodeOptionView', {
 	    vtype: 'proxmoxMail',
 	    deleteEmpty: true,
 	},
-
+	{
+	    xtype: 'combobox',
+	    name: 'default-lang',
+	    text: gettext('Default language'),
+	    defaultValue: '__default__',
+	    comboItems: Proxmox.Utils.language_array(),
+	    deleteEmpty: true,
+	    renderer: Proxmox.Utils.render_language,
+	},
     ],
 
     initComponent: function() {
-- 
2.30.2





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

* [pbs-devel] [PATCH proxmox-widget-toolkit v2] utils: render default value correctly
  2022-02-10 11:57 [pbs-devel] [PATCH proxmox-backup v2] GUI: add support for default language Matthias Heiserer
@ 2022-02-10 11:57 ` Matthias Heiserer
  2022-02-10 12:08   ` [pbs-devel] applied: " Thomas Lamprecht
  2022-02-14 10:38 ` [pbs-devel] applied: [PATCH proxmox-backup v2] GUI: add support for default language Thomas Lamprecht
  1 sibling, 1 reply; 4+ messages in thread
From: Matthias Heiserer @ 2022-02-10 11:57 UTC (permalink / raw)
  To: pbs-devel

---
 src/Utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Utils.js b/src/Utils.js
index 15baac3..d325644 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -90,7 +90,7 @@ utilities: {
     },
 
     render_language: function(value) {
-	if (!value) {
+	if (!value || value === '__default__') {
 	    return Proxmox.Utils.defaultText + ' (English)';
 	}
 	let text = Proxmox.Utils.language_map[value];
-- 
2.30.2





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

* [pbs-devel] applied: [PATCH proxmox-widget-toolkit v2] utils: render default value correctly
  2022-02-10 11:57 ` [pbs-devel] [PATCH proxmox-widget-toolkit v2] utils: render default value correctly Matthias Heiserer
@ 2022-02-10 12:08   ` Thomas Lamprecht
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2022-02-10 12:08 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Matthias Heiserer

On 10.02.22 12:57, Matthias Heiserer wrote:
> ---
>  src/Utils.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!




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

* [pbs-devel] applied: [PATCH proxmox-backup v2] GUI: add support for default language
  2022-02-10 11:57 [pbs-devel] [PATCH proxmox-backup v2] GUI: add support for default language Matthias Heiserer
  2022-02-10 11:57 ` [pbs-devel] [PATCH proxmox-widget-toolkit v2] utils: render default value correctly Matthias Heiserer
@ 2022-02-14 10:38 ` Thomas Lamprecht
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2022-02-14 10:38 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Matthias Heiserer

On 10.02.22 12:57, Matthias Heiserer wrote:
> Allows setting the default language in Configuration/Other/General
> 
> Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
> ---
>  Sorry for the many mails!
> 
>  Without the proxmox-widget-toolkit patch, '__default__' will be shown
>  when no default language is set in the config file.
> 
>  Changes from v1:
>  use `__default__` as default value
>  squash commits 
>  
>  www/config/NodeOptionView.js | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
>

applied, thanks!

adapted commit subject to
"ui: node options: add support for selecting default language" 




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

end of thread, other threads:[~2022-02-14 10:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 11:57 [pbs-devel] [PATCH proxmox-backup v2] GUI: add support for default language Matthias Heiserer
2022-02-10 11:57 ` [pbs-devel] [PATCH proxmox-widget-toolkit v2] utils: render default value correctly Matthias Heiserer
2022-02-10 12:08   ` [pbs-devel] applied: " Thomas Lamprecht
2022-02-14 10:38 ` [pbs-devel] applied: [PATCH proxmox-backup v2] GUI: add support for default language Thomas Lamprecht

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