#5454 closed defect (fixed)

po files keep growing on `update-po`

Reported by: strk Owned by: robe
Priority: medium Milestone: PostGIS 3.4.0
Component: l18n Version:
Keywords: Cc:

Description

The make update-po rule leaves old (outdated) translations in the .po files, in lines starting with #~ prefix. This makes these files ever growing, so we need to decide on a trimming policy.

To make an example, the doc/po/ja/reference_processing.xml.po file has 3553 such lines, and only 3016 lines of used translations.

It would be useful to know if these translations are ever used by weblate, as if they are not we could just strip them in the make update-po rule itself.

Change History (4)

comment:1 by strk, 16 months ago

Trimming can be done with msgattrib:

msgattrib --no-obsolete -o po/ja/reference_processing.xml.po po/ja/reference_processing.xml.po

In addition to drop the obsoleted translations it also tend to reformat lines (line wrapping)

comment:2 by strk, 16 months ago

Effects of removing the obsoleted strings from .po files:

251 files changed, 205 insertions(+), 300034 deletions(-)

comment:3 by Sandro Santilli <strk@…>, 16 months ago

In 074189b/git:

Remove obsoleted translation strings on make update-pot

References #5454

comment:4 by Sandro Santilli <strk@…>, 16 months ago

Resolution: fixed
Status: newclosed

In 29caaad/git:

Remove obsoleted translations

Closes #5454

Note: See TracTickets for help on using tickets.