Skip to content

fix: source string for dcc-network resource is empty#349

Merged
BLumia merged 1 commit intolinuxdeepin:masterfrom
BLumia:missing-source-strings
May 30, 2025
Merged

fix: source string for dcc-network resource is empty#349
BLumia merged 1 commit intolinuxdeepin:masterfrom
BLumia:missing-source-strings

Conversation

@BLumia
Copy link
Copy Markdown
Member

@BLumia BLumia commented May 30, 2025

dcc-network 资源为空,导致翻译平台没有翻译资源,贡献者无法翻译.

Summary by Sourcery

Fix empty translation resources for the dcc-network module by populating network_en.ts and network_en_US.ts with all source strings, enabling the translation platform to detect and translate network UI texts.

Bug Fixes:

  • Restore missing source strings in dcc-network translation files to ensure the translation platform can detect translation entries.

Enhancements:

  • Populate network_en.ts and network_en_US.ts with complete network context messages for translation.

dcc-network 资源为空,导致翻译平台没有翻译资源,贡献者无法翻译.

Log:
@BLumia BLumia requested review from caixr23 and xionglinlin May 30, 2025 09:13
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

系统检测到输入或生成内容可能包含不安全或敏感内容,请您避免输入易产生敏感内容的提示语,感谢您的配合。请打开一个新的会话重新尝试。

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 30, 2025

Reviewer's Guide

This PR populates the previously empty translation files for the dcc-network module by converting the self-closing TS tags into full XML structures containing contexts and message entries with empty translation stubs for all UI strings in both English and English (US).

Entity Relationship Diagram: Structure of Content in Populated .ts Files

erDiagram
    TS_Root {
        string version
        string language
    }
    ContextElement {
        string name "Context Name (e.g., PageAirplane)"
    }
    MessageElement {
        string sourceText "Original UI string"
    }
    TranslationElement {
        string type "(e.g., unfinished)"
        string translatedText "(empty or translated string)"
    }

    TS_Root ||--o{ ContextElement : contains
    ContextElement ||--o{ MessageElement : contains
    MessageElement ||--|| TranslationElement : has
Loading

File-Level Changes

Change Details Files
Expanded TS file into full translation structure
  • Replaced self-closing tag with opening and closing tags
  • Inserted multiple sections covering all network UI components
  • Added entries with text and empty placeholders
dcc-network/translations/network_en.ts
Mirrored full translation structure in US English file
  • Replaced self-closing tag with opening and closing tags
  • Duplicated all context and message blocks from network_en.ts
  • Added blank nodes for each
dcc-network/translations/network_en_US.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: BLumia, xionglinlin

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 @BLumia - I've reviewed your changes - here's some feedback:

  • Instead of hand‐editing these huge TS files, regenerate them with the standard lupdate tool to ensure contexts and messages stay in sync and avoid manual merge conflicts.
  • Since these are English‐locale TS files, consider populating each with the same text as its (or removing the unfinished flag) so the UI shows English by default rather than blank strings.
  • Review whether you really need both network_en.ts and network_en_US.ts when their contents are identical—using locale fallback could reduce redundant maintenance.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

@BLumia BLumia merged commit 24d9f35 into linuxdeepin:master May 30, 2025
15 of 19 checks passed
@BLumia BLumia deleted the missing-source-strings branch May 30, 2025 09:20
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