Skip to content

Automatic Translation: Update .desktop files#158

Closed
deepin-ci-robot wants to merge 1 commit intomasterfrom
auto-translate-desktop-20250703033440
Closed

Automatic Translation: Update .desktop files#158
deepin-ci-robot wants to merge 1 commit intomasterfrom
auto-translate-desktop-20250703033440

Conversation

@deepin-ci-robot
Copy link
Copy Markdown
Contributor

@deepin-ci-robot deepin-ci-robot commented Jul 3, 2025

This PR was automatically generated to update translations for modified .desktop files.

Summary by Sourcery

Chores:

  • Update localized entries in the deepin-calculator .desktop file.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jul 3, 2025

Reviewer's Guide

This PR automates the regeneration of localized metadata in .desktop files, updating Name and Comment entries across multiple languages to match the latest source strings.

File-Level Changes

Change Details Files
Updated localized metadata in .desktop files
  • Regenerated translation entries for all supported languages
  • Removed obsolete or outdated translation keys
  • Aligned each translation with the current source text
deepin-calculator.desktop

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
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-ci-robot

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

Copy link
Copy Markdown

@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 @deepin-ci-robot - I've reviewed your changes and they look great!


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-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Jul 10, 2025

TAG Bot

New tag: 6.5.20
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #160

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Jul 31, 2025

TAG Bot

New tag: 6.5.21
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #164

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Aug 1, 2025

TAG Bot

New tag: 6.5.22
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #165

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Aug 7, 2025

TAG Bot

New tag: 6.5.23
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #166

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Aug 13, 2025

TAG Bot

New tag: 6.5.24
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #168

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Aug 27, 2025

TAG Bot

New tag: 6.5.25
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #169

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Sep 17, 2025

TAG Bot

New tag: 6.5.26
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #171

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Oct 16, 2025

TAG Bot

New tag: 6.5.27
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #174

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Nov 21, 2025

TAG Bot

New tag: 6.5.29
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #183

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Nov 27, 2025

TAG Bot

New tag: 6.5.30
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #185

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Dec 11, 2025

TAG Bot

New tag: 6.5.31
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #188

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Jan 28, 2026

TAG Bot

New tag: 6.5.32
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #192

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Jan 29, 2026

TAG Bot

New tag: 6.5.33
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #194

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Mar 5, 2026

TAG Bot

New tag: 6.5.34
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #196

@wyu71 wyu71 force-pushed the auto-translate-desktop-20250703033440 branch from fe54491 to fbbbf4e Compare March 16, 2026 03:34
@deepin-ci-robot
Copy link
Copy Markdown
Contributor Author

deepin pr auto review

这份 Git diff 主要对 deepin-calculator.desktop 文件进行了修改,这是一个 Linux 桌面环境(遵循 Freedesktop.org 标准)的应用程序配置文件。修改内容主要是增加了多种语言的翻译条目。

以下是对该 diff 的审查意见,分为语法逻辑、代码质量、代码性能和代码安全四个方面:

1. 语法逻辑

  • 格式规范:文件遵循 .desktop 文件的标准格式(INI 文件风格),即 Key[locale]=Value。从 diff 输出看,新增的行格式基本正确,键名如 CommentGenericNameName 后跟正确的语言代码(如 [af], [fil] 等)。
  • 翻译一致性
    • 部分语言未翻译:在某些新增的语言中,Name 字段似乎包含了 "Deepin" 品牌名,但部分条目(如 Name[ku]=CalculatorName[my]=Calculator)看起来并未完全翻译成当地语言,或者仅仅是英文单词。建议检查这些特定语言(如库尔德语 ku、缅甸语 my)的翻译是否准确。
    • 术语一致性:对于 GenericName(通用名称)和 Comment(注释/描述),通常 GenericName 应该是该应用的通用类别(如 "Calculator"),而 Comment 可以是描述性文本。在该 diff 中,两者的翻译内容看起来非常相似甚至相同(例如德语中两者都是 "Taschenrechner")。虽然这在某些应用中是允许的,但通常 Comment 应该更具描述性(例如 "A simple calculator")。不过,如果这是项目的既定策略,则无需修改。
    • 特定语言代码:新增的语言代码(如 ady, pam, sc 等)看起来是有效的 ISO 639 代码。

2. 代码质量

  • 可读性与维护性
    • 文件按字母顺序排列语言条目,这是一个很好的做法,有助于查找和防止重复。
    • Diff 显示删除了 en_AU(澳大利亚英语)的条目,并添加了其他语言。如果 en_AU 与默认的 en 没有显著差异,删除它是合理的,可以减少维护负担。
  • 完整性
    • Diff 显示同时更新了 CommentGenericNameName 三个字段的翻译,保证了各字段翻译覆盖的一致性。
  • 潜在问题
    • Comment[sw]=Maktaba:斯瓦希里语中 "Maktaba" 通常意为"图书馆",而计算器通常是 "Kikokotoo"。建议核实斯瓦希里语的翻译准确性。
    • Name[si]=ඩීපින් කාල්කුලාටර්:僧伽罗语的 "Calculator" 音译看起来像是直接音译,建议确认这是当地通用的用法,还是应该使用意译。

3. 代码性能

  • 解析效率.desktop 文件通常由桌面环境(如 Deepin 的 DDE, GNOME, KDE)在启动时或显示菜单时解析。增加更多的语言条目会轻微增加文件大小和解析时间,但这种影响在现代计算机上是可以忽略不计的。
  • 内存占用:由于这些是静态文本资源,加载后的内存占用也非常小,不会构成性能瓶颈。

4. 代码安全

  • 特殊字符注入.desktop 文件如果解析不当,可能会受到控制字符或特定格式字符的影响。从 diff 看,新增的翻译文本主要包含 Unicode 字符(如西里尔字母、阿拉伯字母等),没有明显的 Shell 命令注入或控制字符风险。
  • 编码问题:文件必须使用 UTF-8 编码。从 diff 输出的多语言字符显示正常来看,编码处理是正确的。

改进建议总结

  1. 核实特定翻译

    • 检查 Name[ku]Name[my]Comment[sw] 的翻译是否准确,确保它们不是错误地保留了英文或使用了错误的词汇。
    • 检查 Name[sc] (萨丁尼亚语) 的翻译,确保其符合当地习惯。
  2. 品牌名处理

    • 确认所有语言中 "Deepin" 的处理方式是否一致(例如有的语言可能需要保留英文 "Deepin",有的可能需要音译或意译)。目前看大部分保留了 "Deepin" 或进行了适配,建议统一标准。
  3. 格式检查

    • 虽然在 diff 中不明显,但建议确保文件末尾有一个空行,符合许多文本编辑器和工具的最佳实践。
  4. 删除条目的确认

    • 确认删除 en_AU 是有意为之,且不会导致澳大利亚英语用户看到不恰当的默认回退(通常是 en)。

总体而言,这是一次标准的国际化(i18n)更新,主要工作在于翻译准确性的校对,代码逻辑和安全性方面没有明显问题。

@wyu71 wyu71 closed this Mar 16, 2026
@lzwind lzwind deleted the auto-translate-desktop-20250703033440 branch April 2, 2026 02:59
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.

2 participants