summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/extract-localizable-strings
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/extract-localizable-strings')
-rwxr-xr-xWebKitTools/Scripts/extract-localizable-strings11
1 files changed, 5 insertions, 6 deletions
diff --git a/WebKitTools/Scripts/extract-localizable-strings b/WebKitTools/Scripts/extract-localizable-strings
index cf4f8f0..b31550a 100755
--- a/WebKitTools/Scripts/extract-localizable-strings
+++ b/WebKitTools/Scripts/extract-localizable-strings
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@ sub UnescapeHexSequence($);
my %isDebugMacro = ( ASSERT_WITH_MESSAGE => 1, LOG_ERROR => 1, ERROR => 1, NSURL_ERROR => 1, FATAL => 1, LOG => 1, LOG_WARNING => 1, UI_STRING_LOCALIZE_LATER => 1, LPCTSTR_UI_STRING_LOCALIZE_LATER => 1, UNLOCALIZED_STRING => 1, UNLOCALIZED_LPCTSTR => 1, dprintf => 1, NSException => 1, NSLog => 1, printf => 1 );
-@ARGV >= 1 or die "Usage: extract-localizable-strings <exceptions file> [ directory... ]\nDid you mean to run update-webkit-localizable-strings instead?\n";
+@ARGV >= 2 or die "Usage: extract-localizable-strings <exceptions file> <file to update> [ directory... ]\nDid you mean to run update-webkit-localizable-strings instead?\n";
my $exceptionsFile = shift @ARGV;
-f $exceptionsFile or die "Couldn't find exceptions file $exceptionsFile\n";
@@ -99,14 +99,13 @@ if (open EXCEPTIONS, $exceptionsFile) {
my $quotedDirectoriesString = '"' . join('" "', @directories) . '"';
for my $dir (@directoriesToSkip) {
- $quotedDirectoriesString .= ' -path "' . $dir . '" -prune';
+ $quotedDirectoriesString .= ' -path "' . $dir . '" -prune -o';
}
-my @files = ( split "\n", `find $quotedDirectoriesString -name "*.h" -o -name "*.m" -o -name "*.mm" -o -name "*.c" -o -name "*.cpp"` );
+my @files = ( split "\n", `find $quotedDirectoriesString \\( -name "*.h" -o -name "*.m" -o -name "*.mm" -o -name "*.c" -o -name "*.cpp" \\)` );
for my $file (sort @files) {
- next if $file =~ /\/WebLocalizableStrings\.h$/;
- next if $file =~ /\/icu\//;
+ next if $file =~ /\/\w+LocalizableStrings\.h$/;
$file =~ s-^./--;