[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unclear documentation about obsolete entries
From: |
Bruno Haible |
Subject: |
Re: Unclear documentation about obsolete entries |
Date: |
Mon, 25 Nov 2024 11:09:45 +0100 |
Hi,
Rodrigo Tobar wrote:
> While running msgcat on some .po files that had been recently updated,
> we received errors about diplicate msgid entries. These stemmed from two
> msgids entries, one valid and the other obsolete. We removed the
> obsolete entry and the error went away.
>
> Questions:
> * Is this a bug or a feature? It seems a bit weird that an obsolete,
> commented entry conflicts with a valid one, but maybe this is intended
> behaviour.
It's not a bug. It's by design. The obsolete entries are there to save
a translator's work for two situations:
- When a changed POT file reintroduces a message that was removed before.
In this case the obsolete entry can be directly reused.
- When some tools are in use that help the translator produce a translated
message, based on her prior translations (kind of a translation memory,
like the "compendium" feature).
> * I'm only superficially familiar with po files and their syntax, but
> from the documentation both at [1] and [2] I couldn't find any reference
> at the "#~ ..." syntax for obsolete entries. Only going through the
> source code at [3] I could find out what was going on. Before that, I
> thought I had hit a bug in gettext. Could the documentation be improved
> in this regard?
> [1] https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
Good point, yes. I will improve the documentation.
Bruno