X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=po%2Fpocheck.pl;h=68dd83f23c4978d80f43d402d8d96b7c43f6fff0;hb=8a1f936ff190964649643872f0c45da10ce3105f;hp=df25fdad3bda069038895a4c97bbb428a521000b;hpb=fa674176fde42e8011f9716e2b270bd5a95d983f;p=lyx.git diff --git a/po/pocheck.pl b/po/pocheck.pl index df25fdad3b..68dd83f23c 100755 --- a/po/pocheck.pl +++ b/po/pocheck.pl @@ -49,14 +49,16 @@ delete $options{i} if $silent_mode; my $check_args = (!%options or defined($options{a})); my $check_colons = (!%options or defined($options{c})); -my $check_spaces = (!%options or defined($options{m})); +my $check_spaces = (!%options or defined($options{s})); my $check_periods = (!%options or defined($options{p})); my $check_qt = (!%options or defined($options{q})); -my $check_menu = (!%options or defined($options{s})); +my $check_menu = (!%options or defined($options{m})); my $check_trans = (!%options or defined($options{t})); my %trans; +my $total_warn = 0; + foreach my $pofilename ( @ARGV ) { my %bad; if (!$silent_mode) { @@ -108,6 +110,9 @@ foreach my $pofilename ( @ARGV ) { # (surely that is always $msgstr?) next if ($msgid eq "" or $msgstr eq ""); + # discard [[...]] from the end of msgid, this is used only as hint to translation + $msgid =~ s/\[\[.*\]\]$//; + # Check for matching %1$s, etc. if ($check_args) { my @argstrs = ( $msgid =~ m/%(\d)\$s/g ); @@ -236,4 +241,8 @@ foreach my $pofilename ( @ARGV ) { } print "\n"; } + $total_warn += $warn; } + +exit ($total_warn > 0); +