https://bugs.kde.org/show_bug.cgi?id=514468

Finley Watson <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/sdk/
                   |                            |lokalize/-/commit/b005c91f8
                   |                            |a1e0fff6af5d660d74d2232b5ff
                   |                            |5b14
             Status|REPORTED                    |RESOLVED

--- Comment #9 from Finley Watson <[email protected]> ---
Git commit b005c91f8a1e0fff6af5d660d74d2232b5ff5b14 by Finley Watson, on behalf
of Varun Sajith Dass.
Committed on 07/02/2026 at 05:58.
Pushed by finw into branch 'master'.

Compress consecutive copyright years in Gettext headers

### Summary

Implemented logic to automatically compress consecutive copyright years in the
Gettext file headers.

### Changes

* Added a static helper function `formatCopyrightYears` in
`gettextheaderparser.cpp`.
* The function parses existing years, sorts them, and groups consecutive
sequences into ranges (e.g., "2020, 2021, 2022" becomes "2020-2022").
* Updated `updateAuthorCopyrightLine` to utilize this formatting logic.

### Testing

Verified locally by running test cases against the logic:

* Input: "2020, 2021, 2022" -\> Output: "2020-2022"
* Input: "2020, 2021, 2023" -\> Output: "2020-2021, 2023"

M  +0    -1    autotests/test_gettextheaderparser.cpp
M  +68   -3    src/catalog/gettextheaderparser.cpp
M  +9    -1    src/catalog/gettextheaderparser.h

https://invent.kde.org/sdk/lokalize/-/commit/b005c91f8a1e0fff6af5d660d74d2232b5ff5b14

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to