-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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(i18n): add Arabic(AR) translation #19214
Conversation
Adding Arabic language, in progress.
Thanks for your contribution! To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: This message is shown because the PR description doesn't contain the document related template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contribution. Why are most of them not translated?
Arabic Translation completed. |
Arabic Translation completed.
monthAbbr: [ | ||
'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', | ||
'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر' | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The month items seem not to be sorted from 1~12 and the dayOfWeek items seem not to be sorted from Sunday-Saturday.
Ref:
https://github.com/amcharts/amcharts5/blob/master/src/locales/ar.ts#L227C14-L266
https://en.wikipedia.org/wiki/Arabic_names_of_Gregorian_months
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is not in the code, but in the code editor, as it displays texts that contain RTL languages in reverse.
I suffer from this problem a lot, as an Arab software developer.
The code display is wrong, but the output is correct.
The same applies to the order of days.
EX:
var monthAbb = [
'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو',
'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'
]
console.log(monthAbb[0]) // يناير = January
console.log(monthAbb[11]) // ديسمبر = December
var dayOfWeek = [
'الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'
]
console.log(dayOfWeek[0]) // الأحد = Sunday
console.log(dayOfWeek[6]) // السبت = Saturday
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explanation. Get it.
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19214@2c56c44 |
Adding Arabic language.
Brief Information
This pull request is in the type of:
What does this PR do?
Other information
- in progress...