From: Matt Amos Date: Thu, 6 Aug 2009 16:24:39 +0000 (+0000) Subject: Merging 16820:16891 from trunk. X-Git-Tag: live~6702^2~4 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/0d5be22cb517ebaaab5eb7af13150bf61e41df56?hp=0a122639c947265ef3b606ef2e56ada234404bc9 Merging 16820:16891 from trunk. --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index aa030ca92..1e87e47c2 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -149,10 +149,10 @@ class AmfController < ApplicationController private - def amf_handle_error(call) + def amf_handle_error(call,rootobj,rootid) yield rescue OSM::APIVersionMismatchError => ex - return [-3, [ex.type.downcase, ex.latest, ex.id]] + return [-3, [rootobj, rootid], [ex.type.downcase, ex.id, ex.latest]] rescue OSM::APIUserChangesetMismatchError => ex return [-2, ex.to_s] rescue OSM::APIBadBoundingBox => ex @@ -163,8 +163,8 @@ class AmfController < ApplicationController return [-2, "An unusual error happened (in #{call}). The server said: #{ex.to_s}"] end - def amf_handle_error_with_timeout(call) - amf_handle_error(call) do + def amf_handle_error_with_timeout(call,rootobj,rootid) + amf_handle_error(call,rootobj,rootid) do Timeout::timeout(APP_CONFIG['api_timeout'], OSM::APITimeoutError) do yield end @@ -175,7 +175,7 @@ class AmfController < ApplicationController # Returns success_code,success_message,changeset id def startchangeset(usertoken, cstags, closeid, closecomment, opennew) - amf_handle_error("'startchangeset'") do + amf_handle_error("'startchangeset'",nil,nil) do user = getuser(usertoken) if !user then return -1,"You are not logged in, so Potlatch can't write any changes to the database." end @@ -253,7 +253,7 @@ class AmfController < ApplicationController # used in any way, rel is any relation which refers to either a way # or node that we're returning. def whichways(xmin, ymin, xmax, ymax) #:doc: - amf_handle_error_with_timeout("'whichways'") do + amf_handle_error_with_timeout("'whichways'",nil,nil) do enlarge = [(xmax-xmin)/8,0.01].min xmin -= enlarge; ymin -= enlarge xmax += enlarge; ymax += enlarge @@ -293,7 +293,7 @@ class AmfController < ApplicationController # with a deleted node only - not POIs or relations). def whichways_deleted(xmin, ymin, xmax, ymax) #:doc: - amf_handle_error_with_timeout("'whichways_deleted'") do + amf_handle_error_with_timeout("'whichways_deleted'",nil,nil) do enlarge = [(xmax-xmin)/8,0.01].min xmin -= enlarge; ymin -= enlarge xmax += enlarge; ymax += enlarge @@ -313,7 +313,7 @@ class AmfController < ApplicationController # Returns the way id, a Potlatch-style array of points, a hash of tags, the version number, and the user ID. def getway(wayid) #:doc: - amf_handle_error_with_timeout("'getway' #{wayid}") do + amf_handle_error_with_timeout("'getway' #{wayid}" ,'way',wayid) do if POTLATCH_USE_SQL then points = sql_get_nodes_in_way(wayid) tags = sql_get_tags_in_way(wayid) @@ -358,7 +358,7 @@ class AmfController < ApplicationController # 5. is this the current, visible version? (boolean) def getway_old(id, timestamp) #:doc: - amf_handle_error_with_timeout("'getway_old' #{id}, #{timestamp}") do + amf_handle_error_with_timeout("'getway_old' #{id}, #{timestamp}", 'way',id) do if timestamp == '' # undelete old_way = OldWay.find(:first, :conditions => ['visible = ? AND id = ?', true, id], :order => 'version DESC') @@ -458,7 +458,7 @@ class AmfController < ApplicationController # Returns array listing GPXs, each one comprising id, name and description. def findgpx(searchterm, usertoken) - amf_handle_error_with_timeout("'findgpx'") do + amf_handle_error_with_timeout("'findgpx'" ,nil,nil) do user = getuser(usertoken) if !uid then return -1,"You must be logged in to search for GPX traces.",[] end @@ -487,7 +487,7 @@ class AmfController < ApplicationController # 5. version. def getrelation(relid) #:doc: - amf_handle_error("'getrelation' #{relid}") do + amf_handle_error("'getrelation' #{relid}" ,'relation',relid) do rel = Relation.find(:first, :conditions => { :id => relid }) return [-4, 'relation', relid, {}, [], nil] if rel.nil? or !rel.visible @@ -523,7 +523,7 @@ class AmfController < ApplicationController # 3. version. def putrelation(renumberednodes, renumberedways, usertoken, changeset_id, version, relid, tags, members, visible) #:doc: - amf_handle_error("'putrelation' #{relid}") do + amf_handle_error("'putrelation' #{relid}" ,'relation',relid) do user = getuser(usertoken) if !user then return -1,"You are not logged in, so the relation could not be saved." end if !tags_ok(tags) then return -1,"One of the tags is invalid. Please pester Adobe to fix Flash on Linux." end @@ -608,7 +608,7 @@ class AmfController < ApplicationController # 6. hash of node versions (node=>version) def putway(renumberednodes, usertoken, changeset_id, wayversion, originalway, pointlist, attributes, nodes, deletednodes) #:doc: - amf_handle_error("'putway' #{originalway}") do + amf_handle_error("'putway' #{originalway}" ,'way',originalway) do # -- Initialise user = getuser(usertoken) @@ -714,7 +714,7 @@ class AmfController < ApplicationController # 4. version. def putpoi(usertoken, changeset_id, version, id, lon, lat, tags, visible) #:doc: - amf_handle_error("'putpoi' #{id}") do + amf_handle_error("'putpoi' #{id}", 'node',id) do user = getuser(usertoken) if !user then return -1,"You are not logged in, so the point could not be saved." end if !tags_ok(tags) then return -1,"One of the tags is invalid. Please pester Adobe to fix Flash on Linux." end @@ -769,7 +769,7 @@ class AmfController < ApplicationController # Returns array of id, long, lat, hash of tags, (current) version. def getpoi(id,timestamp) #:doc: - amf_handle_error("'getpoi' #{id}") do + amf_handle_error("'getpoi' #{id}" ,'node',id) do id = id.to_i n = Node.find(id) v = n.version @@ -796,7 +796,7 @@ class AmfController < ApplicationController # Returns 0 (success), unchanged way id, new way version, new node versions. def deleteway(usertoken, changeset_id, way_id, way_version, deletednodes) #:doc: - amf_handle_error("'deleteway' #{way_id}") do + amf_handle_error("'deleteway' #{way_id}" ,'way',id) do user = getuser(usertoken) unless user then return -1,"You are not logged in, so the way could not be deleted." end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d9bc9e4f1..6dbe9165c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -143,9 +143,12 @@ class ApplicationController < ActionController::Base end def set_locale + response.header['Vary'] = 'Accept-Language' + if @user if !@user.languages.empty? request.user_preferred_languages = @user.languages + response.header['Vary'] = '*' elsif !request.user_preferred_languages.empty? @user.languages = request.user_preferred_languages @user.save diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 4d9c6839e..c67f4abd5 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -282,11 +282,11 @@ class ChangesetController < ApplicationController if bbox conditions = cond_merge conditions, conditions_bbox(bbox) bbox = BoundingBox.from_s(bbox) - bbox_link = "#{bbox.to_s}" + bbox_link = render_to_string :partial => "bbox", :object => bbox end if user - user_link = "#{user.display_name}" + user_link = render_to_string :partial => "user", :object => user end if user and bbox diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb index 416ae28eb..33e0ed3ee 100644 --- a/app/controllers/node_controller.rb +++ b/app/controllers/node_controller.rb @@ -39,7 +39,7 @@ class NodeController < ApplicationController new_node = Node.from_xml(request.raw_post) unless new_node and new_node.id == node.id - raise OSM::BadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") + raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") end node.update_from(new_node, @user) render :text => node.version.to_s, :content_type => "text/plain" @@ -53,7 +53,7 @@ class NodeController < ApplicationController new_node = Node.from_xml(request.raw_post) unless new_node and new_node.id == node.id - raise OSM::BadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") + raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") end node.delete_with_history!(new_node, @user) render :text => node.version.to_s, :content_type => "text/plain" @@ -64,7 +64,7 @@ class NodeController < ApplicationController ids = params['nodes'].split(',').collect { |n| n.to_i } if ids.length == 0 - raise OSM::BadUserInput.new("No nodes were given to search for") + raise OSM::APIBadUserInput.new("No nodes were given to search for") end doc = OSM::API.new.get_xml_doc diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 6f57f4f4a..86b715154 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -112,8 +112,9 @@ class UserController < ApplicationController token = UserToken.find_by_token(params[:token]) if token + @user = token.user + if params[:user] - @user = token.user @user.pass_crypt = params[:user][:pass_crypt] @user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation] @user.active = true diff --git a/app/views/changeset/_bbox.atom.builder b/app/views/changeset/_bbox.atom.builder new file mode 100644 index 000000000..de3b1f112 --- /dev/null +++ b/app/views/changeset/_bbox.atom.builder @@ -0,0 +1 @@ +xml.a(bbox.to_s, :href => url_for(:controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes")) diff --git a/app/views/changeset/_bbox.html.erb b/app/views/changeset/_bbox.html.erb new file mode 100644 index 000000000..f9424befd --- /dev/null +++ b/app/views/changeset/_bbox.html.erb @@ -0,0 +1 @@ +<%= link_to bbox.to_s, :controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes" %> diff --git a/app/views/changeset/_user.atom.builder b/app/views/changeset/_user.atom.builder new file mode 100644 index 000000000..61faea97f --- /dev/null +++ b/app/views/changeset/_user.atom.builder @@ -0,0 +1 @@ +xml.a(user.display_name, :href => url_for(:controller => "user", :action => "view", :display_name => user.display_name)) diff --git a/app/views/changeset/_user.html.erb b/app/views/changeset/_user.html.erb new file mode 100644 index 000000000..0e9507650 --- /dev/null +++ b/app/views/changeset/_user.html.erb @@ -0,0 +1 @@ +<%= link_to user.display_name, :controller => "user", :action => "view", :display_name => user.display_name %> diff --git a/app/views/user/reset_password.html.erb b/app/views/user/reset_password.html.erb index 458a6084c..7d2da5c78 100644 --- a/app/views/user/reset_password.html.erb +++ b/app/views/user/reset_password.html.erb @@ -1,12 +1,12 @@ -

