Changeset 214835 in webkit


Ignore:
Timestamp:
Apr 3, 2017 1:44:54 PM (7 years ago)
Author:
BJ Burg
Message:

run-safari should support launching with custom language and locale
https://bugs.webkit.org/show_bug.cgi?id=170397

Reviewed by Alexey Proskuryakov.

Hook up -AppleLanguages and -AppleLocale to command line options.

  • Scripts/webkitdirs.pm:

(printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
(argumentsForRunAndDebugMacWebKitApp):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r214832 r214835  
     12017-04-03  Brian Burg  <bburg@apple.com>
     2
     3        run-safari should support launching with custom language and locale
     4        https://bugs.webkit.org/show_bug.cgi?id=170397
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Hook up -AppleLanguages and -AppleLocale to command line options.
     9
     10        * Scripts/webkitdirs.pm:
     11        (printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
     12        (argumentsForRunAndDebugMacWebKitApp):
     13
    1142017-04-03  Jonathan Bedard  <jbedard@apple.com>
    215
  • trunk/Tools/Scripts/webkitdirs.pm

    r214631 r214835  
    21772177  --help                            Show this help message
    21782178  --no-saved-state                  Launch the application without state restoration
    2179   -g|--guard-malloc                 Enable Guard Malloc (OS X only)
     2179
     2180Options specific to macOS:
     2181  -g|--guard-malloc                 Enable Guard Malloc
     2182  --lang=LANGUAGE                   Use a specific language instead of system language.
     2183                                    This accepts a language name (German) or a language code (de, ar, pt_BR, etc).
     2184  --locale=LOCALE                   Use a specific locale instead of the system region.
    21802185EOF
    21812186
     
    21912196        push @args, ("-ApplePersistenceIgnoreState", "YES");
    21922197    }
     2198
     2199    my $lang;
     2200    if (checkForArgumentAndRemoveFromARGVGettingValue("--lang", \$lang)) {
     2201        push @args, ("-AppleLanguages", "(" . $lang . ")");
     2202    }
     2203
     2204    my $locale;
     2205    if (checkForArgumentAndRemoveFromARGVGettingValue("--locale", \$locale)) {
     2206        push @args, ("-AppleLocale", $locale);
     2207    }
     2208
    21932209    unshift @args, @ARGV;
    21942210
Note: See TracChangeset for help on using the changeset viewer.