Mercurial > hg
changeset 21960:2896d450fec4 stable
templater: add i18n comments to error messages of newly added functions
This patch adds i18n comments to error messages of newly added
functions "startswith" (introduced by 4a445dc5abff) and "word" (by
8f23f8096606).
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 01 Aug 2014 02:14:24 +0900 |
parents | dccbf52ffe9f |
children | af15de6775c7 |
files | mercurial/templater.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Fri Aug 01 02:14:24 2014 +0900 +++ b/mercurial/templater.py Fri Aug 01 02:14:24 2014 +0900 @@ -468,6 +468,7 @@ def startswith(context, mapping, args): if len(args) != 2: + # i18n: "startswith" is a keyword raise error.ParseError(_("startswith expects two arguments")) patn = stringify(args[0][0](context, mapping, args[0][1])) @@ -480,6 +481,7 @@ def word(context, mapping, args): """return nth word from a string""" if not (2 <= len(args) <= 3): + # i18n: "word" is a keyword raise error.ParseError(_("word expects two or three arguments, got %d") % len(args))