<%= t 'user.reset_password.heading' %>

+

<%= t 'user.reset_password.heading', :user => @user.display_name %>

<%= error_messages_for :user %> <% form_tag do %> <%= hidden_field_tag(:token, params[:token]) %> - - + + diff --git a/config/locales/be.yml b/config/locales/be.yml index c84def63c..5cc277ef4 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -355,7 +355,7 @@ be: video_to_openstreetmap: "уводнае відэа пра OpenStreetMap" more_videos: "Яшчэ больш {{more_videos_link}}." more_videos_here: "відэа тут" - get_reading: 'Пачытайце пра OpenStreetMap на wiki

ці
блогу opengeodata, на якім таксама ёсць подкасты!' + get_reading: 'Пачытайце пра OpenStreetMap на wiki ці блогу opengeodata, на якім таксама ёсць подкасты!' wiki_signup: 'Вы таксама можаце захацець зарэгістравацца на OpenStreetMap wiki.' user_wiki_page: 'Рэкамендуем стварыць старонку карыстальніка на wiki, якая будзе уключаць цэтлікі катэгорый, якія адзначаюць, дзе вы знаходзіцеся, напрыклад [[Category:Users_in_London]].' current_user: 'Спіс бягучых карыстальнікаў па катэгорыях іх геаграфічнага знаходжання даступны на Category:Users_by_geographical_region.' diff --git a/config/locales/de.yml b/config/locales/de.yml index 514c8a4ad..797a7328f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -533,14 +533,6 @@ de: greeting: "Hallo," hopefully_you: "Jemand (hoffentlich du) hat darum gebeten sein Passwort für das OpenStreetMap-Benutzerkonto mit dieser E-Mail-Adresse zurückzusetzen." click_the_link: "Wenn du das bist, klicke bitte auf den Link unten, um dein Passwort zurückzusetzen." - reset_password: - subject: "[OpenStreetMap] Passwort zurückgesetzt" - reset_password_plain: - greeting: "Hallo," - reset: "Dein neues Passwort lautet {{new_password}}" - reset_password_html: - greeting: "Hallo," - reset: "Dein neues Passwort lautet {{new_password}}" message: inbox: title: "Posteingang" diff --git a/config/locales/en.yml b/config/locales/en.yml index 3922c45a6..2cf7a3aa8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -507,7 +507,7 @@ en: video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are {{more_videos_link}}." more_videos_here: "more videos here" - get_reading: 'Get reading about OpenStreetMap on the wiki

or
the opengeodata blog which has podcasts to listen to also!' + get_reading: 'Get reading about OpenStreetMap on the wiki or the opengeodata blog which has podcasts to listen to also!' wiki_signup: 'You may also want to sign up to the OpenStreetMap wiki.' user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as [[Category:Users_in_London]].' current_user: 'A list of current users in categories, based on where in the world they are, is available from Category:Users_by_geographical_region.' @@ -848,12 +848,12 @@ en: title: "Lost password" heading: "Forgotten Password?" email address: "Email Address:" - new password button: "Send me a new password" + new password button: "Reset password" notice email on way: "Sorry you lost it :-( but an email is on its way so you can reset it soon." notice email cannot find: "Couldn't find that email address, sorry." reset_password: title: "Reset password" - heading: "Reset Password" + heading: "Reset Password for {{user}}" password: "Password: " confirm password: "Confirm Password: " reset: "Reset Password" diff --git a/config/locales/es.yml b/config/locales/es.yml index 908173d3a..1d0233f38 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -451,12 +451,6 @@ es: lost_password_html: greeting: "Hola," click_the_link: "Si es usted, por favor pulse el enlace inferior para resetear la contraseña." - reset_password: - subject: "[OpenStreetMap] Reset de contraseña" - reset_password_plain: - greeting: "Hola," - reset_password_html: - greeting: "Hola," message: inbox: title: "Buzón de entrada" diff --git a/config/locales/he.yml b/config/locales/he.yml index ce8c75a72..2aa7182a5 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -348,7 +348,7 @@ he: video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are {{more_videos_link}}." more_videos_here: "more videos here" - get_reading: 'Get reading about OpenStreetMap on the wiki

or
the opengeodata blog which has podcasts to listen to also!' + get_reading: 'Get reading about OpenStreetMap on the wiki or the opengeodata blog which has podcasts to listen to also!' wiki_signup: 'You may also want to sign up to the OpenStreetMap wiki.' user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as [[Category:Users_in_London]].' current_user: 'A list of current users in categories, based on where in the world they are, is available from Category:Users_by_geographical_region.' diff --git a/config/locales/hi.yml b/config/locales/hi.yml index b81c666f5..80e24320b 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -386,7 +386,7 @@ hi: video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are {{more_videos_link}}." more_videos_here: "more videos here" - get_reading: 'Get reading about OpenStreetMap on the wiki

or
the opengeodata blog which has podcasts to listen to also!' + get_reading: 'Get reading about OpenStreetMap on the wiki or the opengeodata blog which has podcasts to listen to also!' wiki_signup: 'You may also want to sign up to the OpenStreetMap wiki.' user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as [[Category:Users_in_London]].' current_user: 'A list of current users in categories, based on where in the world they are, is available from Category:Users_by_geographical_region.' @@ -412,14 +412,6 @@ hi: greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." - reset_password: - subject: "[OpenStreetMap] Password reset" - reset_password_plain: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" - reset_password_html: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" message: inbox: title: "Inbox" diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 7679ac2ca..001cdcf6f 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -523,14 +523,6 @@ hu: greeting: "Szia!" hopefully_you: "Valaki (esetleg Te) kérte, hogy az ehhez az e-mail címhez tartozó openstreetmap.org felhasználói fiók jelszava kerüljön alaphelyzetbe." click_the_link: "Ha ez Te vagy, akkor a jelszó alaphelyzetbe állításához kattints az alábbi hivatkozásra." - reset_password: - subject: "[OpenStreetMap] Jelszó alaphelyzetbe állítása" - reset_password_plain: - greeting: "Szia!" - reset: "Jelszavad alaphelyzetbe lett állítva erre: {{new_password}}" - reset_password_html: - greeting: "Szia!" - reset: "Jelszavad alaphelyzetbe lett állítva erre: {{new_password}}" message: inbox: title: "Beérkezett üzenetek" diff --git a/config/locales/is.yml b/config/locales/is.yml index 2c25a7778..59ae29b88 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -503,7 +503,7 @@ is: video_to_openstreetmap: "kynningarmyndband um OpenStreetMap" more_videos: "Fleiri myndbönd er {{more_videos_link}}." more_videos_here: "hægt að finna hér" - get_reading: 'Þú getur lesið um OpenStreetMap verkefnið á wiki-síðunni okkar

eða
OpenGeoData blogginu þar sem einnig er að finna hljóðvarp.' + get_reading: 'Þú getur lesið um OpenStreetMap verkefnið á wiki-síðunni okkar eða OpenGeoData blogginu þar sem einnig er að finna hljóðvarp.' wiki_signup: 'Kannski viltu einnig skrá þig á wiki-síðuna.' user_wiki_page: 'Það er mælt með því að þú búir ttil notandasíðu á wiki-inu þar sem tengt er í flokk sem gefur til kynna hvar þú ert, t.d. [[Category:Users_in_Iceland]].' current_user: 'Í flokkakerfinu getur þú einnig séð hvar í heiminum OpenStreetMap notendur eru staðsettir.' @@ -529,14 +529,6 @@ is: greeting: "Hæ," hopefully_you: "Einhver (vonandi þú) hefur beðið um að endurstilla lykilorðið á reikningnum með þetta netfang á openstreetmap.org" click_the_link: "Ef þú óskaðir eftir þessari endurstillingu fylgdu tenglinum hér fyrir neðan til að staðfesta breytinguna." - reset_password: - subject: "[OpenStreetMap] Lykilorði breytt" - reset_password_plain: - greeting: "Hæ," - reset: "Lykilorðinu þínu hefur verið breytt í {{new_password}}" - reset_password_html: - greeting: "Hæ," - reset: "Lykilorðinu þínu hefur verið breytt í {{new_password}}" message: inbox: title: "Innhólf" @@ -802,8 +794,12 @@ is: notice email on way: "Nýtt lykilorð er á leiðinni í innhólfið þitt." notice email cannot find: "Þetta netfang fannst ekki." reset_password: - title: "lykilorð endurstillt" - flash changed check mail: "Nýtt lykilorð hefur verið búið til fyrir þig og sent til þín í pósti" + title: "Lykilorð endurstillt" + heading: "Endurstillti lykilorð fyrir notandann {{user}}" + password: "Lykilorð: " + confirm password: "Staðfestu lykilorð: " + reset: "Endurstilla lykilorð" + flash changed: "Lykilorðinu þínu hefur verið breytt" flash token bad: "Þessi leynistrengur fannst ekki, kannski er slóðin röng?" new: title: "Nýskrá" diff --git a/config/locales/it.yml b/config/locales/it.yml index 6d4735c1c..2a7a8275b 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -356,7 +356,7 @@ it: video_to_openstreetmap: "video introduttivo su OpenStreetMap" more_videos: "Ci sono {{more_videos_link}}." more_videos_here: "ulteriori video qui" - get_reading: 'Puoi avere altre informazioni su OpenStreetMap sul wiki

oppure
sul blog opengeodata che mette a disposizione anche alcuni podcast da ascoltare!' + get_reading: 'Puoi avere altre informazioni su OpenStreetMap sul wiki oppure sul blog opengeodata che mette a disposizione anche alcuni podcast da ascoltare!' wiki_signup: 'Ci si può anche iscrivere al wiki di OpenStreetMap.' user_wiki_page: 'E'' consigliato creare una pagina utente sul wiki, che includa delle etichette di categoria che si riferiscano al luogo in si opera, come ad esempio [[Category:Users_in_London]].' current_user: 'Una lista degli utenti attuali nelle categorie, basate sul luogo in cui essi operano, è disponibile su Category:Users_by_geographical_region.' diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 915506a73..e5e2fbdfe 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -450,7 +450,7 @@ ja: video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are {{more_videos_link}}." more_videos_here: "more videos here" - get_reading: 'Get reading about OpenStreetMap on the wiki

or
the opengeodata blog which has podcasts to listen to also!' + get_reading: 'Get reading about OpenStreetMap on the wiki or the opengeodata blog which has podcasts to listen to also!' wiki_signup: 'You may also want to sign up to the OpenStreetMap wiki.' user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as [[Category:Users_in_London]].' current_user: 'A list of current users in categories, based on where in the world they are, is available from Category:Users_by_geographical_region.' @@ -476,14 +476,6 @@ ja: greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." - reset_password: - subject: "[OpenStreetMap] Password reset" - reset_password_plain: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" - reset_password_html: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" message: inbox: title: "受信箱" diff --git a/config/locales/ko.yml b/config/locales/ko.yml index fcb092446..58a5ce343 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -439,7 +439,7 @@ ko: video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are {{more_videos_link}}." more_videos_here: "more videos here" - get_reading: 'Get reading about OpenStreetMap on the wiki

