Skip to content

fix: Fix untranslated Japanese in the right-click menu#357

Merged
pengfeixx merged 1 commit intolinuxdeepin:develop/snipefrom
pengfeixx:fix-339753
Jan 22, 2026
Merged

fix: Fix untranslated Japanese in the right-click menu#357
pengfeixx merged 1 commit intolinuxdeepin:develop/snipefrom
pengfeixx:fix-339753

Conversation

@pengfeixx
Copy link
Contributor

@pengfeixx pengfeixx commented Jan 21, 2026

Fix untranslated Japanese in the right-click menu

Log: Fix untranslated Japanese in the right-click menu

Summary by Sourcery

Bug Fixes:

  • Provide Japanese locale labels for compress and add-to-archive context menu actions to fix previously untranslated items.

Fix untranslated Japanese in the right-click menu

Log: Fix untranslated Japanese in the right-click menu
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 21, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds missing Japanese (ja) translations for several context menu actions related to single-file compression so that the right-click menu is fully localized in Japanese.

File-Level Changes

Change Details Files
Add missing Japanese translations for single-compress context menu actions.
  • Add Japanese translation for the generic single-file compress action label.
  • Add Japanese translation for the "Add to "%b.7z"" context menu item.
  • Add Japanese translation for the "Add to "%b.zip"" context menu item.
src/conf/compressor-singlecompress.conf

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In the Name[id] entry for the .zip action, the placeholder uses %d.zip while the others use %b.zip; consider aligning this placeholder for consistency unless there is a specific reason for the difference.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `Name[id]` entry for the .zip action, the placeholder uses `%d.zip` while the others use `%b.zip`; consider aligning this placeholder for consistency unless there is a specific reason for the difference.

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

deepin pr auto review

这份 git diff 展示了对配置文件 compressor-singlecompress.conf 的修改,主要是在配置文件中添加了日语(ja)的本地化翻译。

以下是对该修改的详细审查意见:

1. 语法与格式审查

  • 格式一致性:新增的日语条目 Name[ja]=... 严格遵循了文件中已有的键值对格式(Name[语言代码]=翻译内容),格式完全正确。
  • 编码字符:新增的日语内容(如 圧縮追加)均为合法的 Unicode 字符。只要该配置文件保存为 UTF-8 编码(这是 Linux 桌面配置文件的标准),就不会出现乱码问题。
  • 引号使用
    • 在第一处修改中,Name[ja]=圧縮 没有使用引号,这与 Name[fr]=Compresser 等其他语言条目保持一致,符合规范。
    • 在第二处和第三处修改中,Name[ja]="%b.7z"に追加 使用了双引号包裹变量 %b。这与同一行中的 Name[it]=Aggiungi a "%b.7z" 以及 Name[pl]=Dodaj do "%b.7z" 的风格一致,是正确的做法。

2. 逻辑与功能审查

  • 功能完整性:修改涵盖了三个不同的上下文:
    1. 通用的“压缩”动作。
    2. 添加到 .7z 文件的上下文。
    3. 添加到 .zip 文件的上下文。
      这表明开发者对配置文件中所有需要翻译的条目进行了全面覆盖,逻辑上是完整的。
  • 变量替换:在日语翻译中正确保留了 %b 占位符。在 .desktop 文件或类似的配置文件中,%b 通常代表基础文件名。保留该变量确保了程序运行时能正确替换文件名。

3. 代码质量审查

  • 翻译准确性
    • 圧縮 (Asshuku):对应 "Compress",翻译准确,是日语中标准的计算机术语。
    • "%b.7z"に追加 (Tai tsuika):对应 "Add to...",翻译准确,符合日语语序(将对象置于动词之前)。
  • 本地化质量:日语翻译自然流畅,符合母语习惯,没有生硬的直译感。

4. 代码安全审查

  • 注入风险:由于这是静态的配置文件文本,不涉及代码执行或 SQL 查询,因此不存在 SQL 注入或命令注入的风险。
  • 特殊字符:日语翻译中未包含可能破坏解析的特殊字符(如未转义的换行符或注释符 #),因此是安全的。

总结与改进建议

这份代码修改非常规范,没有发现明显的错误或风险。为了进一步提高质量,仅提供以下微小的建议:

  1. 文件编码确认:虽然格式正确,但请确保该文件在提交时是以 UTF-8 编码保存的。如果保存为其他编码(如 Shift-JIS),在某些系统上可能会导致显示乱码。
  2. 测试建议:在合并代码后,建议在系统语言设置为日语的环境下进行简单的 UI 测试,确认菜单项或右键菜单能正确显示日语字符,且没有出现方框或乱码("□□"),以确保系统字体支持。

结论:代码质量优秀,可以合并。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, pengfeixx

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

@pengfeixx pengfeixx merged commit 309d295 into linuxdeepin:develop/snipe Jan 22, 2026
15 checks passed
@pengfeixx pengfeixx deleted the fix-339753 branch January 22, 2026 01:35
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