Commit graph

878 commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason
8d6d7b51e8 When a user hasn't made any blocks or been blocked don't display a
skeleton table. Just a <p> saying there's nothing here.
2009-10-01 19:04:38 +00:00
Ævar Arnfjörð Bjarmason
268a2cd474 * use h() on username to avoid XSS
* Link to username in <h1>
 * Set <title> on /blocks and /blocks_by
2009-10-01 18:49:38 +00:00
Ævar Arnfjörð Bjarmason
4f92ce1243 More specific alt/title text 2009-10-01 18:42:45 +00:00
Matt Amos
9b82acded9 Adding title for role icons when viewing user isn't an admin, re-adding translations for those. 2009-10-01 18:09:31 +00:00
Ævar Arnfjörð Bjarmason
8a7040e155 Set title/h1 to something sensible when granting/revoking roles 2009-10-01 18:02:08 +00:00
Ævar Arnfjörð Bjarmason
1d59359202 Add title="" to the revoke/grant icons that indicate what they're about to do 2009-10-01 17:57:20 +00:00
Matt Amos
59102ea017 Merging 17846:17904 from trunk. 2009-10-01 17:23:01 +00:00
Matt Amos
1e3b3c1f10 Refactored user_role and controller. Now much more DRY. 2009-10-01 17:15:34 +00:00
Ævar Arnfjörð Bjarmason
1db1f04974 Synced from Translatewiki 2009-10-01 16:48:31 +00:00
Translatewiki
1812b01564 * Localisation updates from translatewiki.net (2009-10-01)
* svn:eol-style native
2009-10-01 13:42:46 +00:00
Ævar Arnfjörð Bjarmason
f80d250d77 RichardF forgot to nuke cz.yml in [17664]. Nuking 2009-10-01 13:18:45 +00:00
Ævar Arnfjörð Bjarmason
03fd04be95 The 'more' message used in the history dialog (history.as) was missing 2009-10-01 10:59:43 +00:00
Ævar Arnfjörð Bjarmason
5f7586fb0a This whitespace at the end of "Custom: " isn't needed. The layer
selector looks the same without it and Translatewiki pukes on it.

In any case this needs to be turned into a message with
parameters. But Potlatch's code is too hairy so I'm not touching it.
2009-10-01 10:39:31 +00:00
Ævar Arnfjörð Bjarmason
7ac795ff54 Fixed message key that was broken due to a broken regex I used during
importing. It had AS message params mixed up with it.
2009-10-01 10:21:12 +00:00
Richard Fairhurst
495b8e2cb6 show buildings in pink 2009-09-30 23:54:25 +00:00
Matt Amos
77851bac7b Added better messages and error handling in a couple of places. Added integration checks to ensure that the blocking is actually working. Tests FTW. 2009-09-30 17:39:42 +00:00
Matt Amos
95c3d640a4 Tried to DRY the user_blocks controller. Moved the configuration of the blocking periods into application.yml. 2009-09-30 15:44:29 +00:00
Ævar Arnfjörð Bjarmason
ab878d4844 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.
2009-09-30 11:04:16 +00:00
Ævar Arnfjörð Bjarmason
5a76cbe760 Updated from Translatewiki with ''perl script/locale/merge-from-translatewiki'' 2009-09-30 10:58:00 +00:00
Tom Hughes
cd599a2998 Update language list. 2009-09-30 08:50:21 +00:00
Translatewiki
1f58d4a066 Remove untranslated parts in he.yml 2009-09-29 17:32:01 +00:00
Matt Amos
ca06b3c7b1 New migration to add better auditing to user_roles and better column names there and on user_blocks. Added a helper for displaying block status messages. 2009-09-29 16:44:03 +00:00
Ævar Arnfjörð Bjarmason
6eed92c0d6 Capitalize JavaScript as suggested on http://translatewiki.net/w/i.php?title=Special:Translate&task=review&group=out-osm&language=qqq&limit=2500 2009-09-29 16:21:50 +00:00
Ævar Arnfjörð Bjarmason
4df60ea589 Merged from Translatewiki with:
{{{
perl script/locale/merge-from-translatewiki 
}}}
2009-09-29 15:52:08 +00:00
Matt Amos
09c5740b5b Merging 17824:17845 from trunk to blocking branch. 2009-09-29 10:23:31 +00:00
Tom Hughes
18f9ebaf71 Remove corrupt message from Dutch translation. 2009-09-28 21:34:10 +00:00
Ævar Arnfjörð Bjarmason
b14abdd888 Importing new messages to existing languages from Translatewiki. See
also [17832].

