Katsunori FUJIWARA committed ddf6879

enhance rst check to warn if translation adds extra "::" at the end of message

Comments (0)

Files changed (1)

             (msgids[1][0] in titlemarks))
 def check_rst_error(msgs):
-    if (infostock[1] and
-        infostock[0].endswith('::') and not infostock[1].endswith('::')):
+    if 0 == len(infostock[1]):
+        return # not yet translated
+    if infostock[0].endswith('::') and not infostock[1].endswith('::'):
         msgs.append('translation forgot "::" at the end of message')
+    if not infostock[0].endswith('::') and infostock[1].endswith('::'):
+        msgs.append('translation added "::" at the end of message')
     msgids = infostock[0].split('\\n')
     if hastitlemark(msgids):