Patchwork [6,of,7] cleanup: rename check-translation.py checker function - don't hide global var

login
register
mail settings
Submitter Mads Kiilerich
Date Aug. 15, 2014, 2:21 p.m.
Message ID <cd9f59027952dd5513c4.1408112482@mk-desktop>
Download mbox | patch
Permalink /patch/5428/
State Accepted
Headers show

Comments

Mads Kiilerich - Aug. 15, 2014, 2:21 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1408112447 -7200
#      Fri Aug 15 16:20:47 2014 +0200
# Node ID cd9f59027952dd5513c4e45dc4e50a37894a7088
# Parent  1cb58172ab4ef4208ea843fc3696d8cf4d1bd10e
cleanup: rename check-translation.py checker function - don't hide global var

Patch

diff --git a/i18n/check-translation.py b/i18n/check-translation.py
--- a/i18n/check-translation.py
+++ b/i18n/check-translation.py
@@ -7,7 +7,7 @@  import re
 
 checkers = []
 
-def checker(level, msgidpat):
+def levelchecker(level, msgidpat):
     def decorator(func):
         if msgidpat:
             match = re.compile(msgidpat).search
@@ -33,7 +33,7 @@  def match(checker, pe):
 ####################
 
 def fatalchecker(msgidpat=None):
-    return checker('fatal', msgidpat)
+    return levelchecker('fatal', msgidpat)
 
 @fatalchecker(r'\$\$')
 def promptchoice(pe):
@@ -64,7 +64,7 @@  def promptchoice(pe):
 ####################
 
 def warningchecker(msgidpat=None):
-    return checker('warning', msgidpat)
+    return levelchecker('warning', msgidpat)
 
 @warningchecker()
 def taildoublecolons(pe):