X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d8889d5ef6aa51c7021810920eb363310d5bc15c..88060d443e6806333feba9e57bffaa96889ecc25:/script/locale/diff?ds=inline diff --git a/script/locale/diff b/script/locale/diff index 0606791ba..081167b19 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 @@ -72,7 +73,7 @@ C<[[foo]]>) are equivalent in the two provided files. =head1 AUTHOR -Evar ArnfjErE Bjarmason +Evar ArnfjErE Bjarmason =cut @@ -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 = @_; @@ -250,6 +244,10 @@ untranslated_values: layouts.project_name.h1: true layouts.project_name.title: true site.index.license.project_url: true + browse.relation_member.entry: true + + # #{{id}} + changeset.changeset.id: true de: activerecord.attributes.message.sender: true @@ -296,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