Skip to content

- Support Arabic, FrCanadian/Belgian in User Interface #3271

Merged
Keith-CY merged 3 commits into
nervosnetwork:add-more-localesfrom
Natixe:develop
Dec 10, 2024
Merged

- Support Arabic, FrCanadian/Belgian in User Interface #3271
Keith-CY merged 3 commits into
nervosnetwork:add-more-localesfrom
Natixe:develop

Conversation

@Natixe

@Natixe Natixe commented Dec 1, 2024

Copy link
Copy Markdown
Contributor
  • Support Arabic in User Interface
  • Support French Canadian in User Interface
  • Support French Belgian in User Interface

@Keith-CY

Keith-CY commented Dec 1, 2024

Copy link
Copy Markdown
Contributor

Hi @Natixe, truly appreciate your contribution to this project, we will start the review shortly.

@Danie0918

Copy link
Copy Markdown

@homura @yanguoyu @devchenyan Please have a review.

@Natixe

Natixe commented Dec 2, 2024

Copy link
Copy Markdown
Contributor Author

Thanks @Keith-CY I really like the project and ckb so I'm participating ;)

@Keith-CY

Keith-CY commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

I found the CI was blocked, any suggestions from @yanguoyu @homura

@yanguoyu

yanguoyu commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

I found the CI was blocked, any suggestions from @yanguoyu @homura

It looks like the neuron-ui package test run failed.
https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271

FAIL   UI Tests  src/tests/calendar/index.test.ts
    ● Get Local Month Short Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 12
      + Received  + 12
  
        Array [
      -   "ينا.",
      -   "فبر.",
      -   "مارس.",
      -   "أبر.",
      -   "مايو.",
      -   "يون.",
      -   "يول.",
      -   "أغس.",
      -   "سبت.",
      -   "أكت.",
      -   "نوف.",
      -   "ديس.",
      +   "يناير",
      +   "فبراير",
      +   "مارس",
      +   "أبريل",
      +   "مايو",
      +   "يونيو",
      +   "يوليو",
      +   "أغسطس",
      +   "سبتمبر",
      +   "أكتوبر",
      +   "نوفمبر",
      +   "ديسمبر",
        ]
  
        114 |   it('Arabic', () => {
        115 |     const names = ['ينا.', 'فبر.', 'مارس.', 'أبر.', 'مايو.', 'يون.', 'يول.', 'أغس.', 'سبت.', 'أكت.', 'نوف.', 'ديس.']
      > 116 |     expect(getLocalMonthShortNames('ar')).toEqual(names)
            |                                           ^
        117 |   })
        118 |
        119 |   it('Spanish', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:116:43)
  
    ● Get Local Week Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 2
      + Received  + 2
  
        Array [
          "ح",
      -   "إ",
      +   "ن",
          "ث",
      -   "أ",
      +   "ر",
          "خ",
          "ج",
          "س",
        ]
  
        [22](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:23)3 |   it('Arabic', () => {
        224 |     const names = ['ح', 'إ', 'ث', 'أ', 'خ', 'ج', 'س']
      > 2[25](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:26) |     expect(getLocalWeekNames('ar')).toEqual(names)
            |                                     ^
        2[26](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:27) |   })
        2[27](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:28) |
        228 |   it('Traditional Chinese', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:225:[37](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:38))

@Keith-CY

Keith-CY commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

I found the CI was blocked, any suggestions from @yanguoyu @homura

It looks like the neuron-ui package test run failed. nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271

