Skip to content

chore: Update translation#372

Closed
caixr23 wants to merge 0 commit intolinuxdeepin:masterfrom
caixr23:master
Closed

chore: Update translation#372
caixr23 wants to merge 0 commit intolinuxdeepin:masterfrom
caixr23:master

Conversation

@caixr23
Copy link
Copy Markdown
Contributor

@caixr23 caixr23 commented Jul 4, 2025

Update translation

Summary by Sourcery

Update translation files across multiple languages

Enhancements:

  • Standardize TS file headers with explicit UTF-8 encoding and separate DOCTYPE
  • Correct formatting and content of existing translation strings (e.g., non-breaking spaces in “My Networks”)
  • Introduce translation contexts for new network UI components
  • Add new translation keys for network validation messages (Invalid netmask, Invalid gateway, Duplicate IP address)

Chores:

  • Add .tx/config translation extraction configuration

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jul 4, 2025

Reviewer's Guide

This PR refreshes and standardizes all TS translation files by normalizing XML headers, completing many previously unfinished strings (including key UI labels and error messages), adding new translation entries for network validation errors, introducing new contexts for recently added UI items, and adding a .tx/config file for translation management.

Class diagram for translation file structure and new contexts

classDiagram
    class TSFile {
        +language: string
        +contexts: Context[]
    }
    class Context {
        +name: string
        +messages: Message[]
    }
    class Message {
        +source: string
        +translation: string
        +type: string
    }
    TSFile "1" -- "*" Context : contains
    Context "1" -- "*" Message : contains

    class NetAirplaneModeTipsItem {
        <<Context>>
        +Disable <a>Airplane Mode</a> first if you want to connect to a wireless network
    }
    class NetSystemProxyControlItem {
        <<Context>>
        +System Proxy
    }
    class NetWirelessMineItem {
        <<Context>>
        +My Networks
    }
    class NetWirelessOtherItem {
        <<Context>>
        +Other Networks
    }
    TSFile -- NetAirplaneModeTipsItem
    TSFile -- NetSystemProxyControlItem
    TSFile -- NetWirelessMineItem
    TSFile -- NetWirelessOtherItem
Loading

Class diagram for new and updated translation messages for network validation

classDiagram
    class SectionIPv4 {
        <<Context>>
        +Invalid netmask
        +Invalid gateway
        +Duplicate IP address
    }
    class SectionIPv6 {
        <<Context>>
        +Invalid netmask
        +Invalid gateway
        +Duplicate IP address
    }
    SectionIPv4 <|-- Message
    SectionIPv6 <|-- Message
Loading

File-Level Changes

Change Details Files
Standardize TS file headers
  • Added encoding="utf-8" to XML declarations
  • Split DOCTYPE and tags onto separate lines
  • Ensured a newline at the end of each file
dcc-network/translations/*.ts
Complete and adjust translations for core UI labels
  • Filled in previously unfinished translations (e.g., Cancel, Save, Connect)
  • Updated wording for consistency across contexts
  • Re-encoded non-breaking spaces in “My Networks”
network_sq.ts
network_zh_HK.ts
network_zh_TW.ts
network_zh_CN.ts
network_pl.ts
network_es.ts
network_de_DE.ts
network_fi.ts
network_fr.ts
network_it.ts
network_ja.ts
network_ca.ts
network_pt_BR.ts
network_tr.ts
network_uk.ts
network_en.ts
network_en_US.ts
Swap and correct specific translations in Chinese variants
  • Swapped translations for ‘Stop wireless communication’ and the airplane‐mode description
  • Aligned phrasing in HK and TW variants to match intent
network_zh_HK.ts
network_zh_TW.ts
Add new network validation error messages
  • Introduced ‘Invalid netmask’, ‘Invalid gateway’, and ‘Duplicate IP address’
  • Added entries under both IPv4 and IPv6 contexts
dcc-network/translations/*
Introduce new contexts for recent UI items
  • Added contexts for NetAirplaneModeTipsItem and NetSystemProxyControlItem
  • Added contexts for NetWirelessMineItem and NetWirelessOtherItem
network_az.ts
network_bo.ts
network_hu.ts
network_it.ts
network_ko.ts
network_nb_NO.ts
network_ru.ts
Add translation management configuration
  • Created a new .tx/config file for translation tool settings
.tx/config

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: caixr23

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

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