[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I18n of Packages files



On Thu, Sep 21, 2000 at 05:16:16PM +0900, Taketoshi Sano wrote:
> just use with "LANG=C" when invoking from other tools (used as a protocol).
>
> If that tool (ex. dpkg) is correctly gettexized, then it will output the 
> "standard" message (in fact, english one) with "LANG=C".  
> For human reading,  one can use their locale settings to get the message
> in their language.  Sure, this requires additional work on other tools
> which use the output of dpkg, but I think it is of worth.

Hmm... this is getting complicated... I guess that only setting the locale
is not enough to let dpkg know what it should display. Let's summarize what
we want:

 * Ussuming user has her usual locale environment set to her national
   language.

	- when she uses dpkg in a usual, direct way (starts it from shell),
	  she wants to see BOTH the fields names and the description
	  translated.

	- when she uses dpkg in an indirect way, i.e. uses some higher-level
	  package management tool, which in turn uses dpkg, she wants to see
	  the Description translated, but the program has to see the fields'
	  names printed by dpkg in "C" locale.

		  In this situation, if the program sets locale to C before
		  invoking dpkg, the user would get the description in
		  english, which is probably not what she wants


 * Thus there are two ways:

1) The higher-level program translates the fields' names as well as chooses
the description in proper language _on its own_. This means dpkg would have
to produce the following output in each of the conditions:

with LANG=C:

Package: dpkg
Essential: yes
Status: install ok installed
[...]
Description: Package maintenance system for Debian
 [.. rest of description in English follows..]
Description-pl: System zarzadzania pakietami dla Debiana
 [.. rest of description in Polish follows..]
Description-ja: [lots of strange Unicode characters :-)]
 [.. rest of description in Japanese follows..]
[.. rest of descriptions..]

with LANG=pl_PL

Pakiet: dpkg
Istotny: tak
Stan: do-instalowania ok zainstalowany
Priorytet: wymagany
[...]
Opis: System zarzadzania pakietami dla Debiana
 [.. description in pl only ..]

The above would be unacceptable, especially for those, who use "C" locale.

(BTW: why is "C" treated as "en" everywhere? I guess "C" should cause such
things as above, and English speakers should use "en" locale, but that's a
completly another story)

2) Do what Piotr suggested, namely provide some additional switch(es) in
dpkg. I suggest using another switch, though (see below). This should be
done in such way, that

 - invoking 'LANG=C dpkg -s hello' produces fields' names as well as
   description in English.

 - invoking 'LANG=pl_PL dpkg -s' hello produces fields' names as well as
   description in Polish.

 - invoking 'LANG=pl_PL dpkg --standard-field-names -s hello' produces
   fields' names in English, but description in Polish.

Then every program that parses dpkg's output should invoke it with
"--standard-fields-names", and would get field names in format acceptable
for parsing and description acceptable for the user. (Of course the program
in question should display gettextized fields names :-))

Comments?

> Description is more hard, since there are awfully much packages in
> Debian.  We, Debian JP Project, had been doing the work for translation
> of description for hamm, and slink.  For slink, it may be about more than
> 60% of descriptions are translated, I suppose (don't know the detail).

Yes, therefore the descriptions of the most important ones should be
translated first.

> It may be easy to maintain one's own langage file to match the main
> (english) one for translaters, because of the similarity and the order in
> that file.

I agree. This should also ease the life of the maintainer. It will cause
more work for the dpkg-deb's maintainer, though :-)

regards

Marcin

-- 
+--------------------------------+ The reason we come up with new versions
|Marcin Owsiany                  | is not to fix bugs. It's the stupidest
|porridge@pandora.info.bielsko.pl| reason to buy a new version
+--------------------------------+ I ever heard.            - Bill Gates



Reply to: