[PATCH 1 of 2] keyword: prepare kwdemo output for translation

Martin Geisler mg at lazybytes.net
Tue Jul 21 17:37:41 CDT 2009


Christian Ebert <blacktrash at gmx.net> writes:

>>> -    ui.status(_('\n\tconfig using %s keyword template maps\n') % kwstatus)
>>> +    msg = {'current': _('config using current keyword template maps'),
>>> +           'custom': _('config using custom keyword template maps'),
>>> +           'default': _('config using default keyword template maps')
>>> +           }[kwstatus]
>> 
>> Is it even necessary to output so much to the user?
>
> I don't know, do you? ;-) Do you know how many users actually look at
> "hg kwdemo -h" ... otoh, how many will run "hg kwdemo" before actually
> using the extension ...

Good question -- my guess is "not that many"... I think your extension
is the only one with such a demo-function built-in, so it is not
something I would expect as a user.

>> He has 'hg kwdemo' with the --rcfile or --default flag and so he
>> should know which kind of keywords he is seeing.
>
> In theory, yes. As I said, I just think that the output of this
> command should be especially user friendly. Personally, I'm fine with
> a more terse output.

Great, it will only be a little more compact that today.

>> Alternatively, the extension could output the right message instead of
>> setting kwstatus -- it's not used for anything after being set at the
>> beginning of the function.
>
> kwstatus is used three times to determine the right kind of message.

Right -- that is why I suggest removing it and simply outputting the
right message once at the top where you currently assign to kwstatus. If
it had been used for other parts of the logic, then it would have been
strange to remove it.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090722/2830286f/attachment.pgp 


More information about the Mercurial-devel mailing list