Difference between pages "How to Dev" and "Pt-br/Funtoo Linux Localization"

(Difference between pages)
(How to Develop -- The Quick Summary)
 
(Portage Settings)
 
Line 1: Line 1:
= How to 'dev' =
+
== Definir Idioma Padrão ==
__NOTITLE__
+
  
{{fancytip|This page will continue to be updated with development-related information... thanks for your interest :)}}
+
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.}}
  
This page serves as the official introduction on how to collaborate with our community and help to improve Funtoo Linux.
+
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>
  
== Introduction ==
+
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>
  
Thanks for your interest in helping out with Funtoo Linux! Funtoo Linux has existed for several years, and we've been using git since the beginning of the project, but have played with various approaches on how to develop Funtoo Linux in a collaborative fashion. Some approaches have worked, some haven't, and I (Daniel) and others like to periodically experiment with different approaches, so these methods are likely to change in the future.
+
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.
  
== How to Develop -- The Quick Summary ==
+
== Configurações do Portage ==
  
Okay, so you want to get involved. How do you do it? Well, here's how we want you to start:
+
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.
  
* First, you need to actually ''use'' Funtoo Linux in some capacity.
+
É possível personalizar as configurações de <code>LINGUAS</code> ao configurá-la em <code>/etc/make.conf</code>:
* {{CreateAccount}}
+
* Help in the [http://forums.funtoo.org forums].
+
* Find things that need fixing on [https://bugs.funtoo.org the bug tracker], and submit fixes for them.
+
* If you have a new ebuild, then create an issue on [https://bugs.funtoo.org the bug tracker] for it.
+
* Testing things and finding bugs is also a form of help.
+
* Help us document stuff on the wiki. See [[Help:Funtoo Editing Guidelines|How to 'wiki']].
+
* Hang out in <tt>#funtoo</tt> on freenode and chat with us.
+
* Learn more about ebuilds by reading our [[Developer Guide]]. Ask questions.
+
* [[Compare Forked Packages To Gentoo]], find one that needs updating, and ask us how to help.
+
  
If you start doing a good amount of this, you will get noticed and plugged in to our development efforts in a short amount of time.
+
<console>
 +
# ##i##LINGUAS="en_US zh_CN"
 +
</console>
  
Now that you have the big picture, let's start by doing a quick overview of Funtoo infrastructure and how it (currently) relates to Funtoo Linux development.
+
The <code>LINGUAS</code> variable should use spaces between each localization name.
  
== bugs.funtoo.org ==
+
== Read Your Language ==
  
Currently, [https://bugs.funtoo.org bugs.funtoo.org] serves as the center of operations for all development. If you're going to collaborate with us, then you should definitely {{CreateAccount}} and familiarize yourself with our bug tracker. We try to ensure that ''all'' work in Funtoo Linux has a corresponding issue opened on the bug tracker, so there is some reference for someone to look to find out ''why'' some change was made.
+
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: 日本語フォント
  
== The Wiki ==
+
Check if you have your language installed (Chinese) by using the <tt>fc-list</tt> command from the <tt>media-libs/fontconfig</tt> ebuild:
  
You are currently reading the wiki, and it is becoming a more and more important part of development. We currently have the ability to define wiki pages for [[:Category:Ebuilds|Ebuilds]], which are used as official documentation for the ebuild. Documentation is a very important part of Funtoo Linux development, and you're strongly encouraged to read about [[Adding an Ebuild to the Wiki]]. Developers who write good documentation gain much respect :)
+
<console>
 +
# ##i##fc-list :lang=zh
 +
</console>
  
== git.funtoo.org ==
+
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.
  
All of our master git repositories exist on [http://git.funtoo.org git.funtoo.org].
+
For Japanese:
  
== GitHub ==
+
<console>
 +
# ##i##emerge media-fonts/kochi-substitute
 +
</console>
  
We have mirrors of all our git repositories on [http://github.com/funtoo GitHub]. When we push to a repository on git.funtoo.org, it automatically pushes the change to the corresponding repo on GitHub, too.
+
For Chinese:
 +
<console>
 +
# ##i##emerge media-fonts/arphicfonts
 +
</console>
  
This has historically created some confusion, because we don't really (right now) do active development on GitHub, using pull requests. If you have an improvement to Funtoo Linux, we want you to open a bug on our [https://bugs.funtoo.org bug tracker]. However, I am hoping that this will change - see {{Bug|FL-1322}}. But for now, if you create an issue or a pull request on GitHub, we probably won't see it in a timely manner.
+
For Korean:
  
== The Git Repositories Themselves ==
+
<console>
 +
# ##i##emerge media-fonts/baekmuk-fonts
 +
</console>
 +
== Keymap ==
  
One important thing to understand about Funtoo Linux is that the git tree you receive when you type <tt>emerge --sync</tt> is what I call a ''transport tree'' -- it is used to deliver updates to you, but it is not used for development. Our main <tt>/usr/portage</tt> tree can be seen at http://git.funtoo.org/ports-2012/tree or http://github.com/funtoo/ports-2012 is generated using automated scripts which take the Gentoo Portage tree, various funtoo overlays, and several other overlays and combine them into a unified tree. We generate an updated commit for our transport tree every 4 hours.
+
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.
  
=== Development Trees ===
+
<console>
 +
# ##i##nano -w /etc/conf.d/keymaps
 +
</console>
 +
== Input Method ==
  
The repositories that we actually do development in are:
+
ibus is an Intelligent Input Bus for Linux.
  
{{#ask:[[Category:Repositories]] [[Repository Type::Development Tree]]
+
<console>
|? Repository ID}}
+
# ##i##emerge -av ibus
 +
</console>
  
[[Repository:Funtoo Overlay|funtoo-overlay]] is where nearly all of the core Funtoo forked ebuilds live. This tree is maintained by senior Funtoo staff and the BDFL, and also contains stuff like our [[Funtoo 1.0 Profile]] system, and the actual scripts that are used to generate our main "transport" tree that users receive.
+
You also need to install language table for ibus (Chinese)
  
[[Repository:Funtoo LDAP Overlay|The Funtoo LDAP]] and [[Repository:Funtoo GNOME Overlay|GNOME]] overlays are examples of development trees where Funtoo staff have collected a bunch of ebuilds that were cluttering up funtoo-overlay, and placed them in their own repository to improve organization. These are treated as extensions of funtoo-overlay.
+
<console>
 +
# ##i##emerge -av ibus-table-chinese
 +
</console>
  
[[Repository:Funtoo Plex Overlay|The Plex overlay]] and [[Repository:Funtoo DeaDBeeF Overlay|DeaDBeeF]] overlays are examples of overlays that are maintained by independent developers, and these overlays are hosted in these developers' GitHub accounts. We have added these overlays to our merge script, so any updates made to these GitHub repositories are automatically pulled into our transport tree.
+
[[Category:Install|Localization]]
 
+
So as you can see, there is quite a bit of flexiblity in how updates can be added to our tree. Senior staff can work on the funtoo-overlay, others can work on the more independent GNOME and LDAP overlays, and (mostly) independent developers can happily maintain ebuilds in their own independent overlays, hosted on GitHub.
+

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:

# 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:

# 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:

$ eselect locale list
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:

# 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:

$ eselect locale show
LANG variable in profile:
  fr_CA.utf8

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

# 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:

# 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:

# 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:

# emerge media-fonts/kochi-substitute

For Chinese:

# emerge media-fonts/arphicfonts

For Korean:

# 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.

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

Input Method

ibus is an Intelligent Input Bus for Linux.

# emerge -av ibus

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

# emerge -av ibus-table-chinese