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

I18N of USER-* (Re: Default language for system)



Hi,

I'd like to discuss on how user language environments should be established.

'user language environments' means, for example, LANG variable, 
XIM server, font setting for window managers, and so on so on which
is related to enabling native characters to be displayed on console,
editors, pagers, window titles, and so on, enabling native characters
to be inputed in console, X, editors, terminal-emulators, and so on,
and enabling text processing such as grep be done with native characters.

You may think each package, not a user, is responsible for these points.
However, a user sometimes has to set up proper environment to use 
internationalized faculty of internationalized softwares.  The most
famous one is 'LANG' environmental variable.  I am saying of such
kind of user setting.  There are already three packages related to
such settings --- user-{ja,es,de}.


I think such settings are done personally, not system-wide, because
there are users from many countries may share a machine.

I wrote 'user-ja' package (native Debian package) so that a basic 
personal Japanese environment is established by invocation of
'user-ja-conf' script by adding lines to his/her dot-files.
'user-ja-conf' asks which input method the user prefers and so on.


I am thinking of internationalize this 'user-ja' package.  The 
infrastructure is almost done.  If you'd like to add a new 
language support, only you have to do is (1) prepare settings for
dot-files, (2) modify them so as to fit user-ja's way, (3) write
a Perl script file which includes a few routines, for example,
to check if the invoked environment can display native characters,
to display messages in the specified way (in native characters
or in ASCII characters), and (4) add a menu item for the language.
Please install user-ja and read /usr/share/doc/user-ja/README.i18n
for detail.  Don't be serious, 'user-ja' doesn't affect any user
environment without invoking 'user-ja-conf'.

Of course the name of 'user-ja' and 'user-ja-conf' should be changed
to language-natural ones, such as 'language' or 'basic-settings'.
I hope internationalized version of 'user-ja' is included in the
Debian release next to potato.




Now I'll show the approach of 'user-ja' is better.

There are two more 'user-*' packages --- user-de and user-es.
They take different approach to user-ja.  They modify system-wide
setting.  (This is not true --- they make '/etc/language-es'
and let user include from his/her personal startup file.

The advantages of user-ja approach (add lines to user's dot-files) to 
user-{de,es} approach are:

(a1) Users can obtain language environment by only invoking 'user-ja-conf'
     and reply a few questions.
(a2) Some dot-files cannot include other files.

The disadvantages of user-ja approach are:

(d1) Users have to invoke 'user-ja-conf' each time 'user-ja' is updated.
(d2) Some users may hate his/her dot-files to be automatically rewritten.

I think (a2) is determinant.


I can imagine another approach to modify configure files in /etc/ directory
such as /etc/profile and so on.

The advantages of user-ja approach to this '/etc/profile' approach are:

(A1) Some softwares don't supply system-wide configuration file.
(A2) Users from different countries may share a machine.
(A3) For root to use native language can be dangerous because root 
     sometimes have to work in an environment where native language 
     cannot be displayed.
(A4) Files in /etc/ can be overwritten when the original owner package 
     of the file is updated.

The disadvantages of user-ja approach to '/etc/profile' approach are:

(D1) same to (d1).
(D2) Only to install a package is all what required in '/etc/profile'
     approach.

Though this approach is the most convenient for usual users because
of (D2), this approach should be avoided because all of from (A1) to
(A4) are critical.



Now, I'd like to make 'user-ja' more convenient.  For example, 

(1) 'user-ja-conf' is invoked when the installer makes a first 
    non-root user account.

(2) /etc/profile checks whether the logining user already invoked
    'user-ja-conf' and invoke 'user-ja-conf' if not.

(3) 'adduser' invokes 'user-ja-conf'.

(4) 'user-ja-conf' is called from gnome-control-center.

(5) 'user-ja' is installed for default.

These are only brainstorming and I don't think they are really useful.
Only for discussion.


I'd like to discuss

o  Are there any needs for internationalization of user-ja?
   (I think Chinese and Korean need complex user settings as Japanese
   and may want such a package.)

o  How 'user-ja' work with 'adduser', 'base-files' (/etc/profile), 
   installer, and so on?

o  Are there any other better approach?

o  What is the preferable names for internationalized 'user-ja' and
   'user-ja-conf'?

o  Any other.

---
Tomohiro KUBOTA <kubota@debian.or.jp>
http://surfchem0.riken.go.jp/~kubota/


Reply to: