[Scummvm-git-logs] scummvm-tools master -> aa45f532316e8d3f11fca67cb76583327a68a06d

sev- sev at scummvm.org
Tue Sep 10 22:01:45 CEST 2019


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .

Summary:
270d4b64bb PRINCE: Clarified comments in po-parse.pl
aa45f53231 PRINCE: Added .pot file generation


Commit: 270d4b64bbe1b5d9a9afb137908bd5b6d8e3d9a1
    https://github.com/scummvm/scummvm-tools/commit/270d4b64bbe1b5d9a9afb137908bd5b6d8e3d9a1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-09-10T21:53:56+02:00

Commit Message:
PRINCE: Clarified comments in po-parse.pl

Changed paths:
    engines/prince/po-parse.pl


diff --git a/engines/prince/po-parse.pl b/engines/prince/po-parse.pl
index 2d92ca6..7724e4f 100644
--- a/engines/prince/po-parse.pl
+++ b/engines/prince/po-parse.pl
@@ -1,6 +1,6 @@
 #!perl
 
-# Generate .po file for The Prince and the Coward game
+# Parse .po file for The Prince and the Coward game
 
 use utf8;
 
@@ -13,7 +13,7 @@ sub process_talk($);
 use open qw/:std :utf8/;
 
 if ($#ARGV != 1) {
-	die "Usage: $0 <language-code> <file>";
+	die "Usage: $0 <language-code> <file.po>";
 }
 
 my $lang = $ARGV[0];


Commit: aa45f532316e8d3f11fca67cb76583327a68a06d
    https://github.com/scummvm/scummvm-tools/commit/aa45f532316e8d3f11fca67cb76583327a68a06d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-09-10T21:54:29+02:00

Commit Message:
PRINCE: Added .pot file generation

Changed paths:
    engines/prince/gen-po.pl


diff --git a/engines/prince/gen-po.pl b/engines/prince/gen-po.pl
index 7fc747d..89e896a 100644
--- a/engines/prince/gen-po.pl
+++ b/engines/prince/gen-po.pl
@@ -26,6 +26,10 @@ our %data_ids;
 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{$lang}) {
 
 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 @@ EOF
 	}
 }
 
-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;





More information about the Scummvm-git-logs mailing list