i18n/posplit
changeset 28074 a1924bc6e267
parent 20363 e3ee7ec85a15
child 29152 c5057b7780dc
equal deleted inserted replaced
28073:c4bec3c45ec9 28074:a1924bc6e267
    55                 newentry = mkentry(entry, delta, msgid, msgstr)
    55                 newentry = mkentry(entry, delta, msgid, msgstr)
    56                 mdirective = findd.match(msgid)
    56                 mdirective = findd.match(msgid)
    57                 if mdirective:
    57                 if mdirective:
    58                     if not msgid[mdirective.end():].rstrip():
    58                     if not msgid[mdirective.end():].rstrip():
    59                         # only directive, nothing to translate here
    59                         # only directive, nothing to translate here
       
    60                         delta += 2
    60                         continue
    61                         continue
    61                     directive = mdirective.group(1)
    62                     directive = mdirective.group(1)
    62                     if directive in ('container', 'include'):
    63                     if directive in ('container', 'include'):
    63                         if msgid.rstrip('\n').count('\n') == 0:
    64                         if msgid.rstrip('\n').count('\n') == 0:
    64                             # only rst syntax, nothing to translate
    65                             # only rst syntax, nothing to translate
       
    66                             delta += 2
    65                             continue
    67                             continue
    66                         else:
    68                         else:
    67                             # lines following directly, unexpected
    69                             # lines following directly, unexpected
    68                             print 'Warning: text follows line with directive' \
    70                             print 'Warning: text follows line with directive' \
    69                                   ' %s' % directive
    71                                   ' %s' % directive