X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/289c1c3cd99a3da58102bc2169e4feaf92264394..37a7996d949b47f76e5a38cc227f5bbb3e4c19fe:/script/locale/merge-from-translatewiki diff --git a/script/locale/merge-from-translatewiki b/script/locale/merge-from-translatewiki old mode 100644 new mode 100755 index e3608acbf..706ec45b3 --- a/script/locale/merge-from-translatewiki +++ b/script/locale/merge-from-translatewiki @@ -207,7 +207,7 @@ for my $translatewiki_lang (sort @translatewiki_languages_codes) { # were there at import time. Nuke them. while (my ($new_k, $new_v) = each %new) { if (exists $en{ $new_k } and $en{ $new_k } eq $new_v) { - say "Purging dupe in $rails_lang: $new_k=$new_v"; + #say "Purging dupe in $rails_lang: $new_k=$new_v"; delete $new{ $new_k }; } } @@ -317,8 +317,8 @@ sub get_translatewiki_translations { my @languages = @_; + my $cache_file = "/tmp/merge-from-translatewiki.storable"; if ($cache) { - my $cache_file = "/tmp/merge-from-translatewiki.storable"; if (-f $cache_file) { my $c = retrieve($cache_file); return %$c; @@ -351,7 +351,7 @@ sub get_language_from_translatewiki my ($lang) = @_; my $mech = WWW::Mechanize->new; - $mech->get("http://translatewiki.net/w/i.php?title=Special%3ATranslate&task=export-to-file&group=out-osm&language=$lang"); + $mech->get("http://translatewiki.net/w/i.php?title=Special%3ATranslate&task=export-to-file&group=out-osm-site&language=$lang"); die "Couldn't get lang $lang lang from Translatewiki" unless $mech->success; @@ -366,7 +366,7 @@ sub translatewiki_languages { my $mech = WWW::Mechanize->new; - $mech->get('http://translatewiki.net/wiki/Translating:OpenStreetMap/stats/trunk'); + $mech->get('http://translatewiki.net/wiki/Translating:OpenStreetMap/stats/trunk/site'); die "Couldn't get translatewiki table" unless $mech->success;