mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +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,26 +146,48 @@ sub diff_po($$)
|
||||
}
|
||||
}
|
||||
|
||||
@MsgKeys = &getLineSortedKeys(\%Messages);
|
||||
for my $k (@MsgKeys) {
|
||||
$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 (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);
|
||||
for my $k (@MsgKeys) {
|
||||
$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;
|
||||
}
|
||||
|
||||
@MsgKeys = &getLineSortedKeys(\%newMessages);
|
||||
for my $k (@MsgKeys) {
|
||||
$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;
|
||||
@MsgKeys = &getLineSortedKeys(\%newMessages);
|
||||
for my $k (@MsgKeys) {
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
&printExtraMessages("fuzzy", \%Fuzzy);
|
||||
&printExtraMessages("untranslated", \%Untranslated);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user