Skip to content

fix: Handling translation errors in lo languages#359

Merged
lzwind merged 1 commit intolinuxdeepin:masterfrom
JWWTSL:master
Aug 8, 2025
Merged

fix: Handling translation errors in lo languages#359
lzwind merged 1 commit intolinuxdeepin:masterfrom
JWWTSL:master

Conversation

@JWWTSL
Copy link
Copy Markdown
Contributor

@JWWTSL JWWTSL commented Aug 8, 2025

log:

Summary by Sourcery

Correct and enhance Lao (lo) locale translations by fixing existing string errors, adding missing entries for new dialogs and search view, marking outdated entries as vanished, and bumping the application version to 6.0.39.1.

New Features:

  • Add Lao translations for RemoveAlbumDialog, RemoveDialog, and SearchView UI components

Bug Fixes:

  • Fix incorrect Lao translations and placeholder formatting across various contexts (albumControl, fileControl, DBManager, timeline and thumbnail views)
  • Mark obsolete translations as vanished to remove outdated entries

Enhancements:

  • Update translation source locations in albumControl, fileControl, and QML files to match recent code changes
  • Add missing numerus (plural) translation entries for photos, videos, and items counts

Build:

  • Bump package version to 6.0.39.1 in linglong.yaml files

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 8, 2025

TAG Bot

TAG: 6.0.39
EXISTED: no
DISTRIBUTION: unstable

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Aug 8, 2025

Reviewer's Guide

This PR refines the Lao translation files by realigning source location tags across C++ and QML contexts, marking obsolete entries and adding new dialog/SearchView contexts with unfinished translations, introduces pluralization (numerus) support for photo/video counts, and bumps the application version in packaging manifests.

Class diagram for translation context and pluralization changes

classDiagram
    class TranslationEntry {
        - source: string
        - translation: string
        - location: string
        - numerus: bool
        - type: string (e.g., "vanished", "unfinished")
    }
    class TranslationContext {
        - name: string
        - entries: List<TranslationEntry>
    }
    class TranslationFile {
        - contexts: List<TranslationContext>
    }
    TranslationFile --> TranslationContext
    TranslationContext --> TranslationEntry

    %% Highlight pluralization support
    class TranslationEntry {
        +numerus: bool
    }
    %% Highlight new/obsolete entries
    class TranslationEntry {
        +type: string
    }
Loading

Class diagram for packaging manifest version update

classDiagram
    class PackageManifest {
        - id: string
        - name: string
        - version: string
        - kind: string
        - description: string
    }
    PackageManifest <|-- Arm64Manifest
    PackageManifest <|-- Loong64Manifest
    PackageManifest <|-- MainManifest

    %% Version field updated from 6.0.38.1 to 6.0.39.1
Loading

File-Level Changes

Change Details Files
Realign translation source locations
  • Shifted location line numbers in albumControl.cpp translation entries
  • Adjusted QML context location tags for AlbumTitle, AllCollection, CustomAlbum, DeviceAlbum, DeviceLoadDialog, ExportDialog, MenuItemStates, Sidebar, PreviewImageViewer, ThumbnailListView, TimeLineView, SearchView
  • Updated translation location ranges in DBManager, FileControl, GlobalStatus, ImportTimeLineView modules
src/translations/deepin-album_lo.ts
src/albumControl.cpp
src/dbmanager/dbmanager.cpp
src/filecontrol.cpp
src/globalstatus.cpp
src/widgets/importtimelineview/importtimelineview.cpp
src/widgets/timelineview/timelineview.cpp
qml/**/*.qml
Mark obsolete and add missing translation contexts
  • Marked outdated messages with type="vanished"
  • Added new contexts for RemoveAlbumDialog, RemoveDialog, and SearchView with type="unfinished" translations
src/translations/deepin-album_lo.ts
qml/Control/RemoveAlbumDialog.qml
qml/PreviewImageViewer/Dialog/RemoveDialog.qml
qml/ThumbnailImageView/SearchView.qml
Introduce pluralization for dynamic item counts
  • Enabled numerus="yes" for photo/video/items messages
  • Defined plural translation entries (unfinished) for %n photos, %n videos, %n items
src/widgets/importtimelineview/importtimelineview.cpp
src/widgets/timelineview/timelineview.cpp
Bump application version in packaging manifests
  • Incremented version from 6.0.38.1 to 6.0.39.1
arm64/linglong.yaml
linglong.yaml
loong64/linglong.yaml

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 - here's some feedback:

  • Several new strings (e.g. in RemoveAlbumDialog, RemoveDialog, and SearchView contexts) are still marked as type="unfinished" and need proper Lao translations.
  • Pluralized messages (numerus) for "%n photos", "%n videos", and "%n items" only include a single and require explicit cases for all plural forms according to Lao grammatical rules.
  • There are numerous entries; consider removing obsolete translations to keep the TS file clean and in sync with source.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Several new strings (e.g. in RemoveAlbumDialog, RemoveDialog, and SearchView contexts) are still marked as type="unfinished" and need proper Lao translations.
- Pluralized messages (numerus) for "%n photos", "%n videos", and "%n items" only include a single <numerusform> and require explicit cases for all plural forms according to Lao grammatical rules.
- There are numerous <message type="vanished"> entries; consider removing obsolete translations to keep the TS file clean and in sync with source.

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.

<name>RemoveDialog</name>
<message>
<location filename="../qml/PreviewImageViewer/Dialog/RemoveDialog.qml" line="66"/>
<source>Cannot move &quot;%1&quot; to the trash. Do you want to permanently delete it?</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 (code-quality): Delete should only be used for object properties. (only-delete-object-properties)

ExplanationThe `delete` operator is intended for use in deleting the properties of objects, and does not have meaningful behaviour otherwise.

See the MDN docs for delete.

@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

@lzwind lzwind merged commit 405841a into linuxdeepin:master Aug 8, 2025
16 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