This commit can be reviewed in a sane manner by looking at
attachment🎫2305:first-translatewiki-patch.patch.gz

I've manually gone through it and searched for errors. I didn't find
any.
2009-09-28 21:02:47 +00:00
Ævar Arnfjörð Bjarmason
8cdee8e0c7 Remove comment saying when these files were generated 2009-09-28 20:50:03 +00:00
Ævar Arnfjörð Bjarmason
06836b839c Commiting 26 new language translations (although some are really
small) from Translatewiki. This more than doubles the translations we
have as we had 25 before.

This was merged with:

{{{
perl script/locale/merge-from-translatewiki --locales-dir config/locales --only-new
}}}

And here are some stats:

{{{
$ svn st config/locales/|awk '{print $2}'|xargs wc -l|sort -nr
  5212 total
   955 config/locales/hsb.yml
   646 config/locales/fi.yml
   608 config/locales/br.yml
   432 config/locales/nds.yml
   359 config/locales/km.yml
   306 config/locales/af.yml
   289 config/locales/sk.yml
   276 config/locales/sr-EC.yml
   217 config/locales/sv.yml
   162 config/locales/ksh.yml
   154 config/locales/no.yml
   140 config/locales/be-TARASK.yml
   125 config/locales/te.yml
   116 config/locales/gsw.yml
    86 config/locales/eo.yml
    72 config/locales/bg.yml
    71 config/locales/ar.yml
    37 config/locales/tr.yml
    30 config/locales/ps.yml
    26 config/locales/lv.yml
    21 config/locales/eu.yml
    20 config/locales/pt.yml
    20 config/locales/lt.yml
    16 config/locales/nn.yml
    14 config/locales/yi.yml
    14 config/locales/bs.yml
}}}
2009-09-28 20:38:39 +00:00
Matt Amos
30d5e783e4 Added a confirmation step to the process of granting and revoking user roles. 2009-09-28 17:35:39 +00:00
Matt Amos
daa2496024 First version of blocking feature. Allows both time-based (for map protection) and notice-based (for education) blocks on users. Also introduces user roles and a simple UI for displaying and administering these. 2009-09-28 16:01:00 +00:00
Jonas Krückel
d09d8c3296 small fix 2009-09-27 14:15:53 +00:00
Balló György
425bf20b38 Updated Hungarian translation of OpenStreetMap website (Hu: -> HU: in wiki links) 2009-09-25 18:03:58 +00:00
Balló György
25bb6e4192 Updated Hungarian translation of OpenStreetMap website 2009-09-25 17:46:21 +00:00
Ævar Arnfjörð Bjarmason
e7d7f35120 Some of these files were in ISO-8859-1, no idea how that happened.
Fixed with:

