From 088bd1dcb2d2fb223354957e4307b4802ff25442 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 26 Sep 2009 20:03:52 +0000 Subject: [PATCH] Deal with values which are arrays, before and after: MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit avar@aoeu:~/src/osm/sites/rails_port/config/locales$ perl ../../script/locale/diff --dump-flat de.yml|egrep "Nähe|Uni" message.inbox.people_mapping_nearby: Mappern in deiner Nähe message.outbox.people_mapping_nearby: Mappern in deiner Nähe - "Universit\xC3\xA4t" user.friend_map.nearby mapper: "Mapper in der Nähe: [[nearby_user]]" user.view.nearby users: "Benutzer in der Nähe:" user.view.no nearby users: Es gibt bisher keine Benutzer, die einen Standort in deiner Nähe angegeben haben. avar@aoeu:~/src/osm/sites/rails_port/config/locales$ perl ../../script/locale/diff --dump-flat de.yml|egrep "Nähe|Uni" message.inbox.people_mapping_nearby: Mappern in deiner Nähe message.outbox.people_mapping_nearby: Mappern in deiner Nähe - Universität user.friend_map.nearby mapper: "Mapper in der Nähe: [[nearby_user]]" user.view.nearby users: "Benutzer in der Nähe:" user.view.no nearby users: Es gibt bisher keine Benutzer, die einen Standort in deiner Nähe angegeben haben. --- script/locale/diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/locale/diff b/script/locale/diff index e45b8e3c6..aa44ea53d 100755 --- a/script/locale/diff +++ b/script/locale/diff @@ -111,7 +111,7 @@ my $from_parsed = { iterate($from_data->{fileparse($from, qr/\.[^.]*/)}) }; if ($dump_flat) { # Mark as UTF-8 - map { utf8::decode($_) } values %$from_parsed; + map { if (ref $_ eq 'ARRAY') { map { utf8::decode($_) } @$_ } else { utf8::decode($_) } } values %$from_parsed; print Dump $from_parsed; -- 2.39.5