Commit bba6b555 authored by Julien Pivotto's avatar Julien Pivotto

Ignore date

Signed-off-by: Julien Pivotto's avatarJulien Pivotto <roidelapluie@inuits.eu>
parent 182363b5
......@@ -42,8 +42,17 @@ class Pox:
os.path.join(dirpath, orig_filename),
'-P',
os.path.join(dirpath, potfilename)]
subprocess.call(command)
logging.info('Running %s' % ' '.join(command))
subprocess.call(command)
with open(os.path.join(dirpath, potfilename)) as f:
lines = f.readlines()
with open(os.path.join(dirpath, potfilename), 'w') as f:
changed = False
for line in lines:
if line.startswith('"POT-Creation-Date:') and not changed:
changed = True
else:
f.write(line)
try:
command = ['git', 'add', os.path.join(dirpath, potfilename)]
logging.info('Running %s' % ' '.join(command))
......@@ -51,7 +60,7 @@ class Pox:
except:
pass
if len(potfiles) > 0:
command = ['msgcat'] + potfiles + ['-o', os.path.join(dirpath, 'locale.pot')]
command = ['msgcat'] + [os.path.join(dirpath, x) for x in potfiles] + ['-o', os.path.join(dirpath, 'locale.pot')]
logging.info('Running %s' % ' '.join(command))
subprocess.call(command)
try:
......@@ -171,6 +180,9 @@ class Pox:
if not len(filename.split('.')) == 3:
logging.debug('Filename does not contain 2 dots: %s' % filename)
continue
if filename.split('.')[2] == 'en':
logging.debug('Skipping en: %s' % filename)
continue
results.append(filename)
return results
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment