# HG changeset patch # User Martin Geisler # Date 1255955857 -7200 # Node ID 8e0e0d854b60d4ab942d1c238092c3778e95275f # Parent 220d39af2e5779879dd9a7bf3af41d787b7ef9b6 commands: do not split a translated string Splitting the string after translation relies on the implicit assumption that translators will always translate the English words using single foreign words. Also, when translating we want as much context as possible so I've moved the string formatting into the translatable string. diff -r 220d39af2e57 -r 8e0e0d854b60 mercurial/commands.py --- a/mercurial/commands.py Sun Oct 18 22:31:05 2009 -0500 +++ b/mercurial/commands.py Mon Oct 19 14:37:37 2009 +0200 @@ -2901,11 +2901,13 @@ st = list(repo.status(unknown=True))[:7] ms = merge_.mergestate(repo) st.append([f for f in ms if f == 'u']) - labels = _('modified added removed deleted unknown ignored unresolved') + labels = [_('%d modified'), _('%d added'), _('%d removed'), + _('%d deleted'), _('%d unknown'), _('%d ignored'), + _('%d unresolved')] t = [] - for i,l in enumerate(labels.split()): - if st[i]: - t.append('%d %s' % (len(st[i]), l)) + for s,l in zip(st, labels): + if s: + t.append(l % len(s)) t = ', '.join(t)