mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
pocheck update from Michael
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6869 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
defe8051ab
commit
8acbaf9565
@ -1,3 +1,8 @@
|
|||||||
|
2003-04-28 Michael Schmitt <Michael.Schmitt@teststep.org>
|
||||||
|
|
||||||
|
* pocheck.pl: do not output several different messages about bad
|
||||||
|
translation for the same word.
|
||||||
|
|
||||||
2003-04-09 John Levon <levon@movementarian.org>
|
2003-04-09 John Levon <levon@movementarian.org>
|
||||||
|
|
||||||
* Makefile.in.in: translate the toolbar name
|
* Makefile.in.in: translate the toolbar name
|
||||||
|
@ -55,35 +55,35 @@ foreach $pofilename ( @ARGV )
|
|||||||
|
|
||||||
# Check colon at the end of a message
|
# Check colon at the end of a message
|
||||||
if ( ( $msgid =~ m/: *(\|.*)?$/ ) != ( $msgstr =~ m/: *(\|.*)?$/ ) ) {
|
if ( ( $msgid =~ m/: *(\|.*)?$/ ) != ( $msgstr =~ m/: *(\|.*)?$/ ) ) {
|
||||||
print( "Missing or redundant colon:\n" );
|
print( "Missing or unexpected colon:\n" );
|
||||||
print( " '$msgid' => '$msgstr'\n" );
|
print( " '$msgid' => '$msgstr'\n" );
|
||||||
$warn++;
|
$warn++;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check period at the end of a message; uncomment code if you are paranoid
|
# Check period at the end of a message; uncomment code if you are paranoid
|
||||||
#if ( ( $msgid =~ m/\. *(\|.*)?$/ ) != ( $msgstr =~ m/\. *(\|.*)?$/ ) ) {
|
#if ( ( $msgid =~ m/\. *(\|.*)?$/ ) != ( $msgstr =~ m/\. *(\|.*)?$/ ) ) {
|
||||||
# print( "Missing or redundant period:\n" );
|
# print( "Missing or unexpected period:\n" );
|
||||||
# print( " '$msgid' => '$msgstr'\n" );
|
# print( " '$msgid' => '$msgstr'\n" );
|
||||||
# $warn++;
|
# $warn++;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
# Check space at the end of a message
|
# Check space at the end of a message
|
||||||
if ( ( $msgid =~ m/ *?(\|.*)?$/ ) != ( $msgstr =~ m/ *?(\|.*)?$/ ) ) {
|
if ( ( $msgid =~ m/ *?(\|.*)?$/ ) != ( $msgstr =~ m/ *?(\|.*)?$/ ) ) {
|
||||||
print( "Missing or redundant space:\n" );
|
print( "Missing or unexpected space:\n" );
|
||||||
print( " '$msgid' => '$msgstr'\n" );
|
print( " '$msgid' => '$msgstr'\n" );
|
||||||
$warn++;
|
$warn++;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for "&" shortcuts
|
# Check for "&" shortcuts
|
||||||
if ( ( $msgid =~ m/&[^ ]/ ) != ( $msgstr =~ m/&[^ ]/ ) ) {
|
if ( ( $msgid =~ m/&[^ ]/ ) != ( $msgstr =~ m/&[^ ]/ ) ) {
|
||||||
print( "Missing or redundant QT shortcut:\n" );
|
print( "Missing or unexpected Qt shortcut:\n" );
|
||||||
print( " '$msgid' => '$msgstr'\n" );
|
print( " '$msgid' => '$msgstr'\n" );
|
||||||
$warn++;
|
$warn++;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for "|..." shortcut(s)
|
# Check for "|..." shortcut(s)
|
||||||
if ( ( $msgid =~ m/\|[^ ]/ ) != ( $msgstr =~ m/\|[^ ]/ ) ) {
|
if ( ( $msgid =~ m/\|[^ ]/ ) != ( $msgstr =~ m/\|[^ ]/ ) ) {
|
||||||
print( "Missing or redundant xforms shortcut:\n" );
|
print( "Missing or unexpected xforms shortcut:\n" );
|
||||||
print( " '$msgid' => '$msgstr'\n" );
|
print( " '$msgid' => '$msgstr'\n" );
|
||||||
$warn++;
|
$warn++;
|
||||||
}
|
}
|
||||||
@ -96,18 +96,25 @@ foreach $pofilename ( @ARGV )
|
|||||||
$msgstr_clean =~ s/|.*?$//;
|
$msgstr_clean =~ s/|.*?$//;
|
||||||
$msgstr_clean =~ s/&([^ ])/$1/;
|
$msgstr_clean =~ s/&([^ ])/$1/;
|
||||||
|
|
||||||
if ( defined( $trans{$msgid_clean} ) && $msgstr_clean ne $trans{$msgid_clean}{'msgstr_clean'} ) {
|
$trans{$msgid_clean}{$msgstr_clean} = [ $msgid, $msgstr ];
|
||||||
print( "Different translations for '$msgid_clean':\n" );
|
|
||||||
print( " '$msgid' => '$msgstr'\n" );
|
|
||||||
print( " '$trans{$msgid_clean}{'msgid'}' => '$trans{$msgid_clean}{'msgstr'}'\n" );
|
|
||||||
$warn++;
|
|
||||||
} else {
|
|
||||||
$trans{$msgid_clean} = { 'msgid' => $msgid, 'msgstr' => $msgstr, 'msgstr_clean' => $msgstr_clean };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach $msgid ( keys %trans ) {
|
||||||
|
$ref = $trans{$msgid};
|
||||||
|
@msgstrkeys = keys %$ref;
|
||||||
|
|
||||||
|
if ( $#msgstrkeys > 0 ) {
|
||||||
|
print( "Different translations for '$msgid':\n" );
|
||||||
|
foreach $msgstr ( @msgstrkeys ) {
|
||||||
|
print( " '" . $trans{$msgid}{$msgstr}[0] . "' => '" . $trans{$msgid}{$msgstr}[1] . "'\n" );
|
||||||
|
}
|
||||||
|
$warn++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print( "\nTotal number of warnings: $warn\n\n" );
|
print( "\nTotal number of warnings: $warn\n\n" );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user