Skip to content

update-po: Preserve unused translations/comments? #334

@strarsis

Description

@strarsis

Feature Request

Describe your use case and the problem you are facing
update-po doesn't preserve unused translations/comments inside the PO files.
As Gettext editors like POEdit use their own translation database and VCS are usually used, this isn't a big deal and may de-clutter the PO file. - But an option for keeping this extra stuff may still be helpful in some cases.

Describe the solution you'd like
An option that lets update-po keep the unused translations/comments inside the PO files.

Example:
Input PO:

# Copyright (C) 2022 ACME
# This file is distributed under the proprietary.
msgid ""
msgstr ""
"Project-Id-Version: Test Theme 1.0.0\n"
[...]

#: theme.json
msgctxt "Color name"
msgid "Yellow"
msgstr "Gelb"

#~ msgctxt "Font size name"
#~ msgid "Small"
#~ msgstr "Klein"

Output PO (as you can see the extra Copyright comment and the unused translation were both stripped):

msgid ""
msgstr ""
"Project-Id-Version: Test Theme 1.0.0\n"
[...]

#: theme.json
msgctxt "Color name"
msgid "Yellow"
msgstr "Gelb"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions