strip annoying gettext metadata
This commit is contained in:
parent
1b4848ef58
commit
1d69235973
1 changed files with 4 additions and 1 deletions
5
mkht.php
5
mkht.php
|
@ -80,8 +80,11 @@ foreach($nodes_src as $node) {
|
|||
copy($src, $target);
|
||||
}
|
||||
|
||||
if (file_exists(SITE . 'po4a.cfg'))
|
||||
if (file_exists(SITE . 'po4a.cfg')) {
|
||||
exec('po4a --destdir ' . SITE . ' --srcdir ' . SITE . ' ' . SITE . 'po4a.cfg');
|
||||
foreach (glob('po/*.po*') as $gettext_file) // Remove annoying metadata generated by Gettext and translation tools
|
||||
file_put_contents($gettext_file, preg_replace('/.*(POT-Creation-Date|PO-Revision-Date).*\n\n/sU', 'msgid ""' . LF . 'msgstr "Content-Type: text/plain; charset=UTF-8\n"' . LF . LF, file_get_contents($gettext_file)));
|
||||
}
|
||||
|
||||
$nodes_cache = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(SITE . 'cache/', RecursiveDirectoryIterator::SKIP_DOTS));
|
||||
|
||||
|
|
Loading…
Reference in a new issue