tags 443054 pending
thanks
Hello,
On Tue, Sep 18, 2007 at 11:12:16AM +0100, Colin Watson wrote:
>
> I spent a little while trying to think of a convenient
> and reasonably clear way to suppress this. The best I came up with was
> to use -o groff_code=verbatim and say:
>
> .if !'po4a'hide'
>
> So, for example:
>
> .B \-q, \-\-quiet
>
> becomes:
>
> .if !'po4a'hide' .B \-q, \-\-quiet
>
> There may be a better way that uses a dedicated macro so that we can
> just say -o untranslated=Ph or something, but I only had a small amount
> of time to work on this and so didn't get that far.
>
> Perhaps it would be useful to document my suggestion or an improvement
> on it in Locale::Po4a::Man(3pm) (of course with a warning that it should
> not be used in the middle of sentences such that it would break up
> something that should be translated in one piece)?
Sorry for the delay.
I've added the following section to describe that tip in the
Locale::Po4a::Man manpage:
Hiding text to po4a
Sometimes, the author knows that some parts are not translatable, and
should not be extracted by po4a. For example, an option may accept an
other argument, and other may also appear as the last item of a list.
In the first case, other should be not be translatable. And in the sec‐
ond case, other should be translated.
In such case, the author can avoid po4a to extract some strings, using
some special groff constructs:
.if !'po4a'hide' .B other
(this will require the -o groff_code=verbatim option)
A new macro can also be defined to automate this:
.de IR_untranslated
. IR \\$@
..
.IR_untranslated \-q ", " \-\-quiet
(this will require the options -o groff_code=verbatim and -o untrans‐
lated=IR_untranslated; with this construct, the .if !’po4a’hide’ condi‐
tional is not strictly needed since po4a will not parse the internal of
the macro definition)
or using an alias:
.als IR_untranslated IR
.IR_untranslated \-q ", " \-\-quiet
(this will require the -o untranslated=als,IR_untranslated option)
Best Regards,
--
Nekral