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

Farsi translation is wrong #247

Closed
zumoshi opened this issue Sep 28, 2024 · 0 comments
Closed

Farsi translation is wrong #247

zumoshi opened this issue Sep 28, 2024 · 0 comments
Labels
Bug Report a reproducible bug or regression

Comments

@zumoshi
Copy link
Contributor

zumoshi commented Sep 28, 2024

Hello,

I encountered an issue with the following code:

fmt.Println(carbon.CreateFromDateTime(2024, 9, 29, 14, 10, 43).SetLocale("fa").DiffForHumans(carbon.CreateFromDateTime(2024, 9, 29, 12, 10, 43)))

golang version: go1.23.1 linux/amd64

carbon version: v2.3.12

time zone: N/A

I expected to get:

2 ساعت بعد

But I actually get:

بعد ۱ ساعت 2

(there is an extra 1 in the output)

looking through lang/fa.json, while the words themselves are correct, it seems the difficulty of handling mixed direction text has led to | character being put in the wrong spot.

image

both 1 and %d are on the same side...

Thanks!

@zumoshi zumoshi added the Bug Report a reproducible bug or regression label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report a reproducible bug or regression
Projects
None yet
Development

No branches or pull requests

1 participant