+ char optstring[100];
+ int w;
+
+ if (!ENABLE_NLS)
+ goto no_translate;
+
+ if (opt->has_arg) {
+ w = snprintf(optstring, sizeof optstring,
+ _(" -%c, --%s=%s"), opt->val, opt->name,
+ pgettext_expr(opt->name, help->arg));
+ } else {
+ w = snprintf(optstring, sizeof optstring,
+ _(" -%c, --%s"), opt->val, opt->name);
+ }
+
+ if (w < 0)
+ goto no_translate;
+
+ w = mbsnwidth(optstring, w, 0);
+ printf("%s", optstring);
+ goto out;
+
+no_translate:
+ if (opt->has_arg) {
+ w = printf(" -%c, --%s=%s", opt->val, opt->name, help->arg);
+ } else {
+ w = printf(" -%c, --%s", opt->val, opt->name);
+ }
+out:
+ if (w < 0 || w > 18) {
+ putchar('\n');
+ return 0;
+ }
+
+ return w;