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(i18n): add Arabic(AR) translation #19214

Merged
merged 2 commits into from
Oct 18, 2023
Merged

feat(i18n): add Arabic(AR) translation #19214

merged 2 commits into from
Oct 18, 2023

Conversation

OthmanAliModaes
Copy link
Contributor

Adding Arabic language.

Brief Information

This pull request is in the type of:

  • Add new language.

What does this PR do?

  • Add Arabic language file: src/i18n/langAR.ts

Other information

- in progress...

Adding Arabic language, in progress.
@echarts-bot
Copy link

echarts-bot bot commented Oct 16, 2023

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

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: PR: doc ready, PR: awaiting doc, PR: doc unchanged

This message is shown because the PR description doesn't contain the document related template.

Ovilia
Ovilia previously requested changes Oct 17, 2023
Copy link
Contributor

@Ovilia Ovilia left a 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?

@plainheart plainheart marked this pull request as draft October 17, 2023 08:19
@OthmanAliModaes
Copy link
Contributor Author

OthmanAliModaes commented Oct 17, 2023

Arabic Translation completed.

Arabic Translation completed.
@OthmanAliModaes OthmanAliModaes marked this pull request as ready for review October 17, 2023 13:44
@plainheart plainheart changed the title Create langAR.ts feat(i18n): add Arabic(AR) translation Oct 18, 2023
Comment on lines +31 to +34
monthAbbr: [
'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو',
'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'
],
Copy link
Member

@plainheart plainheart Oct 18, 2023

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

Copy link
Contributor Author

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

Copy link
Member

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.

@plainheart plainheart added this to the 5.5.0 milestone Oct 18, 2023
@plainheart plainheart merged commit 31d58b2 into apache:master Oct 18, 2023
2 checks passed
@echarts-bot
Copy link

echarts-bot bot commented Oct 18, 2023

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@github-actions
Copy link
Contributor

The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19214@2c56c44

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

Successfully merging this pull request may close these issues.

3 participants