#590577 libc6: argp looks strings from libc gettext text domain in default text domain

Package:
libc6
Source:
glibc
Description:
GNU C Library: Shared libraries
Submitter:
Jarek Kamiński
Date:
2010-07-27 13:57:04 UTC
Severity:
normal
#590577#5
Date:
2010-07-27 13:47:05 UTC
From:
To:
Hi.

argp tries to localise strings from its source (like "Usage:" or "Give
a short usage message") using default text domain, which fails (unless
program copies translations from libc po files to its own). It is
demonstrated by the following program:
#v+
% cat argptest.c
#include <argp.h>
#include <locale.h>
#include <libintl.h>

struct argp argp;

int main (int argc, char * argv[])
{
        setlocale (LC_ALL, "");
        argp_parse (&argp, argc, argv, 0, NULL, NULL);
        return 0;
}
% ./argptest --help
Usage: argptest [OPTION...]

  -?, --help                 Give this help list
      --usage                Give a short usage message
#v-

Adding textdomain("libc") call before argp_parse() changes output to:
#v+
% ./argptest --help
Składnia: argptest [OPCJA...]

  -?, --help                 Wyświetlenie tego tekstu pomocy
      --usage                Wyświetlenie krótkiej informacji o składni
                             polecenia
#v-

Setting argp.argp_domain = "libc" doesn't help, messages are
untranslated.

Jarek Kamiński.