Skip to content
Permalink
Browse files

PRINCE: Added .pot file generation

  • Loading branch information...
sev- committed Sep 10, 2019
1 parent 270d4b6 commit aa45f532316e8d3f11fca67cb76583327a68a06d
Showing with 7 additions and 3 deletions.
  1. +7 −3 engines/prince/gen-po.pl
@@ -26,6 +26,10 @@
our $lang = $ARGV[0];
my $poldir = $ARGV[1];

if ($lang eq 'pot') {
$lang = "";
}

my $git = "<unknown>";

open GIT, "git describe --tags |" or warn "Can't run git";
@@ -94,8 +98,8 @@

for my $f (sort keys $data{'pl'}) {
for my $n (sort {$a<=>$b} keys $data{'pl'}{$f}) {
if (not exists $data{$lang}{$f}{$n}) {
warn "$lang:$f:$n missing";
if (($lang eq "") || (not exists $data{$lang}{$f}{$n})) {
warn "$lang:$f:$n missing" unless $lang eq "";
if (index($data{'pl'}{$f}{$n}, "\\n") != -1) { # Multiline
$data{$lang}{$f}{$n} = "\"\\n\"";
} else {
@@ -130,7 +134,7 @@
}
}

print "\n\n# Missing: $miss_tr Extra: $extra_tr" if ($miss_tr || $extra_tr);
print "\n\n# Missing: $miss_tr Extra: $extra_tr\n" if ($miss_tr || $extra_tr);
warn "Missing: $miss_tr Extra: $extra_tr" if ($miss_tr || $extra_tr);

exit;

0 comments on commit aa45f53

Please sign in to comment.
You can’t perform that action at this time.