-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix: update fa locale #2151
fix: update fa locale #2151
Conversation
we use https://github.com/moment/moment/blob/develop/src/locale/fa.js as a reference, can you please tell us why such a difference between the two? |
Codecov Report
@@ Coverage Diff @@
## dev #2151 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 183 183
Lines 2096 2096
Branches 550 549 -1
=========================================
Hits 2096 2096
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hi iamkun
Firstly, thank you for paying attention to this issue and emphasizing the
importance of accurate translations based on location.
The common calendar of Persian speakers and people of Iran is the Jalali
calendar.
The order of the months of the Jalali calendar is as follows :
| No | Month (Persian Language) | Month (English Language)
| 1 | فروردین | Farvardin
| 2 | اردیبهشت | Ordibehesht
| 3. | خرداد | Khordad
| 4 | تیر | Tir
| 5 | مرداد | Mordad
| 6 | شهریور | Shahrivar
| 7 | مهر | Mehr
| 8 | آبان | Aban
| 9 | آذر | Azar
| 10 | دی | Dey
| 11 | بهمن | Bahman
| 12 | اسفند | Esfand
Click here for more details
<https://en.wikipedia.org/wiki/Iranian_calendars>
Most libraries and frameworks use the dayjs library (for example, in
the DatePicker
of the Mantain library <https://mantine.dev/dates/date-picker/>).
Because of this problem, programmers were forced to develop side libraries
from the dayjs library (for example, dayjs-jalali
<https://github.com/torbatian/dayjs-jalali> , jalaliday
<https://github.com/alibaba-aero/jalaliday>) ,moment.js library has exactly
the same problem (Persian example : moment-jalaali
<https://github.com/jalaali/moment-jalaali>).
For these reasons, I requested to change the Farsi translation
…On Sat, Dec 3, 2022 at 4:32 PM iamkun ***@***.***> wrote:
we use https://github.com/moment/moment/blob/develop/src/locale/fa.js as
a reference, can you please tell us why such a difference between the two?
—
Reply to this email directly, view it on GitHub
<#2151 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJ4WMWPS37HEO434WSXUKLWLNAE7ANCNFSM6AAAAAASRXU2JQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks for the details above. I'm afraid I can't decide whether to merge this or not since it has a lot of differences from the original moment's locale. I'll label this pr and wait for more reviews from your native speakers. |
Thank you for paying attention to this issue |
I am agree with Soheil. |
Cheers |
🎉 This PR is included in version 1.11.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@iamkun @Soheil-Saberi This PR is getting it wrong by simply translating locale months to Solar Hijri calendar but not taking care of solar calendar's date and time transformations. Dayjs' locale provides literal translations of the Gregory calendar's months which is correct. I believe this PR should be reverted to avoid confusions and misunderstanding. I suggest to use this plugin for Persian users. It handles all the date-time logic of solar calendar along with correct names of the months. |
hi @raminjafary |
Most of the countries do not have solar calendar. As a result, they have one to one mapping of English [literal] translations for the months. But, If you use solar (Persian) months, you have to use solar calendar date-time, too. |
@raminjafary |
There is no guarantee that the other locale files of the other countries in Dayjs repo is being approved context wise. |
@raminjafary |
## [1.11.7](iamkun/dayjs@v1.11.6...v1.11.7) (2022-12-06) ### Bug Fixes * Add locale (zh-tw) meridiem ([iamkun#2149](iamkun#2149)) ([1e9ba76](iamkun@1e9ba76)) * update fa locale ([iamkun#2151](iamkun#2151)) ([1c26732](iamkun@1c26732))
## [1.11.7](iamkun/dayjs@v1.11.6...v1.11.7) (2022-12-06) ### Bug Fixes * Add locale (zh-tw) meridiem ([iamkun#2149](iamkun#2149)) ([1e9ba76](iamkun@1e9ba76)) * update fa locale ([iamkun#2151](iamkun#2151)) ([1c26732](iamkun@1c26732))
Hi everyone. if using Persian calendar (shamsi/jalalli), It does not make sense, neither it is useable from a user's use-case point of view, to translate the NAME of first month of the Gregorian calendar to the NAME of first month of another calendar without converting dates. The #2151 PR is not correct in this matter. A new PR is required to fix the To solve the issue around calendar systems with dayjs, I have created a new plugin that allows using multiple non-gregorian calendars and does correct conversions. Have a look here: https://github.com/calidy-com/dayjs-calendarsystems Also, my plugin does an override on the |
What an irresponsible PR! This needs to be reverted asap. Related: alibaba-aero/jalaliday#39 |
@iamkun FYI |
I opened a PR to undo these changes. @mokhosh @amirhmoradi It would be great if I could have your comments or confirmations on this PR #2411. |
🎉 This issue has been resolved in version 1.11.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [1.11.7](iamkun/dayjs@v1.11.6...v1.11.7) (2022-12-06) ### Bug Fixes * Add locale (zh-tw) meridiem ([iamkun#2149](iamkun#2149)) ([1e9ba76](iamkun@1e9ba76)) * update fa locale ([iamkun#2151](iamkun#2151)) ([1c26732](iamkun@1c26732))
update translate month ,monthsShort , weekdaysShort and relativeTime.past