or
the opengeodata blog which has podcasts to listen to also!' + get_reading: 'Get reading about OpenStreetMap on the wiki or the opengeodata blog which has podcasts to listen to also!' wiki_signup: 'You may also want to sign up to the OpenStreetMap wiki.' user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as [[Category:Users_in_London]].' current_user: 'A list of current users in categories, based on where in the world they are, is available from Category:Users_by_geographical_region.' @@ -465,14 +465,6 @@ ko: greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." - reset_password: - subject: "[OpenStreetMap] Password reset" - reset_password_plain: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" - reset_password_html: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" message: inbox: title: "받은 쪽지함" diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 20c0073be..e12ee0437 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -356,7 +356,7 @@ nl: video_to_openstreetmap: "introductievideo over OpenStreetMap bekijken" more_videos: "Er zijn {{more_videos_link}}." more_videos_here: "hier nog meer video's" - get_reading: 'Lees over OpenStreetMap op de wiki

of
de OpenGeoData-blog die ook podcasts aanbiedt!' + get_reading: 'Lees over OpenStreetMap op de wiki of de OpenGeoData-blog die ook podcasts aanbiedt!' wiki_signup: 'Je kunt je ook registreren op de OpenStreetMap-wiki.' user_wiki_page: 'Het is aanbevolen dat je een gebruikerspagina maakt met onder andere categorieën die zeggen waar je bent, zoals [[Category:Users_in_Amsterdam]].' current_user: 'Een lijst van gebruikers, gesorteerd op woonplaats, is te zien op Category:Users_by_geographical_region.' diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 054fd7066..46811b72f 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -370,7 +370,7 @@ pl: video_to_openstreetmap: "wideo-wprowadzenie do OpenStreetMap" more_videos: "Mamy {{more_videos_link}}." more_videos_here: "więcej materiału wideo tutuaj" - get_reading: 'Zacznij czytać o OpenStreetMap na naszej wiki

