##// END OF EJS Templates
i18n: translate revset predicate docstrings
Wagner Bruna -
r12855:d01c2100 stable
parent child Browse files
Show More
@@ -8,7 +8,7 b''
8 import re
8 import re
9 import parser, util, error, discovery
9 import parser, util, error, discovery
10 import match as matchmod
10 import match as matchmod
11 from i18n import _
11 from i18n import _, gettext
12
12
13 elements = {
13 elements = {
14 "(": (20, ("group", 1, ")"), ("func", 1, ")")),
14 "(": (20, ("group", 1, ")"), ("func", 1, ")")),
@@ -785,10 +785,11 b' def makedoc(topic, doc):'
785 text = symbols[name].__doc__
785 text = symbols[name].__doc__
786 if not text:
786 if not text:
787 continue
787 continue
788 text = gettext(text.rstrip())
788 lines = text.splitlines()
789 lines = text.splitlines()
789 lines[1:] = [(' ' + l.strip()) for l in lines[1:]]
790 lines[1:] = [(' ' + l.strip()) for l in lines[1:]]
790 predicates.append('\n'.join(lines))
791 predicates.append('\n'.join(lines))
791 predicates = '\n'.join(predicates)
792 predicates = '\n\n'.join(predicates)
792 doc = doc.replace('.. predicatesmarker', predicates)
793 doc = doc.replace('.. predicatesmarker', predicates)
793 return doc
794 return doc
794
795
General Comments 0
You need to be logged in to leave comments. Login now