# HG changeset patch # User Simon Heimberg # Date 2014-02-03 20:33:48 # Node ID 1bce1078501d9fec7effe432fc6f2d080e83ebc1 # Parent 3fe079d3a2b498983b99dfa6e616efb4b43994c5 i18n: leave out entries which contain only a rst directive This prevents the danger of translating entries like ".. note::" diff --git a/i18n/posplit b/i18n/posplit --- a/i18n/posplit +++ b/i18n/posplit @@ -55,6 +55,9 @@ if __name__ == "__main__": newentry = mkentry(entry, delta, msgid, msgstr) mdirective = findd.match(msgid) if mdirective: + if not msgid[mdirective.end():].rstrip(): + # only directive, nothing to translate here + continue directive = mdirective.group(1) comment = 'do not translate: .. %s::' % directive if not newentry.comment: