From: Ævar Arnfjörð Bjarmason Date: Mon, 22 Jun 2009 16:32:58 +0000 (+0000) Subject: Change option names and improve POD X-Git-Tag: live~7589 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2ad330d642df0048686f63dc7e86a7dbeb0b30e4 Change option names and improve POD --- diff --git a/script/locale/diff b/script/locale/diff index fdaf4a4fb..2afffb828 100755 --- a/script/locale/diff +++ b/script/locale/diff @@ -12,8 +12,11 @@ locale-diff - Compare two YAML files and print how their datastructures differ =head1 SYNOPSIS - locale-diff en.yml is.yml - locale-diff en.yml is.yml | grep '*' + diff en.yml is.yml + # --keys is the default + diff --keys en.yml is.yml + # --untranslated-values compares prints keys whose values don't differ + diff --untranslated-values en.yml is.yml =head1 DESCRIPTION @@ -30,7 +33,7 @@ translated files when F changes. Print this help message. -=item --diff-keys +=item --keys Show the hash keys that differ between the two files, useful merging new entries from F to a local file. @@ -55,8 +58,8 @@ Getopt::Long::Parser->new( config => [ qw< bundling no_ignore_case no_require_order pass_through > ], )->getoptions( 'h|help' => \my $help, - 'diff-keys' => \my $diff_keys, - 'undiff-values' => \my $undiff_values, + 'keys' => \my $keys, + 'untranslated-values' => \my $untranslated_values, ) or help(); # On --help @@ -74,11 +77,11 @@ my $from_parsed = { iterate($from_data->{basename($from)}) }; my $to_parsed = { iterate($to_data->{basename($to)}) }; # Since this used to be the default, support that... -if ((not $undiff_values and not $diff_keys) or $diff_keys) +if ((not $untranslated_values and not $keys) or $keys) { print_key_differences(); } -elsif ($undiff_values) +elsif ($untranslated_values) { my @untranslated = untranslated_keys($from_parsed, $to_parsed);