Skip to content

[localization] add Chinese strings#252

Merged
capcom6 merged 1 commit intomasterfrom
issue/251-chinese-locale
Aug 2, 2025
Merged

[localization] add Chinese strings#252
capcom6 merged 1 commit intomasterfrom
issue/251-chinese-locale

Conversation

@capcom6
Copy link
Copy Markdown
Owner

@capcom6 capcom6 commented Aug 1, 2025

Summary by CodeRabbit

  • New Features

    • Added Chinese language support with localized interface text for the SMS Gateway app.
  • Bug Fixes

    • Removed duplicate string entries to improve text resource consistency.
  • Chores

    • Reorganized string resource files for enhanced maintainability.

@capcom6 capcom6 linked an issue Aug 1, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 1, 2025

Walkthrough

A new Chinese localization resource file with 121 string entries was added to support the SMS Gateway application's UI in Chinese. Additionally, the main English string resource file was updated to move and deduplicate certain string entries, with one entry marked as non-translatable.

Changes

Cohort / File(s) Change Summary
Chinese Localization Addition
app/src/main/res/values-zh/strings.xml
Added 121 Chinese string resources for UI localization, covering labels, messages, instructions, and UI elements.
String Resource Maintenance
app/src/main/res/values/strings.xml
Deduplicated "device," "device_id," and "sms" entries; moved them earlier; marked "sms" as non-translatable.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a665bb and 315ca73.

📒 Files selected for processing (2)
  • app/src/main/res/values-zh/strings.xml (1 hunks)
  • app/src/main/res/values/strings.xml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/main/res/values/strings.xml
  • app/src/main/res/values-zh/strings.xml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build / build-apk
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue/251-chinese-locale

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this 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.

Copy link
Copy Markdown

@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
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 404dd29 and 1a665bb.

📒 Files selected for processing (2)
  • app/src/main/res/values-zh/strings.xml (1 hunks)
  • app/src/main/res/values/strings.xml (2 hunks)
🔇 Additional comments (3)
app/src/main/res/values/strings.xml (2)

23-24: Duplicates resolved correctly – looks good.

Moving device / device_id earlier in the file eliminates the late-file duplicates without introducing new ones.
No action required.


100-100: Correctly marked as non-translatable – keep translations aligned.

<string name="sms" translatable="false">…</string> is now present only in the default locale. Confirmed absent from the values-zh file, so no duplicate/translation leakage occurs.

app/src/main/res/values-zh/strings.xml (1)

1-121: Placeholder parity verified: all placeholders match between default and zh locales
Automated script confirms every %n$… placeholder in values-zh/strings.xml aligns with the default values/strings.xml.

Comment thread app/src/main/res/values-zh/strings.xml Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 1, 2025

🤖 Pull request artifacts

file commit
app-release.apk 315ca73
app-release.aab 315ca73

@capcom6 capcom6 force-pushed the issue/251-chinese-locale branch from 1a665bb to 315ca73 Compare August 2, 2025 07:42
@capcom6 capcom6 merged commit 09e7f5a into master Aug 2, 2025
3 checks passed
@capcom6 capcom6 deleted the issue/251-chinese-locale branch August 2, 2025 23:09
@coderabbitai coderabbitai Bot mentioned this pull request Aug 30, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Dec 2, 2025
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