mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Postprocessing for crowdin: cleanup PO-Revision-Date: from .po files
This commit is contained in:
@@ -38,6 +38,8 @@ timestamps {
|
||||
sh "$crowdin_cli download --branch ${upstream_branch}"
|
||||
}
|
||||
}
|
||||
sh 'find . -name "*.po" -exec msgfilter -i "{}" -o "{}.replacement" .ci/cleanup-po.pl ";"'
|
||||
sh 'find . -name "*.po" -exec mv "{}.replacement" "{}" ";"'
|
||||
}
|
||||
stage('Push') {
|
||||
sh 'git config user.name "ZNC-Jenkins"'
|
||||
|
||||
16
.ci/cleanup-po.pl
Executable file
16
.ci/cleanup-po.pl
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use v5.10;
|
||||
|
||||
local $/;
|
||||
my $text = <>;
|
||||
|
||||
if ($ENV{MSGFILTER_MSGID}) {
|
||||
print $text;
|
||||
} else {
|
||||
for (split(/^/, $text)) {
|
||||
print unless /^PO-Revision-Date:/;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user