[PATCH V5] mercurial: add debugextensions command (issue4676)

timeless timeless at gmail.com
Thu Sep 24 14:10:47 CDT 2015


> +def debugextensions(ui, **opts):

> +        if ui.quiet or ui.verbose:
> +            fm.write('name', '%s\n', extname)
> +        else:
> +            fm.write('name', '%s', extname)
> +            if not exttestedwith:
> +                fm.plain(_(' (untested!)\n'))
> +            else:
> +                if exttestedwith == ['internal'] or \
> +                                util.version() in exttestedwith:
> +                    fm.plain('\n')
> +                else:
> +                    lasttestedversion = exttestedwith[-1]

this should have _():
> +                    fm.plain(' (%s!)\n' % lasttestedversion)

a localization could use ` [%s]`, or need RTL markers, or various other things.

Also, I'm really suspicious of putting the ()s into the individual
messages, instead of in a container.

a RTL language might want "[%s] foo" instead of "foo (%s)", which is
probably not possible w/ your current scheme.

normally this would be done as:

state=_("untested!")
fm.write('name', _("%s (%s)") % (name, state))


> +  show informations about active extensions
information


More information about the Mercurial-devel mailing list