Atualizáção dos boot floppies traduzidos
Oi gente, o Gleydson e o Lalo mandaram umas correcoes para o boot floppies traduzido para portugues e eu já coloquei na página o atualizado e mandei para o Zanardi. Abraços,PH
tradução do FAQ (era: o que aconteceu com a Págin a da Debia-PT?)
Paulo Henrique Baptista de Oliveira writes: (...) Aproveitando a deixa. Já estou conferindo o tutorial que o kov está traduzindo (para quem não sabe o tutorial é a base do livro da Debian que será lançado pela Macmillan). E as outras pessoas, como vai a tradução? Estamos quase terminando a tradução do FAQ da Debian. Na verdade, o Thiago já terminou sua parte, e estou quase terminando a minha. bye Rafael Caetano [EMAIL PROTECTED]
Tradução dos scripts de inicialização
On Sun, Jul 11, 1999 at 03:45:38AM -0500, Paulo Henrique Baptista de Oliveira wrote: E as outras pessoas, como vai a tradução? estou preparando um projeto maluco de tradução dos scripts do init... vou apresentar a proposta hj em debian-devel-announce (vou fazer um cc pra cá pra vcs verem). Nesse meio tempo, alguém que goste de potfiles poderia verificar se o fsck e o mount, talvez alguns outros programas que são executados no boot, têm suporte a internacionalização, e se tiver traduzí-los. []s, |alo + -- I am Lalo of deB-org. You will be freed. Resistance is futile. http://www.webcom.com/lalo mailto:[EMAIL PROTECTED] pgp key in the web page Debian GNU/Linux --http://www.debian.org
Re: Tradução dos scripts de inicialização
On Mon, Jul 12, 1999 at 04:16:17PM -0300, Lalo Martins wrote: On Sun, Jul 11, 1999 at 03:45:38AM -0500, Paulo Henrique Baptista de Oliveira wrote: E as outras pessoas, como vai a tradução? estou preparando um projeto maluco de tradução dos scripts do init... vou apresentar a proposta hj em debian-devel-announce (vou fazer um cc pra cá pra vcs verem). Boa sorte! E nao se esqueca das toneladas de scripts em perl que Debian usa! :) Se eu nao me engano nao e complicado usar o gettext em linha de comando i.e. scripts. Era algo que eu vinha matutando ha tempos tambem, nao tive tempo de olhar como funcionava. Tens meu apoio. Nesse meio tempo, alguém que goste de potfiles poderia verificar se o fsck e o mount, talvez alguns outros programas que são executados no boot, têm suporte a internacionalização, e se tiver traduzí-los. Nah, nao a versao que veio instalada por default no meu slink. --macan
Re: Tradução dos scripts de inicialização
COOL! Maneiro. Espero que dê certo o projeto. Abraços,PH Quoting Lalo Martins ([EMAIL PROTECTED]): On Sun, Jul 11, 1999 at 03:45:38AM -0500, Paulo Henrique Baptista de Oliveira wrote: E as outras pessoas, como vai a tradução? estou preparando um projeto maluco de tradução dos scripts do init... vou apresentar a proposta hj em debian-devel-announce (vou fazer um cc pra cá pra vcs verem). Nesse meio tempo, alguém que goste de potfiles poderia verificar se o fsck e o mount, talvez alguns outros programas que são executados no boot, têm suporte a internacionalização, e se tiver traduzí-los. []s, |alo + -- I am Lalo of deB-org. You will be freed. Resistance is futile. http://www.webcom.com/lalo mailto:[EMAIL PROTECTED] pgp key in the web page Debian GNU/Linux --http://www.debian.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] - End forwarded message -
Translation of init scripts
This weekend I sat over gettext thinking of translated initscript messages. This is a proposal for some practical solution, so I'm mailing -devel-announce, but please followup on -devel [and send me CC, since I don't plan to subscribe to -devel again]. Also, please leave -user-portuguese out of followups; I'm doing this CC to there because I promised to :-) The gettext package comes with a standalone gettext util, wich can act as an echo replacement. With this, and a debian-init-script.mo file in the correct locale dir, we can get translated messages. I wonder why we didn't start this before; with debian-jp etc, and the number of -de|-es|-fr developers, I think it's an important feature. HOW *** There are four layers to the problem. 1: the selection of the language 2: the display of the messages, retaining compatibility with existing versions 3: the packages and dependencies involved 4: the translations themselves Layer 1: selecting the language === The language is selected by the LANG, LC_ALL or LC_MESSAGES environment variable. Most sites set one of these globally in /etc/environment or /etc/profile, with the option of individual users setting something else in their shell load scripts (for example on sites that offer telnet/ssh accounts). However, I'm not very sure about sourcing /etc/environment in the init scripts. It may set some other potentially nasty things. Also, you may want to keep the system's default language as C (English) but have the boot in your language, since you're the only one who's going to see it. So I think perhaps the best solution would be either of: a: /etc/defaults/language, to be sourced by the parent init scripts (/etc/init.d/rc, for example - all scripts started by init, not by some other scripts) b: hack init itself to set one of the variables, reading the value from inittab or even a boot parameter (/proc/cmdline) These have the added value that the init language isn't necessarily the same as the system default language; so if your site is hosted in Hungary but has telnet/ssh accounts available, you may set the init language to hr and get LANG=C; export LANG in /etc/environment. Then if you do `/etc/init.d/something reload' the messages will come out in the system default language. Magic :-) Layer 2: displaying the messages All echo commands in the scripts must somehow call something internationalized - gettext -s or something debian-specific. Se layers 3 and 4 for the pros and cons of each. The way I did it for my weekend test was editing all scripts which produced output in /etc/init.d and /etc/rc.boot; before they output anything, add: SETLANG=/etc/init.d/setlang.sh if [ -f $SETLANG ]; then . $SETLANG else echo='echo -e' fi This isn't the best way IMHO, as I said in layer 1, but it's good enought for now. Of course I later realized I could source $SETLANG only in the parent scripts. The setlang.sh script currently just does: . /etc/default/language export TEXTDOMAIN=debian-init-scripts echo=/usr/bin/gettext -s -e And then I replaced all echo for $echo. Wow, it works. The rationale for /etc/init.d/setlang.sh is that it could come with the gettext package; so, if gettext isn't installed, things proceed as usual. A second approach is to split the standalone gettext program into its own package and promote it to base/required. Then change all echo for gettext -s - isn't much more trouble than changing them for $echo. A third approach is to come up with a printf-like internationalized program and package it in base/required. The whys are in layer 4. Layer 3: packages and dependencies == This is what I was just talking about; there should be some minimal backward compatibility. Each of the three approachs above have its own problems and sollutions. First approach ($echo) already solves its own problem. If gettext is not installed, it is not used. This is somewhat similar to the way Debian is used to doing things, IMHO. Second and third approachs put the necessary packages in base section and flag them required priority. But the priority only works if dpkg knows about the package! So perhaps, for a while, updated packages should pre-depend on the new package. And just because I'm sure someone will ask: as long as the program exists, it will work just fine if it doesn't find translated messages. It just displays them in English. Layer 4: translating the messages = This poses a problem. Of course our language teams and even users would quickly volunteer, but we should do our best to make the job easier - after all, there must be a LOT of scripts to translate. If people must translate all of Starting foo bar server: foo Stopping foo bar server: foo Starting time waster: twt Stopping time waster: twt the work is a lot bigger than if we just ask them to translate Starting Stopping foo bar server time
Re: Tradução dos scripts de inicialização
On Mon, Jul 12, 1999 at 05:05:52PM -0300, Eduardo Marcel Macan wrote: On Mon, Jul 12, 1999 at 04:16:17PM -0300, Lalo Martins wrote: On Sun, Jul 11, 1999 at 03:45:38AM -0500, Paulo Henrique Baptista de Oliveira wrote: E as outras pessoas, como vai a tradução? estou preparando um projeto maluco de tradução dos scripts do init... vou apresentar a proposta hj em debian-devel-announce (vou fazer um cc pra cá pra vcs verem). Boa sorte! E nao se esqueca das toneladas de scripts em perl que Debian usa! :) Não no init.d, felizmente :-) eu passei boa parte do fds tentando entender se seria possível internacionalizar um script perl, e não achei meios (quer dizer, só escrevendo um módulo gettext com implementação em C). Usa-se muito perl em postinst e similares, mas isso a gente pensa depois :-) mesmo pq seria uma quantidade absurda de mensagens pra traduzir. Nesse meio tempo, alguém que goste de potfiles poderia verificar se o fsck e o mount, talvez alguns outros programas que são executados no boot, têm suporte a internacionalização, e se tiver traduzí-los. Nah, nao a versao que veio instalada por default no meu slink. Ok... o mount e o fsck (não o e2fsck) do potato são 2.9t; não apenas suportam internacionalização (pelo menos no source) como tem um pt_BR.po dentro :-) tou baixando o binário pra ver o q acontece. Mas o fsck.ext2 está no pacote e2fsprogs, e esse não suporta internacionalização ainda (a maioria das mensagens do fsck deve vir do fsck.ext2, creio eu). Alguém tem coragem? []s, |alo + -- I am Lalo of deB-org. You will be freed. Resistance is futile. http://www.webcom.com/lalo mailto:[EMAIL PROTECTED] pgp key in the web page Debian GNU/Linux --http://www.debian.org
Re: Tradução dos scripts de inicialização
On Mon, Jul 12, 1999 at 06:27:52PM -0300, Lalo Martins wrote: Não no init.d, felizmente :-) eu passei boa parte do fds tentando entender se seria possível internacionalizar um script perl, e não achei meios (quer dizer, só escrevendo um módulo gettext com implementação em C). Na verdade, eu tou baixando o perl 5.005 (tou aprendendo essa desgraça pra usar no curso de programação) e descobri que existe um pacote novo chamado... liblocale-gettext-perl q tal? :-) []s, |alo + -- I am Lalo of deB-org. You will be freed. Resistance is futile. http://www.webcom.com/lalo mailto:[EMAIL PROTECTED] pgp key in the web page Debian GNU/Linux --http://www.debian.org