From @oko| @end|ng |rom |n@@-tou|ou@e@|r  Fri Nov  5 16:13:19 2021
From: @oko| @end|ng |rom |n@@-tou|ou@e@|r (Serguei Sokol)
Date: Fri, 5 Nov 2021 16:13:19 +0100
Subject: [Rd] gettext(msgid, domain="R") doesn't work for some 'msgid':s
In-Reply-To: <CAFDcVCT0zPRGEG5ugr+yEbgKH57bo1MMwXRgh=q5y7OwAU1F0A@mail.gmail.com>
References: <CAFDcVCT0zPRGEG5ugr+yEbgKH57bo1MMwXRgh=q5y7OwAU1F0A@mail.gmail.com>
Message-ID: <cbb50719-7151-0187-6bde-d45193cd0bd7@insa-toulouse.fr>

Le 05/11/2021 ? 15:51, Henrik Bengtsson a ?crit?:
> I'm trying to reuse some of the translations available in base R by using:
>
>    gettext(msgid, domain="R")
>
> This works great for most 'msgid's, e.g.
>
> $ LANGUAGE=de Rscript -e 'gettext("cannot get working directory", domain="R")'
> [1] "kann das Arbeitsverzeichnis nicht ermitteln"
>
> However, it does not work for all.  For instance,
>
> $ LANGUAGE=de Rscript -e 'gettext("Execution halted\n", domain="R")'
> [1] "Execution halted\n"
>
> This despite that 'msgid' existing in:
>
> $ grep -C 2 -F 'Execution halted\n' src/library/base/po/de.po
>
> #: src/main/main.c:342
> msgid "Execution halted\n"
> msgstr "Ausf?hrung angehalten\n"
>
> It could be that the trailing newline causes problems, because the
> same happens also for:
>
> $ LANGUAGE=de Rscript --vanilla -e 'gettext("error during cleanup\n",
> domain="R")'
> [1] "error during cleanup\n"
It happens also to:

$ LANGUAGE=de Rscript -e 'gettext("During startup - ", domain="R")'
[1] "During startup - "


#: src/main/main.c:1078
msgid "During startup - "
msgstr "Beim Start - "

which has not "\n" at the end.

Just a testimony with a hope it helps.

Best,
Serguei.

>
> Is this meant to work, and if so, how do I get it to work, or is it a bug?
>
> Thanks,
>
> Henrik
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


-- 
Serguei Sokol
Ingenieur de recherche INRAE

Cellule Math?matiques
TBI, INSA/INRAE UMR 792, INSA/CNRS UMR 5504
135 Avenue de Rangueil
31077 Toulouse Cedex 04

tel: +33 5 61 55 98 49
email: sokol at insa-toulouse.fr
http://www.toulouse-biotechnology-institute.fr/en/technology_platforms/mathematics-cell.html



[Rd] gettext(msgid, domain="R") doesn't work for some 'msgid':s
Serguei Sokol