On 2/17/09, Andrej Vodopivec <andrej.vodopivec at gmail.com> wrote:
> 1) Have a function which translates strings. For the banner I used
>
> (format t (intl:gettext "~&Maxima ~a http://maxima.sourceforge.net~%")
> *autoconf-version*)
>
> but the function name can be changed.
I'd like to get _ to work since then we can just write _"foo" for each string.
There is the _ reader macro in src/intl.lisp but I was unable to get
it to work; I guess it has to be defined at compile time so it's available
when other files are compiled. I couldn't formulate a workable EVAL-WHEN
although I didn't try very hard. Maybe you can figure it out.
> 2) Translations in locale directory. A makefile updates maxima.pot,
> *.po and *.mo files at build time. The translations are installed into
> PREFIX/share/locale/.
OK.
> 3) In cl-user::run (init-cl.lisp) manually set the locale and load the
> translations for the intl package.
I also made some changes (not committed) to src/init-cl.lisp for the
locale stuff but I think you should go ahead and commit your version.
For the record I'll attach the stuff I tried so you can compare it.
For my part, I've (1) renamed a macro named _ in src/mrgmac.lisp to
avoid a name collision with the reader macro, and (2) revised MERROR
messages in src/a*.lisp through src/c*.lisp and wrapped them in calls
to INTL:GETTEXT. I plan to continue on through the alphabet in src/*.lisp.
(3) I'm also working on a script (not yet committed) to trigger each message.
Thanks for your help,
Robert Dodier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init-cl.lisp-i18n-patch-dodier
Type: application/octet-stream
Size: 2679 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20090217/b4a40e57/attachment-0001.obj