grub-devel
[Top][All Lists]
Advanced

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

Re: Fw: gettext support


From: Carles Pina i Estany
Subject: Re: Fw: gettext support
Date: Sun, 21 Jun 2009 18:22:36 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

On Jun/21/2009, Robert Millan wrote:
> On Fri, Jun 19, 2009 at 12:42:26PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> > On Fri, Jun 19, 2009 at 12:37 PM, Robert Millan <address@hidden> wrote:
> > 
> > > On Thu, Jun 18, 2009 at 09:56:07PM +0100, Carles Pina i Estany wrote:
> > > > > >         -Copy ca.mo to /usr/share/locale/ca/LC_MESSAGES/grub.mo
> > > > >
> > > > > Languages files should go to a subdir of $PREFIX. E.g. to
> > > > > $PREFIX/langs/$LANG.mo linux directories may be inaccessible
> > > >
> > > > Now the gettext module will search in $prefix/locale/lang.mo, where lang
> > > > is the variable that the user will setup in grub.cfg (e.g. ca for
> > > > catalan) and $prefix is usually /boot/grub
> > >
> > > Uhm I'm not sure I agree on this one.  Sure, they may be inaccessible, but
> > > only in very rare setups.  On the other hand, we _still_ need a .mo in the
> > > standard directory, because some strings in grub-mkconfig are critical
> > > (they generate text that populates menu entry titles).  So that would mean
> > > installing two .mo files.  Is it really worth the hassle?
> > >
> > It's not a problem. We need two locations anyway: one where make install
> > copies them and the other one where ./grub-install copies them. Would it be
> > possible to use /usr/share/grub/locale/$LANG.mo rather than
> > /usr/share/locale/$LANG/LC_MESSAGES/grub.mo? It would make grub-install
> > easier
> 
> No, for system locales we need to use standard locations, or the userland
> gettext won't find them.

No, for example:
address@hidden:~/grubprova$ cat test.sh 
#!/bin/bash

export TEXTDOMAIN="testscript"
export TEXTDOMAINDIR="./locale"
echo $(gettext "hello world")

address@hidden:~/grubprova$ 

address@hidden:~/grubprova$ tree 
.
|-- locale
|   |-- ca
|   |   `-- LC_MESSAGES
|   |       `-- testscript.mo
|   |-- address@hidden
|   `-- test.pot
`-- test.sh

3 directories, 4 files

I mean, the script needs to tell where the locale directory is located.
As far as I know even if it's in the standard locations.

-- 
Carles Pina i Estany
        http://pinux.info




reply via email to

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