mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 13:04:58 +00:00
Sort deleted and inserted messages, so that adjacent may possibly be
printed next to each other. To test, try e.g. "diff_po.pl -r39000:39100 sk.po" git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39246 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6c23b48fec
commit
e2997ca1b8
@ -146,6 +146,28 @@ sub diff_po($$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (1) {
|
||||||
|
@MsgKeys = sort keys %Messages, keys %newMessages;
|
||||||
|
for my $k (@MsgKeys) {
|
||||||
|
if (defined($Messages{$k})) {
|
||||||
|
$result |= 8;
|
||||||
|
print "deleted message\n";
|
||||||
|
print "< line = " . $Messages{$k}->{line} . "\n" if ($printlines);
|
||||||
|
print RED "< fuzzy = " . $Messages{$k}->{fuzzy} . "\n", RESET;
|
||||||
|
print RED "< msgid = \"$k\"\n", RESET;
|
||||||
|
print RED "< msgstr = \"" . $Messages{$k}->{msgstr} . "\"\n", RESET;
|
||||||
|
}
|
||||||
|
if (defined($newMessages{$k})) {
|
||||||
|
$result |= 16;
|
||||||
|
print "new message\n";
|
||||||
|
print "> line = " . $newMessages{$k}->{line} . "\n" if ($printlines);
|
||||||
|
print GREEN "> fuzzy = " . $newMessages{$k}->{fuzzy} . "\n", RESET;
|
||||||
|
print GREEN "> msgid = \"$k\"\n", RESET;
|
||||||
|
print GREEN "> msgstr = \"" . $newMessages{$k}->{msgstr} . "\"\n", RESET;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
@MsgKeys = &getLineSortedKeys(\%Messages);
|
@MsgKeys = &getLineSortedKeys(\%Messages);
|
||||||
for my $k (@MsgKeys) {
|
for my $k (@MsgKeys) {
|
||||||
$result |= 8;
|
$result |= 8;
|
||||||
@ -165,7 +187,7 @@ sub diff_po($$)
|
|||||||
print GREEN "> msgid = \"$k\"\n", RESET;
|
print GREEN "> msgid = \"$k\"\n", RESET;
|
||||||
print GREEN "> msgstr = \"" . $newMessages{$k}->{msgstr} . "\"\n", RESET;
|
print GREEN "> msgstr = \"" . $newMessages{$k}->{msgstr} . "\"\n", RESET;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
&printExtraMessages("fuzzy", \%Fuzzy);
|
&printExtraMessages("fuzzy", \%Fuzzy);
|
||||||
&printExtraMessages("untranslated", \%Untranslated);
|
&printExtraMessages("untranslated", \%Untranslated);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user