Skip to content

Conversation

@JWWTSL
Copy link
Contributor

@JWWTSL JWWTSL commented Jul 1, 2025

log: update translations file.

Summary by Sourcery

Update AI-generated translations in TS files: standardize headers, adjust source locations, refine existing strings, and add the new 'Your disk has been removed' message.

New Features:

  • Add new UI message 'Your disk has been removed' to translation files

Enhancements:

  • Standardize TS file headers with UTF-8 encoding and update source location line numbers
  • Refine AI‐generated translations across multiple locales for consistency and accuracy

Chores:

  • Remove obsolete translation entries

log: update translations file.
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JWWTSL

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

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 1, 2025

Reviewer's Guide

The PR normalizes TS XML headers, updates per-message location line numbers, refreshes translation strings across all locale files and introduces a new “Your disk has been removed” message entry while marking the old formatting-removed message as vanished.

Class diagram for translation message structure changes

classDiagram
    class TS {
        +version: string
        +language: string
        context: Context[]
    }
    class Context {
        +name: string
        message: Message[]
    }
    class Message {
        +location: string
        +source: string
        +translation: string
        +type: string (optional)
    }
    TS "1" -- "*" Context : contains
    Context "1" -- "*" Message : contains

    %% Highlight new/modified attributes
    Message : +type ("vanished")
    Message : +location (updated line numbers)
    Message : +source = "Your disk has been removed" (added)
    Message : +source = "Your disk is removed when formatting" (now vanished)
Loading

Class diagram for translation file header normalization

classDiagram
    class TS {
        +xml_declaration: string (now always with encoding)
        +doctype: string
        +version: string
        +language: string
    }
    %% The xml_declaration is now normalized to include encoding
    TS : +xml_declaration = '<?xml version="1.0" encoding="utf-8"?>'
    TS : +doctype = '<!DOCTYPE TS>'
Loading

File-Level Changes

Change Details Files
Standardize TS file headers
  • Add UTF-8 encoding declaration
  • Separate XML header and DOCTYPE onto distinct lines
translations/dde-device-formatter_ast.ts
translations/dde-device-formatter_br.ts
translations/dde-device-formatter_my.ts
... and all other TS files
Sync line numbers
  • Bump reported source file line numbers
  • Ensure all tags reflect current code
translations/**/*.ts
Refresh translation entries
  • Update existing translation texts for accuracy
  • Fix HTML/XML escaping in translations
  • Remove outdated translations (vanished)
translations/**/*.ts
Add new removal notification
  • Insert “Your disk has been removed” source and translation
  • Mark the older removal message as vanished
translations/mainwindow.ts entries in all TS files

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

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `translations/dde-device-formatter_kn_IN.ts:30` </location>
<code_context>
         <location filename="../view/mainpage.cpp" line="117"/>
         <source>Label</source>
-        <translation>ನಿಶ್ಚಯಿಸಿ</translation>
+        <translation>ಅಂಶ</translation>
     </message>
     <message>
</code_context>

<issue_to_address>
Translation for 'Label' as 'ಅಂಶ' may be inaccurate.

'ಅಂಶ' translates to 'element' or 'part', which may not fit the context of 'Label' (e.g., disk label). Suggest using 'ಲೇಬಲ್' or 'ಚೀಟಿ' for accuracy.
</issue_to_address>

### Comment 2
<location> `translations/dde-device-formatter_kn_IN.ts:122` </location>
<code_context>
         <location filename="../main.cpp" line="97"/>
         <source>Device does not exist</source>
-        <translation>ಸಾಧನ ಇದು ಅಸ್ತಿತ್ವದಲ್ಲಿಲ್ಲ</translation>
+        <translation>ವಸ್ತು ಇದೆಯಾ?</translation>
     </message>
     <message>
</code_context>

<issue_to_address>
Translation for 'Device does not exist' is a question, not a statement.

'ವಸ್ತು ಇದೆಯಾ?' translates to a question. Use 'ವಸ್ತು ಇಲ್ಲ' or 'ಸಾಧನ ಅಸ್ತಿತ್ವದಲ್ಲಿಲ್ಲ' for an accurate statement translation.
</issue_to_address>

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.

<location filename="../view/mainpage.cpp" line="117"/>
<source>Label</source>
<translation>ನಿಶ್ಚಯಿಸಿ</translation>
<translation>ಅಂಶ</translation>
Copy link

Choose a reason for hiding this comment

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

issue: Translation for 'Label' as 'ಅಂಶ' may be inaccurate.

'ಅಂಶ' translates to 'element' or 'part', which may not fit the context of 'Label' (e.g., disk label). Suggest using 'ಲೇಬಲ್' or 'ಚೀಟಿ' for accuracy.

<location filename="../main.cpp" line="97"/>
<source>Device does not exist</source>
<translation>ಸಾಧನ ಇದು ಅಸ್ತಿತ್ವದಲ್ಲಿಲ್ಲ</translation>
<translation>ವಸ್ತು ಇದೆಯಾ?</translation>
Copy link

Choose a reason for hiding this comment

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

issue: Translation for 'Device does not exist' is a question, not a statement.

'ವಸ್ತು ಇದೆಯಾ?' translates to a question. Use 'ವಸ್ತು ಇಲ್ಲ' or 'ಸಾಧನ ಅಸ್ತಿತ್ವದಲ್ಲಿಲ್ಲ' for an accurate statement translation.

@deepin-ci-robot
Copy link

@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 d7eb161 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 JWWTSL closed this Jul 1, 2025
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