Skip to content

fix: 修复翻译#285

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:release/eaglefrom
myk1343:uploadcode
Jun 10, 2025
Merged

fix: 修复翻译#285
deepin-bot[bot] merged 1 commit intolinuxdeepin:release/eaglefrom
myk1343:uploadcode

Conversation

@myk1343
Copy link
Copy Markdown
Contributor

@myk1343 myk1343 commented Jun 10, 2025

修复翻译

Bug: https://pms.uniontech.com/bug-view-319371.html
https://pms.uniontech.com/bug-view-319211.html
Log: 修复翻译

Summary by Sourcery

Add missing Chinese translations for archive error and password prompt dialogs and align translation entries with new query code locations across all Chinese locale TS files.

Enhancements:

  • Add �LoadCorruptQuery� context translations (archive damaged, open read-only, cancel) in zh_CN, zh_HK, and zh_TW TS files
  • Add �PasswordNeededQuery� context translation for encrypted file password prompt in all Chinese locale TS files
  • Extend location references for Skip, Replace, Cancel, OK, and Apply to all button labels to include corresponding 3rdparty interface query code

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

代码审查意见:

  1. 代码重复:在deepin-compressor_zh_CN.tsdeepin-compressor_zh_HK.tsdeepin-compressor_zh_TW.ts文件中,LoadCorruptQueryPasswordNeededQuery等上下文和消息的翻译内容是相同的。建议将这些重复的翻译提取到一个公共文件中,以减少代码冗余。

  2. 翻译一致性:在deepin-compressor_zh_CN.tsdeepin-compressor_zh_HK.tsdeepin-compressor_zh_TW.ts文件中,Open as read-onlyCancel等按钮文本的翻译在三个文件中是相同的,但Replace按钮的翻译在三个文件中略有不同(deepin-compressor_zh_CN.ts中为“替 换”,deepin-compressor_zh_HK.tsdeepin-compressor_zh_TW.ts中为“替 換”)。建议统一这些翻译,保持一致性。

  3. 注释和文档:在deepin-compressor_zh_CN.tsdeepin-compressor_zh_HK.tsdeepin-compressor_zh_TW.ts文件中,有些消息的<comment>标签下没有添加注释说明,建议在这些标签下添加适当的注释,以便其他开发者理解这些消息的用途。

  4. 文件命名deepin-compressor_zh_CN.tsdeepin-compressor_zh_HK.tsdeepin-compressor_zh_TW.ts文件名中的zh_CNzh_HKzh_TW分别代表简体中文、繁体中文和台湾繁体中文。建议在文件名中添加语言代码的注释,以便其他开发者理解这些文件的语言类型。

  5. 代码格式:在deepin-compressor_zh_CN.tsdeepin-compressor_zh_HK.tsdeepin-compressor_zh_TW.ts文件中,有些消息的<translation>标签下的文本没有遵循统一的格式,建议统一格式,例如使用空格、换行等来保持代码的整洁和可读性。

  6. 版本控制:在deepin-compressor_zh_CN.tsdeepin-compressor_zh_HK.tsdeepin-compressor_zh_TW.ts文件中,有些消息的<location>标签下包含了文件路径和行号。这些信息通常不需要在翻译文件中保留,因为它们是开发相关的信息,而不是翻译相关的信息。建议移除这些信息,以保持翻译文件的简洁性。

综上所述,建议对上述文件进行重构,以提高代码质量和可维护性。

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Jun 10, 2025

Reviewer's Guide

This PR enriches the translation TS files by adding missing UI contexts for damaged archives and encrypted file prompts and synchronizes location references for existing popup dialog strings across Simplified, Traditional Hong Kong, and Traditional Taiwan Chinese.

File-Level Changes

Change Details Files
Add missing translation contexts for archive corruption and password prompts
  • Introduce LoadCorruptQuery context with translations for damage warning, read-only option, and cancel
  • Introduce PasswordNeededQuery context with translation for encrypted file password prompt
translations/deepin-compressor_zh_CN.ts
translations/deepin-compressor_zh_HK.ts
translations/deepin-compressor_zh_TW.ts
Align translation entries for popup dialogs with 3rdparty interface source
  • Add location tags in TS files for Skip, Replace, Cancel, OK, and Apply to all mapping to queries.cpp
translations/deepin-compressor_zh_CN.ts
translations/deepin-compressor_zh_HK.ts
translations/deepin-compressor_zh_TW.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: max-lvs, myk1343

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@myk1343
Copy link
Copy Markdown
Contributor Author

myk1343 commented Jun 10, 2025

/forcemerge

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot bot commented Jun 10, 2025

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit 21721d2 into linuxdeepin:release/eagle Jun 10, 2025
14 of 15 checks passed
@myk1343 myk1343 deleted the uploadcode branch June 16, 2025 07:29
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.

3 participants