On Tue, Oct 14, 2003 at 04:38:12PM +0100, amck@utvinternet.com wrote:
> >
> >
> >Hello,
> >
> >I just tried to restart a service on the computer of a friend of mine using
>
> >redhat, and the messages come in french. Now, I'm jalous and I want the same
>
> >functionnality under Debian. I've checked the bug pages of sysvinit and
> >general, and saw nothing like that.
> >
> >As usual, it will be more complicated under Debian than under other
> >distributions because we have no centralized authority and some maintainers
>
> >won't accept to see parts of "their" packages out of their hands.
> >
> >
> >Here is the design I propose for that, introducing a new package called
> >"po-sysv". It seems pretty simple and I may implement it soon, if nobody
> >comes up with major objections.
> >
> >FILES:
> >------
> >
> >/etc/po-sysv/<lang-code>/po-sysv.po
> > translation provided by this package, extracted by the scripts of
> > w.d.o/intl/l10n and translated as usual (main way of translation)
> >/usr/lib/po-sysv/<lang-code>/<package>.po
> > If the package maintainer wants to override the content of the previous
> > database, or simply to integrate those translations in their package.
> >/etc/po-sysv/<lang-code>/user.po
> > The user may want to overide the translations.
> >
> >/usr/share/locale/.../po-sysv-scripts.mo
> > The result of the concatenation of both databases, to be used by the init
>
> > scripts
> >/usr/share/locale/.../po-sysv.mo
> > The messages of the binaries in that package, if needed.
> >
> >/etc/sysv-i18n/sysv-i18n.bashrc
> > every bash-based init script should source it prepare the i18n of message>s.
>
> >
>
> Please avoid using /etc for the data files;
ok.
`mv /etc/po-sysv/<lang-code>/po-sysv.po \
/usr/lib/po-sysv/<lang-code>/po-sysv-scripts.po `
`mv /etc/po-sysv/<lang-code>/user.po /etc/po-sysv/user.<lang-code>.po`
But this one stays under /etc because it is where the user can override the
translation provided by the system, what is configuration data.
> under the LSB its reserved for configuration information, and even that is
> being transitioned out.
What do you mean with the last part of this sentence ?
> Also, for /etc services remember that /usr may not be mounted
> at the time, so /usr/share/locale (the 'best' place), is also
> out.
>
> Instead, put 'core' stuff, eg for base, in something like
> /lib/locale/<lang>/<package.po>
Sure, I'm an idiot. On the system I saw, it was under /etc/locale. I found
this so disgusting that I moved it back to the usual location, which was an
error.
Is it really safe to assume that /lib is mounted?
Is it ok to put at most 50k (5k of text*10 lang) there? It is rather
unpleasant to have to handle 2 mo file per language (one in /usr/share/lib
and the other in /lib), so I would prefer to do a virtual mv here, too.
> >/etc/environment
> > the definition of the LANGuage to use (this is standard, isn't it?).
> >
[...]
> >REMAINING PROBLEM:
> >------------------
> >
> >/usr/bin/po-sysv-install should be integrated both with po-debconf, so that
>
> >each package can have only one DB for both kind of material, and with
> >debhelp so that this mecanism can be integrated seamlessly to debian.
> >
> >Both binaries could be placed in two packages (po-sysv and po-sysv-dev) so
>
> >that the first one gets a chance to be of priority 'standard'.
> >
> >Did I edit my /etc/environment or is the definition of LANG in it standard?
>
> >
> >It is possible with this design to have string collision between packages.
>
> >But I think that this is rather unlikely.
> >
> >This design also introduce a little mo bloat since all strings are
> >translated, even for the uninstalled packages. But who cares about 10k? [*]
>
> >
>
>
> Why po-debconf ? gettext also supports shell, etc. (which is
> how redhat, etc. do it). Some /etc/init.d files , such as
> pcmcia, etc are shared across plaforms, which we would want,
> and they use GETTEXT. Why not just use gettext, placing the
> po files in the same place as redhat /mandrake, etc?
>
> (Obviously use po-debconf for debconf stuff, but boot and
> /etc/init.d services would use
> if [ -e /bin/gettext ]
> GETTEXT="getttext --domain $SERVICE "
> else
> GETTEXT="echo -n"
>
> $GETTEXT "Starting service..."
>
> etc.
Of course, I am sorry, my sentence was not clear at all. Under no condition
I imagined to come out with a new system to select & show the sentence to
the end user. The gettext solution you propose is perfectly ok to me (even
if I tend to prefer the equivalent bashism).
I spoke about the logistic of translations, which should be integrated to
the one of po-debconf. Here is my point:
- The translations should be stored in the source package under the po
format.
- It should be separated from the main po file (to ease the life of Debian
translators, but not only)
The debian/po directory is then a natural place for those translation
(again, in the source package).
And since this place is used by po-debconf for now, I propose that
po-debconf and po-sysv get somehow integrated in a way which is still not
clear to me[*] so that things become easy to use from both maintainer and
translator point of view.
Sorry for the lack of clarity, Mt.
[*]: Nope, po4a won't help here, I guess.
Attachment:
pgpMWQ1y2JoCy.pgp
Description: PGP signature