[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#355367: debuild: Preserving locale settings can affect build
From: |
Karl Berry |
Subject: |
Re: Bug#355367: debuild: Preserving locale settings can affect build |
Date: |
Tue, 7 Mar 2006 17:19:29 -0600 |
but what I did is the following:
Wow, thanks!!
I tested the attached patch against texinfo/makeinfo 4.8 and it worked,
Please say exactly how you tested it, ie, which environment variables
you set to what, what the makeinfo invocation was, what the input file
was. I have had a great deal of trouble reproducing and testing i18n
stuff in the past.
Furthermore I don't know WHEN the @docuemntlanguage is set,
In principle, it could be changed through the document, if the document
was written in more than one language. In practice, I have never seen
it used anywhere except at the beginning. Anyway, I don't think it
matters.
but it might be enough to change it in the respective callback
function cm_documentlanguage,
Yes, that is the only thing we can do.
but how to expand the 2 letter code to a full setting?
Well, although I see the manual says a two-letter code, clearly that is
not completely correct, although I don't recall anyone writing to me
about it. If someone wanted to differentiate German German from
Austrian German, they should be able to use address@hidden de'
for the first and address@hidden de_AT' for the second.
So the answer is, make a lookup table which translates the two-letter
codes to their respective "common" value, e.g., fr->fr_FR, de->de_DE, etc.
Question: is de_DE, fr_FR, etc., really needed for gettext? If you just
say "de" to gettext (in some way), doesn't it guess you mean de_DE?
Anyway, the only way in which @documentlanguage is used now is that for
some code CC, texinfo.tex tries to \input txi-CC.tex. So there is no
reason why we couldn't have txi-de_AT.tex, if it was needed.
Just for my own information, are there in fact any differences with
German German and Austrian German with respect to these few words? Take
a look at txi-de.tex and see if any of it would be different in Austria.
(The list of words there should also give some clues about other places
to apply __.)
one might have managed to fix this in the last 5 years since the
bug is open).
One would think. I was scared off by Bruno's telling me that the
"simple" way to switch languages (which you implemented) was wrong
somehow. I find gettext quite "magical", overall.
Now, some comments on the patch:
+char interface_language[21] = "C";
...
+ strncpy(interface_language, optarg, 20);
21? No. Make it a char * and use xstrdup on optarg.
+char *getdocumenttext (const char *msgid)
...
+ safedlocale = setlocale(LC_ALL,NULL);
Not that it is important, and not that I'm complaining, but GNU style
is to format code like this:
char *
getdocumenttext (...)
...
safedlocale = setlocale (LC_ALL, NULL); /* with spaces */
Also, "safed" should be "save_" :).
Thanks very much for all this. Actual progress, after lo these many
years :).
Best,
k