bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#355367: debuild: Preserving locale settings can affect build


From: Norbert Preining
Subject: Re: Bug#355367: debuild: Preserving locale settings can affect build
Date: Tue, 7 Mar 2006 12:11:43 +0100
User-agent: Mutt/1.3.28i

Dear Karl, dear all!

Short description: makeinfo: locale settings should not influence output
files

Long description:
        see http://bugs.debian.org/113988

You already mention in the TODO file that it would be good to use the
document language instead of LANG for translating some messages (liek
Next, Previous etc).

On Die, 07 Mär 2006, Sven Joachim wrote:
> ,----
> | * Makeinfo:
> |   - [...]
> |   - Use @documentlanguage instead of LANG for many translations.
> `----
> 
> If this could be implemented (and authors use @documentlanguage), it
> would solve the problem.

I took a look at the code and I couldn't implement THIS one, but what I
did is the following:

- Add a cmd line option --document-language=STR where STR should be
  a string which can be used for LC_ALL=str
- define a function getdocumenttext which is aliased to __ which does
  the following: save the current locale, set the current locale to
  the value as set with the above option (or C if not set at all),
  translates the message, resets the LC_ALL to the saved value
- changed all occurrences (I found) of _("Next") etc to __("Next").

I tested the attached patch against texinfo/makeinfo 4.8 and it worked,
so my locale settings are not taken into account when translating the
messages.

What is missing: Merge @documentlanguage with the above variable (I
called it interface_langauge). This is not completely trivial as the
documentlanguage is a 2 letter code, while the LANG/LC_ALL setting
usually is something like de_AT etc. Furthermore I don't know WHEN the
@docuemntlanguage is set, but it might be enough to change it in the
respective callback function cm_documentlanguage, but how to expand the
2 letter code to a full setting?


Karl: Please comment on this, what do you think, could we include
something like this?

Sven, Julian: What this solve the problems you have?
  (and btw, it took me without C knowledge to hack this in 1h, so if
  this would be so important (as mentioned in the last emails) than
  one might have managed to fix this in the last 5 years since the
  bug is open).

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining AT logic DOT at>             Università di Siena
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
PLYMOUTH (vb.)
To relate an amusing story to someone without remembering that it was
they who told it to you in the first place.
                        --- Douglas Adams, The Meaning of Liff

Attachment: texinfo-langhack.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]