Show More
@@ -7,7 +7,7 b'' | |||||
7 |
|
7 | |||
8 | from node import hex, nullid, nullrev, short |
|
8 | from node import hex, nullid, nullrev, short | |
9 | from repo import RepoError, NoCapability |
|
9 | from repo import RepoError, NoCapability | |
10 | from i18n import _ |
|
10 | from i18n import _, gettext | |
11 | import os, re, sys, urllib |
|
11 | import os, re, sys, urllib | |
12 | import hg, util, revlog, bundlerepo, extensions, copies |
|
12 | import hg, util, revlog, bundlerepo, extensions, copies | |
13 | import difflib, patch, time, help, mdiff, tempfile |
|
13 | import difflib, patch, time, help, mdiff, tempfile | |
@@ -1289,7 +1289,7 b' def help_(ui, name=None, with_version=Fa' | |||||
1289 | ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) |
|
1289 | ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) | |
1290 |
|
1290 | |||
1291 | # description |
|
1291 | # description | |
1292 | doc = i[0].__doc__ |
|
1292 | doc = gettext(i[0].__doc__) | |
1293 | if not doc: |
|
1293 | if not doc: | |
1294 | doc = _("(No help text available)") |
|
1294 | doc = _("(No help text available)") | |
1295 | if ui.quiet: |
|
1295 | if ui.quiet: | |
@@ -1315,7 +1315,7 b' def help_(ui, name=None, with_version=Fa' | |||||
1315 | f = f.lstrip("^") |
|
1315 | f = f.lstrip("^") | |
1316 | if not ui.debugflag and f.startswith("debug"): |
|
1316 | if not ui.debugflag and f.startswith("debug"): | |
1317 | continue |
|
1317 | continue | |
1318 | doc = e[0].__doc__ |
|
1318 | doc = gettext(e[0].__doc__) | |
1319 | if not doc: |
|
1319 | if not doc: | |
1320 | doc = _("(No help text available)") |
|
1320 | doc = _("(No help text available)") | |
1321 | h[f] = doc.splitlines(0)[0].rstrip() |
|
1321 | h[f] = doc.splitlines(0)[0].rstrip() | |
@@ -1360,7 +1360,8 b' def help_(ui, name=None, with_version=Fa' | |||||
1360 | except KeyError: |
|
1360 | except KeyError: | |
1361 | raise cmdutil.UnknownCommand(name) |
|
1361 | raise cmdutil.UnknownCommand(name) | |
1362 |
|
1362 | |||
1363 |
doc = (mod.__doc__ or _('No help text available') |
|
1363 | doc = gettext(mod.__doc__) or _('No help text available') | |
|
1364 | doc = doc.splitlines(0) | |||
1364 | ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0])) |
|
1365 | ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0])) | |
1365 | for d in doc[1:]: |
|
1366 | for d in doc[1:]: | |
1366 | ui.write(d, '\n') |
|
1367 | ui.write(d, '\n') |
@@ -5,9 +5,11 b'' | |||||
5 | # This software may be used and distributed according to the terms |
|
5 | # This software may be used and distributed according to the terms | |
6 | # of the GNU General Public License, incorporated herein by reference. |
|
6 | # of the GNU General Public License, incorporated herein by reference. | |
7 |
|
7 | |||
|
8 | from i18n import _ | |||
|
9 | ||||
8 | helptable = ( |
|
10 | helptable = ( | |
9 | (["dates"], "Date Formats", |
|
11 | (["dates"], _("Date Formats"), | |
10 | r''' |
|
12 | _(r''' | |
11 | Some commands allow the user to specify a date: |
|
13 | Some commands allow the user to specify a date: | |
12 | backout, commit, import, tag: Specify the commit date. |
|
14 | backout, commit, import, tag: Specify the commit date. | |
13 | log, revert, update: Select revision(s) by date. |
|
15 | log, revert, update: Select revision(s) by date. | |
@@ -43,10 +45,10 b' helptable = (' | |||||
43 | ">{date}" - on or after a given date |
|
45 | ">{date}" - on or after a given date | |
44 | "{date} to {date}" - a date range, inclusive |
|
46 | "{date} to {date}" - a date range, inclusive | |
45 | "-{days}" - within a given number of days of today |
|
47 | "-{days}" - within a given number of days of today | |
46 | '''), |
|
48 | ''')), | |
47 |
|
49 | |||
48 | (["patterns"], "File Name Patterns", |
|
50 | (["patterns"], _("File Name Patterns"), | |
49 | r''' |
|
51 | _(r''' | |
50 | Mercurial accepts several notations for identifying one or more |
|
52 | Mercurial accepts several notations for identifying one or more | |
51 | files at a time. |
|
53 | files at a time. | |
52 |
|
54 | |||
@@ -89,10 +91,10 b' helptable = (' | |||||
89 |
|
91 | |||
90 | re:.*\.c$ any name ending in ".c", anywhere in the repository |
|
92 | re:.*\.c$ any name ending in ".c", anywhere in the repository | |
91 |
|
93 | |||
92 | '''), |
|
94 | ''')), | |
93 |
|
95 | |||
94 | (['environment', 'env'], 'Environment Variables', |
|
96 | (['environment', 'env'], _('Environment Variables'), | |
95 | r''' |
|
97 | _(r''' | |
96 | HG:: |
|
98 | HG:: | |
97 | Path to the 'hg' executable, automatically passed when running hooks, |
|
99 | Path to the 'hg' executable, automatically passed when running hooks, | |
98 | extensions or external tools. If unset or empty, an executable named |
|
100 | extensions or external tools. If unset or empty, an executable named | |
@@ -160,10 +162,10 b' EDITOR::' | |||||
160 | PYTHONPATH:: |
|
162 | PYTHONPATH:: | |
161 | This is used by Python to find imported modules and may need to be set |
|
163 | This is used by Python to find imported modules and may need to be set | |
162 | appropriately if Mercurial is not installed system-wide. |
|
164 | appropriately if Mercurial is not installed system-wide. | |
163 | '''), |
|
165 | ''')), | |
164 |
|
166 | |||
165 | (['revs', 'revisions'], 'Specifying Single Revisions', |
|
167 | (['revs', 'revisions'], _('Specifying Single Revisions'), | |
166 | r''' |
|
168 | _(r''' | |
167 | Mercurial accepts several notations for identifying individual |
|
169 | Mercurial accepts several notations for identifying individual | |
168 | revisions. |
|
170 | revisions. | |
169 |
|
171 | |||
@@ -193,10 +195,10 b' PYTHONPATH::' | |||||
193 | no working directory is checked out, it is equivalent to null. |
|
195 | no working directory is checked out, it is equivalent to null. | |
194 | If an uncommitted merge is in progress, "." is the revision of |
|
196 | If an uncommitted merge is in progress, "." is the revision of | |
195 | the first parent. |
|
197 | the first parent. | |
196 | '''), |
|
198 | ''')), | |
197 |
|
199 | |||
198 | (['mrevs', 'multirevs'], 'Specifying Multiple Revisions', |
|
200 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), | |
199 | r''' |
|
201 | _(r''' | |
200 | When Mercurial accepts more than one revision, they may be |
|
202 | When Mercurial accepts more than one revision, they may be | |
201 | specified individually, or provided as a continuous range, |
|
203 | specified individually, or provided as a continuous range, | |
202 | separated by the ":" character. |
|
204 | separated by the ":" character. | |
@@ -212,5 +214,5 b' PYTHONPATH::' | |||||
212 |
|
214 | |||
213 | A range acts as a closed interval. This means that a range of 3:5 |
|
215 | A range acts as a closed interval. This means that a range of 3:5 | |
214 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. |
|
216 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. | |
215 | '''), |
|
217 | ''')), | |
216 | ) |
|
218 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now