i
blogu opengeodata który ma nawet podcasty do posłuchania!' + get_reading: 'Zacznij czytać o OpenStreetMap na naszej wiki i blogu opengeodata który ma nawet podcasty do posłuchania!' wiki_signup: 'Załóż sobie konto na wiki projektu OpenStreetMap jeśli chcesz.' user_wiki_page: 'Najlepiej stwórz swoją stronę użytkownika na wiki zawierającą odpowiednie kategorie wskazujące twoją lokalizację, np. [[Category:Users_in_Warszawa]].' current_user: 'Aktualne listy użytkowników według ich położenia na Ziemi znajdziesz na stronie Category:Users_by_geographical_region.' diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 1545b6e1e..c8d881c6d 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -94,7 +94,7 @@ pt-BR: next_tooltip: "Editado posteriormente por {{user}}" all: prev_tooltip: "Conjunto de alterações anterior" - next_tooltip: "Próximo conjunto de alteções" + next_tooltip: "Próximo conjunto de alterações" changeset_details: created_at: "Criado em:" closed_at: "Fechado em:" @@ -116,7 +116,7 @@ pt-BR: edited_at: "Editado em:" edited_by: "Editado por:" version: "Versão:" - in_changeset: "No conjunto de modificações:" + in_changeset: "No conjunto de alterações:" containing_relation: entry: "Relação {{relation_name}}" entry_role: "Relação {{relation_name}} (como {{relation_role}})" @@ -367,9 +367,9 @@ pt-BR: osm_namefinder: '{{types}} de OpenStreetMap Namefinder' geonames: 'Localização do GeoNames' types: - cities: Cidades - towns: Cidades - places: Lugares + cities: "Cidades" + towns: "Cidades" + places: "Lugares" description_osm_namefinder: prefix: "{{distance}} {{direction}} de {{type}} " results: @@ -390,11 +390,11 @@ pt-BR: layouts: project_name: # in - title: OpenStreetMap + title: "OpenStreetMap" # in <h1> - h1: OpenStreetMap + h1: "OpenStreetMap" logo: - alt_text: OpenStreetMap logo + alt_text: "OpenStreetMap logo" welcome_user: "Bem vindo, {{user_link}}" welcome_user_link_tooltip: "Sua Página de usuário" home: "início" @@ -424,7 +424,7 @@ pt-BR: user_diaries_tooltip: "Ver os diários dos usuários" tag_line: "O Wiki de Mapas Livres" intro_1: "OpenStreetMap é um mapa livre e editável do mundo. Ele é feito por pessoas como você." - intro_2: "OpenStreetMap te permite ver, editar e usar dados geográficos de maneira colaborativa de qualquer lugar do mundo." + intro_2: "OpenStreetMap permite visualizar, editar e usar dados geográficos de maneira colaborativa de qualquer lugar do mundo." intro_3: "A hospedagem dos dados do OpenStreetMap é cedida gentilmente por {{ucl}} e {{bytemark}}." intro_3_ucl: "UCL VR Centre" intro_3_bytemark: "bytemark" @@ -439,7 +439,7 @@ pt-BR: news_blog_tooltip: "Blog de notícias sobre o OpenStreetMap, dados geográficos livres, etc." shop: "Produtos" shop_tooltip: "Compre produtos com a marca OpenStreetMap" - shop_url: http://wiki.openstreetmap.org/wiki/Merchandise + shop_url: "http://wiki.openstreetmap.org/wiki/Merchandise" sotm: 'Venha para a OpenStreetMap Conference 2009 (The State of the Map) de 10 a 12 de julho em Amsterdam!' alt_donation: "Faça uma doação" notifier: @@ -507,7 +507,7 @@ pt-BR: video_to_openstreetmap: "vídeo introdutório ao OpenStreetMap" more_videos: "Há também {{more_videos_link}}." more_videos_here: "mais vídeos aqui" - get_reading: 'Continue lendo sobre o OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide"> no wiki</p> ou <a href="http://www.opengeodata.org/">no blog OpenGeoData</a> que tem <a href="http://www.opengeodata.org/?cat=13">podcasts para baixar</a>!' + get_reading: 'Continue lendo sobre o OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide">no wiki</a> ou <a href="http://www.opengeodata.org/">no blog OpenGeoData</a> que tem <a href="http://www.opengeodata.org/?cat=13">podcasts para baixar</a>!' wiki_signup: 'Você pode querer também <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page"> se registrar no wiki do OpenStreetMap</a>.' user_wiki_page: 'É recomendável que você crie sua página no wiki, incluindo etiquetas sobre sua localização, como em <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_Rio_de_Janeiro">[[Category:Users_in_Rio_de_Janeiro]]</a>.' current_user: 'A lista de usuários, baseada em suas localizações no mundo, está disponível em <a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>.' @@ -533,14 +533,6 @@ pt-BR: greeting: "Olá," hopefully_you: "Alguém (possivelmente você) pediu uma nova senha para a conta no openstreetmap.org ligada a este e-mail." click_the_link: "Se esta pessoa é você, por favor clique no link abaixo para receber uma nova senha." - reset_password: - subject: "[OpenStreetMap] Nova senha" - reset_password_plain: - greeting: "Olá," - reset: "Sua nova senha é {{new_password}}" - reset_password_html: - greeting: "Olá," - reset: "Sua nova senha é {{new_password}}" message: inbox: title: "Caixa de Entrada" @@ -593,7 +585,7 @@ pt-BR: to: "Para" back_to_outbox: "Voltar para a caixa de saída" sent_message_summary: - delete_button: "Delete" + delete_button: "Apagar" mark: as_read: "Mensagem marcada como lida" as_unread: "Mensagem marcada como não lida" @@ -605,7 +597,7 @@ pt-BR: js_2: "O OpenStreetMap usa javascript para a navegação dos mapas." js_3: 'Você pode tentar o <a href="http://tah.openstreetmap.org/Browse/">navegador estático Tiles@Home</a> se não for possível ativar o javascript.' permalink: "Link Permanente" - shortlink: "Link Curto" + shortlink: "Atalho" license: notice: "Licenciado sob a {{license_name}} para o {{project_name}} e seus contribuidores." license_name: "Creative Commons de Atribuição-Compartilhamento pela Mesma Licença 2.0" @@ -628,75 +620,75 @@ pt-BR: search: "Buscar" where_am_i: "Onde estou?" submit_text: "Ir" - search_help: "exemplos: 'Belo Horizonte', 'Av. Paulista, São Paulo', 'CB2 5AQ', or 'post offices near Porto Alegre' <a href='http://wiki.openstreetmap.org/wiki/Pt-br:Search'>mais exemplos...</a>" + search_help: "exemplos: 'Brasília', 'Av. Paulista, São Paulo', ou 'hospitals near Belo Horizonte' <a href='http://wiki.openstreetmap.org/wiki/Pt-br:Search'>mais exemplos...</a>" key: - map_key: "Map key" - map_key_tooltip: "Map key para a renderização do mapnik neste nível de zoom" + map_key: "Legenda" + map_key_tooltip: "Legenda para o mapa renderizado neste nível de zoom" table: - heading: "Legenda para z{{zoom_level}}" + heading: "Legenda para o zoom nível {{zoom_level}}" entry: - motorway: "Motorway" - trunk: "Trunk road" - primary: "Primary road" - secondary: "Secondary road" - unclassified: "Unclassified road" - unsurfaced: "Unsurfaced road" - track: "Track" - byway: "Byway" - bridleway: "Bridleway" - cycleway: "Cycleway" - footway: "Footway" - rail: "Railway" - subway: "Subway" + motorway: "Rodovia expressa" + trunk: "Via Expressa" + primary: "Via Primária" + secondary: "Via Secundária" + unclassified: "Via Sem Classificação Administrativa" + unsurfaced: "Via Não Pavimentada" + track: "Trilha" + byway: "Trilha Larga" + bridleway: "Trilha de Montaria" + cycleway: "Ciclovia" + footway: "Passagem para Pedestres" + rail: "Trilhos" + subway: "Trilhos Subterrâneos" tram: - - Light rail - - tram + - Trem metropolitano + - Trem de superfície (bonde) cable: - - Cable car - - chair lift + - Veículo de cabos + - Elevador de Cadeiras runway: - - Airport Runway - - taxiway + - Pista de aterrissagem + - Pista de manobras apron: - - Airport apron - - terminal - admin: "Administrative boundary" - forest: "Forest" - wood: "Wood" - golf: "Golf course" - park: "Park" - resident: "Residential area" - tourist: "Tourist attraction" + - Pista de estacionamento de aviões + - Aeroporto + admin: "Limite Administrativo" + forest: "Floresta" + wood: "Reserva Florestal" + golf: "Campo de Golf" + park: "Parque" + resident: "Área Residencial" + tourist: "Atração Turística" common: - - Common - - meadow - retail: "Retail area" - industrial: "Industrial area" - commercial: "Commercial area" - heathland: "Heathland" + - Área pública + - Vegetação rasteira + retail: "Área Comercial (Lojas)" + industrial: "Área Industrial" + commercial: "Área Commercial (Escritórios)" + heathland: "Área Sem Vegetação" lake: - - Lake - - reservoir - farm: "Farm" - brownfield: "Brownfield site" - cemetery: "Cemetery" - allotments: "Allotments" - pitch: "Sports pitch" - centre: "Sports centre" - reserve: "Nature reserve" - military: "Military area" - school: "School; university" - building: "Significant building" - station: "Railway station" + - Lago + - Represa ou Reservatório de Água + farm: "Fazenda" + brownfield: "Área Livre Pós Demolição" + cemetery: "Cemitério" + allotments: "Terra Arrendada" + pitch: "Campo para Prática de Esportes" + centre: "Centro de Esportes/Ginásio" + reserve: "Reserva Natural" + military: "Área Militar" + school: "Escola/Universidade" + building: "Edificação" + station: "Estação de Trem/Metrô" summit: - - Summit - - peak - tunnel: "Dashed casing = tunnel" - bridge: "Black casing = bridge" - private: "Private access" - permissive: "Permissive access" - destination: "Destination access" - construction: "Roads under construction" + - Monte + - Pico + tunnel: "Túnel (Envoltória Tracejada)" + bridge: "Ponte/Viaduto (Envoltória Sólida)" + private: "Acesso Restrito (Propriedade Privada)" + permissive: "Acesso Permissivo" + destination: "Acesso Local Apenas" + construction: "Vias em Construção" trace: create: upload: "Enviar Trilha GPS" diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 88df00ed3..3eae9ce73 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -495,7 +495,7 @@ ro: video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are {{more_videos_link}}." more_videos_here: "more videos here" - get_reading: 'Get reading about OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide">on the wiki</p> or <a href="http://www.opengeodata.org/">the opengeodata blog</a> which has <a href="http://www.opengeodata.org/?cat=13">podcasts to listen to</a> also!' + get_reading: 'Get reading about OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide">on the wiki</a> or <a href="http://www.opengeodata.org/">the opengeodata blog</a> which has <a href="http://www.opengeodata.org/?cat=13">podcasts to listen to</a> also!' wiki_signup: 'You may also want to <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page">sign up to the OpenStreetMap wiki</a>.' user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_London">[[Category:Users_in_London]]</a>.' current_user: 'A list of current users in categories, based on where in the world they are, is available from <a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>.' @@ -521,14 +521,6 @@ ro: greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." - reset_password: - subject: "[OpenStreetMap] Password reset" - reset_password_plain: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" - reset_password_html: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" message: inbox: title: "Inbox" diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 87d6b88c8..81af04309 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -356,7 +356,7 @@ ru: video_to_openstreetmap: "ознакомительное видео об OpenStreetMap" more_videos: "Посмотрите {{more_videos_link}}." more_videos_here: "больше видео здесь" - get_reading: 'Узнайте больше об OpenStreetMap в <a href="http://wiki.openstreetmap.org/wiki/Ru:Beginners_Guide">Вики</p> или на <a href="http://www.opengeodata.org/">блоге OpenGeoData</a>, в котором еще можно послушать <a href="http://www.opengeodata.org/?cat=13">подкасты</a>!' + get_reading: 'Узнайте больше об OpenStreetMap в <a href="http://wiki.openstreetmap.org/wiki/Ru:Beginners_Guide">Вики</a> или на <a href="http://www.opengeodata.org/">блоге OpenGeoData</a>, в котором еще можно послушать <a href="http://www.opengeodata.org/?cat=13">подкасты</a>!' wiki_signup: 'Вы можете <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Ru:Main_Page">зарегистрироваться на Вики OpenStreetMap</a>.' user_wiki_page: 'Рекомендуется создать свою страницу пользователя, включив в неё тег категории, описывающий ваше местонахождение, например: <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_Moscow">[[Category:Users_in_Moscow]]</a>.' current_user: 'Список пользователей, основанный на их местоположении, доступен здесь: <a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>.' diff --git a/config/locales/sl.yml b/config/locales/sl.yml index ac666f049..db249f264 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -521,7 +521,7 @@ sl: video_to_openstreetmap: "uvodni video posnetek o OpenStreetMap" more_videos: "Ogledate si lahko {{more_videos_link}}." more_videos_here: "še več video posnetkov" - get_reading: 'Preberite si več o OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide">v wiki-ju</p> ali <a href="http://www.opengeodata.org/">na opengeodata blog-u</a> ki vsebuje tudi <a href="http://www.opengeodata.org/?cat=13">zvočne podcast-e</a>!' + get_reading: 'Preberite si več o OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide">v wiki-ju</a> ali <a href="http://www.opengeodata.org/">na opengeodata blog-u</a> ki vsebuje tudi <a href="http://www.opengeodata.org/?cat=13">zvočne podcast-e</a>!' wiki_signup: 'Lahko se <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page">vpišete tudi na wiki projekta OpenStreetMap</a>.' user_wiki_page: 'Priporočljivo je, da si naredite svojo uporabniško wiki stran, ki naj vsebuje oznako kategorije, ki določa vaš položaj, npr <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_Slovenia">[[Category:Users_in_Slovenia]]</a>.' current_user: 'Seznam trenutnih uporabnikov po kategorijah glede na njihov geografski položaj je na voljo v kategoriji <a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>.' @@ -547,14 +547,6 @@ sl: greeting: "Pozdravljeni," hopefully_you: "Nekdo (upamo, da vi) je zahteval ponastavitev gesla openstreetmap.org uporabniškega računa s tem naslovom e-pošte." click_the_link: "Če ste to vi, vas prosimo, da kliknete na spodnjo povezavo za ponastavitev gesla." - reset_password: - subject: "[OpenStreetMap] Ponastavitev gesla" - reset_password_plain: - greeting: "Pozdravljeni," - reset: "Vaše geslo je bilo nastavljeno na {{new_password}}" - reset_password_html: - greeting: "Pozdravljeni," - reset: "Vaše geslo je bilo nastavljeno na {{new_password}}" message: inbox: title: "Prejeta pošta" diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 8f5e8364e..7c39618cb 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -495,7 +495,7 @@ vi: video_to_openstreetmap: "video giới thiệu về OpenStreetMap" more_videos: "Cũng có {{more_videos_link}}." more_videos_here: "thêm video tại đây" - get_reading: 'Bắt đầu tìm hiểu về OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Vi:Beginners%27_Guide?uselang=vi">tại wiki</p> hoặc <a href="http://www.opengeodata.org/">blog OpenGeoData</a>, blog này cũng chứa <a href="http://www.opengeodata.org/?cat=13">podcast để nghe</a>!' + get_reading: 'Bắt đầu tìm hiểu về OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Vi:Beginners%27_Guide?uselang=vi">tại wiki</a> hoặc <a href="http://www.opengeodata.org/">blog OpenGeoData</a>, blog này cũng chứa <a href="http://www.opengeodata.org/?cat=13">podcast để nghe</a>!' wiki_signup: 'Có lẽ bạn cũng muốn <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Vi:Main_Page&uselang=vi">mở tài khoản ở wiki OpenStreetMap</a>.' user_wiki_page: 'Bạn nên tạo ra trang cá nhân trên wiki và gắn các thẻ thể loại để cho người ta biết bạn ở đâu, thí dụ như <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_Hanoi?uselang=vi">[[Category:Users in Hanoi]]</a>.' current_user: 'Có danh sách các người dùng, xếp thể loại theo nơi ở, tại <a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region?uselang=vi">Category:Users by geographical region</a>.' @@ -521,14 +521,6 @@ vi: greeting: "Chào bạn," hopefully_you: "Ai (chắc bạn) đã xin đặt lại mật khẩu của tài khoản openstreetmap.org có địa chỉ thư điện tử này." click_the_link: "Nếu bạn là người đó, xin hãy nhấn chuột vào liên kết ở dưới để đặt lại mật khẩu." - reset_password: - subject: "[OpenStreetMap] Đã đặt lại mật khẩu" - reset_password_plain: - greeting: "Chào bạn," - reset: "Mật khẩu của bạn đã được đặt lại thành {{new_password}}" - reset_password_html: - greeting: "Chào bạn," - reset: "Mật khẩu của bạn đã được đặt lại thành {{new_password}}" message: inbox: title: "Hộp thư" diff --git a/config/locales/yo.yml b/config/locales/yo.yml index b210e3177..9b9fa5354 100644 --- a/config/locales/yo.yml +++ b/config/locales/yo.yml @@ -439,7 +439,7 @@ yo: video_to_openstreetmap: "introductory video to OpenStreetMap" more_videos: "There are {{more_videos_link}}." more_videos_here: "more videos here" - get_reading: 'Get reading about OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide">on the wiki</p> or <a href="http://www.opengeodata.org/">the opengeodata blog</a> which has <a href="http://www.opengeodata.org/?cat=13">podcasts to listen to</a> also!' + get_reading: 'Get reading about OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide">on the wiki</a> or <a href="http://www.opengeodata.org/">the opengeodata blog</a> which has <a href="http://www.opengeodata.org/?cat=13">podcasts to listen to</a> also!' wiki_signup: 'You may also want to <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page">sign up to the OpenStreetMap wiki</a>.' user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_London">[[Category:Users_in_London]]</a>.' current_user: 'A list of current users in categories, based on where in the world they are, is available from <a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>.' @@ -465,14 +465,6 @@ yo: greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." - reset_password: - subject: "[OpenStreetMap] Password reset" - reset_password_plain: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" - reset_password_html: - greeting: "Hi," - reset: "Your password has been reset to {{new_password}}" message: inbox: title: "Inbox" diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 4cca27908..57235218d 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -387,7 +387,7 @@ zh-CN: video_to_openstreetmap: "关于OpenStreetMap的介绍影片" more_videos: "这里{{more_videos_link}}." more_videos_here: "有更多的影片" - get_reading: '开始阅读在wiki上关于OpenStreetMap的信息 <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide"></p> 或 <a href="http://www.opengeodata.org/">在 opengeodata blog</a> 上也有<a href="http://www.opengeodata.org/?cat=13">podcasts 可以倾听</a>!' + get_reading: '开始阅读在wiki上关于OpenStreetMap的信息 <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide"></a> 或 <a href="http://www.opengeodata.org/">在 opengeodata blog</a> 上也有<a href="http://www.opengeodata.org/?cat=13">podcasts 可以倾听</a>!' wiki_signup: '您可能也想要 <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page">注册到 OpenStreetMap wiki</a>.' user_wiki_page: '推荐您创立一个用户wiki网页,它包括分类标签,用来提醒您所在位置,例如 <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_London">[[Category:Users_in_London]]</a>.' current_user: '一个基于其所处位置的,当前用户分类列表可从这里获得<a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>.' diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index f5fa89aef..bcf3d6fd8 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -447,7 +447,7 @@ zh-TW: video_to_openstreetmap: "觀看 OpenStreetMap 的導覽影片" more_videos: "這裡還有更多 {{more_videos_link}}。" more_videos_here: "影片" - get_reading: '在 wiki 中閱讀更多 <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide"></p> 或 <a href="http://www.opengeodata.org/">opengeodata 部落格,</a> 其中也有 <a href="http://www.opengeodata.org/?cat=13">podcasts 可以聽</a>!' + get_reading: '在 wiki 中閱讀更多 <a href="http://wiki.openstreetmap.org/wiki/Beginners%27_Guide"></a> 或 <a href="http://www.opengeodata.org/">opengeodata 部落格,</a> 其中也有 <a href="http://www.opengeodata.org/?cat=13">podcasts 可以聽</a>!' wiki_signup: '您可能也想在 <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page"> OpenStreetMap wiki 註冊</a>。' user_wiki_page: '建議您建立一個使用者 wiki 頁面,其中包含註記您住哪裡的分類標籤,如 <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_London">[[Category:Users_in_London]]</a>。' current_user: '一份目前使用者的清單,以他們在世界上何處為基礎的分類,可在這裡取得:<a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>。' @@ -473,14 +473,6 @@ zh-TW: greeting: "您好," hopefully_you: "有人 (希望是您) 要求重設這個電子郵件位址的 openstreetmap.org 帳號密碼。" click_the_link: "如果這是您,請按下列連結重設您的密碼。" - reset_password: - subject: "[OpenStreetMap] 密碼重設" - reset_password_plain: - greeting: "您好," - reset: "您的密碼已重設為 {{new_password}}" - reset_password_html: - greeting: "您好," - reset: "您的密碼已重設為 {{new_password}}" message: inbox: title: "收件匣" diff --git a/config/potlatch/colours.txt b/config/potlatch/colours.txt index ec1c2de03..e69a5b2cc 100644 --- a/config/potlatch/colours.txt +++ b/config/potlatch/colours.txt @@ -9,7 +9,9 @@ trunk_link 0x7FC97F 1 - primary 0xE46D71 1 - primary_link 0xE46D71 1 - secondary 0xFDBF6F 1 - +secondary_link 0xFDBF6F 1 - tertiary 0xFEFECB 1 - +tertiary_link 0xFEFECB 1 - unclassified 0xE8E8E8 1 - residential 0xE8E8E8 1 - road 0xAAAAAA 1 - diff --git a/config/potlatch/presets.txt b/config/potlatch/presets.txt index 887346a57..8305c49e1 100644 --- a/config/potlatch/presets.txt +++ b/config/potlatch/presets.txt @@ -71,11 +71,11 @@ way/natural coastline: natural=coastline,landuse=,leisure= fell: natural=fell,landuse=,leisure= heath: natural=heath,landuse=,leisure= -lake: natural=water,landuse=,leisure= forest: landuse=forest,natural=,leisure= marsh: natural=marsh,landuse=,leisure= nature reserve: leisure=nature_reserve,landuse=,natural= scree: natural=scree,landuse=,leisure= +water: natural=water,landuse=,leisure= woodland: natural=wood,landuse=,leisure= way/landuse diff --git a/db/migrate/003_sql_session_store_setup.rb b/db/migrate/003_sql_session_store_setup.rb index 4de0dd4b1..daef768b7 100644 --- a/db/migrate/003_sql_session_store_setup.rb +++ b/db/migrate/003_sql_session_store_setup.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class SqlSessionStoreSetup < ActiveRecord::Migration def self.up create_table "sessions", :options => innodb_option do |t| diff --git a/db/migrate/004_user_enhancements.rb b/db/migrate/004_user_enhancements.rb index a6e81d222..1c3bb5007 100644 --- a/db/migrate/004_user_enhancements.rb +++ b/db/migrate/004_user_enhancements.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class UserEnhancements < ActiveRecord::Migration def self.up add_column "diary_entries", "latitude", :double diff --git a/db/migrate/007_add_relations.rb b/db/migrate/007_add_relations.rb index c265fc3ad..cb5410378 100644 --- a/db/migrate/007_add_relations.rb +++ b/db/migrate/007_add_relations.rb @@ -1,17 +1,20 @@ +require 'lib/migrate' + class AddRelations < ActiveRecord::Migration def self.up + # enums work like strings but are more efficient + create_enumeration :nwr_enum, ["Node", "Way", "Relation"] + # a relation can have members much like a way can have nodes. # differences: # way: only nodes / relation: any kind of member # way: ordered sequence of nodes / relation: free-form "role" string create_table "current_relation_members", innodb_table do |t| - t.column "id", :bigint, :limit => 64, :null => false - t.column "member_type", :string, :limit => 11, :null => false - t.column "member_id", :bigint, :limit => 11, :null => false + t.column "id", :bigint, :limit => 64, :null => false + t.column "member_type", :nwr_enum, :null => false + t.column "member_id", :bigint, :limit => 11, :null => false t.column "member_role", :string end - # enums work like strings but are more efficient - alter_column_nwr_enum :current_relation_members, :member_type add_primary_key "current_relation_members", ["id", "member_type", "member_id", "member_role"] add_index "current_relation_members", ["member_type", "member_id"], :name => "current_relation_members_member_idx" @@ -34,14 +37,13 @@ class AddRelations < ActiveRecord::Migration end create_table "relation_members", myisam_table do |t| - t.column "id", :bigint, :limit => 64, :default => 0, :null => false - t.column "member_type", :string, :limit => 11, :null => false - t.column "member_id", :bigint, :limit => 11, :null => false + t.column "id", :bigint, :limit => 64, :default => 0, :null => false + t.column "member_type", :nwr_enum, :null => false + t.column "member_id", :bigint, :limit => 11, :null => false t.column "member_role", :string - t.column "version", :bigint, :limit => 20, :default => 0, :null => false + t.column "version", :bigint, :limit => 20, :default => 0, :null => false end - alter_column_nwr_enum :relation_members, :member_type add_primary_key "relation_members", ["id", "version", "member_type", "member_id", "member_role"] add_index "relation_members", ["member_type", "member_id"], :name => "relation_members_member_idx" @@ -76,5 +78,6 @@ class AddRelations < ActiveRecord::Migration drop_table :current_relation_tags drop_table :relation_members drop_table :current_relation_members + drop_enumeration :nwr_enum end end diff --git a/db/migrate/010_diary_comments.rb b/db/migrate/010_diary_comments.rb index 43019a938..bf7319912 100644 --- a/db/migrate/010_diary_comments.rb +++ b/db/migrate/010_diary_comments.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class DiaryComments < ActiveRecord::Migration def self.up create_table "diary_comments", myisam_table do |t| diff --git a/db/migrate/018_create_acls.rb b/db/migrate/018_create_acls.rb index 5205b99b0..d82020892 100644 --- a/db/migrate/018_create_acls.rb +++ b/db/migrate/018_create_acls.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class CreateAcls < ActiveRecord::Migration def self.up create_table "acls", myisam_table do |t| diff --git a/db/migrate/020_populate_node_tags_and_remove.rb b/db/migrate/020_populate_node_tags_and_remove.rb index dc048f190..7d0791189 100644 --- a/db/migrate/020_populate_node_tags_and_remove.rb +++ b/db/migrate/020_populate_node_tags_and_remove.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class PopulateNodeTagsAndRemove < ActiveRecord::Migration def self.up have_nodes = select_value("SELECT count(*) FROM current_nodes").to_i != 0 diff --git a/db/migrate/021_move_to_innodb.rb b/db/migrate/021_move_to_innodb.rb index da0488ca5..8312dec2c 100644 --- a/db/migrate/021_move_to_innodb.rb +++ b/db/migrate/021_move_to_innodb.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class MoveToInnodb < ActiveRecord::Migration @@conv_tables = ['nodes', 'ways', 'way_tags', 'way_nodes', 'current_way_tags', 'relation_members', diff --git a/db/migrate/024_order_relation_members.rb b/db/migrate/024_order_relation_members.rb index 5500edfcf..76ec32222 100644 --- a/db/migrate/024_order_relation_members.rb +++ b/db/migrate/024_order_relation_members.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class OrderRelationMembers < ActiveRecord::Migration def self.up # add sequence column. rails won't let us define an ordering here, diff --git a/db/migrate/025_add_end_time_to_changesets.rb b/db/migrate/025_add_end_time_to_changesets.rb index 4941b72b9..20d66719d 100644 --- a/db/migrate/025_add_end_time_to_changesets.rb +++ b/db/migrate/025_add_end_time_to_changesets.rb @@ -1,3 +1,5 @@ +require 'lib/migrate' + class AddEndTimeToChangesets < ActiveRecord::Migration def self.up # swap the boolean closed-or-not for a time when the changeset will diff --git a/lib/migrate.rb b/lib/migrate.rb index 50ba6321d..81cdd4d05 100644 --- a/lib/migrate.rb +++ b/lib/migrate.rb @@ -59,6 +59,11 @@ module ActiveRecord types[:bigint_auto_20] = { :name => "bigint(20) DEFAULT NULL auto_increment" } types[:four_byte_unsigned] = { :name=> "integer unsigned" } types[:inet] = { :name=> "integer unsigned" } + + enumerations.each do |e,v| + types[e.to_sym]= { :name => "enum('#{v.join '\',\''}')" } + end + types end @@ -96,8 +101,16 @@ module ActiveRecord execute "CREATE FULLTEXT INDEX `#{table_name}_#{column}_idx` ON `#{table_name}` (`#{column}`)" end - def alter_column_nwr_enum (table_name, column) - execute "alter table #{table_name} change column #{column} #{column} enum('Node','Way','Relation');" + def enumerations + @enumerations ||= Hash.new + end + + def create_enumeration (enumeration_name, values) + enumerations[enumeration_name] = values + end + + def drop_enumeration (enumeration_name) + enumerations.delete(enumeration_name) end def alter_primary_key(table_name, new_columns) @@ -125,6 +138,11 @@ module ActiveRecord types[:bigint_auto_20] = { :name => "bigint" } #fixme: need autoincrement? types[:four_byte_unsigned] = { :name => "bigint" } # meh types[:inet] = { :name=> "inet" } + + enumerations.each_key do |e| + types[e.to_sym]= { :name => e } + end + types end @@ -147,13 +165,18 @@ module ActiveRecord execute "CREATE INDEX #{table_name}_#{column}_idx on #{table_name} (#{column})" end - def alter_column_nwr_enum (table_name, column) - response = select_one("select count(*) as count from pg_type where typname = 'nwr_enum'") - if response['count'] == "0" #yep, as a string - execute "create type nwr_enum as ENUM ('Node', 'Way', 'Relation')" - end - execute "alter table #{table_name} drop #{column}" - execute "alter table #{table_name} add #{column} nwr_enum" + def enumerations + @enumerations ||= Hash.new + end + + def create_enumeration (enumeration_name, values) + enumerations[enumeration_name] = values + execute "create type #{enumeration_name} as enum ('#{values.join '\',\''}')" + end + + def drop_enumeration (enumeration_name) + execute "drop type #{enumeration_name}" + enumerations.delete(enumeration_name) end def alter_primary_key(table_name, new_columns) diff --git a/public/potlatch/potlatch.swf b/public/potlatch/potlatch.swf index ccfc064bc..74e021a6f 100644 Binary files a/public/potlatch/potlatch.swf and b/public/potlatch/potlatch.swf differ diff --git a/test/functional/node_controller_test.rb b/test/functional/node_controller_test.rb index 42311c38f..0595f3d08 100644 --- a/test/functional/node_controller_test.rb +++ b/test/functional/node_controller_test.rb @@ -178,6 +178,12 @@ class NodeControllerTest < ActionController::TestCase delete :delete, :id => current_nodes(:visible_node).id assert_response :conflict + # try to delete a node with a different ID + content(nodes(:public_visible_node).to_xml) + delete :delete, :id => current_nodes(:visible_node).id + assert_response :bad_request, + "should not be able to delete a node with a different ID from the XML" + # valid delete now takes a payload content(nodes(:public_visible_node).to_xml) delete :delete, :id => current_nodes(:public_visible_node).id @@ -271,9 +277,6 @@ class NodeControllerTest < ActionController::TestCase content current_nodes(:visible_node).to_xml put :update, :id => current_nodes(:visible_node).id assert_require_public_data "should have failed with a forbidden when data isn't public" - - - ## Finally test with the public user @@ -344,6 +347,12 @@ class NodeControllerTest < ActionController::TestCase assert_response :conflict, "should not be able to put 'p1r4at3s!' in the version field" + ## try an update with the wrong ID + content current_nodes(:public_visible_node).to_xml + put :update, :id => current_nodes(:visible_node).id + assert_response :bad_request, + "should not be able to update a node with a different ID from the XML" + ## finally, produce a good request which should work content current_nodes(:public_visible_node).to_xml put :update, :id => current_nodes(:public_visible_node).id
<%= t 'user.reset_password.password' %><%= password_field(:user, :pass_crypt,{:size => 30, :maxlength => 255, :tabindex => 4}) %>
<%= t 'user.reset_password.confirm password' %><%= password_field(:user, :pass_crypt_confirmation,{:size => 30, :maxlength => 255, :tabindex => 5}) %>
<%= t 'user.reset_password.password' %><%= password_field(:user, :pass_crypt, {:value => '', :size => 30, :maxlength => 255, :tabindex => 4}) %>
<%= t 'user.reset_password.confirm password' %><%= password_field(:user, :pass_crypt_confirmation, {:value => '', :size => 30, :maxlength => 255, :tabindex => 5}) %>