def checksentence(mystring, finfo, *, islua=False): m = re.match(r"\s*$", mystring) if m: wmlwarn(finfo, "found an empty translatable message") return 1 elif warnall() and not islua: if "}" in mystring: wmsg = "found a translatable string containing a WML macro. " " Translation for this string will NEVER work" wmlwarn(finfo, wmsg) return 2 else: return 0 else: return 0
def checksentence(mystring, finfo, *, islua=False): m = re.match(r'\s*$', mystring) if m: wmlwarn(finfo, "found an empty translatable message") return 1 elif warnall() and not islua: if "}" in mystring: wmsg = ("found a translatable string containing a WML macro. " " Translation for this string will NEVER work") wmlwarn(finfo, wmsg) return 2 else: return 0 else: return 0