All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carles Pina i Estany <carles@pina.cat>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Fw: gettext support
Date: Sun, 21 Jun 2009 18:22:36 +0100	[thread overview]
Message-ID: <20090621172236.GA23270@pina.cat> (raw)
In-Reply-To: <20090621110757.GB27710@thorin>


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 <rmh@aybabtu.com> 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:
carles@pinux:~/grubprova$ cat test.sh 
#!/bin/bash

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

carles@pinux:~/grubprova$ 

carles@pinux:~/grubprova$ tree 
.
|-- locale
|   |-- ca
|   |   `-- LC_MESSAGES
|   |       `-- testscript.mo
|   |-- ca_ES@euro.po
|   `-- 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	other threads:[~2009-06-21 17:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 21:47 Fw: gettext support Carles Pina i Estany
2009-06-16 22:37 ` Vladimir 'phcoder' Serbinenko
2009-06-17 11:37 ` Vladimir 'phcoder' Serbinenko
2009-06-17 20:29   ` Carles Pina i Estany
2009-06-18 13:38     ` Robert Millan
2009-06-18 14:45       ` Vladimir 'phcoder' Serbinenko
2009-06-18 21:07         ` Carles Pina i Estany
2009-06-19 17:22           ` Vladimir 'phcoder' Serbinenko
2009-06-19 23:13             ` Carles Pina i Estany
2009-06-20  0:17               ` Vladimir 'phcoder' Serbinenko
2009-06-19 10:32         ` Robert Millan
2009-06-18 19:30       ` Carles Pina i Estany
2009-06-18 20:56   ` Carles Pina i Estany
2009-06-19 10:37     ` Robert Millan
2009-06-19 10:42       ` Vladimir 'phcoder' Serbinenko
2009-06-21 11:07         ` Robert Millan
2009-06-21 17:22           ` Carles Pina i Estany [this message]
2009-06-21 18:42             ` Robert Millan
2009-06-21 19:14               ` Pavel Roskin
2009-06-21 21:09                 ` Carles Pina i Estany
2009-06-21 21:18                   ` Robert Millan
2009-06-21 21:28                     ` Carles Pina i Estany
2009-06-21 22:03                       ` Vladimir 'phcoder' Serbinenko
2009-06-21 22:31                         ` Carles Pina i Estany
2009-06-21 22:47                           ` Robert Millan
2009-06-21 22:56                             ` Colin Watson
2009-06-22 19:03                     ` Jordi Mallach
2009-06-22 19:42                       ` Javier Martín
2009-06-23 10:05                         ` Jordi Mallach
2009-06-23 10:45                           ` Javier Martín
2009-06-24  9:17                             ` Jordi Mallach
2009-06-21 21:20                   ` Vladimir 'phcoder' Serbinenko
2009-06-21 23:42                   ` Pavel Roskin
2009-06-22  9:39                     ` Robert Millan
2009-06-22 10:16                       ` Colin Watson
2009-06-21 21:14                 ` Robert Millan
2009-06-25 21:20                 ` Carles Pina i Estany
2009-06-26  3:09                   ` Pavel Roskin
2009-06-26 12:47                     ` Robert Millan
2009-06-26 15:31                       ` Pavel Roskin
2009-06-26 23:42                       ` Carles Pina i Estany
2009-06-19 13:55       ` Jordi Mallach
2009-06-19 14:32         ` Vladimir 'phcoder' Serbinenko
2009-06-21 11:17           ` Robert Millan
2009-06-19 23:08       ` Carles Pina i Estany
2009-06-21 11:09         ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090621172236.GA23270@pina.cat \
    --to=carles@pina.cat \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.