On Wed, 30 Aug 2006 22:11:47 +0200, Nicolas François
<nicolas.francois(a)centraliens.net> wrote:
Hello Jean-Yves,
Moving the discussion to the po4a mailing list, so that I can announce
the new BibTeX module.
On Tue, Aug 29, 2006 at 11:39:58PM +0200, Martin Quinson wrote:
>
> j'ai fais chier le mainteneur actuel de po4a, et il l'a fait. Y'a un
> proto
> dans le CVS du projet, et le mieux serait que tu passes nous voir un
> soir
> sur le canal #po4a du serveur
irc.oftc.net. Nicolas (nekral) n'est pas
> tres
> dispo de jour car il bosse, mais les soirs, c'est différent.
>
> Comme ca, on pourra discuter de ce qui existe déjà, et de ce que tu
> souhaites vraiment avoir.
The module basically works (attached, the PO and the generated file when
the PO is not translated, for a bibliography given by Martin:
http://graal.ens-lyon.fr/biblio/Biblio/complete-bibliography.bib)
Getting a quick look at it. At first sight, this is nice.
First there are some questions about the validity of the module.
* Something like:
| title = {foo bar ... baz},
Could generate:
| title = {foo bar ...
| ... baz},
Is it still valid, or should I ensure that it stay in one line?
This is OK.
* Same question for:
| title = "foo bar ... baz",
and
| title = foo bar ... baz,
This, I'm afraid, is not.
* What does:
| month = {3-8} # apr,
means? Is it a comment?
Is it the same for the next line?
| month = apr # "4",
iirc, the '#' in bibtex is strings concatenation...
There is also some possible future improvements:
* Mark some fields as not translatable (e.g. the 'key' field, 'page' in
some languages, 'ISBN' and 'ISSN', etc.)
Yes. Actually, most of the fields should not be translated either because
these are title/names/numbers/... or because bibtex itself (via its style
files) should take care of it.
Typically, fields like:
author = {Jean-Yves Marion and Jean-Yves Moyen}
should usually not be translated (the 'and' is a keyword of bibtex)
because authors names are usually the same in all languages. Of course,
there is the problem of different writing system (eg japanese names could
be written in japanese for a japanese version but transliterated in roman
for an english/french/... version) and of elder authors (eg the english
'Euclid' should be translated into 'Euclide' in a french version).
Similar remarks hold for title of the papers (those should not be
translated, except for transliteration), editors names, ...
fields like
year = 2006
should probably not be translated (well, maybe if translated into a
language with a completely different dating system ?)
and some stuff is taken into account by the .bst (bibtex style file).
Typically, months names are expanded by bibtex itself (that is "month =
apr" will result in the month 'April' being displayed) and I have a french
bst that expand months names into french (eg "month = apr" into
'Avril').
Well, having everything translatable is probably not that harmfull, but
the point is... on my own .bib file, there are very few differences
between my french and english versions. Only a couple of notes are changed
and maybe one or two town/country names.
Attached is what my complete biblio more or less look like. It was
prepared fro translation using the LaTeX gettext module that was shortly
included into latex-makefile, that means that the only things I felt I
need translating (between english and french) are those into \gettext
command. The rest must either stay the same or is taken into account by
the .bst
The point is that the translated file has then to be generated even with a
very very low rate of actually translated strings (if all fields are
copied into the .po) which is certainly possible but not very convenient
(and keeping a huge .po for only a couple translated strings is a huge
waste of resources).
By the way (note to Martin), that latexgettext was quite nice for these
two kind of situations met in .bib:
_ very very few things to translate compared to things not to translate,
so it is easier to specify manually what has to be translated rather than
try to guess.
_ translation of command. Typically, I liked a \bibalpha command that
triggered either \bibliographystyle{alpha} or \bibliographystyle{fr-alpha}
depending on the current language of the document.
* Add an input or output character translation table (e.g. to avoid
stuff
like {\'e} in the PO's msgid, or to allow users to use accentuated
characters in the PO's msgstr while still generating escaped chars
This, I guess, is a more general problem (it is probably also present with
translation of LaTeX files).
--
Hypocorischtroumpf,
Jym.