Package: localization-config Version: 0.104 Priority: wishlist Tags: patch As Konstantinos requested a few months back, here is a patch for the current 'update-locale-config' manpage in localization-config. I've introduce some information based on a review of the source code, but, then again, my english wording probably sucks and I might have missed something important on how the script works.
I have added information to almost all the different sections and have rewritten the sections on how to add new languages and software support with a generic section describing how package scripts work. I've also added pointers to additional i18n related materials/tools that developers/users might find worthwhile reading/using. Best regards Javier
--- update-locale-config.1.orig 2004-10-19 23:54:45.000000000 +0200 +++ update-locale-config.1 2004-10-20 00:35:14.000000000 +0200 @@ -1,21 +1,70 @@ -.TH "UPDATE-LOCALE-CONFIG" "8" "2003-09-30" "update-locale-config" "Skolelinux User's Manual" +.TH "UPDATE-LOCALE-CONFIG" "8" "2004-10-20" "update-locale-config" "Debian GNU/Linux User's Manual" .SH "NAME" update\-locale\-config \- Update differnt programs' language settings .SH "SYNOPSIS" .B update\-locale\-config -[\fI\-l\fR] -.\"[\fI\-vl\fR] +[\fI\--preinst|-p\fR] +[\fI\--list|-l\fR] +.\"[\fI\--verbose|-v\fR] \<\fIlanguage\fR\> .\" ******************************************************************** .SH "DESCRIPTION" .B update\-locale\-config -updates the language settings of different programs. +is a script that automatically updates the language settings +of different programs based on the language code passed as parameter. +This script is run by +.B base-config +throughout the Debian installation process so that the user language +selection is made visible to packages and thus preventing debconf +interfaces from asking questions related to language settings and +adjusting packages' system-wide configuration files to the user selection. +.P +.B update\-locale\-config +can run in two modes, pre-inst or post-inst (the default). Pre-inst mode +will run all scripts under /usr/lib/localization\-config with a +.B preinst +suffix, most of these scripts will do +.B debconf +preseeding and will run before packages are actually installed. The +postinst mode (default) will run all scripts under the same directory with a +.B postinst +suffix, most of these will modify configuration files that are available +once the package has been installed on the system. +.P +System administrators should not need to run +.B update\-locale\-config +by hand, although this option is available. Notice, however, that running +.B update\-locale\-config +in pre-inst mode will not affect the system unless the packages whose +debconf configuration has changed are reconfigured +(with \fBdpkg-reconfigure PACKAGE\fR). +.P +Users should not run +.B update\-locale\-config +as all the changes this script makes are systemwide. +If a user wants to change \fRhis\fI +locale configuration and adjust the language configuration of his own +configuration files +.B set-language-env +(available in the \fBlanguage-env\fR package) should be used instead. + + .\" ******************************************************************** .SH "OPTIONS" .TP +.B \-v | \-\-verbose +Verbose mode, used mainly for debugging purposes. +.TP +.B \-l | \-\-list +List supported locales. +.TP +.B \-p | \-\-preinst +Run the pre-install scripts instead of the (default) postinst scripts. +.TP .I language -specify your favorite native language. Here are the supported languages: +specify your favorite native language. +Here are some of the supported languages: .br .B [EMAIL PROTECTED] Catalan (Spain) @@ -61,24 +110,74 @@ .br .B se_NO Northern Sami -.br -.\".TP -.\".B \-v -.\"Verbose mode, mainly for debugging. -.B \-l -List supported locales. .\" ******************************************************************** -.SH "ADDING NEW LANGUAGES" -Edit the scripts in /usr/lib/locale\-config\-skolelinux/ and add -whatever transformations are necessary to convert from the official -language code to the one the program expects -.SH "ADDING SUPPORT FOR NEW PROGRAMS" -Add a scripts to /usr/lib/locale\-config\-skolelinux/ that edit the -necessary conffiles. -.BR +.SH PACKAGE SCRIPTS +Support for new packages is based on scripts present in +/usr/lib/localization\-config. These scripts must analyse the official +locale language code ([EMAIL PROTECTED]) +and modify the package as appropiate. Since language modifications +might vary between different package versions, the scripts in that +directory should just check the package version and call scripts +in per-distribution subdirectories (\fBsarge\fR, \fBwoody\fR, etc.). +.P +These scripts take as input the locale language code and should do +whatever modifications are need in order to configure the package. +Possible modifications include: +.TP +.I debconf-preseeding +If the package asks to the user through \fBdebconf\fR settings that +might depend on the language and charset, and if an accurate guess +can be made based on the users locale language code then the +script should preseed the debconf values so that the user will not +have to answer the questions himself upon package installation. +Debconf preseeding is usually done in the \fIpreinst\fR phase. +.br +.I configuration file modification +If the package has configuration files that can be modified to +adjust for the user's selection of locale language code, the +script should make any reasonable changes in order to help the user +configure the package. \fBConffiles\fR (see Debian policy) should +be treated with extreme care (to avoid prompts of configuration file +changes by dpkg when upgrading). +.TP +All changes done by the scripts should be idempotent. +.SH LANGUAGE SUPPORT +Language support is embedded in the scripts available at +/usr/lib/localization\-config. These scripts hold the \fIknowledge\fR +on how to transform a given language code into a package's modification. +Adding support for a new language (or variant) should be done by +modifying these scripts. The code presently available that provides +support for some languages could be used as a basis for new language +support. In many scripts, adding support for a new language is just +a matter of defining it and the values that need to be changed for it +in a \fBdatabase\fR of languages and changes (actually implemented +in most cases as hash array in Perl) .SH "FILES" .TP -.I "/usr/lib/locale\-config\-skolelinux/*" -Scripts that modify config files +.I "/usr/lib/localization\-config" +Location of the scripts that adjust programs to use the user configured locale. +.SH SEE ALSO +.B base-config(8), +.B debconf(1), +.B language-env(1), +.B locale(1) +.P +Recommended reading also includes +.I Debian GNU/Linux - Install manual +(available at \fBhttp://www.debian.org/releases/stable/installmanual\fR) +which descirbes how language and country selection works in the debian installer +and +.I Introduction to i18n +(available at \fBhttp://www.debian.org/doc/manuals/intro-i18n/\fr) +which describes i18n (and locale) to developers. +.SH BUGS +Bugs regarding this software should be sent against the +.B localization-config +package, preferably using the +.B report-bug +script. .SH "AUTHOR" -Dagfinn Ilmari Mannsåker <[EMAIL PROTECTED]> +This software and a first version of the manpage was written by +Dagfinn Ilmari Mannsåker <[EMAIL PROTECTED]> for the Skolelinux +distribution. This manpage was later modified for the Debian GNU/Linux by +Javier Fernandez-Sanguino.
signature.asc
Description: Digital signature