i18n: leave out entries which contain only a rst directive
authorSimon Heimberg <simohe@besonet.ch>
Mon, 03 Feb 2014 21:33:48 +0100
changeset 20362 1bce1078501d
parent 20361 3fe079d3a2b4
child 20363 e3ee7ec85a15
i18n: leave out entries which contain only a rst directive This prevents the danger of translating entries like ".. note::"
i18n/posplit
--- a/i18n/posplit	Sun Nov 17 20:24:33 2013 +0100
+++ b/i18n/posplit	Mon Feb 03 21:33:48 2014 +0100
@@ -55,6 +55,9 @@
                 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: