[Po4a-devel] Mots-clés pour identifier les chaînes à traduire

Martin Quinson martin.quinson at ens-rennes.fr
Tue Sep 12 21:09:21 UTC 2017


Hello,

I'm answering in english because this is an english-speaking mailing
list. Please do not stick to french ;)

For the others, Binoyte would prefer to have an explicit \gettext{}
macro in LaTeX to make sure that there is no false positive, ie text
marked to translate where it should not (Binoyte, please correct me
if I'm wrong).

This could certainly be possible, but this is definitely not the
approach chosen in po4a. We try to extract the string automatically,
with no extra burden on the original author. From my personal
experience, your latex source quickly becomes unmanageable when you
start littering it with orthogonal macros.

I fully agree that when po4a generates too much false positives, it
gets annoying. But at the same time, these strings are rather easy to
ignore, aren't they? We could also possibly instruct the LaTeX module
to not have so much positives. 

Could you please setup a small example exemplifying how po4a marks too
much content to be translated?

Thanks in advance, and welcome in the community.
Mt.

On Tue, Sep 12, 2017 at 10:51:22AM +0200, Binoyte wrote:
> Bonjour,
> 
> je cherche un moyen de tenir synchronisé un gros document et ses
> traductions associées en LaTeX.  Connaissant gettext (pour le php), j'ai
> rapidement découvert po4a.
> 
> J'ai fait quelques essais et c'est exactement ce que je cherche. Mais il y
> a un point qui me gène : il n'y a pas d'identificateur des chaînes à
> traduire.
> 
> En php par exemple, on écrit `gettext("La chaine à traduire")` et on ne
> trouvera que "La chaine à traduire" dans le fichier *.po. Or là je retrouve
> tout y compris ce qui ne doit pas être traduit, le code en général comme
> `\begin{document}`.
> 
> Y'a-t-il moyen de spécifier un fonction particulière mettons `\gettext{}` ?
> Il me sera facile de la créer dans mon code, elle ne fera rien que de
> reproduire le texte passé en argument. Ainsi les fichiers po ne
> contiendront que le strict minimum à traduire.
> 
> Je vous remercie par avance.

> _______________________________________________
> Po4a-devel mailing list
> Po4a-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/po4a-devel


-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20170912/2be64c0b/attachment.sig>


More information about the Po4a-devel mailing list