[Comerrers] Welcome and proposal

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 9 May 2002 14:04:46 -0400 (EDT)


On 9 May 2002, Love wrote:

>
> I guess I should say something too.
>
> I've never done any i18n and l10n of any program, execpt a test program 10
> minuts ago. So I don't really know what I'm talking about.
>
> First, arla not really a consumer of com_err, we just use a large table or
> error and strings, duplicating all work of com_err. We/I are interested
> i18n of arla, so sharing of error-strings would be great provided the have
> approritate license on the files so we can use them.
>
> There is a BSD licensed libintl from citrus project (that netbsd uses), so
> we don't have any problems using gettext as an interface.
>
> Comments on Derrik's mail, why should the generated output diffrer between
> a i18n and non i18n version ? As I understands it gettext("foo") == "foo"
> if there are no .mo files from the current language.

Correct.  Indeed, the source files generated by compile_et should not
differ at all.  Instead, we should simply add generic gettext support to
the com_err library, so that _any_ error table can be localized simply by
providing an appropriate message catalog.  The only change to compile_et
should be an option to generate a .po file from the error table.  This
would take the place of running xgettext; the rest of the process would
remain essentially the same.

> I would guess that Theodore Ts'o suggestion that would be acceptable, but I
> don't really understand in what domain the error message should come from.
> It seems kind of strange to centralize all error-text when com_err have
> made them spread out in all libs.
>
> Is that the modification Derrik is talking about, should
> initialize_error_table{,_r} provide the the com_err lib how in what domain
> the error codes are in ?
>
> Or should all error-message be in the "et" domain, and how are they then
> appened to each other ?

Actually, I think the right answer is that there is a separate domain for
each error table, derived algorithmically from the name of the error
package.  The com_err library can then use dgettext() or a similar
interface to look up translations in the appropriate domain.

-- Jeff