Show More
@@ -5,6 +5,7 b'' | |||||
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2, incorporated herein by reference. |
|
6 | # GNU General Public License version 2, incorporated herein by reference. | |
7 |
|
7 | |||
|
8 | import textwrap | |||
8 | from i18n import _ |
|
9 | from i18n import _ | |
9 | import extensions |
|
10 | import extensions | |
10 |
|
11 | |||
@@ -45,7 +46,11 b' def listexts(header, exts, maxlength):' | |||||
45 | return '' |
|
46 | return '' | |
46 | result = '\n%s\n\n' % header |
|
47 | result = '\n%s\n\n' % header | |
47 | for name, desc in sorted(exts.iteritems()): |
|
48 | for name, desc in sorted(exts.iteritems()): | |
48 | result += ' %s %s\n' % (name.ljust(maxlength), desc) |
|
49 | # wrap desc at 70 characters, just like the main help texts | |
|
50 | desc = textwrap.wrap(desc, width=70 - maxlength - 4) | |||
|
51 | pad = '\n' + ' ' * (maxlength + 4) | |||
|
52 | result += ' %s %s\n' % (name.ljust(maxlength), | |||
|
53 | pad.join(desc)) | |||
49 | return result |
|
54 | return result | |
50 |
|
55 | |||
51 | def extshelp(): |
|
56 | def extshelp(): |
General Comments 0
You need to be logged in to leave comments.
Login now