diff options
| author | Jo-Philipp Wich <jo@mein.io> | 2020-01-29 08:29:17 +0100 |
|---|---|---|
| committer | Hannu Nyman <hannu.nyman@iki.fi> | 2020-05-15 17:12:25 +0300 |
| commit | 9b69e8f9cc41654e3b09352832c5154025bf2561 (patch) | |
| tree | dc9b1d8decda5cca43b99fe34d71bacdc60186b4 | |
| parent | 733734ab203db3e808e3ffae761aae770310d624 (diff) | |
build: add script to merge master translation into branches
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cab574958c580c38ca8dc852d8dada1681d62046)
| -rwxr-xr-x | build/i18n-merge-master.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build/i18n-merge-master.pl b/build/i18n-merge-master.pl new file mode 100755 index 0000000000..d7479efb84 --- /dev/null +++ b/build/i18n-merge-master.pl @@ -0,0 +1,17 @@ +#!/usr/bin/env perl + +if (open F, '-|', 'find', $ARGV[0] || '.', '-type', 'f', '-name', '*.po') { + while (defined(my $path = readline F)) { + chomp $path; + + (my $ref = $path) =~ s/\.po$/\.master.po/; + + printf 'Updating %s ', $path; + system("git show --format=\%B 'master:$path' > '$ref'"); + system('msgmerge', '-N', '-o', $path, $ref, $path); + system('msgattrib', '--no-obsolete', '-o', $path, $path); + unlink($ref); + } + + close F; +} |
