Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 9454:dafadd7ff07e
hg: avoid combining translated strings
Combining translated string fragments into bigger strings is bad
practice because it removes context from the fragments. The translator
sees the fragments in isolation and might not jump back to the source
to see how a string like "%d files %s" is actually used.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 14 Sep 2009 23:48:25 +0200 |
parents | 6cfea6e4c892 |
children | b2310903c462 |
comparison
equal
deleted
inserted
replaced
9453:de414835d140 | 9454:dafadd7ff07e |
---|---|
325 release(src_lock, dest_lock) | 325 release(src_lock, dest_lock) |
326 if dir_cleanup is not None: | 326 if dir_cleanup is not None: |
327 dir_cleanup.cleanup() | 327 dir_cleanup.cleanup() |
328 | 328 |
329 def _showstats(repo, stats): | 329 def _showstats(repo, stats): |
330 stats = ((stats[0], _("updated")), | 330 repo.ui.status(_("%d files updated, %d files merged, " |
331 (stats[1], _("merged")), | 331 "%d files removed, %d files unresolved\n") % stats) |
332 (stats[2], _("removed")), | |
333 (stats[3], _("unresolved"))) | |
334 note = ", ".join([_("%d files %s") % s for s in stats]) | |
335 repo.ui.status("%s\n" % note) | |
336 | 332 |
337 def update(repo, node): | 333 def update(repo, node): |
338 """update the working directory to node, merging linear changes""" | 334 """update the working directory to node, merging linear changes""" |
339 stats = _merge.update(repo, node, False, False, None) | 335 stats = _merge.update(repo, node, False, False, None) |
340 _showstats(repo, stats) | 336 _showstats(repo, stats) |