[Maxima] progress on i18n stuff
andrej.vodopivec at gmail.com
Tue Feb 17 11:41:36 CST 2009
On Tue, Feb 17, 2009 at 4:48 PM, Robert Dodier <robert.dodier at gmail.com> wrote:
> 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~%")
>> 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.
To get this to work with xgettext nicely this would have to be
_("foo"). But since xgettext knows how to parse lisp files I think it
is better to have a function call directly. We can work on this later.
I tried to call (install) at the end of intl.lisp, which seems to
install the reader macro. I get an error when compiling $ordergreat. I
don't know what to do with that.
>> 2) Translations in locale directory. A makefile updates maxima.pot,
>> *.po and *.mo files at build time. The translations are installed into
>> 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.
You changes are very similar to mine. I merged them and committed.
If anyone wants to start translating I can provide more info. If I
introduced bugs let me know.
More information about the Maxima