X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=po%2Fpocheck.pl;h=69bc405b2b947b1c1b9a59f5a850cebdee2b8d97;hb=309ce3bf0cb2c8e53c16e4097f1004ca0371ec78;hp=b46bacfe354cecbbbc4add712db8b20438c52f06;hpb=4eccc221197519bd86f77ce27399877f3cb38861;p=lyx.git diff --git a/po/pocheck.pl b/po/pocheck.pl index b46bacfe35..69bc405b2b 100755 --- a/po/pocheck.pl +++ b/po/pocheck.pl @@ -81,9 +81,18 @@ foreach $pofilename ( @ARGV ) $warn++; } + # Check for "|..." shortcuts + if ( ( $msgid =~ m/\|[^ ]/ ) != ( $msgstr =~ m/\|[^ ]/ ) ) { + print( "Missing or unexpected menu shortcut:\n" ); + print( " '$msgid' => '$msgstr'\n" ); + $warn++; + } + $msgid_clean = lc($msgid); $msgstr_clean = lc($msgstr); + $msgid_clean =~ s/(.*)\|.*?$/$1/; # strip menu shortcuts + $msgstr_clean =~ s/(.*)\|.*?$/$1/; $msgid_clean =~ s/&([^ ])/$1/; # strip Qt shortcuts $msgstr_clean =~ s/&([^ ])/$1/;