Difference between revisions of "Funtoo Linux Localization/pt-br"

From Funtoo
Jump to navigation Jump to search
(Updating to match new version of source page)
Line 1: Line 1:
== Definir Idioma Padrão ==
<languages/>
=== Set Default Language ===


No Funtoo, há dois arquivos de configuração responsáveis suas configurações de idioma: <code>/etc/locale.gen</code> e <code>/etc/env.d/00basic</code>. O primeiro arquivo contém somente en_US.UTF-8 locale habilitado. O ultimo é um arquivo padrão embarcado que vem a partir do stage3 e responsável pelo en_US.UTF-8 locale system-wide. não recomendado editar.
On Funtoo, there are two configuration files responsible for your language settings: {{f|/etc/locale.gen}} and {{f|/etc/env.d/00basic}}. First file has only en_US.UTF-8 locale enabled. Last one is a default shipped file comes from stage3 and responsible for en_US.UTF-8 locale system-wide. Not recommended to edit.
Os passos a seguir lhe guiarão através do processo de editar o idioma padrão do sistema (default system language), utilizando o francês canadense como um exemplo.
The following steps will guide you through the process of setting up the default system language, using French Canadian as an example.
Primeiro você terá que editar <code>/etc/locale.gen</code>:
First you will need to edit {{f|/etc/locale.gen}}:
<console>
{{console|body=# ##i##nano -w /etc/locale.gen}}
# ##i##nano -w /etc/locale.gen
Specify your preferred locale with the accompanying character format (you will mostly want UTF-8):
</console>
{{note|It is recommended to keep the preconfigured en_US.UTF-8 locale as a fallback.}}
Especifique sua localidade preferida com o formato de caracter acompanhante (Você vai preferir principalmente UTF-8):
{{fancynote|É recomendado manter o en_US.UTF-8 locale pré-configurado com um fallback.}}
{{file|name=/etc/locale.gen|body=
{{file|name=/etc/locale.gen|body=
en_US.UTF-8 UTF-8
en_US.UTF-8 UTF-8
fr_CA.UTF-8 UTF-8
fr_CA.UTF-8 UTF-8
}}
}}
Para determinar uma localidade apropriada para o seu sistema, você deve dar uma olha em <code>/usr/share/i18n/SUPPORTED</code> para a lista padrão de combinações suportadas  ou verifique o diretório <code>/usr/share/i18n/locales/</code> para uma lista de valores válidos.
To determine an appropriate locale for your system, you should take a look into <code>/usr/share/i18n/SUPPORTED</code> for the default list of supported combinations or check the {{f|/usr/share/i18n/locales/}} directory for a list of valid values.
{{fancywarning|Lhe é altamente aconcelhado usar ''ao menos uma'' localidade UTF-8 desde que algumas aplicações possam exigi-la.}}
{{warning|You are strongly advised to use ''at least one'' UTF-8 locale since some applications may require it.}}


Agora, essas localidades precisam ser geradas:
Now, those locales need to be generated:
<console>
{{console|body=
# ##i##locale-gen
# ##i##locale-gen
  ##g##*##!g## Generating 2 locales (this might take a while) with 1 jobs
  ##g##*##!g## Generating 2 locales (this might take a while) with 1 jobs
Line 23: Line 22:
  *  (2/2) Generating fr_CA.UTF-8 ... [ ok ]
  *  (2/2) Generating fr_CA.UTF-8 ... [ ok ]
  ##g##*##!g## Generation complete
  ##g##*##!g## Generation complete
</console>
}}


Uma vez feito, você pode aplicar suas configurações de localidade do system (locale settings system-wide). Primeiro exiba todas as opções disponíveis:
Once done, you can apply your locale settings system-wide. First display all available options:
<console>
{{console|body=
$ ##i##eselect locale list
$ ##i##eselect locale list
##b####g##Available targets for the LANG variable:
##b####g##Available targets for the LANG variable:
Line 34: Line 33:
   ##b##[4]##!b##  en_US.utf8 ##bl##*
   ##b##[4]##!b##  en_US.utf8 ##bl##*
   ##b##[ ]##!b##  (free form)
   ##b##[ ]##!b##  (free form)
</console>
}}
O asterisco azul indica a localidade atual padrão do sistema. Você pode agora alterá-lo de acordo com o que desejar:
The blue star indicates the current default system locale. You can now change it according your wishes:
<console>
{{console|body=
# ##i##eselect locale set 3
# ##i##eselect locale set 3
Setting LANG to fr_CA.utf8 ...
Setting LANG to fr_CA.utf8 ...
Run ". /etc/profile" to update the variable in your shell.
Run ". /etc/profile" to update the variable in your shell.
</console>
}}
Alternativamente, você pode definir a localidade padrão manualmente. Esse arquivo deve primeiro ser criado com o seu editor preferido:
Alternatively, you can set the default locale manually. This file should be created first with your prefered editor:
{{file|name=/etc/env.d/02locale|body=LANG="fr_CA.utf8"}}
{{file|name=/etc/env.d/02locale|body=LANG="fr_CA.utf8"}}
Você pode verificar suas ações utilizando:
You can verify your actions using:
<console>
{{console|body=
$ ##i##eselect locale show
$ ##i##eselect locale show
##b####g##LANG variable in profile:
##b####g##LANG variable in profile:
   ##b##fr_CA.utf8
   ##b##fr_CA.utf8
</console>
}}


Para um efeito imediato é necessário recarregar o ambiente:
For an immediate effect it is required to reload the environment:
<console>
{{console|body=
# ##i##env-update && source /etc/profile
# ##i##env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
>>> Regenerating /etc/ld.so.cache...
</console>
}}
Parabéns! Você definiu com sucesso seu idioma padrão no Funtoo.
Congratulations! You have successfully set up your default language on Funtoo.


== Configurações do Portage ==
=== Portage Settings ===


Portage utiliza uma variável especial <code>LINGUAS</code> que define quais localizações/traduções são instaladas por padrão. Por padrão, <code>LINGUAS</code> em unset, a qual resultará em ''todas'' localizações disponíveis sendo instaladas pelo Portage.
Portage uses a special variable {{c|L10N}} that defines what localizations/translations get installed by default. By default, {{c|L10N}} is unset, which only builds the packages' default language.  


É possível personalizar as configurações de <code>LINGUAS</code> ao configurá-la em <code>/etc/make.conf</code>:
It is possible to customize the setting of {{c|L10N}} by setting it in {{f|/etc/portage/make.conf}}:


<console>
{{file|lang=bash|name=/etc/portage/make.conf|body=
# ##i##LINGUAS="en_US zh_CN"
# Install English (United States) and Chinese (China) translations (if available)
</console>
L10N="en-US zh-CN"
}}


A variável <code>LINGUAS</code> deve utilizar espaços entre cada nome de localização.
The {{c|LI10N}} variable should use spaces between each localization name. A list of all supported languages can be found in {{f|/usr/portage/profiles/desc/l10n.desc}}.


== Leia Seu Idioma ==
Some old packages still use the deprecated {{c|LINGUAS}} variable. You can set it in {{f|/etc/portage/make.conf}}:


Um Funtoo Linux novinho instalado não habilita para ler todos os idiomas. Você quer ler as coisas, digamos, no Mozilla Firefox. Você precisa instalar as fonts - Um bom sinal de que você não instalou as fonts adequadas é que os caracteres a seguir aparecem como caixas com números dentro delas: 日本語フォント
{{file|lang=bash|name=/etc/portage/make.conf|body=LINGUAS="en_US zh_CN"}}


Verifique se você possui o idioma instalado (Chinês) ao utilizar o comando <tt>fc-list</tt> a partir do ebuild <tt>media-libs/fontconfig</tt> ebuild:
It uses the same syntax, but uses other language codes which can be found in {{f|/usr/portage/profiles/desc/linguas.desc}}.


<console>
After setting the {{c|L10N}} and {{c|LINGUAS}} USE flags you may need to re-emerge some packages:
 
{{console|body=###i## emerge --ask --newuse --deep --with-bdeps=y @world}}
 
=== Read Your Language ===
 
A newly installed Funtoo Linux does not able to read all the languages. You want to read the stuff, say, in Mozilla Firefox. You need to install fonts - A good sign that you have not installed the proper fonts is that the following characters appear as boxes with numbers inside: 日本語フォント
 
Check if you have your language installed (Chinese) by using the {{c|fc-list}} command from the {{c|media-libs/fontconfig}} ebuild:
 
{{console|body=
# ##i##fc-list :lang=zh
# ##i##fc-list :lang=zh
</console>
}}


Se você estiver com sorte, a font correta será instalada, e seus aplicativos também serão capazes de utilizar chinês como o idioma padrão. Mas em caso de você não possuir as fonts corretas instaladas desta maneira, você precisa instalá-las manualmente.
If you are lucky, the right font will be installed, and your apps will also be able to use Chinese as the default language. But in case you not have the right font installed in this way, you need to install them manually.


Para japonês:
For Japanese:


<console>
{{console|body=
# ##i##emerge media-fonts/kochi-substitute
# ##i##emerge media-fonts/kochi-substitute
</console>
}}


Para chinês:
For Chinese:
<console>
{{console|body=
# ##i##emerge media-fonts/arphicfonts
# ##i##emerge media-fonts/arphicfonts
</console>
}}


Para Coreano:
For Korean:


<console>
{{console|body=
# ##i##emerge media-fonts/baekmuk-fonts
# ##i##emerge media-fonts/baekmuk-fonts
</console>
}}
 
A very good alternative could be a Noto Fonts by Google, claimed to be a fonts with widest language support:
{{console|body=
# ##i##emerge media-fonts/noto
}}


== Mapa de teclado (Keymap) ==
=== Keymap ===


O Funtoo Linux padroniza para um teclado inglês americano (US English). Se você estiver utilizando um outro tipo de teclado, edite <tt>/etc/conf.d/keymaps</tt> e defina o keymap para o seu modelo de tecladoto. Por exemplo, cf Para o teclado do francês canadense (French Canadian), fr Para francês azerty (French Azerty).
Funtoo Linux defaults to a US English keyboard. If you are using another type of keyboard, edit {{f|/etc/conf.d/keymaps}} and set keymap to your keyboard model. For example, cf for French Canadian keyboard, fr for French Azerty.


<console>
{{console|body=
# ##i##nano -w /etc/conf.d/keymaps
# ##i##nano -w /etc/conf.d/keymaps
</console>
}}


== Método de entrada ==
=== Input Method ===


ibus é um Barramento de Entrada Inteligente (Intelligent Input Bus) para Linux.
ibus is an Intelligent Input Bus for Linux.


<console>
{{console|body=
# ##i##emerge -av ibus
# ##i##emerge -av ibus
</console>
}}


Você também precisa instalar a tabela de idiomas para o ibus (Chinês)
You also need to install language table for ibus (Chinese)


<console>
{{console|body=
# ##i##emerge -av ibus-table-chinese
# ##i##emerge -av ibus-table-chinese
</console>
}}
 
[[Category:Install|Localization]]
[[Category:Install|Localization]]
[[Category:pt_BR]]
[[Category:Official Documentation]]

Revision as of 04:57, April 14, 2019

Other languages:
English • ‎Türkçe • ‎español • ‎polski • ‎português do Brasil • ‎中文(中国大陆)‎

Set Default Language

On Funtoo, there are two configuration files responsible for your language settings: /etc/locale.gen and /etc/env.d/00basic. First file has only en_US.UTF-8 locale enabled. Last one is a default shipped file comes from stage3 and responsible for en_US.UTF-8 locale system-wide. Not recommended to edit. The following steps will guide you through the process of setting up the default system language, using French Canadian as an example. First you will need to edit /etc/locale.gen:

root # nano -w /etc/locale.gen

Specify your preferred locale with the accompanying character format (you will mostly want UTF-8):

   Note

It is recommended to keep the preconfigured en_US.UTF-8 locale as a fallback.

   /etc/locale.gen
en_US.UTF-8 UTF-8
fr_CA.UTF-8 UTF-8

To determine an appropriate locale for your system, you should take a look into /usr/share/i18n/SUPPORTED for the default list of supported combinations or check the /usr/share/i18n/locales/ directory for a list of valid values.

   Warning

You are strongly advised to use at least one UTF-8 locale since some applications may require it.

Now, those locales need to be generated:

root # locale-gen
 * Generating 2 locales (this might take a while) with 1 jobs
 *  (1/2) Generating en_US.UTF-8 ... [ ok ]
 *  (2/2) Generating fr_CA.UTF-8 ... [ ok ]
 * Generation complete

Once done, you can apply your locale settings system-wide. First display all available options:

user $ eselect locale list
root ##b##Available targets for the LANG variable:
  [1]   C
  [2]   POSIX
  [3]   fr_CA.utf8
  [4]   en_US.utf8 *
  [ ]   (free form)

The blue star indicates the current default system locale. You can now change it according your wishes:

root # eselect locale set 3
Setting LANG to fr_CA.utf8 ...
Run ". /etc/profile" to update the variable in your shell.

Alternatively, you can set the default locale manually. This file should be created first with your prefered editor:

   /etc/env.d/02locale
LANG="fr_CA.utf8"

You can verify your actions using:

user $ eselect locale show
root ##b##LANG variable in profile:
  fr_CA.utf8

For an immediate effect it is required to reload the environment:

root # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...

Congratulations! You have successfully set up your default language on Funtoo.

Portage Settings

Portage uses a special variable L10N that defines what localizations/translations get installed by default. By default, L10N is unset, which only builds the packages' default language.

It is possible to customize the setting of L10N by setting it in /etc/portage/make.conf:

   /etc/portage/make.conf (bash source code)
# Install English (United States) and Chinese (China) translations (if available)
L10N="en-US zh-CN"

The LI10N variable should use spaces between each localization name. A list of all supported languages can be found in /usr/portage/profiles/desc/l10n.desc.

Some old packages still use the deprecated LINGUAS variable. You can set it in /etc/portage/make.conf:

   /etc/portage/make.conf (bash source code)
LINGUAS="en_US zh_CN"

It uses the same syntax, but uses other language codes which can be found in /usr/portage/profiles/desc/linguas.desc.

After setting the L10N and LINGUAS USE flags you may need to re-emerge some packages:

root # emerge --ask --newuse --deep --with-bdeps=y @world

Read Your Language

A newly installed Funtoo Linux does not able to read all the languages. You want to read the stuff, say, in Mozilla Firefox. You need to install fonts - A good sign that you have not installed the proper fonts is that the following characters appear as boxes with numbers inside: 日本語フォント

Check if you have your language installed (Chinese) by using the fc-list command from the media-libs/fontconfig ebuild:

root # fc-list :lang=zh

If you are lucky, the right font will be installed, and your apps will also be able to use Chinese as the default language. But in case you not have the right font installed in this way, you need to install them manually.

For Japanese:

root # emerge media-fonts/kochi-substitute

For Chinese:

root # emerge media-fonts/arphicfonts

For Korean:

root # emerge media-fonts/baekmuk-fonts

A very good alternative could be a Noto Fonts by Google, claimed to be a fonts with widest language support:

root # emerge media-fonts/noto

Keymap

Funtoo Linux defaults to a US English keyboard. If you are using another type of keyboard, edit /etc/conf.d/keymaps and set keymap to your keyboard model. For example, cf for French Canadian keyboard, fr for French Azerty.

root # nano -w /etc/conf.d/keymaps

Input Method

ibus is an Intelligent Input Bus for Linux.

root # emerge -av ibus

You also need to install language table for ibus (Chinese)

root # emerge -av ibus-table-chinese