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

feat(tui): add Arabic (ar) locale #1344

Closed
wants to merge 2 commits into from
Closed

feat(tui): add Arabic (ar) locale #1344

wants to merge 2 commits into from

Conversation

fujiapple852
Copy link
Owner

No description provided.

@c-git
Copy link
Collaborator

c-git commented Nov 8, 2024

Thanks @tsallabi you got it. That's perfect thanks.

bsod_failed:
en: "Trippy Failed :("
fr: "Trippy a échoué :("
tr: "Trippy Başarısız :("
it: "Trippy ha avuto un problema :("
pt: "Trippy falhou :("
zh: "Trippy 失败 :("
ar: "فشل Trippy :("
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

فشل متوقع

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Google translate tells me that "فشل متوقع" means "Expected failure" which seems wrong? Also, can you show me how it would look in the full context (i.e. is it "Trippy فشل متوقع :(")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is very new word and has different meaning
An adjective meaning cool, freaky, groovy, amazing, or all of the above, depending on the context in which it's used. Although "trippy" is a fairly new word, the root word, "trip," refers to soft psychedelic trips and has been in use since the 60's.

Person 1: "Whoa, dude. Those yellow fractals in the air are pretty trippy..."

Person 2: "Um, I think you've seriously gotta cut the acid. That's the McDonald's sign."

Courtesy: Urban Dictionary: trippy

kilometer:
en: "km"
fr: "km"
tr: "km"
it: "km"
pt: "km"
zh: "公里"
ar: "km"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

كيلومتر

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsallabi which would sound better, "km" or "كيلومتر"?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Arabic both are understood, but to be clear كيلومتر is clearer

@c-git
Copy link
Collaborator

c-git commented Nov 8, 2024

Thank you @tsallabi will go over it soon and get back to you, really appreciate the help.

@tsallabi
Copy link

tsallabi commented Nov 8, 2024 via email

@c-git
Copy link
Collaborator

c-git commented Nov 8, 2024

The space where the abbreviation has to go may not fit the full sentence. Do you think people would understand if we just use the English abbreviation?

@tsallabi
Copy link

tsallabi commented Nov 8, 2024 via email

@fujiapple852
Copy link
Owner Author

@tsallabi @c-git I agree that we should stick to the English abbreviations for technical terms, as we've done with the other languages. I'll close the related threads.

@fujiapple852
Copy link
Owner Author

@tsallabi thanks for your contribution!

I've left a couple of questions on the open threads above.

Here is is how currently looks:

Screenshot 2024-11-15 at 6 39 48 PM Screenshot 2024-11-15 at 6 39 35 PM Screenshot 2024-11-15 at 6 39 21 PM Screenshot 2024-11-15 at 6 39 13 PM

@tsallabi
Copy link

tsallabi commented Nov 15, 2024 via email

@fujiapple852
Copy link
Owner Author

@tsallabi you are correct. After some research it seems the terminal I am using (iTerm2 on macOS) does not support RTL/BiDi for languages such as ar. Worse, even for terminals which do support this (such as the Terminal that comes with macOS), the rendering is still wrong for complex TUI layouts as it attempts to reorder everything on the line.

Instead, I've taken the approach of reordering the translated text (using a library which supports the Unicode Bidirectional Algorithm) in the application prior to rendering.

Below are revised screenshots for ar:

Screenshot 2024-11-16 at 4 35 04 PM Screenshot 2024-11-16 at 4 35 13 PM Screenshot 2024-11-16 at 4 35 25 PM

These do not match exactly with the desired ar translations (i'm not sure why) and there is clearly an issue for mixed text (note the inverted [ and ]). There will also be an issue for terminals which do try to reorder BiDi/RTL text as it would be reordered twice in effect (this may be fixable).

My question to you is therefore, is the updated rendering better than before and is it right (or at least "good enough")? If not, then it may not be possible to add translations for RTL languages at the moment.

@fujiapple852
Copy link
Owner Author

Closing this as, given the state of RTL support in terminal emulators, Trippy is unlikely to support Arabic for the foreseeable future sadly. Thanks for he help with translating anyway!

@tsallabi
Copy link

tsallabi commented Jan 25, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants