Difference between pages "Funtoo Profiles" and "Funtoo Linux Localization/pt-br"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
== What is a profile? ==
== Definir Idioma Padrão ==


In Gentoo and Funtoo Linux, profiles are used to define base system settings, and have historically had a lot of untapped potential. In Funtoo Linux, I wanted to take advantage of some of this potential to allow Funtoo Linux users to easily tailor their system for various types of roles. Enter the new Funtoo profile system.
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.
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.
Primeiro você terá que editar <code>/etc/locale.gen</code>:
<console>
# ##i##nano -w /etc/locale.gen
</console>
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=
en_US.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.
{{fancywarning|Lhe é altamente aconcelhado usar ''ao menos uma'' localidade UTF-8 desde que algumas aplicações possam exigi-la.}}


== What It Is ==
Agora, essas localidades precisam ser geradas:
<console>
# ##i##locale-gen
##g##*##!g## 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 ]
##g##*##!g## Generation complete
</console>


Historically, users have had to add a ton of settings to <tt>/etc/make.conf</tt> to customize their Gentoo or Funtoo Linux system, which made setup of the operating system more difficult than it should be.
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:
<console>
$ ##i##eselect locale list
##b####g##Available targets for the LANG variable:
  ##b##[1]##!b##  C
  ##b##[2]##!b##  POSIX
  ##b##[3]##!b##  fr_CA.utf8
  ##b##[4]##!b##  en_US.utf8 ##bl##*
  ##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:
<console>
# ##i##eselect locale set 3
Setting LANG to fr_CA.utf8 ...
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:
{{file|name=/etc/env.d/02locale|body=LANG="fr_CA.utf8"}}
Você pode verificar suas ações utilizando:
<console>
$ ##i##eselect locale show
##b####g##LANG variable in profile:
  ##b##fr_CA.utf8
</console>


In Gentoo Linux, it is possible to only define one ''system profile''. Think of a system profile as the default settings that Portage uses for building everything on your system.
Para um efeito imediato é necessário recarregar o ambiente:
<console>
# ##i##env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
</console>
Parabéns! Você definiu com sucesso seu idioma padrão no Funtoo.


In Funtoo Linux, multiple profiles can be enabled at the same time. These include:
== Configurações do Portage ==


* '''arch''' - one arch profile is enabled, at build time, and is not changed. This defines CPU architecture-specific 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.
* '''build''' - one build profile is enabled, at build time, and is generally not changed. It defines the type of build, such as 'current' or 'stable', and associated settings.
* '''flavor''' - one flavor is enabled per system, and can be changed by the user. This defines the general use of the system, such as 'minimal', 'core', 'desktop', 'workstation'
* '''mix-in''' - zero or more mix-ins can be enabled that enable settings specific to a particular subset of features, such as 'gnome', 'kde', 'media', 'mate', 'X', 'hardened'


{{Fancynote|1=
É possível personalizar as configurações de <code>LINGUAS</code> ao configurá-la em <code>/etc/make.conf</code>:
See [[Flavors and Mix-ins]] for a complete list of all flavors and mix-ins available in Funtoo Linux, along with descriptions of what each one does.}}
 
<console>
# ##i##LINGUAS="en_US zh_CN"
</console>


=== Origins and Benefits ===
The <code>LINGUAS</code> variable should use spaces between each localization name.


This new system is really a completion of the original cascading profile design that was designed by Daniel Robbins and implemented by Seemant Kulleen as part of Portage. Funtoo Profiles designed to leverage the existing cascading profile system and provide something much more useable and maintainable for users and developers alike. Here are some of its benefits:
== Read Your Language ==


* Fewer settings in /etc/make.conf. <tt>CHOST</tt> and <tt>ARCH</tt> no longer set in <tt>/etc/make.conf</tt>.
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: 日本語フォント
* Separation of concerns -- arch, build, and flavor-related settings are organized together.
* User flexibility - any number of mix-ins can be enabled to tweak masks or USE settings as needed.


{{fancynote|See [[Custom Profiles]] for information on how to extend the profile system.}}
Check if you have your language installed (Chinese) by using the <tt>fc-list</tt> command from the <tt>media-libs/fontconfig</tt> ebuild:


== What It Looks Like ==
Here's a what a list of profiles looks like:
<console>
<console>
###i## eselect profile list
# ##i##fc-list :lang=zh
Currently available arch profiles:
  [1]  funtoo/1.0/linux-gnu/arch/x86-32bit
  [2]  funtoo/1.0/linux-gnu/arch/x86-64bit
Currently available build profiles:
  [3]  funtoo/1.0/linux-gnu/build/stable
  [4]  funtoo/1.0/linux-gnu/build/current
  [5]  funtoo/1.0/linux-gnu/build/experimental
Currently available flavor profiles:
  [6]  funtoo/1.0/linux-gnu/flavor/minimal
  [7]  funtoo/1.0/linux-gnu/flavor/core
  [8]  funtoo/1.0/linux-gnu/flavor/desktop
  [9]  funtoo/1.0/linux-gnu/flavor/workstation
Currently available mix-ins profiles:
  [10]  funtoo/1.0/linux-gnu/mix-ins/audio
  [11]  funtoo/1.0/linux-gnu/mix-ins/console-extras
  [12]  funtoo/1.0/linux-gnu/mix-ins/dvd
  [13]  funtoo/1.0/linux-gnu/mix-ins/gnome
  [14]  funtoo/1.0/linux-gnu/mix-ins/kde
  [15]  funtoo/1.0/linux-gnu/mix-ins/media
  [16]  funtoo/1.0/linux-gnu/mix-ins/print
  [17]  funtoo/1.0/linux-gnu/mix-ins/python3-only
  [18]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
  [19]  funtoo/1.0/linux-gnu/mix-ins/server-db
  [20]  funtoo/1.0/linux-gnu/mix-ins/server-mail
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-web
  [22]  funtoo/1.0/linux-gnu/mix-ins/X
  [23]  funtoo/1.0/linux-gnu/mix-ins/xfce
</console>
</console>
As you can see, there are multiple types of profiles to choose from.
Let's move on to how to start using it.


== Switch to the Funtoo 1.0 Profile ==
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:


=== Using eselect ===
The preferred method of adding and removing profiles is to use [[eselect|eselect profile]]. This ensures that profiles are added correctly and in the proper order. The order is very important for things to work right.
For a list of options, run:
<console>
<console>
###i## eselect profile help
# ##i##emerge media-fonts/kochi-substitute
</console>
</console>


