Patchwork [3,of,3,STABLE] templater: add i18n comments to error messages of newly added functions

login
register
mail settings
Submitter Katsunori FUJIWARA
Date July 31, 2014, 5:19 p.m.
Message ID <c8227baec2eada84f2bc.1406827148@feefifofum>
Download mbox | patch
Permalink /patch/5214/
State Accepted
Commit 2896d450fec495e8f043a68117f40fcf24619d4f
Headers show

Comments

Katsunori FUJIWARA - July 31, 2014, 5:19 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1406826864 -32400
#      Fri Aug 01 02:14:24 2014 +0900
# Branch stable
# Node ID c8227baec2eada84f2bc4e4965bd9166ebc0a896
# Parent  b75beb040a6c063e3cee6d5b3d52c5c35995af2c
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).
Matt Mackall - July 31, 2014, 5:53 p.m.
On Fri, 2014-08-01 at 02:19 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1406826864 -32400
> #      Fri Aug 01 02:14:24 2014 +0900
> # Branch stable
> # Node ID c8227baec2eada84f2bc4e4965bd9166ebc0a896
> # Parent  b75beb040a6c063e3cee6d5b3d52c5c35995af2c
> templater: add i18n comments to error messages of newly added functions

These are queued for stable, thanks.

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -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))