{{{
for i in $(file *|grep ISO|awk '{print $1}'|sed s/://); do cat $i | iconv -f iso-8859-1 -t utf-8 > $i.utf8;done
for i in *yml; do mv $i.utf8 $i; done
}}}
2009-09-23 18:14:30 +00:00
Ævar Arnfjörð Bjarmason
65fec5d38a Removing zh-HANS: Just contained a few messages in English 2009-09-23 18:09:00 +00:00
Ævar Arnfjörð Bjarmason
623c0dcef8 Removed i18n messages which contained English - old crap from the wiki 2009-09-23 18:08:01 +00:00
Ævar Arnfjörð Bjarmason
f32dc6ff8c Make the 'Advanced' menu translatable 2009-09-23 18:03:20 +00:00
Ævar Arnfjörð Bjarmason
d5c71f697b Delete redundant translations from localised files.
I used this script:

{{{
#!/usr/bin/env perl
use feature ':5.10';
use strict;
use warnings;
use YAML::Syck qw(Load LoadFile Dump DumpFile);
use File::Slurp qw(slurp);
use Data::Dump 'dump';
use Encode qw(decode);
use autodie;

$YAML::Syck::Headless = 1;
$YAML::Syck::SortKeys = 1;
$YAML::Syck::ImplicitUnicode = 1;

my %lang;
chdir 'locales';
my @yml = glob "*.yml";
my @lang = map { s/\.yml//; $_ } @yml;

for my $lang (@lang) {
    say "Loading $lang";
    $lang{$lang} = LoadFile("$lang.yml")->{$lang};
}

for my $lang (grep { $_ ne 'en' } @lang) {
    while (my ($k, $v) = each %{ $lang{ $lang } }) {
        if ($lang{ $lang }->{$k} eq $lang{ en }->{$k}
            or (exists $lang{ $lang }->{$k} and not exists $lang{ en }->{$k})) {
            delete $lang{ $lang }->{$k};
        }
    }
}

for my $lang (@lang) {
    DumpFile("$lang.yml", { $lang => $lang{$lang} }) or die "arghl";
}
}}}
2009-09-23 17:29:29 +00:00
Ævar Arnfjörð Bjarmason
aeca7367be Used perl -pi -e 's/^.*?"action_createpoi":/ action_createpoi:/g' *yml 2009-09-23 17:23:58 +00:00
Ævar Arnfjörð Bjarmason
889523944f Convert all the Potlatch locale files to a rails-like format (to make
it easier for Translatewiki).

Here's the program I used to convert it:

{{{
    #!/usr/bin/env perl
    use feature ':5.10';
    use strict;
    use warnings;
    use YAML::Syck qw(Load LoadFile Dump DumpFile);
    use File::Slurp qw(slurp);
    use Data::Dump 'dump';
    use Encode qw(decode);
    use autodie;
    
    $YAML::Syck::Headless = 1;
    $YAML::Syck::SortKeys = 1;
    $YAML::Syck::ImplicitUnicode = 1;
    
    my %lang;
    chdir 'locales';
    my @yml = glob "*.yml";
    my @lang = map { s/\.yml//; $_ } @yml;
    
    for my $lang (@lang) {
        say "Loading $lang";
    
        my $file = "$lang.yml";
        $lang{$lang} = LoadFile($file);
        if (-f "$lang.html") {
            $lang{$lang}->{"help_html"} = slurp("$lang.html")
        }
    
        DumpFile("$lang.yml.new", { $lang => $lang{$lang} }) or die "arghl";
    }
}}}
2009-09-23 16:26:17 +00:00
Ævar Arnfjörð Bjarmason
c60743e615 I'm hacking the Potlatch i18n system, moving the old files to the new location before I overwrite them to preserve history 2009-09-23 16:05:09 +00:00
Ævar Arnfjörð Bjarmason
3d4270d452 Syncing translations from the wiki. Hopefully for the last time :) 2009-09-23 15:51:33 +00:00
Tom Hughes
fc5261ece5 Remove remaining trailing spaces from translations. 2009-09-22 20:15:09 +00:00
Ævar Arnfjörð Bjarmason
6480d7ec02 Use the list form for school instead of the colon 2009-09-22 19:16:34 +00:00
Ævar Arnfjörð Bjarmason
32a06b9e5b Use <br /> everywhere and not a mix of <br>, <br/> and <br /> so as to
not confuse translators.

I don't know if this gets sanitized in rails. Maybe this makes us more
XHTML compliant too.
2009-09-22 12:40:59 +00:00
Tom Hughes
d0bc9b9091 Update Vietnamese translation. Closes #2299. 2009-09-20 16:47:19 +00:00
Ævar Arnfjörð Bjarmason
421b611389 Use i18n() parameters for this JavaScript message instead of ad-hoc
string concatenation.

See [17712] for why I'm changing this.
2009-09-20 10:41:57 +00:00
Ævar Arnfjörð Bjarmason
185c7c24ae See [17712] for why I'm changing this
The 'user.view.mapper since' message is broken. It should be done with
translation parameters. But messages can't include HTML like <b> and I
don't want to experiment with making that work or changing this into a
HTML table that doesn't look crappy.
2009-09-20 10:25:31 +00:00
Ævar Arnfjörð Bjarmason
039a49a97b Translatewiki doesn't support trailing whitespace in messages. So if
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
2009-09-20 10:10:12 +00:00