20 N_(
"[DO_NOT_TRANSLATE_THIS_MARKER]"),
21 "[DO_NOT_TRANSLATE_THIS_MARKER_de]" },
23 N_(
"[DO_NOT_TRANSLATE_THIS_MARKER]"),
24 N_(
"[DO_NOT_TRANSLATE_THIS_MARKER]") },
27 int main(
int argc,
char *argv[])
33 puts(
"Syntax: test-nls <localedir>\n");
40 const char *newloc = setlocale(LC_ALL, NULL);
41 printf(
"Default locale: %s\n", newloc);
52 printf(
"setlocale(\"%s\")\n",
locale);
53 const char *actual_locale = setlocale(LC_MESSAGES,
locale);
54 if (actual_locale == NULL) {
55 fprintf(stderr,
"Error: Cannot set locale to %s.\n",
locale);
58 printf(
"new locale: %s\n", actual_locale);
63 printf(
"message basedir: %s\n", basedir);
67 const char *domain =
textdomain(GETTEXT_PACKAGE);
68 printf(
"message domain: %s\n", domain);
73 printf(
"message codeset: %s\n", codeset);
76 puts(
"before translation");
78 puts(
"after translation");
80 if (strcmp(
expected, translation) != 0) {
87 "Error: translation != expected\n",
#define textdomain(String)
#define bind_textdomain_codeset(Domain, Codeset)
#define bindtextdomain(Domain, Directory)
int main(int argc, char *argv[])
static testcase testcases[]