Gentoo Archives: gentoo-user

From: Francisco Ares <frares@×××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] [SOLVED] LINGUAS issue
Date: Fri, 13 Nov 2015 01:06:47
Message-Id: CAHH9eM4rTKc2XKz0A8fB3maDN5d8z35s2BnnzNCmZWkZxZmsyg@mail.gmail.com
1 2015-11-12 16:27 GMT-02:00 <wabenbau@×××××.com>:
2
3 > Francisco Ares <frares@×××××.com> wrote:
4 >
5 > > Hi, all.
6 > >
7 > > My locale language is "pt_BR" (Brazilian Portuguese), and many
8 > > applications now support native translations.
9 > >
10 > > And there is the "pt" possible LINGUAS entry, and there is no "pt_PT"
11 > > (Portugal spoken Portuguese), for instance, neither any derivatives
12 > > for other Portuguese speaking countries, which possibly have their
13 > > own regional differences.
14 >
15 > You can add locales by editing /etc/locale.gen and running locale-gen.
16 > As i saw in /usr/share/i18n/SUPPORTED, pt_PT is supported.
17 >
18 > > There are a few applications that do not distinguish "pt_BR" from
19 > > "pt" and treat Portuguese language as simply "pt". An example is the
20 > > OCR program "tesseract", that builds language specifics according to
21 > > the LINGUAS environment variable.
22 > >
23 > > Is there a way for specifying particular "LINGUAS" for individual
24 > > packages? I would not like to have to build dozens of applications to
25 > > include "pt" to my "LINGUAS" definition just to have "tesseract" to
26 > > include my native language support. I've found some old messages
27 > > about this on the net, but did not get any real solution.
28 >
29 > You can define package specific environment variables for package
30 > builds in /etc/portage/env/
31 >
32 > If you need package specific environment variables for runtime you
33 > could create simple scripts to set the env and start the program.
34 >
35 > #!/bin/sh
36 > #
37 > # start_tesseract.sh
38 > #
39 > LINGUAS="pt"
40 > tesseract
41 >
42 > Then modify the according menu entries / starter buttons to use the
43 > script.
44 >
45 > > Or should I ask the "tesseract" package maintainer to add "pt_BR" to
46 > > the available options?
47 >
48 > That's a good idea.
49 >
50 > --
51 > Regards
52 > wabe
53 >
54 >
55
56 Thanks Florian, Jörg and wabe, it is finally solved.
57
58 It happens that I also had LINGUAS set in /etc/profile
59
60 So, as it seems, this setting bypasses all others. I've had found that
61 "LINGUAS_pt" use flag trick before, in an old post, but as it didn't work
62 at a first attempt, and as the post was a bit old, I supposed that this
63 feature was not in portage anymore.
64
65 But now with 3 persons saying basically the same thing, I went deeper in my
66 /etc files.
67
68 The trick brought up by wabe was crucial, as I tried to include another USE
69 flag on the same "env" configuration; when I asked to rebuild tesseract,
70 the USE flag was there, but the LINGUAS wasn't. So I started to look for
71 other instances and found it in that /etc/profile file, edited in 2012,
72 probably when I first installed Gentoo on this machine as a newbie.
73
74 Going now into a full revision into /etc .
75
76 Thanks a lot!
77 Francisco