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

[i18n] Add additional translations for de-DE, es-ES, fr-FR, id-ID, it-IT, js-JP, ko-KR, pt-PT, tr-TR, zh-CN, and zh-TW #8788

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

AMoo-Miki
Copy link
Collaborator

@AMoo-Miki AMoo-Miki commented Nov 1, 2024

Description

[i18n] Add additional translations for de-DE, es-ES, fr-FR, id-ID, it-IT, ja-JP, ko-KR, pt-PT, tr-TR, zh-CN, and zh-TW

Changelog

  • feat: [i18n-dev] Allow updating existing localization files when importing with "i18n:integrate"
  • feat: [i18n] Add additional translations for de-DE, es-ES, fr-FR, id-ID, it-IT, pt-PT, and tr-TR
  • feat: [i18n] Add additional translations for ja-JP, ko-KR, zh-CN, and zh-TW

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

github-actions bot commented Nov 1, 2024

❌ Entry Too Long

Entry is 119 characters long, which is 19 characters longer than the maximum allowed length of 100 characters. Please revise your entry to be within the maximum length.

Copy link
Contributor

github-actions bot commented Nov 1, 2024

❌ Invalid Prefix

Invalid description prefix. Found "". Expected "breaking", "deprecate", "feat", "fix", "infra", "doc", "chore", "refactor", "security", "skip", or "test".

opensearch-changeset-bot bot added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Nov 1, 2024
opensearch-changeset-bot bot added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Nov 1, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 82.60870% with 8 lines in your changes missing coverage. Please review.

Project coverage is 60.80%. Comparing base (affd265) to head (63140cb).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/dev/i18n/integrate_locale_files.ts 82.60% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8788      +/-   ##
==========================================
+ Coverage   60.75%   60.80%   +0.04%     
==========================================
  Files        3798     3798              
  Lines       90690    90734      +44     
  Branches    14277    14290      +13     
==========================================
+ Hits        55101    55169      +68     
+ Misses      32090    32065      -25     
- Partials     3499     3500       +1     
Flag Coverage Δ
Linux_1 29.05% <ø> (-0.01%) ⬇️
Linux_2 56.39% <ø> (ø)
Linux_3 37.65% <ø> (+0.04%) ⬆️
Linux_4 29.87% <82.60%> (+0.04%) ⬆️
Windows_1 29.06% <ø> (-0.01%) ⬇️
Windows_2 56.34% <ø> (ø)
Windows_3 37.65% <ø> (+0.04%) ⬆️
Windows_4 29.87% <82.60%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AMoo-Miki AMoo-Miki added i18n Internationalization related Issues and PRs backport 2.x labels Nov 1, 2024
joshuali925
joshuali925 previously approved these changes Nov 1, 2024
@@ -206,19 +215,94 @@ async function writeMessages(
}
}

function isSpreadableObject(value: unknown) {
try {
return { ...value }, true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think [...null] results in error but {...null} works, should it consider null as non spreadable?

reading a bit more seems it's iterable vs enumerable, looking at usage i think it's fine since it's spreading into an object

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null is an acceptable argument but thanks for thinking about it.

return false; // Found a key, so it is NOT empty
}
}
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have lodash for these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are actively trying to phase out lodash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some tests for these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing tests for this functionality are pretty inadequate. I have created an issue for it:
#8791

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some tests for the new functionality.

Copy link
Member

@kavilla kavilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

Copy link
Collaborator

@virajsanghvi virajsanghvi 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 meeting patch coverage!

A cypress test is failing, but looks like that's been happening elsewhere

@AMoo-Miki
Copy link
Collaborator Author

ciGroup10 is new group which currently has no tests. Hence merging this PR.

@AMoo-Miki AMoo-Miki merged commit 87832f3 into opensearch-project:main Nov 6, 2024
68 of 69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 6, 2024
…-IT, js-JP, ko-KR, pt-PT, tr-TR, zh-CN, and zh-TW (#8788)

* [i18n-dev] Allow updating existing localization files when importing with "i18n:integrate"

Signed-off-by: Miki <[email protected]>

* [i18n] Add additional translations for de-DE, es-ES, fr-FR, id-ID, it-IT, ja-JP, ko-KR, pt-PT, tr-TR, zh-CN, and zh-TW

Signed-off-by: Miki <[email protected]>

* Changeset file for PR #8788 created/updated

---------

Signed-off-by: Miki <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 87832f3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ananzh pushed a commit that referenced this pull request Nov 7, 2024
…-IT, js-JP, ko-KR, pt-PT, tr-TR, zh-CN, and zh-TW (#8788) (#8821)

* [i18n-dev] Allow updating existing localization files when importing with "i18n:integrate"
* [i18n] Add additional translations for de-DE, es-ES, fr-FR, id-ID, it-IT, ja-JP, ko-KR, pt-PT, tr-TR, zh-CN, and zh-TW
* Changeset file for PR #8788 created/updated

---------



(cherry picked from commit 87832f3)

Signed-off-by: Miki <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x distinguished-contributor i18n Internationalization related Issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants