public inbox for gentoo-devhelp@lists.gentoo.org
 help / color / mirror / Atom feed
From: Nikos Chantziaras <realnc@arcor.de>
To: Daniel Pielmeier <daniel.pielmeier@googlemail.com>,
	 gentoo-devhelp@lists.gentoo.org
Subject: Re: [gentoo-devhelp] LINGUAS vs LANGUAGES
Date: Fri, 15 May 2009 17:47:04 +0300	[thread overview]
Message-ID: <4A0D8068.3090304@arcor.de> (raw)
In-Reply-To: <6142e6140905150705n3db6e281g43439abe11eb1fb7@mail.gmail.com>

(It would be nice to reply on-list so the list's archives will be 
helpful to others searching through it.)

Daniel Pielmeier wrote:
> 2009/5/15 Nikos Chantziaras <realnc@arcor.de>:
>> Reading the Gentoo Development Guide doesn't offer much help on LINGUAS:
>>
>>  http://devmanual.gentoo.org/general-concepts/linguas/index.html
>>
>> It says to look at games-rpg/nwn, but that ones seems to use LANGUAGES
>> instead of LINGUAS.  My ebuild is EAPI=2 and the application in question
>> supports English and German.  What is correct, LINGUAS="en de" or
>> LANGUAGES="en de"?
> 
> LINGUAS holds the languages you want to install from make.conf.
> LANGUAES or LANGS or any other variable name you choose in your ebuild
> should refer to the languages available in the application to be
> installed.

Then I guess LINGUAS is what I need, since a user not having "de" in 
make.conf wouldn't want a German translation of the application's GUI 
installed.


> How you treat localisation in your ebuild depends on how the
> application itself treats the installation of locales. Take a look at
> net-irc/quassel for an example of an application that also uses cmake
> as build system. Maybe there is a better way to achieve locales
> installation but this one works. For cmake you need to know if the
> application supports customized installation of locales by using
> LINGUAS. Take a look in CMakelists.txt in the source for hints.

The application uses qmake and it simply installs all languages (*.qm 
files) unconditionally during "make install" and loads the appropriate 
one according to the LANG env variable at runtime, falling back to 
English if one isn't available.  At this time, German ("de") is the only 
one supported though (the app's built-in being English).

The solution I arrived at in my ebuild is:

   IUSE="linguas_de"

and then in src_install() I don't use the "install" make target which 
would install the *.qm files unconditionally, but rather use the other 
targets "install" depends upon, omitting "install_i18n":

   # Install everything except documentation and i18n.
   emake INSTALL_ROOT="${D}" install_target install_charmaps \
   || die "make install failed"
   # Install i18n files.
   if use linguas_de; then
     insinto "${GAMES_DATADIR}/${PN}/i18n"
     doins "${PN}_de.qm" || die "doins ${PN}_de.qm failed"
   fi

It works.  I assume putting linguas_de directly in IUSE is correct?



  parent reply	other threads:[~2009-05-15 14:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 13:39 [gentoo-devhelp] LINGUAS vs LANGUAGES Nikos Chantziaras
     [not found] ` <6142e6140905150705n3db6e281g43439abe11eb1fb7@mail.gmail.com>
2009-05-15 14:47   ` Nikos Chantziaras [this message]
2009-05-15 15:01     ` Daniel Pielmeier
2009-05-15 16:35       ` Daniel Pielmeier
2009-05-15 19:16         ` [gentoo-devhelp] " Nikos Chantziaras
2009-07-21 10:13           ` Steven J Long
2009-07-26 20:51             ` Mike Frysinger
2009-08-01 15:22               ` [gentoo-devhelp] " Steven J Long
2009-08-06 19:40                 ` Steven J Long
2009-08-13 19:28                 ` Mike Frysinger
2009-08-15 23:16                   ` [gentoo-devhelp] " Steven J Long
2009-07-31 15:26             ` [gentoo-devhelp] " Nikos Chantziaras

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=4A0D8068.3090304@arcor.de \
    --to=realnc@arcor.de \
    --cc=daniel.pielmeier@googlemail.com \
    --cc=gentoo-devhelp@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox