changeset 147:63a93d33511a trunk

simplify
author pjenvey
date Wed, 20 Jun 2007 19:54:33 +0000
parents 14fe2a8fb842
children 6bb1026756f2
files babel/messages/extract.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/babel/messages/extract.py
+++ b/babel/messages/extract.py
@@ -260,7 +260,7 @@
         elif tok == COMMENT:
             # Strip the comment token from the line
             value = value[1:].strip()
-            if in_translator_comments is True and \
+            if in_translator_comments and \
                     translator_comments[-1][0] == lineno - 1:
                 # We're already inside a translator comment, continue appending
                 # XXX: Should we check if the programmer keeps adding the
@@ -271,8 +271,7 @@
             # starts with one of the comment tags
             for comment_tag in comment_tags:
                 if value.startswith(comment_tag):
-                    if in_translator_comments is not True:
-                        in_translator_comments = True
+                    in_translator_comments = True
                     comment = value[len(comment_tag):].strip()
                     translator_comments.append((lineno, comment))
                     break
Copyright (C) 2012-2017 Edgewall Software