Xt translated labels ?
Samuel Thibault
samuel.thibault at ens-lyon.org
Tue Nov 7 17:58:00 PST 2006
Hi,
Glynn Clements, le Fri 25 Aug 2006 15:22:31 +0100, a écrit :
> Samuel Thibault wrote:
>
> > Xt is great in that you can change application labels etc. But there
> > does not seem to be any agreement on how it might be possible to have Xt
> > applications automatically translated according to the current locale. I
> > mean, there could be
> >
> > /usr/lib/X11/app-defaults/fr/
> > /usr/lib/X11/app-defaults/fr_BE/
> > /usr/lib/X11/app-defaults/de/
> > /usr/lib/X11/app-defaults/jp/
> > etc.
> >
> > containing the translated labels, and XtVaOpenApplications should not
> > only look at /usr/lib/X11/app-defaults, but also at the directory
> > corresponding to the current locale, for getting the translated labels.
> >
> > Any thoughts?
>
> It already does this, except the locale has to come first, i.e.
> /usr/lib/X11/fr/app-defaults/ etc.
>
> The default search path for app-defaults (and similar) files is:
>
> /usr/lib/X11/%L/%T/%N%C%S:\
> /usr/lib/X11/%l/%T/%N%C%S:\
> /usr/lib/X11/%T/%N%C%S:\
> /usr/lib/X11/%L/%T/%N%S:\
> /usr/lib/X11/%l/%T/%N%S:\
> /usr/lib/X11/%T/%N%S
>
> Note that the application will only use the first matching file,
We have a problem with this default: this is not sufficient, it should
also include %l_%t.%c, %l.%c and %l_%t between %L and %l.
As an instance, let's consider the catalan language, and ca_*,
ca_ES at euro, ca_ES.UTF-8, ca_ES at valencia and ca_ES.UTF-8 at valencia
locales. We need to be able to:
- provide a generic catalan translation, stored in
/usr/lib/X11/ca/apps-default (8bit version) and
/usr/lib/X11/ca.UTF-8/apps-default (UTF-8 version).
So that all ca_* and ca_*.UTF-8 locales will find catalan
translations.
- provide a spanish catalan translation, stored in
/usr/lib/X11/ca_ES/apps-default (8bit version) and
/usr/lib/X11/ca_ES.UTF-8/apps-default (UTF-8 version).
so that ca_ES@* and ca_ES.UTF-8@* locales will get better
translations.
- provide a valencia-specific spanish catalan translation, stored in
/usr/lib/X11/ca_ES at valencia/apps-default (8bit version) and
/usr/lib/X11/ca_ES.UTF-8 at valencia/apps-default (UTF-8 version).
so that ca_ES at valencia and ca_ES.UTF-8 at valencia locales will get
better localization.
So I'd suggest to introduce %l_%t.%c, %l.%c and %l_%t between %L and %l
in the filesearchpath for getting correct translations in all of the
above cases, i.e. use
/usr/lib/X11/%L/%T/%N%C%S:\
/usr/lib/X11/%l_%t.%c/%T/%N%C%S:\
/usr/lib/X11/%l.%c/%T/%N%C%S:\
/usr/lib/X11/%l_%t/%T/%N%C%S:\
/usr/lib/X11/%l/%T/%N%C%S:\
/usr/lib/X11/%T/%N%C%S:\
/usr/lib/X11/%L/%T/%N%S:\
/usr/lib/X11/%l_%t.%c/%T/%N%S:\
/usr/lib/X11/%l.%c/%T/%N%S:\
/usr/lib/X11/%l_%t/%T/%N%S:\
/usr/lib/X11/%l/%T/%N%S:\
/usr/lib/X11/%T/%N%S
What do people think about this?
Samuel
More information about the xorg
mailing list