[PATCH] show value requirement and multiple occurrence of option in online help

timeless timeless at gmail.com
Sun May 16 07:01:00 CDT 2010


On Sun, May 16, 2010 at 2:10 PM, FUJIWARA Katsunori
<fujiwara at ascade.co.jp> wrote:
> +            if isinstance(default, list):
> +                addendum = _(" VALUE [+]")
> +                multioccur = True
> +            elif (default is not None) and not isinstance(default, bool):
> +                addendum = _(" VALUE")
> +            else:
> +                addendum = ""
> +            opt_output.append(("%2s%s" %
> +                               (shortopt and "-%s" % shortopt,
> +                                longopt and " --%s%s" % (longopt, addendum)),
>                                "%s%s" % (desc,
>                                          default
>                                          and _(" (default: %s)") % default
>                                          or "")))
> +    if multioccur:
> +        msg = _("\n[+] multiple occurrences of this option are additive")
> +        if ui.verbose and name != 'shortlist':
> +            opt_output.append((msg, ()))
> +        else:
> +            opt_output.insert(-1, (msg, ()))

IMO this requires feedback from the l10n teams.

I'm not a fan of "addendum" here, i think countindicator or
numberqualifier or something is probably better. Addendum says nothing
about what it is.

But more importantly, we need to know if locales are able to safely do this.

It might be the case that 'value' needs to be translated in different
genders with different plurals for different items. If that's the
case, then it's possible that this approach doesn't really work.


More information about the Mercurial-devel mailing list