]> git.openstreetmap.org Git - rails.git/commitdiff
Translatewiki doesn't support trailing whitespace in messages. So if
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 20 Sep 2009 10:10:12 +0000 (10:10 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 20 Sep 2009 10:10:12 +0000 (10:10 +0000)
we want to move to it (without hacking it) we're going to have to
eliminate those.

I compiled a list of them and I'm removing trailing whitespace from
those messages where the whitespace was a no-op. Mostly cases like
"<td>foo </td><td>bar</td>" or "<p>foo \n</p>"

These are the commands I ran to remove them:

    perl -pi -e 's[(      )(coordinates:)(\s*)"(.*?) "$][$1$2$3"$4"]g' *yml
    perl -pi -e 's[(      )(subject:|language:|location:|latitude:|latitude:|longitude:|coordinates:)(\s*)"(.*?) "$][$1$2$3"$4"]g' *yml
    perl -pi -e 's[(      )(recent_entries:)(\s*)"(.*?) "$][$1$2$3"$4"]g' *yml
    perl -pi -e 's[(      )(home location:|latitude:|longitude:|preferred languages:|profile description:|)(\s*)"(.*?) "$][$1$2$3"$4"]g' *yml
    perl -pi -e 's[^(        )(heading:)(\s*)"(.*?) "$][$1$2$3"$4"]g' *yml
    perl -pi -e 's[^(      )(email or username:|password:|confirm email address:|display name:|email address:|confirm password:|nearby users:)(\s*)"(.*?) "$][$1$2$3"$4"]g' *yml
    perl -pi -e 's[(      contact_webmaster:\s*)\x27(.*?) \x27][$1\x27$2\x27]' *yml


No differences found