X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/12f78fc254953b2c5110f34bd089364fd3f6b9e5..eff06faf46c8f0cc4d92a16f6b2daa22eabb4893:/script/locale/diff?ds=inline diff --git a/script/locale/diff b/script/locale/diff index e2c9ee733..b19d42a26 100755 --- a/script/locale/diff +++ b/script/locale/diff @@ -2,10 +2,11 @@ use feature ':5.10'; use strict; use warnings; -use YAML::Syck qw(Load LoadFile); +use YAML::Syck qw(LoadFile); use Test::Differences; use Pod::Usage (); use Getopt::Long (); +use File::Basename qw(fileparse); =head1 NAME @@ -101,8 +102,8 @@ my ($from, $to) = @ARGV; my $from_data = LoadFile($from); my $to_data = LoadFile($to); -my $from_parsed = { iterate($from_data->{basename($from)}) }; -my $to_parsed = { iterate($to_data->{basename($to)}) }; +my $from_parsed = { iterate($from_data->{fileparse($from, qr/\.[^.]*/)}) }; +my $to_parsed = { iterate($to_data->{fileparse($to, qr/\.[^.]*/)}) }; if ($keys) { @@ -114,7 +115,7 @@ elsif ($untranslated_values or $untranslated_values_all) # Prune according to blacklist if ($untranslated_values) { - @untranslated = prune_untranslated_with_blacklist(basename($to), @untranslated); + @untranslated = prune_untranslated_with_blacklist(scalar(fileparse($to, qr/\.[^.]*/)), @untranslated); } say for @untranslated; @@ -149,7 +150,7 @@ sub prune_untranslated_with_blacklist my %keys; @keys{@keys} = (); - my $end_yaml = Load(join '', ); + my $end_yaml = LoadFile(*DATA); my $untranslated_values = $end_yaml->{untranslated_values}; my $default = $untranslated_values->{default}; my $this_language = $untranslated_values->{$language} || {}; @@ -217,13 +218,6 @@ sub iterate return @ret; } -sub basename -{ - my $name = shift; - $name =~ s[\..*?$][]; - $name; -} - sub help { my %arg = @_; @@ -252,6 +246,9 @@ untranslated_values: site.index.license.project_url: true browse.relation_member.entry: true + # #{{id}} + changeset.changeset.id: true + de: activerecord.attributes.message.sender: true activerecord.attributes.trace.name: true @@ -297,3 +294,15 @@ untranslated_values: # http://creativecommons.org/licenses/by-sa/2.0/ site.index.license.license_url: true + + # {{id}} + printable_name.with_id: true + + # {{name}} ({{id}}) + printable_name.with_name: true + + # {{type}} + geocoder.search_osm_namefinder.prefix: true + + # {{suffix}}, {{parentname}} + geocoder.search_osm_namefinder.suffix_suburb: true