From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D653C1384B4 for ; Fri, 13 Nov 2015 01:06:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7374B21C0CC; Fri, 13 Nov 2015 01:06:34 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 662A621C0B9 for ; Fri, 13 Nov 2015 01:06:33 +0000 (UTC) Received: by obbnk6 with SMTP id nk6so62308030obb.2 for ; Thu, 12 Nov 2015 17:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=qWjNcfs64vpN0Qh53RlzHo0/XrkHV9dDGGu4wspYEmM=; b=U1azxDTxSu14GFtc5PMWggKzQLxkcotUNcqZ1FaliRgzi2MUzILQHviJLOXU5pKAHG og3vmjzNnCKt2bg2thpi3PxkjKLqHoQRWWmngQRa6n97O3jO4ADbXhkARJfb1TY+uaGm oJT6d1W6rFaZwdxUAKOX7BXyRVlAsbmB9QUI7Vi8KctI1oQaMjSBag9ZeCKs2RL3R9ws KAiwzJcVqpA50E7IbzFM50feUQfmz5Kf+00DQwEio8tzy/XDIs+rgtstpMtjV1N2nKPH mqyU5C4ZfBkallbM08Sokvs6n9b2e2DOwZ5msfxydsenNVKIwPgky7jvY98jfaUeV/Ks Xa1w== X-Received: by 10.182.74.226 with SMTP id x2mr11066955obv.87.1447376792634; Thu, 12 Nov 2015 17:06:32 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.60.76.102 with HTTP; Thu, 12 Nov 2015 17:05:53 -0800 (PST) From: Francisco Ares Date: Thu, 12 Nov 2015 23:05:53 -0200 Message-ID: Subject: Re: [gentoo-user] [SOLVED] LINGUAS issue To: gentoo-user Content-Type: multipart/alternative; boundary=001a11c1d0ce94cbba052461abd2 X-Archives-Salt: 146a068f-c597-467c-a0ae-2a03bef2af4e X-Archives-Hash: 113e8ee132d57ed3a465b614ce87bf10 --001a11c1d0ce94cbba052461abd2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2015-11-12 16:27 GMT-02:00 : > Francisco Ares wrote: > > > Hi, all. > > > > My locale language is "pt_BR" (Brazilian Portuguese), and many > > applications now support native translations. > > > > And there is the "pt" possible LINGUAS entry, and there is no "pt_PT" > > (Portugal spoken Portuguese), for instance, neither any derivatives > > for other Portuguese speaking countries, which possibly have their > > own regional differences. > > You can add locales by editing /etc/locale.gen and running locale-gen. > As i saw in /usr/share/i18n/SUPPORTED, pt_PT is supported. > > > There are a few applications that do not distinguish "pt_BR" from > > "pt" and treat Portuguese language as simply "pt". An example is the > > OCR program "tesseract", that builds language specifics according to > > the LINGUAS environment variable. > > > > Is there a way for specifying particular "LINGUAS" for individual > > packages? I would not like to have to build dozens of applications to > > include "pt" to my "LINGUAS" definition just to have "tesseract" to > > include my native language support. I've found some old messages > > about this on the net, but did not get any real solution. > > You can define package specific environment variables for package > builds in /etc/portage/env/ > > If you need package specific environment variables for runtime you > could create simple scripts to set the env and start the program. > > #!/bin/sh > # > # start_tesseract.sh > # > LINGUAS=3D"pt" > tesseract > > Then modify the according menu entries / starter buttons to use the > script. > > > Or should I ask the "tesseract" package maintainer to add "pt_BR" to > > the available options? > > That's a good idea. > > -- > Regards > wabe > > Thanks Florian, J=C3=B6rg and wabe, it is finally solved. It happens that I also had LINGUAS set in /etc/profile So, as it seems, this setting bypasses all others. I've had found that "LINGUAS_pt" use flag trick before, in an old post, but as it didn't work at a first attempt, and as the post was a bit old, I supposed that this feature was not in portage anymore. But now with 3 persons saying basically the same thing, I went deeper in my /etc files. The trick brought up by wabe was crucial, as I tried to include another USE flag on the same "env" configuration; when I asked to rebuild tesseract, the USE flag was there, but the LINGUAS wasn't. So I started to look for other instances and found it in that /etc/profile file, edited in 2012, probably when I first installed Gentoo on this machine as a newbie. Going now into a full revision into /etc . Thanks a lot! Francisco --001a11c1d0ce94cbba052461abd2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= 2015-11-12 16:27 GMT-02:00 <wabenbau@gmail.com>:
Francisco Ares= <frares@gmail.com> wrote:
> Hi, all.
>
> My locale language is "pt_BR" (Brazilian Portuguese), and ma= ny
> applications now support native translations.
>
> And there is the "pt" possible LINGUAS entry, and there is n= o "pt_PT"
> (Portugal spoken Portuguese), for instance, neither any derivatives > for other Portuguese speaking countries, which possibly have their
> own regional differences.

You can add locales by editing /etc/locale.gen and running locale-ge= n.
As i saw in /usr/share/i18n/SUPPORTED, pt_PT is supported.

> There are a few applications that do not distinguish "pt_BR"= from
> "pt" and treat Portuguese language as simply "pt".= An example is the
> OCR program "tesseract", that builds language specifics acco= rding to
> the LINGUAS environment variable.
>
> Is there a way for specifying particular "LINGUAS" for indiv= idual
> packages?=C2=A0 I would not like to have to build dozens of applicatio= ns to
> include "pt" to my "LINGUAS" definition just to ha= ve "tesseract" to
> include my native language support.=C2=A0 I've found some old mess= ages
> about this on the net, but did not get any real solution.

You can define package specific environment variables for package builds in /etc/portage/env/

If you need package specific environment variables for runtime you
could create simple scripts to set the env and start the program.

#!/bin/sh
#
# start_tesseract.sh
#
LINGUAS=3D"pt"
tesseract

Then modify the according menu entries / starter buttons to use the
script.

> Or should I ask the "tesseract" package maintainer to add &q= uot;pt_BR" to
> the available options?

That's a good idea.

--
Regards
wabe



Thanks Florian, J= =C3=B6rg and wabe, it is finally solved.

It happens that I als= o had LINGUAS set in /etc/profile

So, as it seems, this setting bypasses all others.=C2=A0 I've had found th= at=20 "LINGUAS_pt" use flag trick before, in an old post, but as it did= n't=20 work at a first attempt, and as the post was a bit old, I supposed that=20 this feature was not in portage anymore.

But now with 3 person= s saying basically the same thing, I went deeper in my /etc files.

<= /div>The trick brought up by wabe was crucial, as I tried to include another USE flag on the same "env" configuration; when I asked to rebuild=20 tesseract, the USE flag was there, but the LINGUAS wasn't. So I started= =20 to look for other instances and found it in that /etc/profile file,=20 edited in 2012, probably when I first installed Gentoo on this machine=20 as a newbie.

Going now into a full revision into /etc .

Thanks a lot!
Francisco

--001a11c1d0ce94cbba052461abd2--