all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [yew-devel] [PATCH yew-comp 1/1] languages: add text direction information where necessary
Date: Fri, 12 Sep 2025 10:32:16 +0200	[thread overview]
Message-ID: <20250912083225.942200-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20250912083225.942200-1-d.csapak@proxmox.com>

we have 3 languages that are RTL (right-to-left):
* Aarabic
* Persian (Farsi)
* Hebrew

so set the RTL direction there.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/lib.rs | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs
index c884167..ca34e67 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -206,7 +206,7 @@ mod xtermjs;
 pub use xtermjs::{ConsoleType, ProxmoxXTermJs, XTermJs};
 
 use pwt::gettext_noop;
-use pwt::state::LanguageInfo;
+use pwt::state::{LanguageInfo, TextDirection};
 
 // Bindgen javascript code from js-helper-module.js
 
@@ -261,7 +261,7 @@ pub fn load_csrf_token() -> Option<String> {
 /// All Proxmox products should support those languages.
 pub fn available_language_list() -> Vec<LanguageInfo> {
     vec![
-        LanguageInfo::new("ar", "العربية", gettext_noop("Arabic")),
+        LanguageInfo::new("ar", "العربية", gettext_noop("Arabic")).direction(TextDirection::Rtl),
         LanguageInfo::new("bg", "Български", gettext_noop("Bulgarian")),
         LanguageInfo::new("ca", "Català", gettext_noop("Catalan")),
         LanguageInfo::new("cs", "Czech", gettext_noop("Czech")),
@@ -270,9 +270,10 @@ pub fn available_language_list() -> Vec<LanguageInfo> {
         LanguageInfo::new("en", "English", gettext_noop("English")),
         LanguageInfo::new("es", "Español", gettext_noop("Spanish")),
         LanguageInfo::new("eu", "Euskera (Basque)", gettext_noop("Euskera (Basque)")),
-        LanguageInfo::new("fa", "فارسی", gettext_noop("Persian (Farsi)")),
+        LanguageInfo::new("fa", "فارسی", gettext_noop("Persian (Farsi)"))
+            .direction(TextDirection::Rtl),
         LanguageInfo::new("fr", "Français", gettext_noop("French")),
-        LanguageInfo::new("he", "עברית", gettext_noop("Hebrew")),
+        LanguageInfo::new("he", "עברית", gettext_noop("Hebrew")).direction(TextDirection::Rtl),
         LanguageInfo::new("hr", "Hrvatski", gettext_noop("Croatian")),
         LanguageInfo::new("it", "Italiano", gettext_noop("Italian")),
         LanguageInfo::new("ja", "日本語", gettext_noop("Japanese")),
-- 
2.47.3



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

  parent reply	other threads:[~2025-09-12  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12  8:32 [yew-devel] [PATCH yew-comp/yew-widget-toolkit 0/4] Enable RTL text direction for relevant languages Dominik Csapak
2025-09-12  8:32 ` [yew-devel] [PATCH yew-widget-toolkit 1/3] state: language: add text direction setting Dominik Csapak
2025-09-12  8:32 ` [yew-devel] [PATCH yew-widget-toolkit 2/3] widget: rtl switcher: refactor setting rtl direction Dominik Csapak
2025-09-12  8:32 ` [yew-devel] [PATCH yew-widget-toolkit 3/3] widget: language selector: automatically set text direction from language Dominik Csapak
2025-09-12  8:32 ` Dominik Csapak [this message]
2025-09-12  8:48 ` [yew-devel] superseded: [PATCH yew-comp/yew-widget-toolkit 0/4] Enable RTL text direction for relevant languages Dominik Csapak

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=20250912083225.942200-5-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=yew-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