Re: [cdebconf] helper macros, i18n, backup, etc
On Wed, Dec 11, 2002 at 04:56:55PM +0100, Martin Sjögren wrote:
> ons 2002-12-11 klockan 16.07 skrev Denis Barbier:
> > On Wed, Dec 11, 2002 at 12:45:45AM +0100, Denis Barbier wrote:
> > [...]
> > > 3. May I set a _ macro in frontend.h in order to start i18n of
> > > frontends? As libdiscover already calls dcgettext, I would like to
> > > set it to
> > > #define _(x) dcgettext("cdebconf", (x), LC_MESSAGES)
> > [...]
> >
> > An alternative is to store msgids in debconf 'text' elements, there
> > is then no need for libc gettext.
>
> But discover already uses dcgettext, why not use the simple convenience
> of _("string to be translated")? Is there a reason why a .c or a shell
> script can't put in the same POTFILES.in as the templates file?
AFAICT dash has no i18n support, so you can't use $"strings" bash syntax.
This does not seem to be a problem, since shell scripts currently do not
use translatable strings (except progress.config ;))
It is different with C files; the framework is in, and we can use dcgettext
in source files. But GNU libc requires that locale is fully installed
before displaying a message for that language. For instance, glibc checks
that /usr/lib/locale/fr_FR/LC_* files exist before displaying messages
in French. Given the size of these files, it does certainly matter.
This is overkill because we know that all strings are UTF-8 encoded, so
we only need to set LC_MESSAGES. So if we want to use dcgettext, we
have to figure out how to generate dummy /usr/lib/locale/xx_XX/LC_* files.
> We sure want all translatable strings to end up in the same .po file!
This is another issue, we could merge all those extra templates files
in a single PO file.
Denis
Reply to: