##// END OF EJS Templates
keyword: make kwdemo more translation friendly
Christian Ebert -
r8939:bc9ac7a2 default
parent child Browse files
Show More
@@ -281,9 +281,6 b' def demo(ui, repo, *args, **opts):'
281
281
282 Override current keyword template maps with "default" option.
282 Override current keyword template maps with "default" option.
283 '''
283 '''
284 def demostatus(stat):
285 ui.status(_('\n\t%s\n') % stat)
286
287 def demoitems(section, items):
284 def demoitems(section, items):
288 ui.write('[%s]\n' % section)
285 ui.write('[%s]\n' % section)
289 for k, v in items:
286 for k, v in items:
@@ -323,7 +320,7 b' def demo(ui, repo, *args, **opts):'
323 if k.endswith('keyword'):
320 if k.endswith('keyword'):
324 extension = '%s = %s' % (k, v)
321 extension = '%s = %s' % (k, v)
325 break
322 break
326 demostatus('config using %s keyword template maps' % kwstatus)
323 ui.status(_('\n\tconfig using %s keyword template maps\n') % kwstatus)
327 ui.write('[extensions]\n%s\n' % extension)
324 ui.write('[extensions]\n%s\n' % extension)
328 demoitems('keyword', ui.configitems('keyword'))
325 demoitems('keyword', ui.configitems('keyword'))
329 demoitems('keywordmaps', kwmaps.iteritems())
326 demoitems('keywordmaps', kwmaps.iteritems())
@@ -346,7 +343,7 b' def demo(ui, repo, *args, **opts):'
346 ui.note('hg -R "%s" ci -m "%s"\n' % (tmpdir, msg))
343 ui.note('hg -R "%s" ci -m "%s"\n' % (tmpdir, msg))
347 repo.commit(text=msg)
344 repo.commit(text=msg)
348 fmt = ui.verbose and ' in %s' % path or ''
345 fmt = ui.verbose and ' in %s' % path or ''
349 demostatus('%s keywords expanded%s' % (kwstatus, fmt))
346 ui.status(_('\n\t%s keywords expanded%s\n') % (kwstatus, fmt))
350 ui.write(repo.wread(fn))
347 ui.write(repo.wread(fn))
351 ui.debug(_('\nremoving temporary repository %s\n') % tmpdir)
348 ui.debug(_('\nremoving temporary repository %s\n') % tmpdir)
352 shutil.rmtree(tmpdir, ignore_errors=True)
349 shutil.rmtree(tmpdir, ignore_errors=True)
General Comments 0
You need to be logged in to leave comments. Login now