Enhance output of po_diff.pl to better see message-edges.

This commit is contained in:
Kornel Benko 2016-12-03 11:42:22 +01:00
parent f4c3dc6668
commit 633d5e2c10

View File

@ -395,19 +395,19 @@ sub printDiff($$$$)
print "diffline = " . $rM->{line} . "," . $rnM->{line} . "\n" if ($printlines); print "diffline = " . $rM->{line} . "," . $rnM->{line} . "\n" if ($printlines);
print " msgid = \"$k\"\n"; print " msgid = \"$k\"\n";
if ($rM->{fuzzy} eq $rnM->{fuzzy}) { if ($rM->{fuzzy} eq $rnM->{fuzzy}) {
print " fuzzy = " . $rM->{fuzzy} . "\n" if ($printlines); print " fuzzy = \"" . $rM->{fuzzy} . "\"\n" if ($printlines);
} }
else { else {
print RED "< fuzzy = " . $rM->{fuzzy} . "\n", RESET; print RED "< fuzzy = \"" . $rM->{fuzzy} . "\"\n", RESET;
} }
print RED "< msgstr = " . $rM->{msgstr} . "\n", RESET; print RED "< msgstr = \"" . $rM->{msgstr} . "\"\n", RESET;
if ($k ne $nk) { if ($k ne $nk) {
print GREEN "> msgid = \"$nk\"\n", RESET; print GREEN "> msgid = \"$nk\"\n", RESET;
} }
if ($rM->{fuzzy} ne $rnM->{fuzzy}) { if ($rM->{fuzzy} ne $rnM->{fuzzy}) {
print GREEN "> fuzzy = " . $rnM->{fuzzy} . "\n", RESET; print GREEN "> fuzzy = \"" . $rnM->{fuzzy} . "\"\n", RESET;
} }
print GREEN "> msgstr = " . $rnM->{msgstr} . "\n", RESET; print GREEN "> msgstr = \"" . $rnM->{msgstr} . "\"\n", RESET;
print "\n"; print "\n";
} }