Commit graph

2714 commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason
5524765d17 --only-new option
Don't spew so much debug output
2009-09-28 20:25:19 +00:00
Ævar Arnfjörð Bjarmason
134ff60ab7 * 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
2009-09-28 20:17:36 +00:00
Ævar Arnfjörð Bjarmason
1facda11d6 A hacky in-process script for merging translations from Translatewiki
while working around all the bugs in #2305
2009-09-28 19:06:34 +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
ab1444f338 Truncate long reason texts to not overwhelm the browser window. 2009-09-28 17:30:10 +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
Matt Amos
52fa09ecae Creating branch for blocking feature work. 2009-09-28 15:55:23 +00:00
Jonas Krückel
d09d8c3296 small fix 2009-09-27 14:15:53 +00:00
Tom Hughes
f0d3831f12 Escape language codes before matching them in case they contain
characters with special meaning in a regexp. Closes #2318.
2009-09-26 22:39:09 +00:00
Ævar Arnfjörð Bjarmason
088bd1dcb2 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.
2009-09-26 20:03:52 +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
Tom Hughes
b8afd4fbf3 Fix comment typo. 2009-09-24 23:27:45 +00:00
Tom Hughes
77ce1b2809 Ignore empty tags. Closes #2311. 2009-09-24 23:27:13 +00:00
Tom Hughes
2297dc9074 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.
2009-09-24 23:15:35 +00:00
Ævar Arnfjörð Bjarmason
9b7e39dc49 I moved Potlatch's locales but didn't update this, which broke all i18n 2009-09-23 23:34:43 +00:00
Ævar Arnfjörð Bjarmason
2b2e754b3d Quick hack to add --dump-flat to get a human-readable flat version of the hash 2009-09-23 20:36:09 +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
5a76b08868 oops, removing debugging code 2009-09-23 17:36:51 +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
65eec82978 [2304]: Split the default English i18n parameter in Potlatch out to a YAML file 2009-09-23 17:08:46 +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
4462275225 delete localised directory 2009-09-23 16:05:56 +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
Richard Fairhurst
00332614f9 add ability to specify custom background in the query string 2009-09-18 14:11:18 +00:00
Ævar Arnfjörð Bjarmason
658a34714f When displaying objects in /browse/* and in the JavaScript "Data"
feature use the name key corresponding to the user's
locale. E.g. "name:is" for Icelandic.

This will fall back on "name". The interface will be equivalent unless
the user has selected another language than English in the preferences
and objects with localized name:* tags corresponding to the user's
language are being displayed.
2009-09-17 23:36:54 +00:00
Ævar Arnfjörð Bjarmason
619cacba7c "Athugasemd eftir Foo þann fimmtudaginn [...]" is grammatically
incorrect. Use "Athugasemd eftir Foo sett inn fimmtudaginn [...]"
2009-09-17 22:58:10 +00:00
Ævar Arnfjörð Bjarmason
eef5ac2c73 Icelandic day names should be in lower case 2009-09-17 22:49:42 +00:00
Richard Fairhurst
1db51102cd Or maybe this one. #2279. Ugh. 2009-09-17 00:51:45 +00:00
Richard Fairhurst
34fb52dcb7 Localisation 2009-09-17 00:48:55 +00:00
Richard Fairhurst
8c8d1475d5 Potlatch 1.2b 2009-09-17 00:38:20 +00:00
Tom Hughes
6fafe7f309 Display the changeset comment (if any) as part of the description of
any object in the data browser. Closes #2282.
2009-09-15 22:03:09 +00:00
Tom Hughes
cded3db315 Update be locale. Closes #2284. 2009-09-15 20:20:21 +00:00
Tom Hughes
3d06c902f6 Remove scale bar. Closes #1704. 2009-09-15 16:01:50 +00:00
Ævar Arnfjörð Bjarmason
da28349f51 So the way [17620] did it sucked but [17624] broke it unless you
didn't have any changes because .item_count is the number of edits,
not pages.

Using .page_count works though, Whee!
2009-09-14 23:36:21 +00:00
Ævar Arnfjörð Bjarmason
835e12925e auto_link() changeset comments in the global/user/bbox/etc history too
(as well as in changeset detail & atom feeds)
2009-09-14 23:26:36 +00:00
Tom Hughes
00ec185fe7 Update Russian translation. Closes #2281. 2009-09-14 23:22:10 +00:00
Tom Hughes
26bd59a1da Output tags to the feed as raw HTML so that links are not escaped (any
real HTML in the tag has already been escaped). Closes #2264.
2009-09-14 23:17:52 +00:00