]> git.openstreetmap.org Git - rails.git/blobdiff - script/locale/diff
Moved find_token method into the token class, since that seems a more appropriate...
[rails.git] / script / locale / diff
index 0335fe9836037e8195db56e699b42a70e5e2ea98..b19d42a267fed71a0936cf04eacf0de2a3000109 100755 (executable)
@@ -6,6 +6,7 @@ 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;
@@ -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
@@ -303,3 +300,9 @@ untranslated_values:
     
     # {{name}} ({{id}})
     printable_name.with_name: true
+
+    # {{type}} 
+    geocoder.search_osm_namefinder.prefix: true
+
+    # {{suffix}}, {{parentname}}
+    geocoder.search_osm_namefinder.suffix_suburb: true