##// END OF EJS Templates
i18n: add i18n comment to error messages of template functions
FUJIWARA Katsunori -
r23112:3226ed45 stable
parent child Browse files
Show More
@@ -217,6 +217,7 b' def buildfunc(exp, context):'
217 217
218 218 def date(context, mapping, args):
219 219 if not (1 <= len(args) <= 2):
220 # i18n: "date" is a keyword
220 221 raise error.ParseError(_("date expects one or two arguments"))
221 222
222 223 date = args[0][0](context, mapping, args[0][1])
@@ -244,6 +245,7 b' def diff(context, mapping, args):'
244 245
245 246 def fill(context, mapping, args):
246 247 if not (1 <= len(args) <= 4):
248 # i18n: "fill" is a keyword
247 249 raise error.ParseError(_("fill expects one to four arguments"))
248 250
249 251 text = stringify(args[0][0](context, mapping, args[0][1]))
@@ -254,6 +256,7 b' def fill(context, mapping, args):'
254 256 try:
255 257 width = int(stringify(args[1][0](context, mapping, args[1][1])))
256 258 except ValueError:
259 # i18n: "fill" is a keyword
257 260 raise error.ParseError(_("fill expects an integer width"))
258 261 try:
259 262 initindent = stringify(_evalifliteral(args[2], context, mapping))
@@ -267,6 +270,7 b' def pad(context, mapping, args):'
267 270 """usage: pad(text, width, fillchar=' ', right=False)
268 271 """
269 272 if not (2 <= len(args) <= 4):
273 # i18n: "pad" is a keyword
270 274 raise error.ParseError(_("pad() expects two to four arguments"))
271 275
272 276 width = int(args[1][1])
@@ -422,6 +426,7 b' def shortest(context, mapping, args):'
422 426 """usage: shortest(node, minlength=4)
423 427 """
424 428 if not (1 <= len(args) <= 2):
429 # i18n: "shortest" is a keyword
425 430 raise error.ParseError(_("shortest() expects one or two arguments"))
426 431
427 432 node = stringify(args[0][0](context, mapping, args[0][1]))
@@ -471,6 +476,7 b' def shortest(context, mapping, args):'
471 476
472 477 def strip(context, mapping, args):
473 478 if not (1 <= len(args) <= 2):
479 # i18n: "strip" is a keyword
474 480 raise error.ParseError(_("strip expects one or two arguments"))
475 481
476 482 text = stringify(args[0][0](context, mapping, args[0][1]))
General Comments 0
You need to be logged in to leave comments. Login now