]>
git.openstreetmap.org Git - rails.git/log
Matt Amos [Fri, 2 Oct 2009 10:46:19 +0000 (10:46 +0000)]
Fix wrong comment.
Tom Hughes [Thu, 1 Oct 2009 21:30:45 +0000 (21:30 +0000)]
Add "blocks on" and "blocks by" links to the user page when a logged
in user is looking at their own page.
Tom Hughes [Thu, 1 Oct 2009 21:13:13 +0000 (21:13 +0000)]
Swap two translations so they are the right way round.
Tom Hughes [Thu, 1 Oct 2009 20:39:04 +0000 (20:39 +0000)]
Replace a couple calls to inject with more readble constructs.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 20:29:17 +0000 (20:29 +0000)]
Set a limit on the new/edit block text area. Make it as big as diary
comments instead of the insane default rails size of 40/20 cols/rows
Tom Hughes [Thu, 1 Oct 2009 20:24:53 +0000 (20:24 +0000)]
Correct comment.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 20:24:36 +0000 (20:24 +0000)]
* The Back link in block/id/edit wasn't translatable
* New text for back links to make them more understandable
Tom Hughes [Thu, 1 Oct 2009 20:22:52 +0000 (20:22 +0000)]
Correct comment.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 20:18:24 +0000 (20:18 +0000)]
* <title> for /blocks/new/*
* use h() to escape usernames
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 20:08:13 +0000 (20:08 +0000)]
Add a route for '/blocks/new/:display_name' so links will be
'/blocks/new/Example' not '/blocks/new?display_name=Example'
Tom Hughes [Thu, 1 Oct 2009 20:04:33 +0000 (20:04 +0000)]
Don't bother creating the user index on user_roles as migration 48 will
create one on user+role that will do the same job.
Removing it here is a bit of a hack as it will not get dropped from
existing databases but as it was not given an explicit name it is hard
to write a migration to drop it.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 20:02:54 +0000 (20:02 +0000)]
use h() to avoid XSS in usernames
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 19:59:02 +0000 (19:59 +0000)]
title/links for revoke page
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 19:55:25 +0000 (19:55 +0000)]
Oops. Mixed up heading/title
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 19:45:36 +0000 (19:45 +0000)]
title/heading & XSS fix for /edit
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 19:27:15 +0000 (19:27 +0000)]
Add <title> to /blocks and don't Camel Case headings
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 19:18:23 +0000 (19:18 +0000)]
Set title on /blocks/:id and link to usernames
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 19:10:31 +0000 (19:10 +0000)]
Back -> View all blocks
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 19:04:38 +0000 (19:04 +0000)]
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.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 18:49:38 +0000 (18:49 +0000)]
* use h() on username to avoid XSS
* Link to username in <h1>
* Set <title> on /blocks and /blocks_by
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 18:42:45 +0000 (18:42 +0000)]
More specific alt/title text
Matt Amos [Thu, 1 Oct 2009 18:09:31 +0000 (18:09 +0000)]
Adding title for role icons when viewing user isn't an admin, re-adding translations for those.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 18:02:08 +0000 (18:02 +0000)]
Set title/h1 to something sensible when granting/revoking roles
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 17:57:20 +0000 (17:57 +0000)]
Add title="" to the revoke/grant icons that indicate what they're about to do
Matt Amos [Thu, 1 Oct 2009 17:23:01 +0000 (17:23 +0000)]
Merging 17846:17904 from trunk.
Matt Amos [Thu, 1 Oct 2009 17:15:34 +0000 (17:15 +0000)]
Refactored user_role and controller. Now much more DRY.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 16:48:31 +0000 (16:48 +0000)]
Synced from Translatewiki
Richard Fairhurst [Thu, 1 Oct 2009 16:01:12 +0000 (16:01 +0000)]
compile avar's latest commit
Translatewiki [Thu, 1 Oct 2009 13:42:46 +0000 (13:42 +0000)]
* Localisation updates from translatewiki.net (2009-10-01)
* svn:eol-style native
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 13:41:51 +0000 (13:41 +0000)]
Translatewiki URLs changed. Adjust script to match
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 13:18:45 +0000 (13:18 +0000)]
RichardF forgot to nuke cz.yml in [17664]. Nuking
Richard Fairhurst [Thu, 1 Oct 2009 11:04:00 +0000 (11:04 +0000)]
Potlatch 1.2c
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 10:59:43 +0000 (10:59 +0000)]
The 'more' message used in the history dialog (history.as) was missing
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 10:39:31 +0000 (10:39 +0000)]
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.
Ævar Arnfjörð Bjarmason [Thu, 1 Oct 2009 10:21:12 +0000 (10:21 +0000)]
Fixed message key that was broken due to a broken regex I used during
importing. It had AS message params mixed up with it.
Richard Fairhurst [Wed, 30 Sep 2009 23:54:25 +0000 (23:54 +0000)]
show buildings in pink
Tom Hughes [Wed, 30 Sep 2009 23:47:26 +0000 (23:47 +0000)]
Open up crossdomain policy to allow all headers from everywhere as I can't
find any information anywhere that gives me any idea why we would want to
restrict what headers can be sent.
Tom Hughes [Wed, 30 Sep 2009 23:26:47 +0000 (23:26 +0000)]
Import extra rails translations from http://github.com/svenfuchs/rails-i18n.
Ævar Arnfjörð Bjarmason [Wed, 30 Sep 2009 17:43:17 +0000 (17:43 +0000)]
comment out dupe purging debug message
Ævar Arnfjörð Bjarmason [Wed, 30 Sep 2009 17:43:02 +0000 (17:43 +0000)]
compile error in previous commit
Ævar Arnfjörð Bjarmason [Wed, 30 Sep 2009 17:42:06 +0000 (17:42 +0000)]
--cache option
Matt Amos [Wed, 30 Sep 2009 17:39:42 +0000 (17:39 +0000)]
Added better messages and error handling in a couple of places. Added integration checks to ensure that the blocking is actually working. Tests FTW.
Matt Amos [Wed, 30 Sep 2009 15:44:29 +0000 (15:44 +0000)]
Tried to DRY the user_blocks controller. Moved the configuration of the blocking periods into application.yml.
Ævar Arnfjörð Bjarmason [Wed, 30 Sep 2009 11:04:16 +0000 (11:04 +0000)]
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.
Ævar Arnfjörð Bjarmason [Wed, 30 Sep 2009 10:58:00 +0000 (10:58 +0000)]
Updated from Translatewiki with ''perl script/locale/merge-from-translatewiki''
Tom Hughes [Wed, 30 Sep 2009 08:50:21 +0000 (08:50 +0000)]
Update language list.
Tom Hughes [Wed, 30 Sep 2009 08:49:28 +0000 (08:49 +0000)]
Add script to update config/languages.yml from translatewiki language list.
Tom Hughes [Wed, 30 Sep 2009 08:49:00 +0000 (08:49 +0000)]
Rename reload_languages to reload-languages for consistency.
Translatewiki [Tue, 29 Sep 2009 17:32:01 +0000 (17:32 +0000)]
Remove untranslated parts in he.yml
Matt Amos [Tue, 29 Sep 2009 16:44:03 +0000 (16:44 +0000)]
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.
Tom Hughes [Tue, 29 Sep 2009 16:24:07 +0000 (16:24 +0000)]
Revert r17851 and just give non-local flash clients access to
the X_HTTP_METHOD_OVERRIDE header.
Ævar Arnfjörð Bjarmason [Tue, 29 Sep 2009 16:21:50 +0000 (16:21 +0000)]
Capitalize JavaScript as suggested on http://translatewiki.net/w/i.php?title=Special:Translate&task=review&group=out-osm&language=qqq&limit=2500
Ævar Arnfjörð Bjarmason [Tue, 29 Sep 2009 15:52:08 +0000 (15:52 +0000)]
Merged from Translatewiki with:
{{{
perl script/locale/merge-from-translatewiki
}}}
Andy Allan [Tue, 29 Sep 2009 14:18:33 +0000 (14:18 +0000)]
Merge r17285 from the oauth branch - allow flash access to set headers, even when hosted at non-openstreetmap domains
Ævar Arnfjörð Bjarmason [Tue, 29 Sep 2009 13:28:23 +0000 (13:28 +0000)]
* Reconstruct option
* I hate File::Basename and it hates absolute paths. I'm using my evil hack again
Matt Amos [Tue, 29 Sep 2009 10:23:31 +0000 (10:23 +0000)]
Merging 17824:17845 from trunk to blocking branch.
Ævar Arnfjörð Bjarmason [Tue, 29 Sep 2009 10:12:01 +0000 (10:12 +0000)]
Actually make the last commit work. I thought Ruby's string interpolation syntax worked differently
Ævar Arnfjörð Bjarmason [Tue, 29 Sep 2009 09:23:11 +0000 (09:23 +0000)]
Escape user-supplied JavaScript. Fixes http://lists.openstreetmap.org/pipermail/talk/2009-September/042846.ht
Ævar Arnfjörð Bjarmason [Tue, 29 Sep 2009 09:00:53 +0000 (09:00 +0000)]
--locales-dir is now config/locales by default
Thomas Wood [Tue, 29 Sep 2009 03:58:33 +0000 (03:58 +0000)]
Tests for [17838]
Why is our testing fixtures such a mess? It took me half an hour to find a useable node. And I'm still not sure if it's ok, since I want to get to bed. kthxbye
Thomas Wood [Tue, 29 Sep 2009 02:55:35 +0000 (02:55 +0000)]
5 character patch to only output duplicated nodes once in a way/full call
Unit tests not run - problems on this system
Fixes #2327
Tom Hughes [Mon, 28 Sep 2009 21:34:10 +0000 (21:34 +0000)]
Remove corrupt message from Dutch translation.
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 21:02:47 +0000 (21:02 +0000)]
Importing new messages to existing languages from Translatewiki. See
also [17832].
This commit can be reviewed in a sane manner by looking at
attachment:ticket:2305:first-translatewiki-patch.patch.gz
I've manually gone through it and searched for errors. I didn't find
any.
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 20:52:53 +0000 (20:52 +0000)]
more SYNOPSIS instructions
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 20:50:03 +0000 (20:50 +0000)]
Remove comment saying when these files were generated
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 20:43:48 +0000 (20:43 +0000)]
Actualy having autogenerated timestamps at the top of files which are
under version controll is a pretty lousy idea now that I think of it..
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 20:38:39 +0000 (20:38 +0000)]
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
}}}
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 20:27:50 +0000 (20:27 +0000)]
Report on download progress
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 20:25:19 +0000 (20:25 +0000)]
--only-new option
Don't spew so much debug output
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 20:17:36 +0000 (20:17 +0000)]
* Add more keys from the optional list that we don't want to ignor
* Don't delete a singular form if the plural form exists in the source language (en)
* Don't nuke site.key.table.entry singularls when the source language (en) has an array
Ævar Arnfjörð Bjarmason [Mon, 28 Sep 2009 19:06:34 +0000 (19:06 +0000)]
A hacky in-process script for merging translations from Translatewiki
while working around all the bugs in #2305
Matt Amos [Mon, 28 Sep 2009 17:35:39 +0000 (17:35 +0000)]
Added a confirmation step to the process of granting and revoking user roles.
Matt Amos [Mon, 28 Sep 2009 17:30:10 +0000 (17:30 +0000)]
Truncate long reason texts to not overwhelm the browser window.
Matt Amos [Mon, 28 Sep 2009 16:01:00 +0000 (16:01 +0000)]
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.
Matt Amos [Mon, 28 Sep 2009 15:55:23 +0000 (15:55 +0000)]
Creating branch for blocking feature work.
Jonas Krückel [Sun, 27 Sep 2009 14:15:53 +0000 (14:15 +0000)]
small fix
Tom Hughes [Sat, 26 Sep 2009 22:39:09 +0000 (22:39 +0000)]
Escape language codes before matching them in case they contain
characters with special meaning in a regexp. Closes #2318.
Ævar Arnfjörð Bjarmason [Sat, 26 Sep 2009 20:03:52 +0000 (20:03 +0000)]
Deal with values which are arrays, before and after:
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.
Balló György [Fri, 25 Sep 2009 18:03:58 +0000 (18:03 +0000)]
Updated Hungarian translation of OpenStreetMap website (Hu: -> HU: in wiki links)
Balló György [Fri, 25 Sep 2009 17:46:21 +0000 (17:46 +0000)]
Updated Hungarian translation of OpenStreetMap website
Tom Hughes [Thu, 24 Sep 2009 23:27:45 +0000 (23:27 +0000)]
Fix comment typo.
Tom Hughes [Thu, 24 Sep 2009 23:27:13 +0000 (23:27 +0000)]
Ignore empty tags. Closes #2311.
Tom Hughes [Thu, 24 Sep 2009 23:15:35 +0000 (23:15 +0000)]
Wrap GPX API calls with the API error handler, and make sure the create
method throws on error so it can be trapped and reported. Closes #2310.
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 23:34:43 +0000 (23:34 +0000)]
I moved Potlatch's locales but didn't update this, which broke all i18n
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 20:36:09 +0000 (20:36 +0000)]
Quick hack to add --dump-flat to get a human-readable flat version of the hash
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 18:14:30 +0000 (18:14 +0000)]
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
}}}
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 18:09:00 +0000 (18:09 +0000)]
Removing zh-HANS: Just contained a few messages in English
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 18:08:01 +0000 (18:08 +0000)]
Removed i18n messages which contained English - old crap from the wiki
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 18:03:20 +0000 (18:03 +0000)]
Make the 'Advanced' menu translatable
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 17:36:51 +0000 (17:36 +0000)]
oops, removing debugging code
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 17:29:29 +0000 (17:29 +0000)]
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";
}
}}}
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 17:23:58 +0000 (17:23 +0000)]
Used perl -pi -e 's/^.*?"action_createpoi":/ action_createpoi:/g' *yml
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 17:08:46 +0000 (17:08 +0000)]
[2304]: Split the default English i18n parameter in Potlatch out to a YAML file
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 16:26:17 +0000 (16:26 +0000)]
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";
}
}}}
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 16:05:56 +0000 (16:05 +0000)]
delete localised directory
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 16:05:09 +0000 (16:05 +0000)]
I'm hacking the Potlatch i18n system, moving the old files to the new location before I overwrite them to preserve history
Ævar Arnfjörð Bjarmason [Wed, 23 Sep 2009 15:51:33 +0000 (15:51 +0000)]
Syncing translations from the wiki. Hopefully for the last time :)
Tom Hughes [Tue, 22 Sep 2009 20:15:09 +0000 (20:15 +0000)]
Remove remaining trailing spaces from translations.
Ævar Arnfjörð Bjarmason [Tue, 22 Sep 2009 19:16:34 +0000 (19:16 +0000)]
Use the list form for school instead of the colon
Ævar Arnfjörð Bjarmason [Tue, 22 Sep 2009 12:40:59 +0000 (12:40 +0000)]
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.