Skip to content

feat: add Traditional Chinese translations for tray plugin#334

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-322517
Jul 7, 2025
Merged

feat: add Traditional Chinese translations for tray plugin#334
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-322517

Conversation

@wjyrich

@wjyrich wjyrich commented Jul 4, 2025

Copy link
Copy Markdown
Contributor
  1. Added new translation files for Traditional Chinese (zh_HK and zh_TW)
  2. Translated "Remove from dock" and "Pin to dock" strings
  3. Different translations provided for PluginItem and QuickPluginItem contexts
  4. Supports Hong Kong and Taiwan Chinese variants with appropriate terminology

feat: 添加托盘插件的繁体中文翻译

  1. 新增繁体中文(香港和台湾)翻译文件
  2. 翻译了"Remove from dock"和"Pin to dock"字符串
  3. 为PluginItem和QuickPluginItem上下文提供不同的翻译
  4. 支持香港和台湾的中文变体并使用适当的术语

Summary by Sourcery

Add Traditional Chinese (Hong Kong and Taiwan) translations for the tray plugin by creating separate localization files and translating key UI actions.

New Features:

  • Add zh_HK and zh_TW translation files for the tray plugin
  • Localize ‘Remove from dock’ and ‘Pin to dock’ strings in PluginItem and QuickPluginItem for Hong Kong and Taiwan variants

1. Added new translation files for Traditional Chinese (zh_HK and zh_TW)
2. Translated "Remove from dock" and "Pin to dock" strings
3. Different translations provided for PluginItem and QuickPluginItem
contexts
4. Supports Hong Kong and Taiwan Chinese variants with appropriate
terminology

feat: 添加托盘插件的繁体中文翻译

1. 新增繁体中文(香港和台湾)翻译文件
2. 翻译了"Remove from dock"和"Pin to dock"字符串
3. 为PluginItem和QuickPluginItem上下文提供不同的翻译
4. 支持香港和台湾的中文变体并使用适当的术语
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

代码审查结果:

  1. 文件格式

    • 文件扩展名应为 .xml 而不是 .ts,因为这是一个 XML 文件,而不是 TypeScript 文件。
  2. 翻译一致性

    • trayplugin-loader_zh_HK.tstrayplugin-loader_zh_TW.ts 文件中,Remove from dock 的翻译分别为 "拿掉駐留" 和 "從任務列移除",这两个翻译在语义上可能不完全一致。建议确认翻译是否准确。
  3. 重复代码

    • trayplugin-loader_zh_HK.tstrayplugin-loader_zh_TW.ts 文件中的内容几乎完全相同,可以考虑将重复的翻译提取到一个公共文件中,以减少代码冗余。
  4. 注释和文档

    • 缺少对翻译文件内容的注释说明,建议添加注释说明每个翻译项的用途和上下文。
  5. 编码规范

    • 确保所有翻译项的格式和缩进一致,以提高代码的可读性。
  6. 语言版本

    • 确保文件名中的语言代码(如 zh_HKzh_TW)与实际翻译的语言版本一致。

改进建议:

  • 将文件扩展名从 .ts 改为 .xml
  • 确认并调整翻译以确保语义一致。
  • 提取重复的翻译到公共文件中。
  • 添加注释说明每个翻译项的用途和上下文。
  • 确保代码格式和缩进的一致性。
  • 确认语言代码与实际翻译的语言版本一致。

@sourcery-ai

sourcery-ai Bot commented Jul 4, 2025

Copy link
Copy Markdown

Reviewer's Guide

Adds two new Traditional Chinese translation files (zh_HK and zh_TW) for the tray plugin, providing localized “Remove from dock” and “Pin to dock” strings in both PluginItem and QuickPluginItem contexts.

Entity relationship diagram for new translation files

erDiagram
    TRAYPLUGIN_LOADER_ZH_HK ||--|| PLUGINITEM : contains
    TRAYPLUGIN_LOADER_ZH_HK ||--|| QUICKPLUGINITEM : contains
    TRAYPLUGIN_LOADER_ZH_TW ||--|| PLUGINITEM : contains
    TRAYPLUGIN_LOADER_ZH_TW ||--|| QUICKPLUGINITEM : contains
    PLUGINITEM {
        string Remove_from_dock
    }
    QUICKPLUGINITEM {
        string Remove_from_dock
        string Pin_to_dock
    }
Loading

Class diagram for new translation contexts in tray plugin

classDiagram
    class PluginItem {
        +"Remove from dock": string
    }
    class QuickPluginItem {
        +"Remove from dock": string
        +"Pin to dock": string
    }
    PluginItem <|-- trayplugin-loader_zh_HK
    QuickPluginItem <|-- trayplugin-loader_zh_HK
    PluginItem <|-- trayplugin-loader_zh_TW
    QuickPluginItem <|-- trayplugin-loader_zh_TW
Loading

File-Level Changes

Change Details Files
Added Traditional Chinese translation support for tray plugin
  • Added Hong Kong variant translation file
  • Added Taiwan variant translation file
  • Localized “Remove from dock” for PluginItem
  • Localized “Remove from dock” for QuickPluginItem
  • Localized “Pin to dock” for QuickPluginItem
src/loader/translations/trayplugin-loader_zh_HK.ts
src/loader/translations/trayplugin-loader_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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey @wjyrich - I've reviewed your changes - here's some feedback:

  • The zh_HK and zh_TW files contain identical translations—if your tooling supports it, consider consolidating into a shared zh_Hant locale to reduce duplication.
  • Verify that using “駐留” versus “任務列” aligns with the rest of the UI to ensure consistent terminology across all contexts.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The zh_HK and zh_TW files contain identical translations—if your tooling supports it, consider consolidating into a shared zh_Hant locale to reduce duplication.
- Verify that using “駐留” versus “任務列” aligns with the rest of the UI to ensure consistent terminology across all contexts.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, wjyrich

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

@wjyrich

wjyrich commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 7, 2025

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot deepin-bot Bot merged commit 6d824d4 into linuxdeepin:master Jul 7, 2025
7 of 10 checks passed
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