X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1355455f83bd0cbac40ee841d86354b5cb5f0089..ab878d4844f7db8a21465b19ec238ce608c1e772:/script/locale/merge-from-translatewiki diff --git a/script/locale/merge-from-translatewiki b/script/locale/merge-from-translatewiki index ab89b61d9..faf6750f9 100644 --- a/script/locale/merge-from-translatewiki +++ b/script/locale/merge-from-translatewiki @@ -196,6 +196,16 @@ for my $translatewiki_lang (sort @translatewiki_languages_codes) { } } + # There are a bunch of keys on Translatewiki that are + # equivalent to English for some reason. Probably because they + # 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"; + delete $new{ $new_k }; + } + } + my $expanded = expand_hash( \%new ); my $out = +{ $rails_lang => $expanded }; spit_out($out_file, $out);