# HG changeset patch # User Christian Ebert # Date 1247016307 -7200 # Node ID 5b87f3ea105a4c0734d82776867988cee2acb539 # Parent 783774a5eff3851237c9c8b50cda849d55cab03f (0.9.2compat) kwdemo: get rid of subfunction and ease translation diff -r 783774a5eff3 -r 5b87f3ea105a hgkw/keyword.py --- a/hgkw/keyword.py Wed Jul 08 02:50:01 2009 +0200 +++ b/hgkw/keyword.py Wed Jul 08 03:25:07 2009 +0200 @@ -455,9 +455,6 @@ Override current keyword template maps with "default" option. ''' - def demostatus(stat): - ui.status(_('\n\t%s\n') % stat) - def demoitems(section, items): ui.write('[%s]\n' % section) for k, v in items: @@ -496,7 +493,7 @@ if k.endswith('keyword'): extension = '%s = %s' % (k, v) break - demostatus('config using %s keyword template maps' % kwstatus) + ui.status(_('\n\tconfig using %s keyword template maps\n') % kwstatus) ui.write('[extensions]\n%s\n' % extension) demoitems('keyword', ui.configitems('keyword')) demoitems('keywordmaps', kwmaps.iteritems()) @@ -519,7 +516,7 @@ ui.note('hg -R "%s" ci -m "%s"\n' % (tmpdir, msg)) repo.commit(text=msg) fmt = ui.verbose and ' in %s' % path or '' - demostatus('%s keywords expanded%s' % (kwstatus, fmt)) + ui.status(_('\n\t%s keywords expanded%s\n') % (kwstatus, fmt)) ui.write(repo.wread(fn)) ui.debug(_('\nremoving temporary repository %s\n') % tmpdir) shutil.rmtree(tmpdir, ignore_errors=True)