[PATCH 1 of 2] keyword: prepare kwdemo output for translation
Martin Geisler
mg at lazybytes.net
Tue Jul 21 16:48:02 UTC 2009
Christian Ebert <blacktrash at gmx.net> writes:
> # HG changeset patch
> # User Christian Ebert <blacktrash at gmx.net>
> # Date 1248171792 -3600
> # Node ID f713de0058b6f0c7e21a9c97936158ed1fa9d97b
> # Parent 8864112d4f57815b11d49dff22d25969d3ae23a8
> keyword: prepare kwdemo output for translation
>
> Translatable strings must be complete sentences.
> Thanks to Wagner Bruna for pointing this out.
>
> diff --git a/hgext/keyword.py b/hgext/keyword.py
> --- a/hgext/keyword.py
> +++ b/hgext/keyword.py
> @@ -285,7 +285,6 @@
> for k, v in items:
> ui.write('%s = %s\n' % (k, v))
>
> - msg = 'hg keyword config and expansion example'
> kwstatus = 'current'
> fn = 'demo.txt'
> branchname = 'demobranch'
> @@ -319,7 +318,11 @@
> if k.endswith('keyword'):
> extension = '%s = %s' % (k, v)
> break
> - 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? He has 'hg kwdemo'
with the --rcfile or --default flag and so he should know which kind of
keywords he is seeing.
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.
--
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://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20090721/ea717cd6/attachment.asc>
More information about the Mercurial-devel
mailing list