Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observations: Issues with RTL / Persian in v1.2.0 #734

Open
YektaDev opened this issue Nov 6, 2024 · 2 comments
Open

Observations: Issues with RTL / Persian in v1.2.0 #734

YektaDev opened this issue Nov 6, 2024 · 2 comments
Labels
bug Something isn't working Pagefind UI The prebuilt Pagefind UI components

Comments

@YektaDev
Copy link
Contributor

YektaDev commented Nov 6, 2024

  1. Number formatting. For some reason—even though it's mentioned that numbers are already being formatted—I’m seeing "1 نتیجه برای تست یافت شد" instead of "۱ نتیجه برای تست یافت شد". Am I missing something?
     console.log(new Intl.NumberFormat('fa').format(1)); // Returns ۱, the expected value
  2. The buttons are incorrectly placed.
    As previously mentioned, the positions of the Search and Clear buttons need to be swapped in all RTL layouts, but this behavior doesn't seem to have been implemented yet.
@YektaDev YektaDev changed the title Observations: Issues with **RTL / Persian** in v1.2.0 Observations: Issues with RTL / Persian in v1.2.0 Nov 6, 2024
@bglw
Copy link
Contributor

bglw commented Nov 7, 2024

👋 Thanks for the quick feedback!

Regarding the number formatting, can you provide a screenshot, or a link to a page exhibiting the issue? Here's the relevant code, where translations.language will be fa. Unsure what could be causing an issue here.

{translate("one_result", automatic_translations, translations)
.replace(/\[SEARCH_TERM\]/, search_term)
.replace(
/\[COUNT\]/,
new Intl.NumberFormat(translations.language).format(1)
)}

Regarding the buttons — yes I didn't get that into the 1.2.0 release, but will make sure it's in the next release (1.2.1 or 1.3.0) along with any other feedback that is surfaced 🙂

@bglw
Copy link
Contributor

bglw commented Nov 7, 2024

Actually, I think I see the issue here. That check should also be looking at automatic_translations.language — I'll put a test case into the suite and get that fixed up.

@bglw bglw added bug Something isn't working Pagefind UI The prebuilt Pagefind UI components labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Pagefind UI The prebuilt Pagefind UI components
Projects
None yet
Development

No branches or pull requests

2 participants