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

棋譜情報に「記録係」を追加 #953

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

sunfish-shogi
Copy link
Owner

@sunfish-shogi sunfish-shogi commented Sep 6, 2024

説明 / Description

sunfish-shogi/tsshogi#24

チェックリスト / Checklist

  • MUST
    • npm test passed
    • npm run lint was applied without warnings
    • changes of /docs/webapp not included (except release branch)
    • console.log not included (except script file)
  • MUST for Outside Contributor
  • RECOMMENDED (it depends on what you change)
    • unit test added/updated
    • i18n

Summary by CodeRabbit

  • New Features

    • Added localization support for the term "Scorekeeper" in English, Japanese, Vietnamese, and Traditional Chinese, improving the user experience for multilingual users.
    • Enhanced functionality to handle scorekeeper metadata within the application.
  • Documentation

    • Updated the Texts type to include a new property for scorekeeper, aiding in internationalization efforts.

@sunfish-shogi sunfish-shogi self-assigned this Sep 6, 2024
Copy link

coderabbitai bot commented Sep 6, 2024

Walkthrough

The changes introduce a new localization entry for "scorekeeper" across multiple language files, including English, Japanese, Vietnamese, and Chinese (Traditional). Additionally, the getRecordMetadataName function is updated to handle the new RecordMetadataKey.SCOREKEEPER, and the Texts type is modified to incorporate the scorekeeper property. These updates enhance the internationalization support within the application.

Changes

Files Change Summary
src/common/i18n/locales/en.ts Added scorekeeper: "Scorekeeper" to the English localization.
src/common/i18n/locales/ja.ts Added scorekeeper: "記録係" to the Japanese localization.
src/common/i18n/locales/vi.ts Added scorekeeper: "記録係" to the Vietnamese localization.
src/common/i18n/locales/zh_tw.ts Added scorekeeper: "記録係" to the Chinese (Traditional) localization.
src/common/i18n/record.ts Extended getRecordMetadataName to handle RecordMetadataKey.SCOREKEEPER.
src/common/i18n/text_template.ts Updated Texts type to include scorekeeper: string;.

Poem

🐰 In the meadow where bunnies play,
A scorekeeper hops, brightening the day.
With words now in many a tongue,
Our games are more fun, and songs are sung!
So let’s cheer for the changes, hooray! 🎉


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sunfish-shogi sunfish-shogi marked this pull request as ready for review September 6, 2024 17:09
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.49%. Comparing base (9ce3b34) to head (6892f69).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #953   +/-   ##
=======================================
  Coverage   71.49%   71.49%           
=======================================
  Files         106      106           
  Lines       10918    10918           
  Branches     1963     1963           
=======================================
  Hits         7806     7806           
  Misses       3094     3094           
  Partials       18       18           

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9ce3b34 and 6892f69.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (6)
  • src/common/i18n/locales/en.ts (1 hunks)
  • src/common/i18n/locales/ja.ts (1 hunks)
  • src/common/i18n/locales/vi.ts (1 hunks)
  • src/common/i18n/locales/zh_tw.ts (1 hunks)
  • src/common/i18n/record.ts (1 hunks)
  • src/common/i18n/text_template.ts (1 hunks)
Files skipped from review due to trivial changes (2)
  • src/common/i18n/locales/en.ts
  • src/common/i18n/locales/zh_tw.ts
Additional comments not posted (3)
src/common/i18n/record.ts (1)

50-51: Approved: Addition of SCOREKEEPER case in getRecordMetadataName.

The implementation of the new case for RecordMetadataKey.SCOREKEEPER is consistent with the existing structure and coding style of the switch statement. The use of t.scorekeeper assumes that the translation setup is correctly handled, which should be verified in the corresponding translation files.

src/common/i18n/text_template.ts (1)

386-386: Approved: Addition of scorekeeper property to Texts type.

The addition of the scorekeeper property to the Texts type is correctly implemented and aligns with the structure of the existing properties. This change supports the new functionality of handling scorekeeper data in different languages.

src/common/i18n/locales/ja.ts (1)

391-391: Approved: Addition of scorekeeper translation in Japanese locale.

The new translation entry for scorekeeper as "記録係" is appropriately added to the Japanese locale file. This aligns with the internationalization efforts and supports the new functionality introduced in the application.

@@ -388,6 +388,7 @@ export const vi: Texts = {
note: "Ghi chú",
senteShortName: "Tiên thủ (ngắn)",
goteShortName: "Hậu thủ (ngắn)",
scorekeeper: "記録係", // TODO: translate
Copy link

Choose a reason for hiding this comment

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

Addition of scorekeeper key approved but requires translation.

The addition of the scorekeeper key aligns with the PR's objectives. However, the value "記録係" is in Japanese, which suggests it needs translation to Vietnamese. Please address the TODO comment by providing a translation or confirming if the placeholder should remain as is.

@sunfish-shogi sunfish-shogi merged commit e7ac875 into main Sep 6, 2024
5 checks passed
@sunfish-shogi sunfish-shogi deleted the add-scorekeeper branch September 6, 2024 17:33
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.

1 participant