Skip to content

feat: updat translation#148

Merged
lzwind merged 1 commit intolinuxdeepin:masterfrom
JWWTSL:master
May 26, 2025
Merged

feat: updat translation#148
lzwind merged 1 commit intolinuxdeepin:masterfrom
JWWTSL:master

Conversation

@JWWTSL
Copy link
Copy Markdown
Contributor

@JWWTSL JWWTSL commented May 26, 2025

log: test translation

Summary by Sourcery

Refresh English translation files by adding missing entries, updating source locations, and inserting test translation strings.

Enhancements:

  • Add XML encoding declaration and normalize TS file header
  • Update source file line references for existing translation entries
  • Introduce new translation contexts and keys for various widgets and drawing tools
  • Insert test translation strings in main.cpp to validate translator loading

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 26, 2025

Reviewer's Guide

This PR refines the English translation TS file by updating its XML header, synchronizing all location line numbers, and adding numerous new translation entries (marked unfinished), and adds sample translation invocations in main.cpp for testing coverage.

File-Level Changes

Change Details Files
Updated XML header formatting
  • Added encoding="utf-8" to XML declaration
  • Split XML declaration and DOCTYPE onto separate lines
  • Retained TS tag with version, language, and sourcelanguage
translations/deepin-draw_en.ts
Synchronized location line numbers
  • Bumped dozens of line attributes to match shifted code
  • Unified location ranges across multiple contexts
translations/deepin-draw_en.ts
Inserted new translation contexts and messages
  • Added for various widgets/tools (e.g., BlurWidget, CCutWidget, CEllipseTool, etc.)
  • Populated messages with source strings and type="unfinished" placeholders
translations/deepin-draw_en.ts
Added translation test calls in main.cpp
  • Inserted QObject::tr() calls for three sample sentences
  • Ensured these test strings appear in TS file for verification
src/deepin-draw/main.cpp

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

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 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.

<source>Radius</source>
<translation>Radius</translation>
</message>
<message>
<location filename="../src/deepin-draw/main.cpp" line="95"/>
<source>The quick brown fox jumps over the lazy dog</source>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue: Eliminate debug translation entries

These test messages should be removed or moved to a dedicated test file, as they are not part of the production UI.

Comment on lines -14 to 16
<location filename="../src/application.cpp" line="407"/>
<location filename="../src/application.cpp" line="396"/>
<source>OK</source>
<translation>OK</translation>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Avoid manual updates to TS tags

Using Qt’s lupdate tool will keep tags accurate and prevent errors from manual edits.

Suggested implementation:

        <!-- <location filename="../src/application.cpp" line="396"/> -->

After making this change, you should run the lupdate tool on your project to automatically regenerate all <location> tags with the correct file paths and line numbers. This will ensure that the translation source file remains accurate and maintainable.

log: test translation
@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@deepin-ci-robot
Copy link
Copy Markdown

@JWWTSL: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
deepin-auto-translation 488c198 link true /test deepin-auto-translation

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@JWWTSL
Copy link
Copy Markdown
Contributor Author

JWWTSL commented May 26, 2025

/merge

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented May 26, 2025

This pr cannot be merged! (status: unstable)

@lzwind lzwind merged commit 7d8c2c5 into linuxdeepin:master May 26, 2025
14 of 19 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