Re: Documentation for Package Maintainers regarding Translations (was: General Questions about Translations and what a package maintainer has to do)

Marc Haber <[email protected]> Tue, 25 Mar 2025 15:27:26 +0100
Newsgroups gmane.linux.debian.internationalization.general,gmane.linux.debian.devel.general
Message-ID <[email protected]>
On Mon, Mar 24, 2025 at 06:33:19PM +0000, Helge Kreutzmann wrote:
>Am Mon, Mar 24, 2025 at 05:49:40PM +0100 schrieb Marc Haber:
>> "Using no line numbers" => invoke msgmerge with --no-location?
>
>Yes.
>
>> "Web pages mentioned above" => I don't see web pages being mentioned. That
>> needs a name or a link
>
>I meant the references to the Debian status pages, the link I inserted
>further above: https://www.debian.org/international/l10n/
>
>Please reword this to make it more clear.

Done.

>> "Add code in your build system to discard po(t) that only change in the date
>> stamp" => that would mak ethe source package and the tag in the VCS diverge.
>> I don't like that at all.
>
>This I don't understand.
>
>At some stage you update the POT files. Then you run a (git) commit,
>to place the updated files in your repository.

Yes, this should be a manual process, in my opinion.

>In manpages-l10n Tobias added code to detect, if only the time stamp
>changed. If so, the time stamp is reverted to the previous value, and
>a "git commit" is a noop. Then also the po files are left alone.

That should be a feature of xgettext or the other tools that might write 
the POT files: Don't regenerate the file if the only change is the time 
stamp. Since xgettext is unlikely to change¹

>This "only" saves you a commit in this corner case.
>
>It is not meant to diverge version, because in the end the po(t) files
>in your package should match the po(t) files in the repository.

The problem ist when POT and PO files are regenerated (and actually 
change) in package build when you're doing an out-of-tree build.

For example, I have export-dir=../build-area set in my gbp.conf. When 
building a package, gbp copies the current working copy (or exports the 
requested branch) to a temporary directory under ../build-area/ and does 
the actual build from there. The temporary build directory is then 
discarded, leaving the current working copy unchanged. When the build 
process regenerates POT and PO files, those changes never find their way 
back into your working copy, making the source package and the VCS 
diverge.

That's why I believe that any point in the package build is the wrong 
place to regenerate PO and POT files. Either that, or we need to 
strongly discourage doing out-of-tree builds.

Greetings
Marc

¹ I tried to put some of the ideas that this discussion brought into 
xgettext / msgmerge bugs and they got rejected upstream quite quickly. I 
will refrain from wasting my time in this regard in the future.