FAIL   UI Tests  src/tests/calendar/index.test.ts
    ● Get Local Month Short Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 12
      + Received  + 12
  
        Array [
      -   "ينا.",
      -   "فبر.",
      -   "مارس.",
      -   "أبر.",
      -   "مايو.",
      -   "يون.",
      -   "يول.",
      -   "أغس.",
      -   "سبت.",
      -   "أكت.",
      -   "نوف.",
      -   "ديس.",
      +   "يناير",
      +   "فبراير",
      +   "مارس",
      +   "أبريل",
      +   "مايو",
      +   "يونيو",
      +   "يوليو",
      +   "أغسطس",
      +   "سبتمبر",
      +   "أكتوبر",
      +   "نوفمبر",
      +   "ديسمبر",
        ]
  
        114 |   it('Arabic', () => {
        115 |     const names = ['ينا.', 'فبر.', 'مارس.', 'أبر.', 'مايو.', 'يون.', 'يول.', 'أغس.', 'سبت.', 'أكت.', 'نوف.', 'ديس.']
      > 116 |     expect(getLocalMonthShortNames('ar')).toEqual(names)
            |                                           ^
        117 |   })
        118 |
        119 |   it('Spanish', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:116:43)
  
    ● Get Local Week Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 2
      + Received  + 2
  
        Array [
          "ح",
      -   "إ",
      +   "ن",
          "ث",
      -   "أ",
      +   "ر",
          "خ",
          "ج",
          "س",
        ]
  
        [22](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:23)3 |   it('Arabic', () => {
        224 |     const names = ['ح', 'إ', 'ث', 'أ', 'خ', 'ج', 'س']
      > 2[25](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:26) |     expect(getLocalWeekNames('ar')).toEqual(names)
            |                                     ^
        2[26](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:27) |   })
        2[27](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:28) |
        228 |   it('Traditional Chinese', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:225:[37](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:38))

I will contact the community Mod to help us review the wording to see if we should update our test sets.

@Keith-CY

Copy link
Copy Markdown
Contributor

I found the CI was blocked, any suggestions from @yanguoyu @homura

It looks like the neuron-ui package test run failed. nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271

FAIL   UI Tests  src/tests/calendar/index.test.ts
    ● Get Local Month Short Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 12
      + Received  + 12
  
        Array [
      -   "ينا.",
      -   "فبر.",
      -   "مارس.",
      -   "أبر.",
      -   "مايو.",
      -   "يون.",
      -   "يول.",
      -   "أغس.",
      -   "سبت.",
      -   "أكت.",
      -   "نوف.",
      -   "ديس.",
      +   "يناير",
      +   "فبراير",
      +   "مارس",
      +   "أبريل",
      +   "مايو",
      +   "يونيو",
      +   "يوليو",
      +   "أغسطس",
      +   "سبتمبر",
      +   "أكتوبر",
      +   "نوفمبر",
      +   "ديسمبر",
        ]
  
        114 |   it('Arabic', () => {
        115 |     const names = ['ينا.', 'فبر.', 'مارس.', 'أبر.', 'مايو.', 'يون.', 'يول.', 'أغس.', 'سبت.', 'أكت.', 'نوف.', 'ديس.']
      > 116 |     expect(getLocalMonthShortNames('ar')).toEqual(names)
            |                                           ^
        117 |   })
        118 |
        119 |   it('Spanish', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:116:43)
  
    ● Get Local Week Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 2
      + Received  + 2
  
        Array [
          "ح",
      -   "إ",
      +   "ن",
          "ث",
      -   "أ",
      +   "ر",
          "خ",
          "ج",
          "س",
        ]
  
        [22](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:23)3 |   it('Arabic', () => {
        224 |     const names = ['ح', 'إ', 'ث', 'أ', 'خ', 'ج', 'س']
      > 2[25](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:26) |     expect(getLocalWeekNames('ar')).toEqual(names)
            |                                     ^
        2[26](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:27) |   })
        2[27](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:28) |
        228 |   it('Traditional Chinese', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:225:[37](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:38))

I will contact the community Mod to help us review the wording to see if we should update our test sets.

We should update our test sets based on support from the community. @yanguoyu

And there are some reviews for the rest of the translations, I will append them later.

@Keith-CY

Keith-CY commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

I found the CI was blocked, any suggestions from @yanguoyu @homura

It looks like the neuron-ui package test run failed. nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271