As stated by the previous command output, let's see the list of what profiles currently defined the option '''list''':
For Chinese:
 
<console>
<console>
###i## eselect profile list
# ##i##emerge media-fonts/arphicfonts
Currently available arch profiles:
  [1]  funtoo/1.0/linux-gnu/arch/x86-64bit *
Currently available build profiles:
  [2]  funtoo/1.0/linux-gnu/build/stable
  [3]  funtoo/1.0/linux-gnu/build/current *
  [4]  funtoo/1.0/linux-gnu/build/experimental
Currently available flavor profiles:
  [5]  funtoo/1.0/linux-gnu/flavor/minimal
  [6]  funtoo/1.0/linux-gnu/flavor/core
  [7]  funtoo/1.0/linux-gnu/flavor/desktop *
Currently available mix-ins profiles:
  [8]  funtoo/1.0/linux-gnu/mix-ins/dvd
  [9]  funtoo/1.0/linux-gnu/mix-ins/gnome
  [10]  funtoo/1.0/linux-gnu/mix-ins/kde
  [11]  funtoo/1.0/linux-gnu/mix-ins/media
  [12]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
  [13]  funtoo/1.0/linux-gnu/mix-ins/server-db
  [14]  funtoo/1.0/linux-gnu/mix-ins/server-mail
  [15]  funtoo/1.0/linux-gnu/mix-ins/server-web
  [16]  funtoo/1.0/linux-gnu/mix-ins/workstation
  [17]  funtoo/1.0/linux-gnu/mix-ins/workstation-minimal
</console>
</console>


As in several other Funtoo utilities, a star on the right indicates an active item (your case may differ from the example above). To add, say, the mix-ins '''dvd''', '''kde''' and '''media''' you have to enter:
For Korean:


<console>
<console>
###i## eselect profile add 8
# ##i##emerge media-fonts/baekmuk-fonts
###i## eselect profile add 10
###i## eselect profile add 11
</console>
</console>
== Keymap ==


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


<console>
<console>
###i## eselect profile add 8 10 11
# ##i##nano -w /etc/conf.d/keymaps
</console>
</console>
== Input Method ==


Verification:
ibus is an Intelligent Input Bus for Linux.


<console>
<console>
###i## eselect profile list 
# ##i##emerge -av ibus
Currently available arch profiles:
  [1]  funtoo/1.0/linux-gnu/arch/x86-64bit *
Currently available build profiles:
  [2]  funtoo/1.0/linux-gnu/build/stable
  [3]  funtoo/1.0/linux-gnu/build/current *
  [4]  funtoo/1.0/linux-gnu/build/experimental
Currently available flavor profiles:
  [5]  funtoo/1.0/linux-gnu/flavor/minimal
  [6]  funtoo/1.0/linux-gnu/flavor/core
  [7]  funtoo/1.0/linux-gnu/flavor/desktop *
Currently available mix-ins profiles:
  [8]  funtoo/1.0/linux-gnu/mix-ins/dvd *
  [9]  funtoo/1.0/linux-gnu/mix-ins/gnome
  [10]  funtoo/1.0/linux-gnu/mix-ins/kde *
  [11]  funtoo/1.0/linux-gnu/mix-ins/media *
  [12]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
  [13]  funtoo/1.0/linux-gnu/mix-ins/server-db
  [14]  funtoo/1.0/linux-gnu/mix-ins/server-mail
  [15]  funtoo/1.0/linux-gnu/mix-ins/server-web
  [16]  funtoo/1.0/linux-gnu/mix-ins/workstation
  [17]  funtoo/1.0/linux-gnu/mix-ins/workstation-minimal
</console>
</console>


{{Fancynote| You must use the numbers to reference the profiles bits you want.}}
You also need to install language table for ibus (Chinese)
 
No magic here, what you add is put by portage in the <tt>/etc/portage/make.profile/parent</tt> file. In the present case this file contains:


<console>
<console>
###i## cat /etc/portage/make.profile/parent
# ##i##emerge -av ibus-table-chinese
gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
gentoo:funtoo/1.0/linux-gnu/build/current
gentoo:funtoo/1.0/linux-gnu/flavor/desktop
gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
gentoo:funtoo/1.0/linux-gnu/mix-ins/gnome
gentoo:funtoo/1.0/linux-gnu/mix-ins/kde
gentoo:funtoo/1.0/linux-gnu/mix-ins/media
</console>
</console>


== For Developers ==
[[Category:Install|Localization]]
 
=== Define the profile sub-sets you will use ===
 
So far in Funtoo we have used the exact same profiles as Gentoo thus Funtoo/2008.0 was strictly the same thing as Gentoo/2008.0 or the barely the same 10.0. This (monolithic) profile was set though a symbolic link named '''/etc/make.profile''' pointing on a complex directory architecture located somewhere under '''/usr/portage/profiles'''. This is no longer valid with the Funtoo 1.0 profiles as they are split in several smaller bricks which are then glued together via the  '''/etc/portage/make.profile/parent''' file (You do not need to include everything, just use the "bricks" you need). Those bricks belongs to several categories:
 
1. MANDATORY -- An "arch" profile which defines settings for a particular architecture. You'll want to set this to whatever arch your system is and leave it alone. '''Setting it to a different arch than your system could severely break it.'''
 
2. MANDATORY -- A "build" profile which should match the tree you wish to use. '''Stable''', '''Current''' (~arch), or '''Experimental''' (use it if you are brave enough and find '''current''' too stable).
 
3. MANDATORY -- A "flavor" profile (what was previously known as ''profiles'' is still known as such in Gentoo) which describes the kind of system you want.
* minimal - Be warned, minimal is exactly what it says, the minimal profile stuff you need for a usable system, nothing else. This is really for people who know what they're doing.
* core - This is the core profile. This is for stuff that affects both desktops and servers.
* desktop - Exactly what it says. If you're using a desktop, you should set this as your flavor.
* server - If you're running a server, you should set this as your flavor.
 
4. OPTIONAL -- One or more "mix-ins" profiles which describe optional add-ons. 'mix-ins' are the heart of the Funtoo 1.0 profiles. Unlike the monolithic profiles which sets a massive amount of use flags and options for you, we've split them into logical add-on profiles. For instance if you want support for gnome, you would add the gnome mix-in to your current profiles. That mix-in sets all the proper use flags and such for gnome. Same with others. Want dvd support? Add that one in. Using a rhel5 kernel which requires special versions of packages such as udev? There's a mix-in for that too. Run a mail server? web server? There's mix-ins for those also. Expect this category to grow in the future as new mix-ins are created.
 
The contents of '''/etc/portage/make.profile/parent''' for a basic setup might look like this:
 
<pre>
gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
gentoo:funtoo/1.0/linux-gnu/build/current
gentoo:funtoo/1.0/linux-gnu/flavor/core
</pre>
 
A more rounded setup for a desktop might look like this:
 
<pre>
gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
gentoo:funtoo/1.0/linux-gnu/build/current
gentoo:funtoo/1.0/linux-gnu/flavor/desktop
gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
gentoo:funtoo/1.0/linux-gnu/mix-ins/media
</pre>
 
== Related ==
* [[Flavors and Mix-ins]]
 
[[Category:Funtoo features]]
[[Category:Portage]]
[[Category:Labs]]
[[Category:HOWTO]]
[[Category:Official Documentation]]

Revision as of 21:43, February 5, 2015

Definir Idioma Padrão

No Funtoo, há dois arquivos de configuração responsáveis suas configurações de idioma: /etc/locale.gen e /etc/env.d/00basic. 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. 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. Primeiro você terá que editar /etc/locale.gen:

root # nano -w /etc/locale.gen

Especifique sua localidade preferida com o formato de caracter acompanhante (Você vai preferir principalmente UTF-8):

   Note

É recomendado manter o en_US.UTF-8 locale pré-configurado com um fallback.

   /etc/locale.gen
en_US.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 /usr/share/i18n/SUPPORTED para a lista padrão de combinações suportadas ou verifique o diretório /usr/share/i18n/locales/ para uma lista de valores válidos.

   Warning

Lhe é altamente aconcelhado usar ao menos uma localidade UTF-8 desde que algumas aplicações possam exigi-la.

Agora, essas localidades precisam ser geradas:

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

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:

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)

O asterisco azul indica a localidade atual padrão do sistema. Você pode agora alterá-lo de acordo com o que desejar:

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

Alternativamente, você pode definir a localidade padrão manualmente. Esse arquivo deve primeiro ser criado com o seu editor preferido:

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

Você pode verificar suas ações utilizando:

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

Para um efeito imediato é necessário recarregar o ambiente:

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

Parabéns! Você definiu com sucesso seu idioma padrão no Funtoo.

Configurações do Portage

Portage utiliza uma variável especial LINGUAS que define quais localizações/traduções são instaladas por padrão. Por padrão, LINGUAS em unset, a qual resultará em todas localizações disponíveis sendo instaladas pelo Portage.

É possível personalizar as configurações de LINGUAS ao configurá-la em /etc/make.conf:

root # LINGUAS="en_US zh_CN"

The LINGUAS variable should use spaces between each localization name.

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

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