Bruno Haible wrote, on 23 Jun 2022:
>
> https://posix.rhansen.org/p/gettext_draft
> Line 1183
> 
> "The first directive in each created dot-po file shall be a domain directive
> giving the associated domain name"
> 
> GNU gettext currently does not do this. Solaris gettext does it.
> The msgfmt program allows the initial domain directive to be absent
> (see lines 996-998).
> 
> What is the added value of this directive, since for msgfmt it is optional?
> In 99% percent of the cases, xgettext is used as part of a build system for
> a single domain. The author of that build system knows the domain perfectly
> well. There is no need to additionally store it in the dot-po file.
> 
> Issue: Since this directive was not documented in
> https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
> many PO file consumers will choke on this directive, once GNU xgettext
> implements the POSIX specification.
> 
> Suggestion: Declare that it is implementation-dependent whether xgettext
> writes out a domain directive, when the output contains only entries for a
> single domain.

In your quote you stopped before the part that gives an exception for
the default output file, if -d is not used.  In today's teleconference
we struck out part about -d so that it reads:

    The first directive in each created dot-po file shall be a domain
    directive giving the associated domain name, except that this
    directive is optional in the default output file.

This allows both the Solaris and GNU behaviours.

-- 
Geoff Clare <g.cl...@opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to