From: Mikel Maron Date: Wed, 12 Oct 2016 14:52:05 +0000 (-0400) Subject: merge upstream/master and resolve conflicts from https://github.com/openstreetmap... X-Git-Tag: live~4275^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/be40536440b8677323bcf30bc2b869e36f907dd9?hp=3a14abde1beae0438d043f536b8417ea92dc2eb7 merge upstream/master and resolve conflicts from https://github.com/openstreetmap/openstreetmap-website/pull/1318 --- diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index fdc0e9d24..bf9f2a9a2 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -28,7 +28,7 @@ class DiaryEntryController < ApplicationController # Subscribe user to diary comments @diary_entry.subscriptions.create(:user => @user) - redirect_to :controller => "diary_entry", :action => "list", :display_name => @user.display_name + redirect_to :action => "list", :display_name => @user.display_name else render :action => "edit" end @@ -46,9 +46,9 @@ class DiaryEntryController < ApplicationController @diary_entry = DiaryEntry.find(params[:id]) if @user != @diary_entry.user - redirect_to :controller => "diary_entry", :action => "view", :id => params[:id] + redirect_to :action => "view", :id => params[:id] elsif params[:diary_entry] && @diary_entry.update_attributes(entry_params) - redirect_to :controller => "diary_entry", :action => "view", :id => params[:id] + redirect_to :action => "view", :id => params[:id] end set_map_location @@ -72,7 +72,7 @@ class DiaryEntryController < ApplicationController # Add the commenter to the subscribers if necessary @entry.subscriptions.create(:user => @user) unless @entry.subscribers.exists?(@user.id) - redirect_to :controller => "diary_entry", :action => "view", :display_name => @entry.user.display_name, :id => @entry.id + redirect_to :action => "view", :display_name => @entry.user.display_name, :id => @entry.id else render :action => "view" end @@ -85,7 +85,7 @@ class DiaryEntryController < ApplicationController diary_entry.subscriptions.create(:user => @user) unless diary_entry.subscribers.exists?(@user.id) - redirect_to :controller => "diary_entry", :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id + redirect_to :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id rescue ActiveRecord::RecordNotFound render :action => "no_such_entry", :status => :not_found end @@ -95,7 +95,7 @@ class DiaryEntryController < ApplicationController diary_entry.subscriptions.where(:user => @user).delete_all if diary_entry.subscribers.exists?(@user.id) - redirect_to :controller => "diary_entry", :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id + redirect_to :action => "view", :display_name => diary_entry.user.display_name, :id => diary_entry.id rescue ActiveRecord::RecordNotFound render :action => "no_such_entry", :status => :not_found end @@ -232,7 +232,7 @@ class DiaryEntryController < ApplicationController def require_administrator unless @user.administrator? flash[:error] = t("user.filter.not_an_administrator") - redirect_to :controller => "diary_entry", :action => "view" + redirect_to :action => "view" end end diff --git a/app/controllers/message_controller.rb b/app/controllers/message_controller.rb index a22802e63..97e892156 100644 --- a/app/controllers/message_controller.rb +++ b/app/controllers/message_controller.rb @@ -25,7 +25,7 @@ class MessageController < ApplicationController if @message.save flash[:notice] = t "message.new.message_sent" Notifier.message_notification(@message).deliver_now - redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name + redirect_to :action => "inbox", :display_name => @user.display_name end end end @@ -81,7 +81,7 @@ class MessageController < ApplicationController @title = t "message.inbox.title" if @user && params[:display_name] == @user.display_name else - redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name + redirect_to :action => "inbox", :display_name => @user.display_name end end @@ -90,7 +90,7 @@ class MessageController < ApplicationController @title = t "message.outbox.title" if @user && params[:display_name] == @user.display_name else - redirect_to :controller => "message", :action => "outbox", :display_name => @user.display_name + redirect_to :action => "outbox", :display_name => @user.display_name end end @@ -107,7 +107,7 @@ class MessageController < ApplicationController @message.message_read = message_read if @message.save && !request.xhr? flash[:notice] = notice - redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name + redirect_to :action => "inbox", :display_name => @user.display_name end rescue ActiveRecord::RecordNotFound @title = t "message.no_such_message.title" @@ -125,7 +125,7 @@ class MessageController < ApplicationController if params[:referer] redirect_to params[:referer] else - redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name + redirect_to :action => "inbox", :display_name => @user.display_name end end rescue ActiveRecord::RecordNotFound diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 51ef4491d..1366038f0 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -316,7 +316,7 @@ class NotesController < ApplicationController end ## - # Generate a condition to choose which bugs we want based + # Generate a condition to choose which notes we want based # on their status and the user's request parameters def closed_condition(notes) closed_since = if params[:closed] diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 60b5a4585..b7c9ccd70 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -95,11 +95,11 @@ class TraceController < ApplicationController @title = t "trace.view.title", :name => @trace.name else flash[:error] = t "trace.view.trace_not_found" - redirect_to :controller => "trace", :action => "list" + redirect_to :action => "list" end rescue ActiveRecord::RecordNotFound flash[:error] = t "trace.view.trace_not_found" - redirect_to :controller => "trace", :action => "list" + redirect_to :action => "list" end def create diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index d250cf21c..e49b01ebe 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -142,7 +142,7 @@ class UserController < ApplicationController @user.data_public = true @user.save flash[:notice] = t "user.go_public.flash success" - redirect_to :controller => "user", :action => "account", :display_name => @user.display_name + redirect_to :action => "account", :display_name => @user.display_name end def lost_password @@ -423,7 +423,7 @@ class UserController < ApplicationController if params[:referer] redirect_to params[:referer] else - redirect_to :controller => "user", :action => "view" + redirect_to :action => "view" end end else @@ -446,7 +446,7 @@ class UserController < ApplicationController if params[:referer] redirect_to params[:referer] else - redirect_to :controller => "user", :action => "view" + redirect_to :action => "view" end end else @@ -459,14 +459,14 @@ class UserController < ApplicationController def set_status @this_user.status = params[:status] @this_user.save - redirect_to :controller => "user", :action => "view", :display_name => params[:display_name] + redirect_to :action => "view", :display_name => params[:display_name] end ## # delete a user, marking them as deleted and removing personal data def delete @this_user.delete - redirect_to :controller => "user", :action => "view", :display_name => params[:display_name] + redirect_to :action => "view", :display_name => params[:display_name] end ## @@ -628,7 +628,7 @@ class UserController < ApplicationController # - If they were referred to the login, send them back there. # - Otherwise, send them to the home page. if REQUIRE_TERMS_SEEN && !user.terms_seen - redirect_to :controller => :user, :action => :terms, :referer => target + redirect_to :action => :terms, :referer => target elsif user.blocked_on_view redirect_to user.blocked_on_view, :referer => target else @@ -740,12 +740,12 @@ class UserController < ApplicationController flash[:error] = t("user.filter.not_an_administrator") if params[:display_name] - redirect_to :controller => "user", :action => "view", :display_name => params[:display_name] + redirect_to :action => "view", :display_name => params[:display_name] else - redirect_to :controller => "user", :action => "login", :referer => request.fullpath + redirect_to :action => "login", :referer => request.fullpath end elsif !@user - redirect_to :controller => "user", :action => "login", :referer => request.fullpath + redirect_to :action => "login", :referer => request.fullpath end end @@ -768,7 +768,7 @@ class UserController < ApplicationController def lookup_user_by_name @this_user = User.find_by_display_name(params[:display_name]) rescue ActiveRecord::RecordNotFound - redirect_to :controller => "user", :action => "view", :display_name => params[:display_name] unless @this_user + redirect_to :action => "view", :display_name => params[:display_name] unless @this_user end ## diff --git a/config/locales/bn.yml b/config/locales/bn.yml index 7bfe40f81..aee9198c0 100644 --- a/config/locales/bn.yml +++ b/config/locales/bn.yml @@ -24,7 +24,7 @@ bn: changeset_tag: পরিবর্তনধার্য ট্যাগ country: দেশ diary_comment: ডাইরি মন্তব্য - diary_entry: ডাইরি এন্ট্রি + diary_entry: ডাইরি ভুক্তি friend: বন্ধু language: ভাষা message: বার্তা @@ -50,14 +50,14 @@ bn: user_preference: ব্যবহারকারীর পছন্দ user_token: ব্যবহারকারী টোকেন way: রাস্তা - way_node: ওয়ে নোড - way_tag: ওয়ে ট্যাগ + way_node: রাস্তার নোড + way_tag: রাস্তার ট্যাগ attributes: diary_comment: - body: বডি + body: মূলাংশ diary_entry: user: ব্যবহারকারী - title: শিরোনাম + title: বিষয় latitude: অক্ষাংশ longitude: দ্রাঘিমাংশ language: ভাষা @@ -105,8 +105,8 @@ bn: closed_html: %{time} আগে বন্ধ created_by_html: '%{user} কর্তৃক %{time} আগে তৈরি' deleted_by_html: '%{user} কর্তৃক %{time}আগে অপসারণ' - edited_by_html: '%{user} কর্তৃক %{time}আগে সম্পাদিত' - closed_by_html: '%{user} কর্তৃক %{time}আগে বন্ধ' + edited_by_html: '%{user} কর্তৃক %{time} আগে সম্পাদিত' + closed_by_html: '%{user} কর্তৃক %{time} আগে বন্ধ' version: সংস্করণ in_changeset: পরিবর্তনসমূহ anonymous: নামহীন @@ -126,9 +126,9 @@ bn: relation: সম্পর্ক (%{count}টি) relation_paginated: সম্পর্ক (%{count}টির %{x}-%{y}) comment: মন্তব্য (%{count}টি) - hidden_commented_by: '%{user} থেকে মন্তব্য লুকান %{when} - আগে' - commented_by: '%{user} থেকে মন্তব্য %{when} আগে' + hidden_commented_by: '%{user} থেকে %{when} আগের + মন্তব্য লুকান' + commented_by: %{when} আগে %{user} থেকে মন্তব্য changesetxml: পরিবর্তনধার্য এক্সএমএল osmchangexml: osmChange এক্সএমএল feed: @@ -175,8 +175,8 @@ bn: note: টীকা redacted: redaction: সম্পর্ক %{id} - message_html: কোনও কারণে %{type}-এর %{version} সংস্করণটি দেখানো যাবেনা। বিস্তারিত - জানতে %{redaction_link} লিংকটি দেখুন। + message_html: কোনও কারণে %{type}-এর %{version} সংস্করণটি দেখানো যাবে না। বিস্তারিত + জানতে %{redaction_link} দেখুন। type: node: সংযোগস্থল way: দিক @@ -198,16 +198,16 @@ bn: title: টীকা:%{id} new_note: নতুন টীকা description: 'বর্ণনা:' - open_title: অসমাধিত টীকা %{note_name} - closed_title: সমাধান করা টীকা#%{note_name} - hidden_title: লুকানো টীকা#%{note_name} + open_title: 'অমীমাংসিত টীকা #%{note_name}' + closed_title: 'মীমাংসিত টীকা #%{note_name}' + hidden_title: 'লুকানো টীকা #%{note_name}' open_by: '%{user} কর্তৃক %{when} আগে তৈরি' open_by_anonymous: বেনামী ব্যবহারকারী কর্তৃক %{when} আগে তৈরি - commented_by: '%{user} কর্তৃক %{when} আগে - দেয়া মন্তব্য' - commented_by_anonymous: বেনামী ব্যবহারকারী কর্তৃক %{when} - আগে দেয়া মন্তব্য + commented_by: '%{user} কর্তৃক করা %{when} আগের + মন্তব্য' + commented_by_anonymous: বেনামি ব্যবহারকারী কর্তৃক করা %{when} + আগের মন্তব্য closed_by: '%{user} কর্তৃক %{when} আগে মীমাংসিত' closed_by_anonymous: বেনামি ব্যবহারকারী দ্বারা %{when} @@ -224,7 +224,7 @@ bn: enclosing: আবদ্ধ বৈশিষ্ট্য changeset: changeset_paging_nav: - showing_page: '%{page} পাতা' + showing_page: '%{page}টি পাতা' next: পরবর্তী » previous: « পূর্ববর্তী changeset: @@ -351,7 +351,7 @@ bn: advice: 'যদি উপরের রপ্তানি ব্যর্থ হয়, দয়া করে নীচে তালিকাভুক্ত উৎসের কোন একটি ব্যবহারের জন্য বিবেচনা করুন:' planet: - title: ওএসএল জগৎ + title: ওএসএম জগৎ description: সম্পূর্ণ ওপেনস্ট্রীটম্যাপ ডাটাবেসের নিয়মিত হালনাগাদের অনুলিপি overpass: title: ওভারপাস API @@ -361,7 +361,7 @@ bn: title: অন্যান্য উৎস description: ওপেনস্ট্রীটম্যাপ উইকিতে তালিকাভুক্ত অতিরিক্ত সূত্র options: বিকল্প - format: 'ফরম্যাট:' + format: বিন্যাস scale: স্কেল max: সর্বোচ্চ image_size: চিত্রের আকার @@ -442,10 +442,10 @@ bn: gambling: জুয়াখেলার আড্ডা grave_yard: কবরস্থান gym: ব্যায়াম কেন্দ্র / জিমখানা - health_centre: স্বাস্থ কেন্দ্র + health_centre: স্বাস্থকেন্দ্র hospital: হাসপাতাল hunting_stand: শিকারশালা - ice_cream: আইস ক্রিম + ice_cream: আইসক্রিম kindergarten: শিশুবিদ্যালয় library: পাঠাগার market: বাজার @@ -584,7 +584,7 @@ bn: farmland: কৃষিজমি forest: অরণ্য garages: গ্যারেজ - grass: ঘস + grass: ঘাস greenfield: তৃণভূমি industrial: শিল্পাঞ্চল meadow: তৃণভূমি @@ -719,7 +719,7 @@ bn: preserved: সংরক্ষিত রেলপথ proposed: প্রস্তাবিত রেলপথ station: রেল স্টেশন - stop: রেল স্টপ + stop: রেল থামার স্থান subway: ভূগর্ভস্থ পথ subway_entrance: ভূগর্ভস্থ পথের প্রবেশিকা tram: ট্রামপথ @@ -757,7 +757,7 @@ bn: general: সাধারণ দোকান gift: উপহারের দোকান greengrocer: সবজিওয়ালা - grocery: মুদির দোকান + grocery: মুদি দোকান hairdresser: নাপিত hardware: যন্ত্রাংশের দোকান hifi: হাই-ফাই @@ -773,7 +773,7 @@ bn: optician: চশমা বিক্রেতা organic: জৈব খাদ্যের দোকান pharmacy: ঔষধালয় - photo: ফটোশপ + photo: ছবির দোকান salon: সালোন second_hand: পুরনো-সামগ্রীর দোকান shoes: জুতোর দোকান @@ -811,13 +811,14 @@ bn: lock_gate: ফটক বন্ধ mooring: নঙ্গরাবদ্ধকরণ river: নদী + wadi: ওয়াদি waterfall: জলপ্রপাত "yes": জলপথ admin_levels: level2: রাষ্ট্রের সীমানা level4: রাজ্যের সীমানা level5: অঞ্চলের সীমানা - level6: প্রদসের সীমানা + level6: প্রদেশের সীমানা level8: নগরের সীমান level9: গ্রামের সীমানা level10: উপনগরের সীমানা @@ -922,9 +923,9 @@ bn: notifier: diary_comment_notification: subject: '[OpenStreetMap] %{user} আপনার দিনলিপি ভুক্তিতে মন্তব্য করেছেন' - hi: হাই %{to_user} + hi: হাই %{to_user}, message_notification: - hi: হাই %{to_user} + hi: হাই %{to_user}, friend_notification: had_added_you: '%{user} আপনাকে ওপেনস্ট্রীটম্যাপে বন্ধু হিসেবে যোগ করেছেন।' see_their_profile: আপনি %{userurl}-এ তাদের প্রোফাইল দেখতে পারেন। @@ -968,6 +969,11 @@ bn: outbox: আউটবক্স subject: বিষয় date: তারিখ + people_mapping_nearby: কাছাকাছি অবদানকারী + message_summary: + unread_button: অপঠিত হিসেবে চিহ্নিত করুন + read_button: পঠিত হিসেবে চিহ্নিত করুন + reply_button: প্রত্যুত্তর site: key: table: @@ -1137,7 +1143,7 @@ bn: destination_without_exit: গন্তব্যে পৌঁছানো against_oneway_without_exit: '%{name}-এ একমুখীর বিরুদ্ধে যান' end_oneway_without_exit: '%{name}-এর একমুখী শেষ' - unnamed: বেনামি সড়ক + unnamed: নামহীন সড়ক time: সময় query: node: সংযোগস্থল diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 791cca0bd..5486084fe 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -9,6 +9,7 @@ # Author: Chase me ladies, I'm the Cavalry # Author: E THP # Author: EdLoach +# Author: Eduard Popov # Author: Jagwar # Author: Kosovastar # Author: Macofe @@ -2389,7 +2390,7 @@ en-GB: turn_left_without_exit: Turn left onto %{name} offramp_left_without_exit: Take the sliproad on the left onto %{name} onramp_left_without_exit: Turn left on the sliproad onto %{name} - endofroad_left_without_exit: At the end of the road turn left onto %{name} + endofroad_left_without_exit: В конце дороги поверните налево на %{name} merge_left_without_exit: Merge left onto %{name} fork_left_without_exit: At the fork turn left onto %{name} slight_left_without_exit: Slight left onto %{name} diff --git a/config/locales/en.yml b/config/locales/en.yml index 23307bdc5..6403087ef 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2191,7 +2191,7 @@ en: key: title: "Map Key" tooltip: "Map Key" - tooltip_disabled: "Map Key available only for Standard layer" + tooltip_disabled: "Map Key not available for this layer" map: zoom: in: Zoom In diff --git a/config/locales/eo.yml b/config/locales/eo.yml index d92c3bcc3..3018512ee 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -94,13 +94,13 @@ eo: default: Implicita (nune %{name}) potlatch: name: Potlatch 1 - description: Potlatch 1 (en-retumila redaktilo) + description: Potlatch 1 (en-foliumila redaktilo) id: name: iD - description: iD (en-retumila redaktilo) + description: iD (en-foliumila redaktilo) potlatch2: name: Potlatch 2 - description: Potlatch 2 (en-retumila redaktilo) + description: Potlatch 2 (en-foliumila redaktilo) remote: name: ekstera redaktilo description: ekstera redaktilo (JOSM aÅ­ Merkaartor) @@ -121,7 +121,7 @@ eo: download_xml: Elŝuti XML-on view_history: Vidi historion view_details: Montri detalojn - location: 'Loko:' + location: 'Pozicio:' changeset: title: 'Ŝanĝaro: %{id}' belongs_to: AÅ­toro @@ -191,7 +191,7 @@ eo: way: linio relation: rilato start_rjs: - feature_warning: Ŝarĝanta %{num_features} eblojn, kiuj eblas igi vian retumilon + feature_warning: Ŝarĝanta %{num_features} eblojn, kiuj eblas igi vian foliumilon malrapida aÅ­ nerespondebla. Ĉu vi certe volas montri tiujn ĉi datumojn? load_data: Elŝuti datumojn loading: Ŝargante... @@ -743,9 +743,9 @@ eo: airport: Flughaveno city: Urbego country: Lando - county: Provinco + county: Distrikto farm: Farmobieno - hamlet: Vilaĝego + hamlet: Vilaĝeto house: Domo houses: Domoj island: Insulo @@ -754,13 +754,13 @@ eo: locality: Ejo moor: Arbustetaro municipality: Municipo - neighbourhood: Kvartaleto + neighbourhood: Najbaraĵo postcode: Poŝtkodo region: Regiono sea: Maro - state: Subŝtato + state: Provinco subdivision: Kvartalo - suburb: Kvartalego + suburb: Suburbo town: Urbo unincorporated_area: Ekstermunicipa tereno village: Vilaĝo @@ -909,13 +909,13 @@ eo: weir: Riversojlo "yes": Akvovojo admin_levels: - level2: Limo de lando - level4: Limo de subŝtato - level5: Limo de regiono - level6: Limo de provinco - level8: Limo de urbo - level9: Limo de distrikto - level10: Limo de kvartalego + level2: Limo de lando (niv.2) + level4: Limo de provinco (niv.4) + level5: Limo de regiono (niv.5) + level6: Limo de distrikto (niv.6) + level8: Limo de urbo (niv.8) + level9: Limo de kvartalo (niv.9) + level10: Limo de subkvartalo (niv.10) description: title: osm_nominatim: Loko el OpenStreetMap @@ -998,7 +998,7 @@ eo: href="http://osmfoundation.org/">OpenStreetMap Foundation (OSMF). intro_2_html: Vi rajtas kopii, disdoni, transdoni kaj modifi niajn datumojn, nur se vi atribuos aÅ­torecon al OpenStreetMap kaj ĝiaj kontribuintoj. Se vi - modifos aÅ­ uzos niajn datumojn, vi devos distribui la verkon sub la sama permesilo. + modifos aÅ­ uzos niajn datumojn, vi povos distribui la verkon sub la sama permesilo. La plena interkonsento de uzado eksplikas viajn rajtojn kaj devojn. intro_3_html: |- @@ -1006,45 +1006,338 @@ eo: Commons Atribuite-Samkondiĉe 2.0 (CC BY-SA). credit_title_html: Kiel atribui aÅ­torecon credit_1_html: 'Ni postulas, ke vi markos: “© Kontribuintoj de OpenStreetMap”.' + credit_2_html: Vi ankaÅ­ devas klarigi, ke datumoj estas disponeblaj sub la permesilo + Open Database License, kaj kartografio de map-kaheloj sub la permesilo CC + BY-SA. Vi povas indiki tion per fari ligilon al tiu + ĉi paĝo pri permesilo. Alimaniere, se vi distribuas OSM en datuma formo, + vi povas mencii nomo(j)n kaj ligilo(j)n al la permesilo(j). Se ne estas eble + meti ligilojn (ekz. en paperaj mapoj), ni sugestas direkti viajn legantojn + al openstreetmap.org (eble meti plenan retadreson), al opendatacommons.org + kaj (se necesas) al creativecommons.org. + credit_3_html: |- + En esploreblaj elektronikaj mapoj, la aÅ­torecon povas esti montrata ĉe la angulo de mapo. + Ekzemplo: + attribution_example: + alt: Ekzemplo kiel atribui OpenStreetMap sur retpaĝo + title: Ekzemplo de aÅ­torec-atribuado + more_title_html: Sciigi pli + more_1_html: |- + Legu pli pri uzado de niaj datumoj kaj kiel atribui aÅ­torecon, je la retpaĝo de OSMF Licence kaj je la paĝo de oftaj demandoj pri leĝo. + more_2_html: Kvankam la datumoj de OpenStreetMap estas liberaj, ni ne povas + liveri senpagan API-on por eksteraj programistoj. Legu nian politikon + pri uzado de API, politikon + pri uzado de kaheloj kaj poltikon + pri uzado de Nominatim. + contributors_title_html: Kunlaborantoj + contributors_intro_html: 'Niaj kunlaborantoj estas miloj da homoj. Ni ankaÅ­ + inkludas datumoj sub malferma permesilo el landaj kartografiaj organizaĵoj + kaj el aliaj fontoj, inter ili:' + contributors_at_html: |- + AÅ­strujo: enhavas datumojn el Stadt Wien (sub CC BY), + Land Vorarlberg kaj + Land Tirol (sub CC BY AT kun postaj ŝanĝoj). + contributors_ca_html: |- + Kanado: enhavas datumojn el + GeoBase®, GeoGratis (© Department of Natural + Resources Canada), CanVec (© Department of Natural + Resources Canada), kaj StatCan (Geography Division, + Statistics Canada). + contributors_fi_html: |- + Suomujo: enhavas datumojn el + National Land Survey of Finland's Topographic Database kaj aliaj fontoj, sub la NLSFI permesilo. + contributors_fr_html: 'Francujo: enhavas datumojn ricevitajn + el ''Direction Générale des Impôts''.' + contributors_nl_html: |- + Nederlando: enhavas datumojn el © AND, 2007 + (www.and.com). + contributors_nz_html: 'Nov-Zelando: enhavas datumojn ricevitajn + el ''Land Information New Zealand''. Crown Copyright reserved.' + contributors_si_html: |- + Slovenujo: enhavas datumojn el Ofico de Termezurado kaj Kartografio kaj + Ministerio pri Terkulturo, Arbarkulturo kaj Proviantado + (publikaj informoj de Slovenujo). + contributors_za_html: |- + Sud-Afriko: enhavas datumojn ricevitajn el Chief Directorate: + National Geo-Spatial Information, landaj kopirajtoj rezervitaj. + contributors_gb_html: |- + Unuiĝinta Reĝlando: enhavas datumojn el 'Ordnance + Survey' © Crown copyright and database right + 2010-12. + contributors_footer_1_html: |- + Por pli da detaloj pri ĉi tiuj kaj aliaj fontoj uzitaj por plibonigi OpenStreetMap, bonvolu viziti la paĝon pri kontribuintoj en la OpenStreetMap-vikio. + contributors_footer_2_html: Inkludo de datumoj en OpenStreetMap ne indikas, + ke la provizanto de datumoj apogas OpenStreetMap, garantias por iu aÅ­ respondumas + por iu. + infringement_title_html: Rompo de kopirajtoj + infringement_1_html: OSM-kunlaborantoj memoru, por ke neniam aldonu datumojn + el iuj ajn fontoj protektataj de kopirajto (ekz. Google Maps aÅ­ paperaj mapoj) + sen klara permeso de posedanto de kopirajtoj. + infringement_2_html: Se ve pensas, ke datumoj protektataj per kopirajto estas + misaldonitaj al OpenStreetMap-datumbazo aÅ­ al tiu ĉi retpaĝo, bonvolu legi + pri proceduro + de forigado de datumoj aÅ­ plenigi la enretan + formularon. + trademarks_title_html: Registritaj markoj + trademarks_1_html: OpenStreetMap, la piktogramo de grandiga lenso kaj 'State + of the Map' estas registritaj markoj de Fondaĵo OpenStreetMap. Se vi havas + iujn demandojn pri uzado de niaj markoj, bonvolu sendi viajn demandojn al + la grupo + de laboro pri permesilo. welcome_page: title: Bonvenon! + introduction_html: Bonvenon al OpenStreetMap, la libera kaj redaktebla mapo de + la mondo. Nun kiam vi registriĝis, vi eblas eki mapigadon. Jen estas mallonga + manlibreto kun la plej gravaj aĵoj kiuj vi povas scii. + whats_on_the_map: + title: Kio estas sur la mapo + on_html: OpenStreetMap estas loko por mapigi objektojn, kiuj estas kaj realaj + kaj aktualaj - tiu estas milionoj da konstruaĵoj, vojoj kaj aliaj detalaĵoj + pri lokoj. Vi povas mapigi ĉiujn elementojn de reala mondo kiuj interesas + vin. + off_html: Ni ne povas inkludi personajn taksojn, eksajn aÅ­ malcertajn + objektojn, kaj datumoj de kopirajtataj fontoj. Escepte se vi estas permesita, + ne kopiu datumoj el aliaj interretaj aÅ­ paperaj mapoj. + basic_terms: + title: Fundamentaj terminoj pri mapigado + paragraph_1_html: OpenStreetMap havas sian propran ĵargonon. Jen estas kelkaj + utilaj vorotoj. + editor_html: Redaktilo estas programo aÅ­ retpaĝo, kiun vi povas + uzi por modifi mapon. + node_html: Nodo (ang 'nodo') estas punkto sur la mapo, kiel + restoracio aÅ­ arbo. + way_html: Linio (ang. 'way') estas linio aÅ­ areo, kiel vojo, + rivereto, lago aÅ­ konstruaĵo. + tag_html: Etikedo (ang. 'tag') estas kolekto de datumoj priskribanta + nodon aÅ­ linion, kiel nomo de restoracio aÅ­ rapidlimo de vojo. + rules: + title: Reguloj! + paragraph_1_html: "OpenStreetMap havas malmultajn formalajn regulojn, tamen + ni esperas, ke ĉiuj kunlaboros kaj interparolos en la komunumo. Se vi planas + iujn agadojn aliajn ol permanajn redaktojn, bonvolu legi la sekvajn rekomendojn + pri enportadoj + kaj \naÅ­tomataj + redaktoj." + questions: + title: Iaj demandoj? + paragraph_1_html: OpenStreetMap havas kelkajn ejojn por lerni pri la projekto, + por demandi pri ion ajn kaj kune diskuti kaj dokumenti pri mapigado. Alklaku + por ricevi helpon. start_mapping: Eki mapigadon + add_a_note: + title: Ĉu mankas al vi tempo por ridaktado? Aldonu rimarkon! + paragraph_1_html: Se vi volas nur korekti iun etan kaj vi ne havas tempon por + registriĝi kaj lerni redaktadon, vi povas facile aldoni rimarkon. + paragraph_2_html: Simple iru al la mapo kaj alklaku + la piktogramon . Tio aldonos treneblan markon + al la mapo. Entajpu vian mesaĝon, konservu ĝin kaj aliaj mapigistoj okupiĝos + pri via rimarko. + fixthemap: + title: Raporti problemon / Korekti mapon + how_to_help: + title: Kiel helpi + join_the_community: + title: Aliĝi al la komunumo + explanation_html: Se vi rimarkis iun problemon kun niaj map-datumoj, ekzemple + strato aÅ­ adreso mankas, la plej bona rimedo estas aniĝi OpenStreetMap-komunumo + kaj redakti kaj ripari datumojn mem. + add_a_note: + instructions_html: Simple alklaku aÅ­ la saman piktogramon + sur la mapo. Tio ĉi aldonos moveblan markon, aldonu vian mesaĝon, konservu + ĝin, kaj aliaj mapigistoj okupiĝos pri via rimarko. + other_concerns: + title: Aliaj aferoj + explanation_html: Se vi havas demandojn pri kial niaj datumoj aÅ­ enhavo estas + uzataj, bonvolu ekkoni paĝon pri kopirajto por pliaj + leĝaj informoj, aÅ­ kontaktu la OSMF-laborgrupon. help_page: + title: Akiri helpon + introduction: OpenStreetMap havas kelkajn ejojn por lerni pri la projekto, por + demandi pri ion ajn kaj kune diskuti kaj dokumenti pri mapigado. + welcome: + url: /welcome + title: Bonvenon al OSM + description: Komencu ekde tiu ĉi manlibreto ampleksanta fundamentojn de OpenStreetMap. + beginners_guide: + url: http://wiki.openstreetmap.org/wiki/Beginners%27_guide + title: Manlibro por komencantoj + description: Manlibro por komencantoj kreata de la komunumo (en la Angla). help: url: https://help.openstreetmap.org/ + title: OpenStreetMap-helppaĝo + description: Demandu aÅ­ serĉu respondojn je retpaĝo de demandoj-kaj-respondoj + pri OSM. + mailing_lists: + title: Dissendolistoj + description: Demandu aÅ­ diskutu pri interesaj temoj en multaj pritemaj aÅ­ regionaj + dissendolistoj. forums: title: Forumoj + description: Demandoj kaj diskutoj por tiuj, kiuj preferas kutimaj diskutforumoj. + irc: + title: IRC + description: Interaga babilejo en multaj diversaj lingvoj kaj pri multaj temoj. + switch2osm: + title: switch2osm + description: Helpas firmaojn kaj organizaĵojn ŝanĝi al mapoj kaj aliaj servoj + de OpenStreetMap. + wiki: + url: https://wiki.openstreetmap.org/wiki/Eo:Main_Page + title: Vikio OpenStreetMap + description: Esploru vikion por akiri detalan dokumentadon de OSM. + about_page: + next: Sekva + copyright_html: ©OpenStreetMap
kontribuintoj + used_by: '%{name} liveras map-datumojn por miloj da retpaĝoj, poŝtelefonaj aplikaĵoj + kaj aparatoj' + lede_text: OpenStreetMap estas kreata de komunumo de mapigistoj kiuj aldonas kaj + prizorgas datumojn pri vojoj, kursoj, kafejoj, stacidomoj kaj pli da aliaj, + en la tuta mondo. + local_knowledge_title: Loka scio + local_knowledge_html: OpenStreetMap emfazas lokan scion. Kontribuantoj uzas aerfotojn, + GPS-aparatojn kaj normajn mapojn por verigi ĉu datumoj de OSM estas akurataj + kaj ĝisdatigaj. + community_driven_title: Kondukata de komunumo + community_driven_html: |- + La komunumo de OpenStreetMap estas diversa, pasia kaj kreskas tagon post tago. Inter niaj kontribuantoj estas amatoroj de mapoj, istoj de GIS, inĝenieroj prizorgantaj OSM-servilojn, helpistoj kiuj mapigas en terenoj de katastrofoj kaj pli da aliuloj. Por lerni pli pri la komunumo, vidu ĵurnalojn de uzantoj, + komunumajn taglibrojn kaj la retpaĝon de Fundaĵo OSM. + open_data_title: Malfermaj datumoj + open_data_html: 'OpenStreetMap estas malfermaj datumoj: vi povas uzi ĝin + kiamaniere vi volas sub la kondiĉo de vi atribuos aÅ­torecon al OpenStreetMap + kaj ĝiaj kontribuintoj. Se vi modifos aÅ­ uzos niajn datumojn, vi povos distribui + la verkon nur sub la sama permesilo. Vidu la paĝon + pri kopirajto kaj permesilo por pli da detaloj.' + legal_title: Leĝaj demandoj + legal_html: Tiu ĉi retpaĝo kaj aliaj servoj estas formale administrata de la Fondaĵo OpenStreetMap (OSMF) komisie de + la komunumo. Uzado de ĉiuj OSMF-servoj estas regulata per Politiko + de uzado kaj nia Politiko + de privateco. Bonvolu kontakti + kun OSMF, se vi havas iun demandon pri permesilo, kopirajto aÅ­ leĝo. + partners_title: Kunlaborantoj notifier: diary_comment_notification: + subject: '[OpenStreetMap] %{user} komentis vian ĵurnal-afiŝon' hi: Saluton %{to_user}, + header: '%{from_user} komentis vian afiŝon en OpenStreetMap-ĵurnalo kun la temo + %{subject}:' + footer: Vi ankaÅ­ povas legi la komenton ĉe %{readurl} kaj komenti ĝin ĉe %{commenturl} + aÅ­ responde ĉe %{replyurl} message_notification: hi: Saluton %{to_user}, + header: '%{from_user} sendis al vi mesaĝon tra OpenStreetMap kun la temo %{subject}:' + footer_html: Vi ankaÅ­ povas legi la mesaĝon ĉe %{readurl} kaj respondi ĉe %{replyurl} friend_notification: subject: '[OpenStreetMap] %{user} aldonis vin kiel amikon' + had_added_you: '%{user} aldonis vin kiel amikon je OpenStreetMap.' + see_their_profile: Vi povas vidi lian profilon ĉe %{userurl}. + befriend_them: Vi ankaÅ­ povas aldoni vin kiel amikon ĉe %{befriendurl}. gpx_notification: greeting: Saluton, + your_gpx_file: Ŝajnas, ke via GPX-dosiero with_description: kun la priskribo + and_the_tags: 'kaj kun la sekvaj etikedoj:' + and_no_tags: kaj kun neniu etikedo. + failure: + subject: '[OpenStreetMap] Eraro dum enportado de GPX-dosiero' + failed_to_import: 'ne estas enportita sukcese. Eraro:' + more_info_1: Pli da informoj pri malsukceso de enportado de GPX-dosieroj kaj + kiel eviti + more_info_2: 'ilin vi povas trovi je:' + success: + subject: '[OpenStreetMap] GPX-dosiero enportita sukcese' + loaded_successfully: estas sukcese ŝargita kun %{trace_points} el %{possible_points} + punktoj. + signup_confirm: + subject: '[OpenStreetMap] Bonvenon al OpenStreetMap' + greeting: Saluton! + created: Iu (espereble vi) ĵus kreis konton je %{site_url}. + confirm: Unue devas konfirmi, ke tiu ĉi peto devenas de vi, do bonvolu alklaki + la ligilon sube por konfirmi vian konton. + welcome: Post konfirmo de konto, ni liveros al vi pliajn informojn kiel komenci. email_confirm: - subject: '[OpenStreetMap] Konfirmi vian retpoŝtadreson' + subject: '[OpenStreetMap] Konfirmado de retpoŝtadreso' email_confirm_plain: greeting: Saluton, + hopefully_you: Iu (espereble vi) volas ŝanĝi vian retpoŝtadreson je %{server_url} + al %{new_address}. + click_the_link: Se tiu estas vi, bonvolu alklaku la ligilon sube por konfirmi + ŝanĝon de adreso. email_confirm_html: greeting: Saluton, + hopefully_you: Iu (espereble vi) volas ŝanĝi vian retpoŝtadreson je %{server_url} + al %{new_address}. + click_the_link: Se tiu estas vi, bonvolu alklaku la ligilon sube por konfirmi + ŝanĝon de adreso. + lost_password: + subject: '[OpenStreetMap] Peto pri restarigo de pasvorto' lost_password_plain: greeting: Saluton, + hopefully_you: Iu (espereble vi) volas restarigi la pasvorton por konto je openstreetmap.org + por tiu ĉi retpoŝtadreso. + click_the_link: Se tiu estas vi, bonvolu alklaki la ligilon sube por restarigi + la pasvorton. lost_password_html: greeting: Saluton, + hopefully_you: Iu (espereble vi) volas restarigi la pasvorton por konto je openstreetmap.org + por tiu ĉi retpoŝtadreso. + click_the_link: Se tiu estas vi, bonvolu alklaki la ligilon sube por restarigi + la pasvorton. note_comment_notification: + anonymous: Anonimulo greeting: Saluton, + commented: + subject_own: '[OpenStreetMap] %{commenter} komentis vian rimarkon' + subject_other: '[OpenStreetMap] %{commenter} komentis rimarkon pri kiu vi + interesiĝas' + your_note: '%{commenter} komentis vian rimarkon sur mapo ĉe %{place}.' + commented_note: '%{commenter} komentis rimarkon sur mapo pri kiu vi interesiĝas. + La rimarko troviĝas ĉe %{place}.' + closed: + subject_own: '[OpenStreetMap] %{commenter} solvis vian rimarkon' + subject_other: '[OpenStreetMap] %{commenter} solvis rimarkon pri kiu vi interesiĝas' + your_note: '%{commenter} solvis vian rimarkon sur mapo ĉe %{place}.' + commented_note: '%{commenter} solvis rimarkon sur mapo pri kiu vi interesiĝas. + La rimarko troviĝis ĉe %{place}.' + reopened: + subject_own: '[OpenStreetMap] %{commenter} remalfermis vian rimarkon' + subject_other: '[OpenStreetMap] %{commenter} remalfermis rimarkon pri kiu + vi interesiĝis' + your_note: '%{commenter} remalfermis vian rimarkon sur mapo ĉe %{place}.' + commented_note: '%{commenter} remalfermis rimarkon sur mapo pri kiu vi interesiĝis. + La rimarko troviĝis ĉe %{place}.' + details: Pli da detaloj pri la rimarko, vi povas trovi je %{url}. changeset_comment_notification: greeting: Saluton, + commented: + subject_own: '[OpenStreetMap] %{commenter} komentis vian ŝanĝaron' + subject_other: '[OpenStreetMap] %{commenter} komentis ŝanĝaron pri kiu vi + interesiĝas' + your_changeset: '%{commenter} komentis vian ŝanĝaron kreitan je %{time}' + commented_changeset: '%{commenter} komentis ŝanĝaron observatan de vi, kreitan + de %{changeset_author} je %{time}' + partial_changeset_with_comment: kun komento '%{changeset_comment}' + partial_changeset_without_comment: sen komento + details: Pli da detaloj pri la ŝanĝaro povas esti trovita ĉe %{url}. message: inbox: title: Alvenkesto my_inbox: Mia leterkesto + outbox: elirkesto + messages: Vi havas %{new_messages} kaj %{old_messages} + new_messages: + one: '%{count} novan mesaĝon' + other: '%{count} novajn mesaĝojn' + old_messages: + one: '%{count} malnovan mesaĝon' + other: '%{count} malnovajn mesaĝojn' from: De subject: Temo date: Dato + no_messages_yet: Vi ankoraÅ­ ne havas iun mesaĝon. Eble kontaktu kun iu el %{people_mapping_nearby_link}? + people_mapping_nearby: proksimaj mapigistoj message_summary: unread_button: Marki kiel nelegitan read_button: Marki kiel legitan @@ -1053,53 +1346,112 @@ eo: new: title: Sendi mesaĝon send_message_to: Sendi novan mesaĝon al %{name} + subject: Temo + body: Enhavo send_button: Sendi - back_to_inbox: Reen al mesaĝejo + back_to_inbox: Reen al alvenkesto message_sent: Mesaĝo sendita + limit_exceeded: Vi antaÅ­nelonge sendis multajn mesaĝojn. Bonvolu atendi iom + da tempo antaÅ­ vi sendos pliajn. + no_such_message: + title: Neekzistanta mesaĝo + heading: Tiu ĉi mesaĝo ne ekzistas + body: BedaÅ­rinde ne ekzistas mesaĝo kun tiu ĉi identigilo. outbox: + title: Elirkesto my_inbox: Mia %{inbox_link} - inbox: Alvenkesto + inbox: alvenkesto + outbox: elirkesto + messages: + one: Vi havas %{count} senditan mesaĝon + other: Vi havas %{count} senditajn mesaĝojn to: Al subject: Temo date: Dato + no_sent_messages: Vi ankoraÅ­ ne sendis iun mesaĝon. Eble kontaktu kun iu el + %{people_mapping_nearby_link}? + people_mapping_nearby: proksimaj mapigistoj + reply: + wrong_user: Vi estas ensalutita kiel '%{user}', sed la mesaĝo, kiun vi volas + respondi, ne estas sendita al tiu uzanto. Bonvolu ensaluti kiel propra uzanto + por respondi ĝin. read: title: Legi mesaĝon from: De subject: Temo date: Dato reply_button: Respondi - unread_button: Marki kiel nelegita + unread_button: Marki kiel nelegitan + back: Reen to: Al + wrong_user: Vi estas ensalutita kiel '%{user}', sed la mesaĝo, kiun vi volas + legi estas sendita al tiu uzanto. Bonvolu ensaluti kiel propra uzanto por + legi ĝin. sent_message_summary: delete_button: Forigi mark: - as_read: Mesaĝo markita kiel legita - as_unread: Mesaĝo markita kiel nelegita + as_read: Mesaĝo markita kiel legitan + as_unread: Mesaĝo markita kiel nelegitan delete: deleted: Mesaĝo forigita site: index: + js_1: Vi aÅ­ uzas foliumilon, kiu ne subtenas Ĝavoskripton, aÅ­ vi havas ĝin malaktivan. + js_2: OpensStreetMap uzas Ĝavoskripton por montri ŝoveblan mapon. + permalink: Konstanta ligilo + shortlink: Mallonga ligilo createnote: Aldoni rimarkon + license: + copyright: Kopirajto de OpenStreetMap kaj kontribuintoj, sub malferma permesilo + remote_failed: Redaktado malsukcesis - certigu ĉu JOSM aÅ­ Merkaartor estas startigita + kaj ĉu defora aliro estas aktiva edit: + not_public: Vi ne agordis por viaj redaktoj estu publikaj. + not_public_description: Vi ne povas plu redakti la mapon. Vi povas agordi ilin + kiel publikan ĉe via %{user_page}. user_page_link: uzantpaĝo + anon_edits_link_text: Tie ĉi vi sciigis kiel. + flash_player_required: Por uzi Potlatch, la OpenStreetMap-redaktilo, vi bezonas + la kromprogramon Flash. Vi povas elŝuti + Flash Player el Adobe.com retpaĝo. Kelkaj + aliaj redaktiloj estas disponeblaj por redakti OpenStreetMap. + potlatch_unsaved_changes: Vi havas nekonservitajn ŝanĝojn. (Por konservi ŝanĝojn + en Potlatch, malelektu nune elektitan linion aÅ­ punkton se vi redaktas en + 'rekta reĝimo', aÅ­ alklaku butonon 'konservi', se ĝi videblas.) + potlatch2_not_configured: Potlatch 2 ne estas agordita - vidu http://wiki.openstreetmap.org/wiki/The_Rails_Port#Potlatch_2 + por pli da informoj + potlatch2_unsaved_changes: Vi havas nekonservitajn ŝanĝojn. (Por konservi ilin + en Potlatch 2, alklaku 'konservi'.) + id_not_configured: iD ne estas agordita + no_iframe_support: Via foliumilo ne subtenas 'HTML iframes', ili estas bezonataj + por tiu ĉi eblo. sidebar: search_results: Serĉrezultoj close: Fermi search: search: Serĉi + get_directions: Difini la kurson + get_directions_title: Difinas la kurson inter du punktoj from: El to: Al where_am_i: Kie mi estas? + where_am_i_title: Trovas la nunan pozicion per la foliumilo submit_text: Ek key: table: entry: motorway: AÅ­tovojo main_road: Ĉefa vojo - primary: Strato de unua ordo - secondary: Strato de dua ordo + trunk: Vojo ekspresa + primary: Vojo unua-ranga + secondary: Vojo dua-ranga + unclassified: Vojo kvara-ranga track: Vojo kampa + bridleway: Ĉevalvojo cycleway: Bicikla vojo + cycleway_national: Bicikla vojo nacia + cycleway_regional: Bicikla vojo regiona + cycleway_local: Bicikla vojo loka footway: Trotuaro rail: Fervojo subway: Metroo @@ -1107,7 +1459,14 @@ eo: - Fervojo malpeza - tramo cable: - 1: seĝtelfero + - Kablovojo + - seĝtelfero + runway: + - Avia dromo + - aÅ­tokur-strato + apron: + - Aviadil-parkumejo + - flugstacio admin: Administra limo forest: Kultiv-arbaro wood: Arbaro @@ -1117,7 +1476,7 @@ eo: common: - Publika ripoza tereno - herbejo - retail: Butikcentro + retail: Komercejo industrial: Industria areo commercial: Oficeja tereno heathland: Erikejo @@ -1125,6 +1484,7 @@ eo: - Lago - akvorezervujo farm: Farmobieno + brownfield: AntaÅ­-konstruejo (post-malkonstruado) cemetery: Tombejo allotments: Familiaj ĝardenoj pitch: Ludkampo @@ -1139,8 +1499,13 @@ eo: summit: - Montosupro - montopinto - destination: Nur por lokaj loĝantoj + tunnel: Strekumita konturo - tunelo + bridge: Nigra konturo - ponto + private: Privata aliro + destination: Aliro nur al celo + construction: Vojoj dum konstruado bicycle_shop: Bicikl-vendejo + bicycle_parking: Parkumejo bicikla toilets: Necesejo richtext_area: edit: Redakti @@ -1303,17 +1668,18 @@ eo: my diary: Mia ĵurnalo new diary entry: nova ĵurnalrikordo my edits: Miaj redaktoj - my traces: Miaj spuroj + my traces: Spuroj my notes: Miaj rimarkoj my messages: Mesaĝoj my profile: Profilo - my settings: Miaj agordoj + my settings: Agordoj my comments: Miaj komentoj blocks on me: Blokas min send message: Sendi mesaĝon diary: Ä´urnalo edits: Redaktoj traces: Spuroj + notes: Map-rimarkoj remove as friend: Eksamikigi add as friend: Aldoni kiel amikon mapper since: 'Mapigisto ekde:' @@ -1331,6 +1697,7 @@ eo: role: administrator: Ĉi tiu uzanto estas administranto moderator: Ĉi tiu uzanto estas kontrolanto + comments: Komentoj create_block: Bloki ĉi tiun uzanton activate_user: Aktivigi tiun ĉi uzanton deactivate_user: Malaktivigi tiun ĉi uzanton @@ -1357,7 +1724,7 @@ eo: heading: Publika redaktado profile description: 'Priskribo de profilo:' preferred languages: 'Preferataj Lingvoj:' - home location: 'Hejma Loko:' + home location: 'Hejma pozicio:' no home location: Vi ne enigis vian hejmlokon. latitude: 'Latitudo:' longitude: 'Longitudo:' @@ -1381,7 +1748,7 @@ eo: success: Ŝanĝo de via retpoŝta adreso konfirmita! failure: Retadreso jam estis konfirmita per tiu ĵetono. set_home: - flash success: Hejma loko sukcese konservita + flash success: Pozicio de hejmo sukcese konservita go_public: flash success: Ĉiuj viaj redaktoj naÅ­ estas publikaj, kaj vi naÅ­ rajtas redakti. make_friend: @@ -1436,6 +1803,7 @@ eo: cancel: Nuligi key: title: Mapklarigo + tooltip: Mapklarigo tooltip_disabled: Mapklarigo estas nur disponebla ĉe la norma tavolo map: zoom: diff --git a/config/locales/he.yml b/config/locales/he.yml index 8df0a1f33..cdf75890c 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1230,7 +1230,10 @@ he: לפי התנאים של אותו הרישיון. ר' את דף הרישיון וזכויות היוצרים לפרטים נוספים. legal_title: משפטי legal_html: |- - האתר הזה ושירותים רבים אחרים מופעלים על־ידי קרן OpenStreetMap‏ (OSMF) בשם הקהילה. + האתר הזה ושירותים רבים אחרים מופעלים על־ידי קרן OpenStreetMap‏ (OSMF) בשם הקהילה. השימוש בכל השירותים במפעילה OSMF כפוף + ל־ + מדיניות שימוש קביל שלנו + ול־Privacy Policyמדיניות הפרטיות שלנו
נא ליצור קשר עם OSMF אם יש לך שאלות על רישוי, זכויות יוצרים או שאלות ובעיות משפטיות אחרות. partners_title: שותפים @@ -1824,9 +1827,9 @@ he: התרומה. email address: 'כתובת דוא״ל:' confirm email address: 'אימות כתובת דוא״ל:' - not displayed publicly: לא מוצג בפומבי (ר׳ מידיניות - פרטיות) + not displayed publicly: הכתובת שלף לא מוצגת בפומבי, ר׳ את מידיניות + פרטיות למידע נוסף display name: 'שם התצוגה:' display name description: שם המשתמש שלך, שמוצג בפומבי. אפשר לשנות את זה בהעפות שלך. diff --git a/config/locales/id.yml b/config/locales/id.yml index 476a93ddc..01f4db744 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1245,7 +1245,8 @@ id: Hak Cipta dan Lisensi untuk perinciannya.' legal_title: Legal legal_html: |- - Situs ini dan layanan terkait lainnya dioperasikan secara resmi oleh OpenStreetMap Foundation (OSMF) atas nama komunitas. + Situs ini dan layanan terkait lainnya dioperasikan secara resmi oleh OpenStreetMap Foundation (OSMF) atas nama komunitas. Menggunakan semua layanan yang dioperasikan oleh OSMF tunduk kepada + Kebijakan Penggunaan Diterima dan Kebijakan Privasi kami
Silakan menghubungi OSMF jika Anda punya pertanyaan seputar lisensi, hak cipta, atau isu dan pertanyaan hukum lainnya. partners_title: Rekan @@ -1875,9 +1876,10 @@ id: kontributor. email address: 'Alamat Email:' confirm email address: 'Konfirmasi Alamat Email:' - not displayed publicly: Tidak dipajangkan secara umum (Lihat kebijakan - privasi) + not displayed publicly: Alamat Anda tidak dipajangkan secara umum, lihat kebijakan privasi kami untuk + informasi lebih lanjut display name: 'Tampilan Nama:' display name description: Username Anda yang ditampilkan pada publik. Anda dapat mengubahnya dalam pengaturan. diff --git a/config/locales/it.yml b/config/locales/it.yml index ae6cfbb46..48aa89ad1 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -33,6 +33,7 @@ # Author: Ricordisamoa # Author: Rippitippi # Author: Ruila +# Author: Selven # Author: Shirayuki # Author: Simone # Author: SimoneSVC @@ -2050,6 +2051,8 @@ it: gravatar: gravatar: Usa Gravatar link text: che cos'è questo? + disabled: Gravatar è stato disattivato. + enabled: La visualizzazione del vostro Gravatar è stata attivata. new image: Aggiungi un'immagine keep image: Mantieni l'immagine attuale delete image: Rimuovi l'immagine attuale diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 9edd7dae1..1307e3969 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -22,6 +22,7 @@ # Author: Luk3 # Author: Macofe # Author: Matheus Sousa L.T +# Author: NMaia # Author: Nemo bis # Author: Nighto # Author: Rodrigo Avila @@ -1253,11 +1254,14 @@ pt-BR: Se você alterar os dados ou criar algo com os dados, pode distribuir o produto resultante apenas sob a mesma licença. Consulte a página sobre direitos de autor e licenciamento para mais informações. legal_title: Jurídico - legal_html: Esta página e vários outros serviços relacionados são formalmente + legal_html: "Esta página e vários outros serviços relacionados são formalmente operados pela OpenStreetMap Foundation - (OSMF) em nome da comunidade.
Por favor contate + (OSMF) em nome da comunidade. O uso de todos os serviços operados pela OSMF + está sujeito às nossas \nPolíticas + de Uso Aceitável e à nossa Política + de Privacidade\n
\nPor favor contate a OSMF se tiver perguntas sobre licenciamento, direitos autorais ou outras - questões e problemas legais. + questões e problemas legais." partners_title: Parceiros notifier: diary_comment_notification: @@ -1884,9 +1888,9 @@ pt-BR: do Contribuidor. email address: 'Endereço de E-mail:' confirm email address: 'Confirme o Endereço de E-mail:' - not displayed publicly: Não será exibido publicamente (veja a política de privacidade) + e-mail">política de privacidade para mais informações display name: 'Nome de Exibição:' display name description: Seu nome de usuário disponível publicamente. Você pode mudá-lo depois nas preferências. diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index 82d2b1e49..3134bc720 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -1863,9 +1863,10 @@ pt-PT: de Colaboração. email address: 'E-mail:' confirm email address: 'Confirmar E-mail:' - not displayed publicly: Não será visível publicamente (ver política - de privacidade) + not displayed publicly: O seu endereço de IP não será visível publicamente. + Consulte a política + de privacidade para mais informação. display name: 'Nome de utilizador:' display name description: O nome de utilizador será visível publicamente. Poderá alterar o nome posteriormente nas preferências. diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 29b8df2c7..751cd7986 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -16,6 +16,7 @@ # Author: DCamer # Author: Dmitry-s93 # Author: Dr&mx +# Author: Eduard Popov # Author: Edward17 # Author: Eleferen # Author: Ergo @@ -1569,6 +1570,8 @@ ru: private: Частный доступ destination: Целевой доступ construction: Строительство дороги + bicycle_shop: Магазин велосипедов + bicycle_parking: Парковка для велосипедов richtext_area: edit: Изменить preview: Предпросмотр @@ -2055,6 +2058,8 @@ ru: gravatar: gravatar: Использовать Gravatar link text: что это? + disabled: Gravatar отключён. + enabled: Отображение вашего Gravatar включено. new image: Добавить изображение keep image: Оставить текущее изображение delete image: Удалить текущее изображение @@ -2420,11 +2425,17 @@ ru: instructions: continue_without_exit: Продолжите по %{name} slight_right_without_exit: Слегка направо на %{name} + endofroad_right_without_exit: В конце дороги поверните направо на %{name} + merge_right_without_exit: Перестройтесь направо на %{name} + fork_right_without_exit: На развилке поверните направо на %{name} turn_right_without_exit: Поверните направо на %{name} sharp_right_without_exit: Резко направо на %{name} uturn_without_exit: Разворот по %{name} sharp_left_without_exit: Резко налево на %{name} turn_left_without_exit: Поверните налево на %{name} + endofroad_left_without_exit: В конце дороги поверните налево на %{name} + merge_left_without_exit: Перестройтесь налево на %{name} + fork_left_without_exit: На развилке поверните налево на %{name} slight_left_without_exit: Слегка влево на %{name} via_point_without_exit: (через точку) follow_without_exit: Следуйте %{name} diff --git a/config/locales/sl.yml b/config/locales/sl.yml index d01174f52..42eb0d095 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -8,6 +8,7 @@ # Author: Macofe # Author: Mateju # Author: Peter Klofutar +# Author: Pickle12 # Author: Ruila # Author: Skalcaa # Author: Stefanb @@ -1647,9 +1648,9 @@ sl: sodelovanja. email address: 'E-poÅ¡tni naslov:' confirm email address: 'Potrdite naslov e-poÅ¡te:' - not displayed publicly: Ne bo javno objavljeno (glej politiko - zasebnosti) + not displayed publicly: VaÅ¡ naslov ne bo javno objavljen (za več informacij + glej politiko zasebnosti) display name: 'Prikazno ime:' display name description: Javno prikazano uporabniÅ¡ko ime. To lahko spremenite kasneje v nastavitvah. diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index d24d8c25f..f140eb32c 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -1019,12 +1019,12 @@ zh-CN: href="http://osmfoundation.org/Licence">OSMF许可协议页面和法律常见问题阅读更多关于使用我们的数据,以及如何表明我们是作者的信息。 more_2_html: 尽管 OpenStreetMap 开放数据,但是我们无法为第三方开发人员提供免费的地图 API。详见我们的 API使用政策、图块使用政策及名称服务使用政策。 + href="http://wiki.openstreetmap.org/wiki/Zh-hans:Tile_usage_policy">地图图块使用政策及名称服务使用政策。 contributors_title_html: 我们的贡献者 contributors_intro_html: 我们的数据来源于成千上万人的贡献。但我们也从国家测绘机构等处获取公共版权的数据,其中包括: contributors_at_html: 奥地利:包含来自 Stadt - Wien(CC + Wien(CC BY协议)、Land Vorarlberg及 Land Tirol (修订的 CC-BY AT协议)的数据。 @@ -1044,7 +1044,7 @@ zh-CN: contributors_gb_html: 英国:包含来自 Ordnance 的调查数据,© Crown 版权所有及数据库权利,2010-12。 contributors_footer_1_html: |- 关于其进一步的细节,及其他被用来帮助提升 OpenStreetMap 的来源,详见 OpenStreetMap Wiki 的贡献者页面。 + href="http://wiki.openstreetmap.org/wiki/Zh-hans:Contributors">贡献者页面。 contributors_footer_2_html: OpenStreetMap 纳入数据并不意味着原始数据提供者认可 OpenStreetMap、提供任何担保或担负任何法律责任。 infringement_title_html: 著作权侵犯 infringement_1_html: OSM 的贡献者会被提醒,绝不要在没有著作权人的明确许可时添加来自任何有著作权的来源的数据(如谷歌地图或印刷地图)。 @@ -1069,7 +1069,7 @@ zh-CN: tag_html: 标签是关于节点或路径的简短数据,例如餐馆的名字或者道路的速度限制。 rules: title: 规则! - paragraph_1_html: OpenStreetMap很少有正式规则,但我们期待所有参与者能合作,并与社区沟通。如果你在考虑任何除手工编辑的活动,请阅读并遵守导入和自动编辑的指导。 questions: title: 还有疑问吗? @@ -1143,7 +1143,8 @@ zh-CN: OpenStreetMap。如果您改变或者使用这些数据,您必须按照相同的版权协议发布结果。详情请参见版权协议。 legal_title: 法律 legal_html: |- - 此网站和很多其他相关服务已由OpenStreetMap基金会(OSMF)正式代表社群运营。 + 此网站和很多其他相关服务已由OpenStreetMap基金会(OSMF)正式代表社群运营。使用所有由OSMF运营的服务均需符合我们的 + 可接受使用方针和我们的隐私政策
如果您有许可协议、版权或其他法律问题,请联络OSMF。 partners_title: 合作伙伴 @@ -1512,7 +1513,7 @@ zh-CN: public_traces_from: 来自 %{user} 的公开 GPS 轨迹 description: 浏览最近上传的 GPS 轨迹 tagged_with: 以 %{tags} 标记 - empty_html: 尚无轨迹。上传新轨迹或在wiki页面上了解 + empty_html: 尚无轨迹。上传新轨迹或在wiki页面上了解 GPS 轨迹。 delete: scheduled_for_deletion: 计划删除的轨迹 @@ -1698,8 +1699,8 @@ zh-CN: license_agreement: 当您确认您的帐户时,您需要同意贡献者条款。 email address: 电子邮件地址: confirm email address: 确认电子邮件地址: - not displayed publicly: 不公开显示(参阅隐私政策) + not displayed publicly: 您的地址未公开显示,请参见我们的隐私政策以获取更多信息 display name: 显示名称: display name description: 您公开显示的用户名。您可以稍后在首选项中进行修改。 external auth: 第三方身份验证: @@ -1754,7 +1755,7 @@ zh-CN: remove as friend: 删除朋友 add as friend: 添加朋友 mapper since: 绘图始于: - ago: (%{time_in_words_ago} 前) + ago: (%{time_in_words_ago} 前) ct status: 贡献者条款: ct undecided: 未决定 ct declined: 已拒绝 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index a5ba417e6..064655ad6 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -990,8 +990,8 @@ zh-TW: intro_2_html: |- 您可以自由地複製、散布、傳輸及修改我們的資料,前提是您須標明作者為 OpenStreetMap 及其貢獻者。若您在我們的資料上作修改或據之衍生其他資料 ,則只可依相同授權條款散佈有關成果。授權的法律原文詳述您的權責。 - intro_3_html: 我們地圖影像塊的製圖法以及我們的文件,以共享創意-署名-相同方式共享 - 2.0(CC BY-SA) 條款授權。 + intro_3_html: 我們地圖影像塊的製圖法以及我們的文件,以創用CC + 姓名標示-相同方式分享 (CC BY-SA) 2.0版條款授權。 credit_title_html: 如何標明作者是 OpenStreetMap credit_1_html: 我們要求您以“© OpenStreetMap 貢獻者”標明作者。 credit_2_html: 您亦須清晰註明,有關資料可透過開放資料庫授權條款取得。若使用我們的影像塊,則須註明其製圖法是按 CC-BY-SA 授權。您可以透過連結至常見法律問題中,可閱讀更多關於使用我們的資料,以及如何標明我們是作者的資料。 + href="http://osmfoundation.org/Licence">OSMF 授權條款頁面與法律上的常見問題中,可閱讀更多關於使用我們的資料,以及如何標明我們是作者的資料。 more_2_html: 雖然 OpenStreetMap 是開放資料,但我們無法為第三方開發人員提供免費的地圖 API。詳見我們的API 使用政策、地圖影像塊使用政策及Nominatim + href="http://wiki.openstreetmap.org/wiki/Zh-hant:Nominatim#使用政策">Nominatim 服務使用政策。 contributors_title_html: 我們的貢獻者 contributors_intro_html: 我們的貢獻者為成千上萬的人。我們也收納了從國家測繪機構及其他來源等取得的開放版權資料,其中包括: contributors_at_html: 奧地利:包含來自 Stadt - Wien (CC + Wien (CC BY授權) 、Land Vorarlberg及 Land Tirol (修訂的CC-BY AT授權) 的資料。 @@ -1161,8 +1162,9 @@ zh-TW: 及其貢獻者。若您在我們的資料上作修改或以之透過某些方式衍生其他資料,則只可依相同授權條款散佈有關成果。詳情請參閱版權及授權條款頁面。 legal_title: 法律資訊 legal_html: "本站以及許多相關的服務正式由OpenStreetMap 基金會 - (OSMF) 代表社群所營運。\n
\n若您有任何授權、版權或其他法律諮詢與問題,請聯絡 - OSMF。" + (OSMF) 代表社群所營運。所有使用的OSMF運行服務皆符合我們的可接受使用政策和隱私政策\n
\n若您有任何授權、版權或其他法律諮詢與問題,請聯絡 OSMF。" partners_title: 合作夥伴 notifier: diary_comment_notification: @@ -1530,7 +1532,7 @@ zh-TW: public_traces_from: '%{user} 的公開 GPS 軌跡' description: 瀏覽最近的 GPS 軌跡上傳 tagged_with: 有如下標籤:%{tags} - empty_html: 還沒有軌跡。上傳新的軌跡或在 wiki + empty_html: 還沒有軌跡。上傳新的軌跡或在 wiki 頁面上瞭解更多有關 GPS 軌跡的資訊。 delete: scheduled_for_deletion: 軌跡已被排程刪除 @@ -1717,8 +1719,8 @@ zh-TW: 。 email address: 電子郵件地址: confirm email address: 確認電子郵件地址: - not displayed publicly: 不要公開顯示 (請看 隱私權政策) + not displayed publicly: 您的地址未公開顯示,請看我們的隱私權政策來獲得更多訊息 display name: 顯示名稱: display name description: 您公開顯示的使用者名稱。您可以稍後在偏好設定中改變它。 external auth: 第三方身份認證 diff --git a/test/controllers/browse_controller_test.rb b/test/controllers/browse_controller_test.rb index d0cbeb796..f4e157f66 100644 --- a/test/controllers/browse_controller_test.rb +++ b/test/controllers/browse_controller_test.rb @@ -85,32 +85,40 @@ class BrowseControllerTest < ActionController::TestCase end def test_read_note - browse_check "note", notes(:open_note).id, "browse/note" + open_note = create(:note_with_comments) + + browse_check "note", open_note.id, "browse/note" end def test_read_hidden_note - get :note, :id => notes(:hidden_note_with_comment).id + hidden_note_with_comment = create(:note_with_comments, :status => "hidden") + + get :note, :id => hidden_note_with_comment.id assert_response :not_found assert_template "browse/not_found" assert_template :layout => "map" - xhr :get, :note, :id => notes(:hidden_note_with_comment).id + xhr :get, :note, :id => hidden_note_with_comment.id assert_response :not_found assert_template "browse/not_found" assert_template :layout => "xhr" session[:user] = users(:moderator_user).id - browse_check "note", notes(:hidden_note_with_comment).id, "browse/note" + browse_check "note", hidden_note_with_comment.id, "browse/note" end def test_read_note_hidden_comments - browse_check "note", notes(:note_with_hidden_comment).id, "browse/note" + note_with_hidden_comment = create(:note_with_comments, :comments_count => 2) do |note| + create(:note_comment, :note => note, :visible => false) + end + + browse_check "note", note_with_hidden_comment.id, "browse/note" assert_select "div.note-comments ul li", :count => 1 session[:user] = users(:moderator_user).id - browse_check "note", notes(:note_with_hidden_comment).id, "browse/note" + browse_check "note", note_with_hidden_comment.id, "browse/note" assert_select "div.note-comments ul li", :count => 2 end diff --git a/test/controllers/changeset_controller_test.rb b/test/controllers/changeset_controller_test.rb index e1960d4e8..c996bbaab 100644 --- a/test/controllers/changeset_controller_test.rb +++ b/test/controllers/changeset_controller_test.rb @@ -3,7 +3,7 @@ require "changeset_controller" class ChangesetControllerTest < ActionController::TestCase api_fixtures - fixtures :friends, :changeset_comments, :changesets_subscribers + fixtures :changeset_comments, :changesets_subscribers ## # test all routes which lead to this controller diff --git a/test/controllers/diary_entry_controller_test.rb b/test/controllers/diary_entry_controller_test.rb index 6ebf4ec09..d926f2656 100644 --- a/test/controllers/diary_entry_controller_test.rb +++ b/test/controllers/diary_entry_controller_test.rb @@ -1,7 +1,7 @@ require "test_helper" class DiaryEntryControllerTest < ActionController::TestCase - fixtures :users, :user_roles, :languages, :friends + fixtures :users, :user_roles, :languages include ActionView::Helpers::NumberHelper @@ -440,7 +440,8 @@ class DiaryEntryControllerTest < ActionController::TestCase end def test_list_friends - diary_entry = create(:diary_entry, :user_id => friends(:normal_user_with_second_user).friend_user_id) + friend = create(:friend, :user_id => users(:normal_user).id) + diary_entry = create(:diary_entry, :user_id => friend.friend_user_id) _other_entry = create(:diary_entry, :user_id => users(:second_public_user).id) # Try a list of diary entries for your friends when not logged in diff --git a/test/controllers/notes_controller_test.rb b/test/controllers/notes_controller_test.rb index bad1e5f1b..e846bbd6a 100644 --- a/test/controllers/notes_controller_test.rb +++ b/test/controllers/notes_controller_test.rb @@ -1,7 +1,7 @@ require "test_helper" class NotesControllerTest < ActionController::TestCase - fixtures :users, :user_roles, :notes, :note_comments + fixtures :users, :user_roles ## # test all routes which lead to this controller @@ -214,44 +214,50 @@ class NotesControllerTest < ActionController::TestCase end def test_comment_success + open_note_with_comment = create(:note_with_comments) assert_difference "NoteComment.count", 1 do assert_no_difference "ActionMailer::Base.deliveries.size" do - post :comment, :id => notes(:open_note_with_comment).id, :text => "This is an additional comment", :format => "json" + post :comment, :id => open_note_with_comment.id, :text => "This is an additional comment", :format => "json" end end assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:open_note_with_comment).id, js["properties"]["id"] + assert_equal open_note_with_comment.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] - assert_equal 5, js["properties"]["comments"].count + assert_equal 2, js["properties"]["comments"].count assert_equal "commented", js["properties"]["comments"].last["action"] assert_equal "This is an additional comment", js["properties"]["comments"].last["text"] assert_nil js["properties"]["comments"].last["user"] - get :show, :id => notes(:open_note_with_comment).id, :format => "json" + get :show, :id => open_note_with_comment.id, :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:open_note_with_comment).id, js["properties"]["id"] + assert_equal open_note_with_comment.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] - assert_equal 5, js["properties"]["comments"].count + assert_equal 2, js["properties"]["comments"].count assert_equal "commented", js["properties"]["comments"].last["action"] assert_equal "This is an additional comment", js["properties"]["comments"].last["text"] assert_nil js["properties"]["comments"].last["user"] + # Ensure that emails are sent to users + note_with_comments_by_users = create(:note) do |note| + create(:note_comment, :note => note, :author_id => users(:normal_user).id) + create(:note_comment, :note => note, :author_id => users(:second_public_user).id) + end assert_difference "NoteComment.count", 1 do assert_difference "ActionMailer::Base.deliveries.size", 2 do - post :comment, :id => notes(:note_with_comments_by_users).id, :text => "This is an additional comment", :format => "json" + post :comment, :id => note_with_comments_by_users.id, :text => "This is an additional comment", :format => "json" end end assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:note_with_comments_by_users).id, js["properties"]["id"] + assert_equal note_with_comments_by_users.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] assert_equal 3, js["properties"]["comments"].count assert_equal "commented", js["properties"]["comments"].last["action"] @@ -268,12 +274,12 @@ class NotesControllerTest < ActionController::TestCase assert_equal 1, email.to.length assert_equal "[OpenStreetMap] An anonymous user has commented on a note you are interested in", email.subject - get :show, :id => notes(:note_with_comments_by_users).id, :format => "json" + get :show, :id => note_with_comments_by_users.id, :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:note_with_comments_by_users).id, js["properties"]["id"] + assert_equal note_with_comments_by_users.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] assert_equal 3, js["properties"]["comments"].count assert_equal "commented", js["properties"]["comments"].last["action"] @@ -286,14 +292,14 @@ class NotesControllerTest < ActionController::TestCase assert_difference "NoteComment.count", 1 do assert_difference "ActionMailer::Base.deliveries.size", 2 do - post :comment, :id => notes(:note_with_comments_by_users).id, :text => "This is an additional comment", :format => "json" + post :comment, :id => note_with_comments_by_users.id, :text => "This is an additional comment", :format => "json" end end assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:note_with_comments_by_users).id, js["properties"]["id"] + assert_equal note_with_comments_by_users.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] assert_equal 4, js["properties"]["comments"].count assert_equal "commented", js["properties"]["comments"].last["action"] @@ -311,12 +317,12 @@ class NotesControllerTest < ActionController::TestCase assert_equal 1, email.to.length assert_equal "[OpenStreetMap] test2 has commented on a note you are interested in", email.subject - get :show, :id => notes(:note_with_comments_by_users).id, :format => "json" + get :show, :id => note_with_comments_by_users.id, :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:note_with_comments_by_users).id, js["properties"]["id"] + assert_equal note_with_comments_by_users.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] assert_equal 4, js["properties"]["comments"].count assert_equal "commented", js["properties"]["comments"].last["action"] @@ -327,18 +333,20 @@ class NotesControllerTest < ActionController::TestCase end def test_comment_fail + open_note_with_comment = create(:note_with_comments) + assert_no_difference "NoteComment.count" do post :comment, :text => "This is an additional comment" end assert_response :bad_request assert_no_difference "NoteComment.count" do - post :comment, :id => notes(:open_note_with_comment).id + post :comment, :id => open_note_with_comment.id end assert_response :bad_request assert_no_difference "NoteComment.count" do - post :comment, :id => notes(:open_note_with_comment).id, :text => "" + post :comment, :id => open_note_with_comment.id, :text => "" end assert_response :bad_request @@ -347,43 +355,49 @@ class NotesControllerTest < ActionController::TestCase end assert_response :not_found + hidden_note_with_comment = create(:note_with_comments, :status => "hidden") + assert_no_difference "NoteComment.count" do - post :comment, :id => notes(:hidden_note_with_comment).id, :text => "This is an additional comment" + post :comment, :id => hidden_note_with_comment.id, :text => "This is an additional comment" end assert_response :gone + closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now) + assert_no_difference "NoteComment.count" do - post :comment, :id => notes(:closed_note_with_comment).id, :text => "This is an additional comment" + post :comment, :id => closed_note_with_comment.id, :text => "This is an additional comment" end assert_response :conflict end def test_close_success - post :close, :id => notes(:open_note_with_comment).id, :text => "This is a close comment", :format => "json" + open_note_with_comment = create(:note_with_comments) + + post :close, :id => open_note_with_comment.id, :text => "This is a close comment", :format => "json" assert_response :unauthorized basic_authorization(users(:public_user).email, "test") - post :close, :id => notes(:open_note_with_comment).id, :text => "This is a close comment", :format => "json" + post :close, :id => open_note_with_comment.id, :text => "This is a close comment", :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:open_note_with_comment).id, js["properties"]["id"] + assert_equal open_note_with_comment.id, js["properties"]["id"] assert_equal "closed", js["properties"]["status"] - assert_equal 5, js["properties"]["comments"].count + assert_equal 2, js["properties"]["comments"].count assert_equal "closed", js["properties"]["comments"].last["action"] assert_equal "This is a close comment", js["properties"]["comments"].last["text"] assert_equal "test2", js["properties"]["comments"].last["user"] - get :show, :id => notes(:open_note_with_comment).id, :format => "json" + get :show, :id => open_note_with_comment.id, :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:open_note_with_comment).id, js["properties"]["id"] + assert_equal open_note_with_comment.id, js["properties"]["id"] assert_equal "closed", js["properties"]["status"] - assert_equal 5, js["properties"]["comments"].count + assert_equal 2, js["properties"]["comments"].count assert_equal "closed", js["properties"]["comments"].last["action"] assert_equal "This is a close comment", js["properties"]["comments"].last["text"] assert_equal "test2", js["properties"]["comments"].last["user"] @@ -401,37 +415,43 @@ class NotesControllerTest < ActionController::TestCase post :close, :id => 12345 assert_response :not_found - post :close, :id => notes(:hidden_note_with_comment).id + hidden_note_with_comment = create(:note_with_comments, :status => "hidden") + + post :close, :id => hidden_note_with_comment.id assert_response :gone - post :close, :id => notes(:closed_note_with_comment).id + closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now) + + post :close, :id => closed_note_with_comment.id assert_response :conflict end def test_reopen_success - post :reopen, :id => notes(:closed_note_with_comment).id, :text => "This is a reopen comment", :format => "json" + closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now) + + post :reopen, :id => closed_note_with_comment.id, :text => "This is a reopen comment", :format => "json" assert_response :unauthorized basic_authorization(users(:public_user).email, "test") - post :reopen, :id => notes(:closed_note_with_comment).id, :text => "This is a reopen comment", :format => "json" + post :reopen, :id => closed_note_with_comment.id, :text => "This is a reopen comment", :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:closed_note_with_comment).id, js["properties"]["id"] + assert_equal closed_note_with_comment.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] assert_equal 2, js["properties"]["comments"].count assert_equal "reopened", js["properties"]["comments"].last["action"] assert_equal "This is a reopen comment", js["properties"]["comments"].last["text"] assert_equal "test2", js["properties"]["comments"].last["user"] - get :show, :id => notes(:closed_note_with_comment).id, :format => "json" + get :show, :id => closed_note_with_comment.id, :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:closed_note_with_comment).id, js["properties"]["id"] + assert_equal closed_note_with_comment.id, js["properties"]["id"] assert_equal "open", js["properties"]["status"] assert_equal 2, js["properties"]["comments"].count assert_equal "reopened", js["properties"]["comments"].last["action"] @@ -440,7 +460,9 @@ class NotesControllerTest < ActionController::TestCase end def test_reopen_fail - post :reopen, :id => notes(:hidden_note_with_comment).id + hidden_note_with_comment = create(:note_with_comments, :status => "hidden") + + post :reopen, :id => hidden_note_with_comment.id assert_response :unauthorized basic_authorization(users(:public_user).email, "test") @@ -448,126 +470,138 @@ class NotesControllerTest < ActionController::TestCase post :reopen, :id => 12345 assert_response :not_found - post :reopen, :id => notes(:hidden_note_with_comment).id + post :reopen, :id => hidden_note_with_comment.id assert_response :gone - post :reopen, :id => notes(:open_note_with_comment).id + open_note_with_comment = create(:note_with_comments) + + post :reopen, :id => open_note_with_comment.id assert_response :conflict end def test_show_success - get :show, :id => notes(:open_note).id, :format => "xml" + open_note = create(:note_with_comments) + + get :show, :id => open_note.id, :format => "xml" assert_response :success assert_equal "application/xml", @response.content_type assert_select "osm", :count => 1 do - assert_select "note[lat='#{notes(:open_note).lat}'][lon='#{notes(:open_note).lon}']", :count => 1 do - assert_select "id", notes(:open_note).id - assert_select "url", note_url(notes(:open_note), :format => "xml") - assert_select "comment_url", comment_note_url(notes(:open_note), :format => "xml") - assert_select "close_url", close_note_url(notes(:open_note), :format => "xml") - assert_select "date_created", notes(:open_note).created_at.to_s - assert_select "status", notes(:open_note).status + assert_select "note[lat='#{open_note.lat}'][lon='#{open_note.lon}']", :count => 1 do + assert_select "id", open_note.id.to_s + assert_select "url", note_url(open_note, :format => "xml") + assert_select "comment_url", comment_note_url(open_note, :format => "xml") + assert_select "close_url", close_note_url(open_note, :format => "xml") + assert_select "date_created", open_note.created_at.to_s + assert_select "status", open_note.status assert_select "comments", :count => 1 do assert_select "comment", :count => 1 end end end - get :show, :id => notes(:open_note).id, :format => "rss" + get :show, :id => open_note.id, :format => "rss" assert_response :success assert_equal "application/rss+xml", @response.content_type assert_select "rss", :count => 1 do assert_select "channel", :count => 1 do assert_select "item", :count => 1 do - assert_select "link", browse_note_url(notes(:open_note)) - assert_select "guid", note_url(notes(:open_note)) - assert_select "pubDate", notes(:open_note).created_at.to_s(:rfc822) - # assert_select "geo:lat", notes(:open_note).lat.to_s - # assert_select "geo:long", notes(:open_note).lon - # assert_select "georss:point", "#{notes(:open_note).lon} #{notes(:open_note).lon}" + assert_select "link", browse_note_url(open_note) + assert_select "guid", note_url(open_note) + assert_select "pubDate", open_note.created_at.to_s(:rfc822) + # assert_select "geo:lat", open_note.lat.to_s + # assert_select "geo:long", open_note.lon + # assert_select "georss:point", "#{open_note.lon} #{open_note.lon}" end end end - get :show, :id => notes(:open_note).id, :format => "json" + get :show, :id => open_note.id, :format => "json" assert_response :success assert_equal "application/json", @response.content_type js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] assert_equal "Point", js["geometry"]["type"] - assert_equal notes(:open_note).lat, js["geometry"]["coordinates"][0] - assert_equal notes(:open_note).lon, js["geometry"]["coordinates"][1] - assert_equal notes(:open_note).id, js["properties"]["id"] - assert_equal note_url(notes(:open_note), :format => "json"), js["properties"]["url"] - assert_equal comment_note_url(notes(:open_note), :format => "json"), js["properties"]["comment_url"] - assert_equal close_note_url(notes(:open_note), :format => "json"), js["properties"]["close_url"] - assert_equal notes(:open_note).created_at, js["properties"]["date_created"] - assert_equal notes(:open_note).status, js["properties"]["status"] + assert_equal open_note.lat, js["geometry"]["coordinates"][0] + assert_equal open_note.lon, js["geometry"]["coordinates"][1] + assert_equal open_note.id, js["properties"]["id"] + assert_equal note_url(open_note, :format => "json"), js["properties"]["url"] + assert_equal comment_note_url(open_note, :format => "json"), js["properties"]["comment_url"] + assert_equal close_note_url(open_note, :format => "json"), js["properties"]["close_url"] + assert_equal open_note.created_at.to_s, js["properties"]["date_created"] + assert_equal open_note.status, js["properties"]["status"] - get :show, :id => notes(:open_note).id, :format => "gpx" + get :show, :id => open_note.id, :format => "gpx" assert_response :success assert_equal "application/gpx+xml", @response.content_type assert_select "gpx", :count => 1 do - assert_select "wpt[lat='#{notes(:open_note).lat}'][lon='#{notes(:open_note).lon}']", :count => 1 do + assert_select "wpt[lat='#{open_note.lat}'][lon='#{open_note.lon}']", :count => 1 do assert_select "time", :count => 1 - assert_select "name", "Note: #{notes(:open_note).id}" + assert_select "name", "Note: #{open_note.id}" assert_select "desc", :count => 1 - assert_select "link[href='http://www.openstreetmap.org/note/#{notes(:open_note).id}']", :count => 1 + assert_select "link[href='http://www.openstreetmap.org/note/#{open_note.id}']", :count => 1 assert_select "extensions", :count => 1 do - assert_select "id", notes(:open_note).id - assert_select "url", note_url(notes(:open_note), :format => "gpx") - assert_select "comment_url", comment_note_url(notes(:open_note), :format => "gpx") - assert_select "close_url", close_note_url(notes(:open_note), :format => "gpx") + assert_select "id", open_note.id.to_s + assert_select "url", note_url(open_note, :format => "gpx") + assert_select "comment_url", comment_note_url(open_note, :format => "gpx") + assert_select "close_url", close_note_url(open_note, :format => "gpx") end end end end def test_show_hidden_comment - get :show, :id => notes(:note_with_hidden_comment).id, :format => "json" + note_with_hidden_comment = create(:note) do |note| + create(:note_comment, :note => note, :body => "Valid comment for hidden note") + create(:note_comment, :note => note, :visible => false) + create(:note_comment, :note => note, :body => "Another valid comment for hidden note") + end + + get :show, :id => note_with_hidden_comment.id, :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:note_with_hidden_comment).id, js["properties"]["id"] + assert_equal note_with_hidden_comment.id, js["properties"]["id"] assert_equal 2, js["properties"]["comments"].count - assert_equal "Valid comment for note 5", js["properties"]["comments"][0]["text"] - assert_equal "Another valid comment for note 5", js["properties"]["comments"][1]["text"] + assert_equal "Valid comment for hidden note", js["properties"]["comments"][0]["text"] + assert_equal "Another valid comment for hidden note", js["properties"]["comments"][1]["text"] end def test_show_fail get :show, :id => 12345 assert_response :not_found - get :show, :id => notes(:hidden_note_with_comment).id + get :show, :id => create(:note, :status => "hidden").id assert_response :gone end def test_destroy_success - delete :destroy, :id => notes(:open_note_with_comment).id, :text => "This is a hide comment", :format => "json" + open_note_with_comment = create(:note_with_comments) + + delete :destroy, :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" assert_response :unauthorized basic_authorization(users(:public_user).email, "test") - delete :destroy, :id => notes(:open_note_with_comment).id, :text => "This is a hide comment", :format => "json" + delete :destroy, :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" assert_response :forbidden basic_authorization(users(:moderator_user).email, "test") - delete :destroy, :id => notes(:open_note_with_comment).id, :text => "This is a hide comment", :format => "json" + delete :destroy, :id => open_note_with_comment.id, :text => "This is a hide comment", :format => "json" assert_response :success js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "Feature", js["type"] - assert_equal notes(:open_note_with_comment).id, js["properties"]["id"] + assert_equal open_note_with_comment.id, js["properties"]["id"] assert_equal "hidden", js["properties"]["status"] - assert_equal 5, js["properties"]["comments"].count + assert_equal 2, js["properties"]["comments"].count assert_equal "hidden", js["properties"]["comments"].last["action"] assert_equal "This is a hide comment", js["properties"]["comments"].last["text"] assert_equal "moderator", js["properties"]["comments"].last["user"] - get :show, :id => notes(:open_note_with_comment).id, :format => "json" + get :show, :id => open_note_with_comment.id, :format => "json" assert_response :gone end @@ -585,11 +619,17 @@ class NotesControllerTest < ActionController::TestCase delete :destroy, :id => 12345, :format => "json" assert_response :not_found - delete :destroy, :id => notes(:hidden_note_with_comment).id, :format => "json" + hidden_note_with_comment = create(:note_with_comments, :status => "hidden") + + delete :destroy, :id => hidden_note_with_comment.id, :format => "json" assert_response :gone end def test_index_success + position = (1.1 * GeoRecord::SCALE).to_i + create(:note_with_comments, :latitude => position, :longitude => position) + create(:note_with_comments, :latitude => position, :longitude => position) + get :index, :bbox => "1,1,1.2,1.2", :format => "rss" assert_response :success assert_equal "application/rss+xml", @response.content_type @@ -623,6 +663,10 @@ class NotesControllerTest < ActionController::TestCase end def test_index_limit + position = (1.1 * GeoRecord::SCALE).to_i + create(:note_with_comments, :latitude => position, :longitude => position) + create(:note_with_comments, :latitude => position, :longitude => position) + get :index, :bbox => "1,1,1.2,1.2", :limit => 1, :format => "rss" assert_response :success assert_equal "application/rss+xml", @response.content_type @@ -707,29 +751,37 @@ class NotesControllerTest < ActionController::TestCase end def test_index_closed + create(:note_with_comments, :status => "closed", :closed_at => Time.now - 5.days) + create(:note_with_comments, :status => "closed", :closed_at => Time.now - 100.days) + create(:note_with_comments, :status => "hidden") + create(:note_with_comments) + + # Open notes + closed in last 7 days get :index, :bbox => "1,1,1.7,1.7", :closed => "7", :format => "json" assert_response :success assert_equal "application/json", @response.content_type js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "FeatureCollection", js["type"] - assert_equal 4, js["features"].count + assert_equal 2, js["features"].count + # Only open notes get :index, :bbox => "1,1,1.7,1.7", :closed => "0", :format => "json" assert_response :success assert_equal "application/json", @response.content_type js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "FeatureCollection", js["type"] - assert_equal 4, js["features"].count + assert_equal 1, js["features"].count + # Open notes + all closed notes get :index, :bbox => "1,1,1.7,1.7", :closed => "-1", :format => "json" assert_response :success assert_equal "application/json", @response.content_type js = ActiveSupport::JSON.decode(@response.body) assert_not_nil js assert_equal "FeatureCollection", js["type"] - assert_equal 6, js["features"].count + assert_equal 3, js["features"].count end def test_index_bad_params @@ -759,14 +811,16 @@ class NotesControllerTest < ActionController::TestCase end def test_search_success - get :search, :q => "note 1", :format => "xml" + create(:note_with_comments) + + get :search, :q => "note comment", :format => "xml" assert_response :success assert_equal "application/xml", @response.content_type assert_select "osm", :count => 1 do assert_select "note", :count => 1 end - get :search, :q => "note 1", :format => "json" + get :search, :q => "note comment", :format => "json" assert_response :success assert_equal "application/json", @response.content_type js = ActiveSupport::JSON.decode(@response.body) @@ -774,7 +828,7 @@ class NotesControllerTest < ActionController::TestCase assert_equal "FeatureCollection", js["type"] assert_equal 1, js["features"].count - get :search, :q => "note 1", :format => "rss" + get :search, :q => "note comment", :format => "rss" assert_response :success assert_equal "application/rss+xml", @response.content_type assert_select "rss", :count => 1 do @@ -783,7 +837,7 @@ class NotesControllerTest < ActionController::TestCase end end - get :search, :q => "note 1", :format => "gpx" + get :search, :q => "note comment", :format => "gpx" assert_response :success assert_equal "application/gpx+xml", @response.content_type assert_select "gpx", :count => 1 do @@ -792,6 +846,8 @@ class NotesControllerTest < ActionController::TestCase end def test_search_no_match + create(:note_with_comments) + get :search, :q => "no match", :format => "xml" assert_response :success assert_equal "application/xml", @response.content_type @@ -836,12 +892,19 @@ class NotesControllerTest < ActionController::TestCase end def test_feed_success + position = (1.1 * GeoRecord::SCALE).to_i + create(:note_with_comments, :latitude => position, :longitude => position) + create(:note_with_comments, :latitude => position, :longitude => position) + position = (1.5 * GeoRecord::SCALE).to_i + create(:note_with_comments, :latitude => position, :longitude => position) + create(:note_with_comments, :latitude => position, :longitude => position) + get :feed, :format => "rss" assert_response :success assert_equal "application/rss+xml", @response.content_type assert_select "rss", :count => 1 do assert_select "channel", :count => 1 do - assert_select "item", :count => 10 + assert_select "item", :count => 4 end end @@ -850,7 +913,7 @@ class NotesControllerTest < ActionController::TestCase assert_equal "application/rss+xml", @response.content_type assert_select "rss", :count => 1 do assert_select "channel", :count => 1 do - assert_select "item", :count => 5 + assert_select "item", :count => 2 end end end @@ -870,13 +933,24 @@ class NotesControllerTest < ActionController::TestCase end def test_mine_success + create(:note) do |note| + create(:note_comment, :note => note, :author_id => users(:normal_user).id) + end + create(:note) do |note| + create(:note_comment, :note => note, :author_id => users(:second_public_user).id) + end + create(:note, :status => "hidden") do |note| + create(:note_comment, :note => note, :author_id => users(:second_public_user).id) + end + + # Note that the table rows include a header row get :mine, :display_name => "test" assert_response :success assert_select "table.note_list tr", :count => 2 get :mine, :display_name => "pulibc_test2" assert_response :success - assert_select "table.note_list tr", :count => 3 + assert_select "table.note_list tr", :count => 2 get :mine, :display_name => "non-existent" assert_response :not_found @@ -889,7 +963,7 @@ class NotesControllerTest < ActionController::TestCase get :mine, :display_name => "pulibc_test2" assert_response :success - assert_select "table.note_list tr", :count => 4 + assert_select "table.note_list tr", :count => 3 get :mine, :display_name => "non-existent" assert_response :not_found diff --git a/test/controllers/site_controller_test.rb b/test/controllers/site_controller_test.rb index 453af4550..70eacb3aa 100644 --- a/test/controllers/site_controller_test.rb +++ b/test/controllers/site_controller_test.rb @@ -265,7 +265,9 @@ class SiteControllerTest < ActionController::TestCase # Test editing a specific note def test_edit_with_note user = users(:public_user) - note = notes(:open_note) + note = create(:note) do |n| + n.comments.create(:author_id => user.id) + end get :edit, { :note => note.id }, { :user => user.id } assert_response :success diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index ede841032..6a5fca785 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -2,7 +2,7 @@ require "test_helper" class UserControllerTest < ActionController::TestCase api_fixtures - fixtures :messages, :friends + fixtures :messages ## # test all routes which lead to this controller @@ -1191,6 +1191,7 @@ class UserControllerTest < ActionController::TestCase # Get users to work with user = users(:normal_user) friend = users(:public_user) + create(:friend, :user_id => user.id, :friend_user_id => friend.id) # Check that the users are friends assert Friend.where(:user_id => user.id, :friend_user_id => friend.id).first @@ -1231,6 +1232,7 @@ class UserControllerTest < ActionController::TestCase # Get users to work with user = users(:normal_user) friend = users(:public_user) + create(:friend, :user_id => user.id, :friend_user_id => friend.id) # Check that the users are friends assert Friend.where(:user_id => user.id, :friend_user_id => friend.id).first diff --git a/test/factories/friends.rb b/test/factories/friends.rb new file mode 100644 index 000000000..46b14a39d --- /dev/null +++ b/test/factories/friends.rb @@ -0,0 +1,7 @@ +FactoryGirl.define do + factory :friend do + # Fixme requires User Factory + user_id 1 + friend_user_id 2 + end +end diff --git a/test/factories/note_comments.rb b/test/factories/note_comments.rb new file mode 100644 index 000000000..b06dc378a --- /dev/null +++ b/test/factories/note_comments.rb @@ -0,0 +1,8 @@ +FactoryGirl.define do + factory :note_comment do + sequence(:body) { |n| "This is note comment #{n}" } + visible true + event "opened" + note + end +end diff --git a/test/factories/notes.rb b/test/factories/notes.rb new file mode 100644 index 000000000..9dbcdf58c --- /dev/null +++ b/test/factories/notes.rb @@ -0,0 +1,17 @@ +FactoryGirl.define do + factory :note do + latitude 1 * GeoRecord::SCALE + longitude 1 * GeoRecord::SCALE + # tile QuadTile.tile_for_point(1,1) + + factory :note_with_comments do + transient do + comments_count 1 + end + + after(:create) do |note, evaluator| + create_list(:note_comment, evaluator.comments_count, :note => note) + end + end + end +end diff --git a/test/fixtures/friends.yml b/test/fixtures/friends.yml deleted file mode 100644 index 782f1e3d2..000000000 --- a/test/fixtures/friends.yml +++ /dev/null @@ -1,4 +0,0 @@ -normal_user_with_second_user: - id: 1 - user_id: 1 - friend_user_id: 2 diff --git a/test/fixtures/note_comments.yml b/test/fixtures/note_comments.yml deleted file mode 100644 index c4b998cad..000000000 --- a/test/fixtures/note_comments.yml +++ /dev/null @@ -1,142 +0,0 @@ -t1: - id: 1 - note_id: 1 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_ip: '192.168.1.1' - body: 'This is the initial description of the note 1' - -t2: - id: 2 - note_id: 2 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_ip: '192.168.1.1' - body: 'This is the initial description of the note 2' - -t3: - id: 3 - note_id: 2 - visible: true - event: opened - created_at: 2007-02-01 00:00:00 - author_ip: '192.168.1.1' - body: 'This is an additional comment for note 2' - -t4: - id: 4 - note_id: 3 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_ip: '192.168.1.1' - body: 'This is the initial comment for note 3' - -t5: - id: 5 - note_id: 4 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_ip: '192.168.1.1' - body: 'Spam for note 4' - -t6: - id: 6 - note_id: 5 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_ip: '192.168.1.1' - body: 'Valid comment for note 5' - -t7: - id: 7 - note_id: 5 - visible: false - event: commented - created_at: 2007-02-01 00:00:00 - author_ip: '192.168.1.1' - body: 'Spam for note 5' - -t8: - id: 8 - note_id: 5 - visible: true - event: commented - created_at: 2007-02-01 00:00:00 - author_ip: '192.168.1.1' - body: 'Another valid comment for note 5' - -t9: - id: 9 - note_id: 6 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_id: 1 - body: 'This is a note with from a logged-in user' - -t10: - id: 10 - note_id: 6 - visible: true - event: commented - created_at: 2007-02-01 00:00:00 - author_id: 4 - body: 'A comment from another logged-in user' - -t11: - id: 11 - note_id: 7 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_ip: '192.168.1.1' - body: 'Initial note description' - -t12: - id: 12 - note_id: 7 - visible: true - event: commented - created_at: 2007-02-01 00:00:00 - author_ip: '192.168.1.1' - body: 'A comment description' - -t13: - id: 13 - note_id: 7 - visible: true - event: closed - created_at: 2007-03-01 00:00:00 - author_id: 4 - -t14: - id: 14 - note_id: 8 - visible: true - event: commented - created_at: 2007-02-01 00:00:00 - author_id: 4 - body: 'A comment description' - -t15: - id: 15 - note_id: 2 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_id: 10 - body: 'This is a note with from a suspended user' - -t16: - id: 16 - note_id: 2 - visible: true - event: opened - created_at: 2007-01-01 00:00:00 - author_id: 11 - body: 'This is a note with from a deleted user' diff --git a/test/fixtures/notes.yml b/test/fixtures/notes.yml deleted file mode 100644 index 79e488f1f..000000000 --- a/test/fixtures/notes.yml +++ /dev/null @@ -1,113 +0,0 @@ -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html -<% SCALE = 10000000 unless defined?(SCALE) %> - -open_note: - id: 1 - latitude: <%= 1*SCALE %> - longitude: <%= 1*SCALE %> - status: open - tile: <%= QuadTile.tile_for_point(1,1) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-01-01 00:00:00 - -open_note_with_comment: - id: 2 - latitude: <%= 1.1*SCALE %> - longitude: <%= 1.1*SCALE %> - status: open - tile: <%= QuadTile.tile_for_point(1.1,1.1) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-02-01 00:00:00 - -closed_note_with_comment: - id: 3 - latitude: <%= 1.2*SCALE %> - longitude: <%= 1.2*SCALE %> - status: closed - tile: <%= QuadTile.tile_for_point(1.2,1.2) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - closed_at: 2007-03-01 00:00:00 - -hidden_note_with_comment: - id: 4 - latitude: <%= 1.3*SCALE %> - longitude: <%= 1.3*SCALE %> - status: hidden - tile: <%= QuadTile.tile_for_point(1.3,1.3) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - -note_with_hidden_comment: - id: 5 - latitude: <%= 1.4*SCALE %> - longitude: <%= 1.4*SCALE %> - status: open - tile: <%= QuadTile.tile_for_point(1.4,1.4) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - -note_with_comments_by_users: - id: 6 - latitude: <%= 1.5*SCALE %> - longitude: <%= 1.5*SCALE %> - status: open - tile: <%= QuadTile.tile_for_point(1.5,1.5) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - -note_closed_by_user: - id: 7 - latitude: <%= 1.6*SCALE %> - longitude: <%= 1.6*SCALE %> - status: closed - tile: <%= QuadTile.tile_for_point(1.6,1.6) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - closed_at: 2007-03-01 00:00:00 - -hidden_note_with_comment: - id: 4 - latitude: <%= 1.3*SCALE %> - longitude: <%= 1.3*SCALE %> - status: hidden - tile: <%= QuadTile.tile_for_point(1.3,1.3) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - -note_with_hidden_comment: - id: 5 - latitude: <%= 1.4*SCALE %> - longitude: <%= 1.4*SCALE %> - status: open - tile: <%= QuadTile.tile_for_point(1.4,1.4) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - -note_with_comments_by_users: - id: 6 - latitude: <%= 1.5*SCALE %> - longitude: <%= 1.5*SCALE %> - status: open - tile: <%= QuadTile.tile_for_point(1.5,1.5) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - -note_closed_by_user: - id: 7 - latitude: <%= 1.6*SCALE %> - longitude: <%= 1.6*SCALE %> - status: closed - tile: <%= QuadTile.tile_for_point(1.6,1.6) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 - closed_at: 2007-03-01 00:00:00 - -hidden_note_with_comment_by_user: - id: 8 - latitude: <%= 1.3*SCALE %> - longitude: <%= 1.3*SCALE %> - status: hidden - tile: <%= QuadTile.tile_for_point(1.3,1.3) %> - created_at: 2007-01-01 00:00:00 - updated_at: 2007-03-01 00:00:00 diff --git a/test/models/friend_test.rb b/test/models/friend_test.rb index a13f67470..08eeeeb17 100644 --- a/test/models/friend_test.rb +++ b/test/models/friend_test.rb @@ -2,9 +2,9 @@ require "test_helper" class FriendTest < ActiveSupport::TestCase api_fixtures - fixtures :friends def test_friend_count + create(:friend) assert_equal 1, Friend.count end end diff --git a/test/models/note_comment_test.rb b/test/models/note_comment_test.rb index 323a827c0..2375ba9d4 100644 --- a/test/models/note_comment_test.rb +++ b/test/models/note_comment_test.rb @@ -2,20 +2,20 @@ require "test_helper" class NoteCommentTest < ActiveSupport::TestCase - fixtures :users, :notes, :note_comments + fixtures :users def test_event_valid ok = %w(opened closed reopened commented hidden) bad = %w(expropriated fubared) ok.each do |event| - note_comment = note_comments(:t1) + note_comment = create(:note_comment) note_comment.event = event assert note_comment.valid?, "#{event} is invalid, when it should be" end bad.each do |event| - note_comment = note_comments(:t1) + note_comment = create(:note_comment) note_comment.event = event assert !note_comment.valid?, "#{event} is valid when it shouldn't be" end @@ -28,13 +28,13 @@ class NoteCommentTest < ActiveSupport::TestCase "foo\ufffebar", "foo\uffffbar"] ok.each do |body| - note_comment = note_comments(:t1) + note_comment = create(:note_comment) note_comment.body = body assert note_comment.valid?, "#{body} is invalid, when it should be" end bad.each do |body| - note_comment = note_comments(:t1) + note_comment = create(:note_comment) note_comment.body = body assert !note_comment.valid?, "#{body} is valid when it shouldn't be" end diff --git a/test/models/note_test.rb b/test/models/note_test.rb index 4adbef4b8..6525ee5f6 100644 --- a/test/models/note_test.rb +++ b/test/models/note_test.rb @@ -2,27 +2,27 @@ require "test_helper" class NoteTest < ActiveSupport::TestCase - fixtures :users, :notes, :note_comments + fixtures :users def test_status_valid ok = %w(open closed hidden) bad = %w(expropriated fubared) ok.each do |status| - note = notes(:open_note) + note = create(:note) note.status = status assert note.valid?, "#{status} is invalid, when it should be" end bad.each do |status| - note = notes(:open_note) + note = create(:note) note.status = status assert !note.valid?, "#{status} is valid when it shouldn't be" end end def test_close - note = notes(:open_note) + note = create(:note) assert_equal "open", note.status assert_nil note.closed_at note.close @@ -31,7 +31,7 @@ class NoteTest < ActiveSupport::TestCase end def test_reopen - note = notes(:closed_note_with_comment) + note = create(:note, :status => "closed", :closed_at => Time.now) assert_equal "closed", note.status assert_not_nil note.closed_at note.reopen @@ -40,23 +40,29 @@ class NoteTest < ActiveSupport::TestCase end def test_visible? - assert_equal true, notes(:open_note).visible? - assert_equal true, notes(:note_with_hidden_comment).visible? - assert_equal false, notes(:hidden_note_with_comment).visible? + assert_equal true, create(:note, :status => "open").visible? + assert_equal true, create(:note, :status => "closed").visible? + assert_equal false, create(:note, :status => "hidden").visible? end def test_closed? - assert_equal true, notes(:closed_note_with_comment).closed? - assert_equal false, notes(:open_note).closed? + assert_equal true, create(:note, :status => "closed", :closed_at => Time.now).closed? + assert_equal false, create(:note, :status => "open", :closed_at => nil).closed? end def test_author - assert_nil notes(:open_note).author - assert_equal users(:normal_user), notes(:note_with_comments_by_users).author + comment = create(:note_comment) + assert_nil comment.note.author + + comment = create(:note_comment, :author_id => users(:normal_user).id) + assert_equal users(:normal_user), comment.note.author end def test_author_ip - assert_equal IPAddr.new("192.168.1.1"), notes(:open_note).author_ip - assert_nil notes(:note_with_comments_by_users).author_ip + comment = create(:note_comment) + assert_nil comment.note.author_ip + + comment = create(:note_comment, :author_ip => IPAddr.new("192.168.1.1")) + assert_equal IPAddr.new("192.168.1.1"), comment.note.author_ip end end diff --git a/test/models/user_test.rb b/test/models/user_test.rb index f9d94cc17..5de5db326 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -5,7 +5,7 @@ class UserTest < ActiveSupport::TestCase include Rails::Dom::Testing::Assertions::SelectorAssertions api_fixtures - fixtures :friends, :languages, :user_roles + fixtures :languages, :user_roles def test_invalid_with_empty_attributes user = User.new @@ -106,6 +106,7 @@ class UserTest < ActiveSupport::TestCase end def test_friend_with + create(:friend, :user_id => users(:normal_user).id, :friend_user_id => users(:public_user).id) assert users(:normal_user).is_friends_with?(users(:public_user)) assert !users(:normal_user).is_friends_with?(users(:inactive_user)) assert !users(:public_user).is_friends_with?(users(:normal_user)) @@ -129,14 +130,11 @@ class UserTest < ActiveSupport::TestCase def test_friends_with # normal user is a friend of second user - # it should be a one way friend accossitation - assert_equal 1, Friend.count + # it should be a one way friend associatation norm = users(:normal_user) sec = users(:public_user) - # friend = Friend.new - # friend.befriender = norm - # friend.befriendee = sec - # friend.save + create(:friend, :user_id => norm.id, :friend_user_id => sec.id) + assert_equal 1, Friend.count assert_equal [sec], norm.friend_users assert_equal 1, norm.friend_users.size assert_equal 1, Friend.count diff --git a/test/test_helper.rb b/test/test_helper.rb index 419ea1806..42b7cc498 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -60,8 +60,6 @@ module ActiveSupport fixtures :client_applications fixtures :redactions - - fixtures :notes, :note_comments end ##