Bug 514468 - SPDX-FileCopyrightText lines are very long
Summary: SPDX-FileCopyrightText lines are very long
Status: REPORTED
Alias: None
Product: lokalize
Classification: Applications
Component: editor (other bugs)
Version First Reported In: 25.08.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Finley Watson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-11 20:22 UTC by Philipp Kiemle
Modified: 2026-01-15 19:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Kiemle 2026-01-11 20:22:16 UTC
Lokalize seems to simply append a year to the "SPDX-FileCopyrightText:" line, whenever a person contributes the first time each year, resulting in long, convoluted lines like this one:

# SPDX-FileCopyrightText: 2006, 2010, 2011, 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2020, 2021 Firstname Lastname <email@domain.tld>

I think it would be better if "adjacent" years would be summarized into a range, so the above line would become

# SPDX-FileCopyrightText: 2006, 2010-2021 Firstname Lastname <email@domain.tld>

This is much easier to read and is already used in the GUI "About" dialogs all across the KDE software.
Comment 1 Finley Watson 2026-01-11 20:30:55 UTC
Thanks for the report. Is there a standard for these lines?
Comment 2 Albert Astals Cid 2026-01-11 20:33:49 UTC
https://spdx.dev/use/specifications/
Comment 3 Finley Watson 2026-01-11 20:41:02 UTC
I meant specific to the format of SPDX-FileCopyrightText, for instance I don't want to change this line and then tooling that consumes the line breaks because the new format is unexpected.
Comment 4 Albert Astals Cid 2026-01-11 20:46:45 UTC
8.8 says it's free form https://spdx.github.io/spdx-spec/v2.3/file-information/
Comment 5 Philipp Kiemle 2026-01-11 21:00:24 UTC
(In reply to Finley Watson from comment #3)
> I meant specific to the format of SPDX-FileCopyrightText, for instance I
> don't want to change this line and then tooling that consumes the line
> breaks because the new format is unexpected.

I found these two sources:
- https://reuse.software/spec-3.3/#format-of-copyright-notices
- https://spdx.github.io/spdx-spec/v2.3/file-tags/

They both say that the proposed version is OK. So every tooling dealing with these lines *should* be able to parse them either way, I guess
Comment 6 Finley Watson 2026-01-11 21:10:28 UTC
Thanks both. I'll bear this bug in mind for a potential port to using libgettext instead of the handmade stuff Lokalize currently uses.

In the mean time, I've found where the logic needs updating: https://invent.kde.org/sdk/lokalize/-/blob/master/src/catalog/gettextheaderparser.cpp?ref_type=heads#L75
Comment 7 Karl Ove Hufthammer 2026-01-15 18:43:47 UTC
(In reply to Philipp Kiemle from comment #0)
> # SPDX-FileCopyrightText: 2006, 2010, 2011, 2012, 2013, 2014, 2015, 2017,
> 2018, 2019, 2020, 2021 Firstname Lastname <email@domain.tld>
> 
> I think it would be better if "adjacent" years would be summarized into a
> range, so the above line would become
> 
> # SPDX-FileCopyrightText: 2006, 2010-2021 Firstname Lastname
> <email@domain.tld>

This looks wrong. Since the year 2016 is missing in the first list, I think the ranges should be:

2006, 2010-2015, 2017-2021
Comment 8 Philipp Kiemle 2026-01-15 19:22:59 UTC
Yeah, you are right - I didn't see it was missing.