FAIL   UI Tests  src/tests/calendar/index.test.ts
    ● Get Local Month Short Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 12
      + Received  + 12
  
        Array [
      -   "ينا.",
      -   "فبر.",
      -   "مارس.",
      -   "أبر.",
      -   "مايو.",
      -   "يون.",
      -   "يول.",
      -   "أغس.",
      -   "سبت.",
      -   "أكت.",
      -   "نوف.",
      -   "ديس.",
      +   "يناير",
      +   "فبراير",
      +   "مارس",
      +   "أبريل",
      +   "مايو",
      +   "يونيو",
      +   "يوليو",
      +   "أغسطس",
      +   "سبتمبر",
      +   "أكتوبر",
      +   "نوفمبر",
      +   "ديسمبر",
        ]
  
        114 |   it('Arabic', () => {
        115 |     const names = ['ينا.', 'فبر.', 'مارس.', 'أبر.', 'مايو.', 'يون.', 'يول.', 'أغس.', 'سبت.', 'أكت.', 'نوف.', 'ديس.']
      > 116 |     expect(getLocalMonthShortNames('ar')).toEqual(names)
            |                                           ^
        117 |   })
        118 |
        119 |   it('Spanish', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:116:43)
  
    ● Get Local Week Names › Arabic
  
      expect(received).toEqual(expected) // deep equality
  
      - Expected  - 2
      + Received  + 2
  
        Array [
          "ح",
      -   "إ",
      +   "ن",
          "ث",
      -   "أ",
      +   "ر",
          "خ",
          "ج",
          "س",
        ]
  
        [22](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:23)3 |   it('Arabic', () => {
        224 |     const names = ['ح', 'إ', 'ث', 'أ', 'خ', 'ج', 'س']
      > 2[25](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:26) |     expect(getLocalWeekNames('ar')).toEqual(names)
            |                                     ^
        2[26](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:27) |   })
        2[27](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:28) |
        228 |   it('Traditional Chinese', () => {
  
        at Object.<anonymous> (src/tests/calendar/index.test.ts:225:[37](https://github.com/nervosnetwork/neuron/actions/runs/12127893610/job/33894569475?pr=3271#step:9:38))

I will contact the community Mod to help us review the wording to see if we should update our test sets.

We should update our test sets based on support from the community. @yanguoyu

And there are some reviews for the rest of the translations, I will append them later.

With the help of ChatGPT, I found the translation to be pretty good and didn't need to be adjusted.
I would suggest merging this PR to a specific branch first and fixing the test sets from our sides, any idea from @yanguoyu @homura

@yanguoyu

Copy link
Copy Markdown
Contributor

With the help of ChatGPT, I found the translation to be pretty good and didn't need to be adjusted. I would suggest merging this PR to a specific branch first and fixing the test sets from our sides, any idea from @yanguoyu @homura

No problem

@homura

homura commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

With the help of ChatGPT, I found the translation to be pretty good and didn't need to be adjusted.
I would suggest merging this PR to a specific branch first and fixing the test sets from our sides, any idea from

I also asked Claude, and it told me that this is a high-quality translation
thx a lot for the outstanding work

@Keith-CY
Keith-CY changed the base branch from develop to add-more-locales December 10, 2024 05:39
@Keith-CY

Copy link
Copy Markdown
Contributor

I've opened https://github.com/nervosnetwork/neuron/tree/add-more-locales to fix the test sets. Please add approval if no more suggestion @yanguoyu @homura

@Keith-CY
Keith-CY merged commit a4a1a7d into nervosnetwork:add-more-locales Dec 10, 2024
@Keith-CY

Copy link
Copy Markdown
Contributor

Support for Arabic, Canadian/Belgian French will be delivered in the next release.
We sincerely appreciate your contribution to our project and the community 👏 @Natixe

@Natixe

Natixe commented Dec 10, 2024

Copy link
Copy Markdown
Contributor Author

Hey, thank you for the compliments on my translation; I was happy to do it. If you know a native Arabic speaker who can give you feedback, that would be even better. I hope you appreciate my help in any case :) ^^

github-merge-queue Bot pushed a commit that referenced this pull request Dec 13, 2024
* - Support Arabic, FrCanadian/Belgian in User Interface (#3271)

* test: fix test cases which derived from Intl

* refactor: remove unrelated update

---------

Co-authored-by: Natixe <49234582+Natixe@users.noreply.github.com>
@Keith-CY Keith-CY mentioned this pull request Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants