Changeset - e505395c3a03
[Not reviewed]
default
0 1 0
Mads Kiilerich (mads) - 6 years ago 2020-02-02 21:29:18
mads@kiilerich.com
Grafted from: f2f6ab50c26e
i18n: better stripping of header comment for new translations

Also strip any header occurrence of:

# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#

while preserving stripping of:

#, fuzzy

and leading empty comment lines.
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
scripts/i18n_utils.py
Show inline comments
 
@@ -33,13 +33,16 @@ def runcmd(cmd, *args, **kwargs):
 
header_comment_strip_re = re.compile(r'''
 
    ^
 
    [#][ ]Translations[ ]template[ ]for[ ]Kallithea[.] \n
 
    |
 
    ^
 
    [#][ ]FIRST[ ]AUTHOR[ ]<EMAIL@ADDRESS>,[ ]\d+[.] \n
 
    [#] \n
 
    (?:[#] \n)?
 
    |
 
    ^
 
    (?:[#] \n)?
 
    [#],[ ]fuzzy \n
 
    ''',
 
    re.MULTILINE|re.VERBOSE)
 

	
 
header_normalize_re = re.compile(r'''
 
    ^ "
0 comments (0 inline, 0 general)