def new
@title = t "diary_entry.new.title"
- if params[:diary_entry]
+ if request.post?
@diary_entry = DiaryEntry.new(entry_params)
@diary_entry.user = @user
else
default_lang = @user.preferences.where(:k => "diary.default_language").first
lang_code = default_lang ? default_lang.v : @user.preferred_language
- @diary_entry = DiaryEntry.new(:language_code => lang_code)
+ @diary_entry = DiaryEntry.new(entry_params.merge(:language_code => lang_code))
set_map_location
render :action => "edit"
end
# return permitted diary entry parameters
def entry_params
params.require(:diary_entry).permit(:title, :body, :language_code, :latitude, :longitude)
+ rescue ActionController::ParameterMissing
+ ActionController::Parameters.new.permit(:title, :body, :language_code, :latitude, :longitude)
end
##
# clicks send.
# The display_name param is the display name of the user that the message is being sent to.
def new
- if params[:message]
+ if request.post?
if @user.sent_messages.where("sent_on >= ?", Time.now.getutc - 1.hour).count >= MAX_MESSAGES_PER_HOUR
flash[:error] = t "message.new.limit_exceeded"
else
end
end
- @message ||= Message.new(:recipient => @this_user)
+ @message ||= Message.new(message_params.merge(:recipient => @this_user))
@title = t "message.new.title"
end
# return permitted message parameters
def message_params
params.require(:message).permit(:title, :body)
+ rescue ActionController::ParameterMissing
+ ActionController::Parameters.new.permit(:title, :body)
end
end
end
def create
- if params[:trace]
+ if request.post?
logger.info(params[:trace][:gpx_file].class.name)
if params[:trace][:gpx_file].respond_to?(:read)
else
@title = t "trace.edit.title", :name => @trace.name
- if params[:trace]
+ if request.post?
@trace.description = params[:trace][:description]
@trace.tagstring = params[:trace][:tagstring]
@trace.visibility = params[:trace][:visibility]
<p><%= raw t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p>
<% end %>
-<%= message_body do %>
- <%= @comment.to_html %>
+<% unless @comment.empty? %>
+ <%= message_body do %>
+ <%= @comment.to_html %>
+ <% end %>
<% end %>
<p><%= raw t 'notifier.note_comment_notification.details', :url => link_to(@noteurl, @noteurl) %></p>
<%= t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => @commenter, :place => @place %>
<% end %>
+<% unless @comment.empty? %>
==
<%= @comment.to_text %>
==
+<% end %>
<%= t 'notifier.note_comment_notification.details', :url => @noteurl %>
feed:
title: Набор зьменаў %{id}
title_comment: Набор зьменаў %{id} - %{comment}
+ way:
+ nodes: Вузлы
relation_member:
entry_role: '%{type} %{name} як %{role}'
type:
ліцэнзіі</a> растлумачыць Вам правы і адказнасьці.
credit_title_html: Як спасылацца на OpenStreetMap
credit_1_html: |-
- Калі Вы выкарыстоўваеце выявы мапаў OpenStreetMap, мы патрабуем, каб
- Вы рабілі спасылку хаця б “© удзельнікі OpenStreetMap
- , CC BY-SA”. Калі Вы выкарыстоўваеце толькі картаграфічныя зьвесткі,
- мы патрабуем наяўнасьць “Картаграфічныя зьвесткі © Удзельнікі OpenStreetMap,
- CC BY-SA”.
+ Мы патрабуем, каб
+ Вы пазначалі “© удзельнікі OpenStreetMap”.
credit_2_html: |-
Дзе магчыма, павінна быць гіпэр-спасылка на OpenStreetMap <a
href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a>
www.creativecommons.org.
more_title_html: Даведацца болей
more_1_html: |-
- Даведайцеся болей пра выкарыстаньне нашых зьвестак на <a
- href="http://wiki.openstreetmap.org/wiki/Legal_FAQ">старонцы адказаў
+ Даведайцеся болей пра выкарыстаньне нашых зьвестак і пра спасыланьне на нас на <a
+ href="http://osmfoundation.org/Licence">старонцы ліцэнзіі OSMF</a> і <a href="http://wiki.openstreetmap.org/wiki/Legal_FAQ">старонцы адказаў
і пытаньняў</a>.
more_2_html: |-
Удзельнікі OSM павінны памятаць пра тое, што забаронена дадаваць зьвесткі
trace_not_found: Трэк ня знойдзены!
visibility: 'Бачнасьць:'
trace_paging_nav:
- showing_page: Ð\9fаказанаÑ\8f Ñ\81таронка %{page}
+ showing_page: Старонка %{page}
trace:
pending: ЧАКАЕ
count_points: '%{count} пунктаў'
url: 'URL-адрас ключа запыту:'
access_url: 'URL-адрас ключа доступу:'
authorize_url: 'URL-адрас аўтарызацыі:'
- support_notice: Мы падтрымліваем HMAC-SHA1 (рэкамэндуецца) і звычайны тэкст
- у SSL-рэжыме.
+ support_notice: Мы падтрымліваем HMAC-SHA1 (рэкамэндуецца) і подпісы RSA-SHA1.
edit: Рэдагаваць падрабязнасьці
requests: 'Запыт наступных дазволаў ад удзельніка:'
allow_read_prefs: чытаць іх налады ўдзельніка.
flash changed: Ваш пароль быў зьменены.
flash token bad: Немагчыма знайсьці такі ключ, можа праверце URL-адрас?
new:
- title: СÑ\82ваÑ\80Ñ\8bÑ\86Ñ\8c Ñ\80аÑ\85Ñ\83нак
+ title: Ð\97аÑ\80Ñ\8dгÑ\96Ñ\81Ñ\82Ñ\80аваÑ\86Ñ\86а
no_auto_account_create: На жаль, мы зараз ня можам стварыць для Вас рахунак
аўтаматычна.
contact_webmaster: Калі ласка, зьвяжыцеся з <a href="%{webmaster}">вэбмайстрам</a>
blocks by me: заблякаваныя мной
send message: даслаць паведамленьне
diary: дзёньнік
- edits: рэдагаваньні
- traces: трэкі
- remove as friend: выдаліць зь сяброў
- add as friend: дадаць у сябры
+ edits: Рэдагаваньні
+ traces: Трэкі
+ remove as friend: Ð\92ыдаліць зь сяброў
+ add as friend: Ð\94адаць у сябры
mapper since: 'Стварае мапы з:'
ago: (%{time_in_words_ago} таму)
ct status: 'Умовы супрацоўніцтва:'
электроннай пошты.
flash update success: Зьвесткі пра карыстальніка пасьпяхова абноўленыя.
confirm:
- heading: Пацьверджаньне рахунку
+ heading: Праверце электронную пошту!
press confirm button: Націсьніце кнопку «Пацьвердзіць» для актывацыі Вашага
рахунку.
button: Пацьвердзіць
friendly: '%e %B %Y в %H:%M'
activerecord:
models:
- changeset: Списък промени
+ changeset: Списък с промени
country: Държава
friend: Приятел
language: Език
user:
email: Електронна поща
active: Активен
+ display_name: Видимо потребителско име
description: Описание
languages: Езици
pass_crypt: Парола
node: възел
way: път
relation: релация
- changeset: списък промени
+ changeset: списък с промени
note: Бележка
timeout:
type:
way: път
relation: релация
- changeset: списък промени
+ changeset: списък с промени
note: бележка
redacted:
type:
comment: Коментар
area: Област
list:
- title: Списък промени
+ title: Списък с промени
empty: Няма намерени списъци с промени.
empty_area: Няма списъци с промени в този район.
empty_user: Няма списъци с промени от този потребител.
geonames_reverse: Резултати от <a href="http://www.geonames.org/">GeoNames</a>
search_osm_nominatim:
prefix:
+ aerialway:
+ cable_car: Кабинков лифт
+ chair_lift: Седалков лифт
aeroway:
helipad: Вертолетна площадка
+ taxiway: Път за рулиране
terminal: Терминал
amenity:
animal_shelter: Приют за животни
phone: Телефон за спешни повиквания
highway:
abandoned: Изоставена железопътна линия
+ bridleway: Конен път
bus_stop: Автобусна спирка
construction: Магистрала в строеж
cycleway: Велосипедна пътека
construction: Строителство
farm: Ферма
farmland: Обработваема земя
+ farmyard: Стопански двор
forest: Гора
garages: Гаражи
grass: Трева
industrial: Промишлена зона
landfill: Сметище
+ meadow: Ливада
military: Военна зона
mine: Рудник
orchard: Овощна градина
historic_station: Гара с историческо значение
junction: Железопътен възел
level_crossing: Прелез
+ light_rail: Бърз трамвай
monorail: Монорелсов път
narrow_gauge: Теснолинейка
platform: Железопътна платформа
title: Добре дошли в OSM
beginners_guide:
title: Наръчник за начинаещи
+ mailing_lists:
+ title: Пощенски списъци
forums:
title: Форуми
irc:
search: Търсене
get_directions_title: Намерете маршрут между две точки
from: От
+ to: До
where_am_i: Къде съм аз?
submit_text: Напред
key:
trunk: Междуградски път
primary: Главен път
secondary: Второстепенен път
+ bridleway: Конен път
+ cycleway: Велосипедна пътека
+ footway: Пътека
+ rail: Железопът
subway: Метро
+ tram:
+ - Бърз трамвай
+ - трамвай
+ cable:
+ - Кабинков лифт
+ - седалков лифт
+ runway:
+ - Летищна писта
+ - път за рулиране
+ apron:
+ - Летищен перон
+ - терминал
+ admin: Административна граница
forest: Гора
+ wood: Лес
+ golf: Игрище за голф
park: Парк
+ resident: Жилищна зона
+ common:
+ 1: ливада
+ retail: Зона за търговия на дребно
+ industrial: Промишлена зона
+ commercial: Търговска зона
+ heathland: Пустош
lake:
- Езеро
+ farm: Земеделско стопанство
cemetery: Гробище
+ pitch: Спортна площадка
centre: Спортен център
+ reserve: Природен резерват
+ military: Военна зона
school:
- Училище
+ building: Значима сграда
station: Железопътна гара
+ summit:
+ - Било
+ - връх
+ tunnel: Тунел (пунктирана линия)
+ bridge: Мост (плътна линия)
+ construction: Пътища в изграждане
+ bicycle_shop: Магазин за велосипеди
richtext_area:
edit: Редактиране
preview: Преглед
allow_write_api: промяна на картата.
user:
login:
+ title: Вписване
email or username: 'Електронна поща или потребителско име:'
password: 'Парола:'
remember: Запомни ме
lost password link: Забравена парола?
+ login_button: Вписване
+ register now: Регистрирайте се
+ no account: Нямате сметка?
+ auth_providers:
+ google:
+ title: Вписване с Гугъл
+ facebook:
+ title: Вписване с Фейсбук
+ wikipedia:
+ title: Вписване с Уикипедия
+ yahoo:
+ title: Вписване с Яху
lost_password:
email address: 'Електронна поща:'
reset_password:
preferred languages: 'Предпочитани езици:'
preferred editor: 'Предпочитан редактор:'
image: 'Изображение:'
+ new image: Добавяне на изображение
+ keep image: Запазване на текущото изображение
+ replace image: Заменяне на текущото изображение
latitude: 'Географска ширина:'
longitude: 'Географска дължина:'
flash update success confirm needed: Сведенията за потребителя са успешно обновени.
show:
ago: преди %{time}
edit: Редактиране
+ note:
+ mine:
+ ago_html: преди %{when}
javascripts:
share:
title: Споделяне
cancel: Отказ
+ image: Изображение
+ link: Препратка или код
+ custom_dimensions: Размер по избор
format: 'Формат:'
scale: 'Мащаб:'
download: Изтегляне
+ include_marker: Добавяне на маркер
+ key:
+ title: Легенда
map:
zoom:
in: Увеличаване
base:
standard: Стандартен
cycle_map: Колоездачна карта
- transport_map: ТÑ\80анÑ\81поÑ\80Ñ\82на карта
+ transport_map: Ð\9fÑ\80евозна карта
hot: Хуманитарна карта
layers:
header: Слоеве на картата
+ notes: Бележки
data: Данни
+ overlays: Слоеве за отстраняване на грешки
title: Слоеве
donate_link_text: <a class='donate-attr' href='%{donate_url}'>Направете дарение</a>
site:
edit_tooltip: Редактиране на картата
createnote_tooltip: Добавяне на бележка на картата
+ notes:
+ new:
+ add: Добавяне на бележка
directions:
engines:
+ graphhopper_bicycle: Велосипед (GraphHopper)
+ graphhopper_foot: Пеша (GraphHopper)
+ mapquest_bicycle: Велосипед (MapQuest)
mapquest_car: Кола (MapQuest)
+ mapquest_foot: Пеша (MapQuest)
osrm_car: Кола (OSRM)
+ mapzen_bicycle: Велосипед (Mapzen)
mapzen_car: Кола (Mapzen)
+ mapzen_foot: Пеша (Mapzen)
directions: Насоки
distance: Разстояние
instructions:
turn_left_without_exit: Завийте наляво по %{name}
endofroad_left_without_exit: В края на пътя завийте наляво по %{name}
roundabout_without_exit: На кръговото движение вземете %{name}
+ start_without_exit: Тръгнете от края на %{name}
destination_without_exit: Пристигнахте на местоназначението
unnamed: неименуван път
time: Време
car_parts: "Car Parts"
car_repair: "Car Repair"
carpet: "Carpet Shop"
- car_repair: "Car Repair"
charity: "Charity Shop"
chemist: "Chemist"
clothes: "Clothes Shop"
on lähellä paikkaa %{place}.'
details: Lisää tietoja merkinnästä löytyy osoitteesta %{url}.
changeset_comment_notification:
+ hi: Hei %{to_user},
greeting: Hei,
commented:
partial_changeset_without_comment: ei kommenttia
La note se trouve près de %{place}.'
details: Plus de détails concernant la note se trouvent à %{url}.
changeset_comment_notification:
+ hi: Bonjour %{to_user},
greeting: Bonjour,
commented:
subject_own: '[OpenStreetMap] %{commenter} a commenté un de vos ensembles
partial_changeset_with_comment: avec le commentaire « %{changeset_comment}' »
partial_changeset_without_comment: sans commentaire
details: Plus de détails sur l’ensemble de modifications à %{url}.
+ unsubscribe: Pour vous désabonner des mises à jour de cet ensemble de modifications,
+ visitez %{url} et cliquez sur « Désabonner ».
message:
inbox:
title: Boîte de réception
vostede comentou. A nota está preto de %{place}.'
details: Pode atopar máis detalles da nota en %{url}.
changeset_comment_notification:
+ hi: Ola %{to_user},
greeting: Ola,
commented:
subject_own: '[OpenStreetMap] %{commenter} comentou nun dos teus conxuntos
partial_changeset_with_comment: co comentario '%{changeset_comment}'
partial_changeset_without_comment: sen comentarios
details: Máis detalles sobre o conxunto de cambios poden atoparse en %{url}.
+ unsubscribe: Para darse de baixa das actualizacións deste conxunto de cambios,
+ visite %{url} e prema en "darse de baixa".
message:
inbox:
title: Caixa de entrada
Le nota es in le vicinitate de %{place}.'
details: Plus detalios sur le nota pote esser trovate a %{url}.
changeset_comment_notification:
+ hi: Salute %{to_user},
greeting: Salute,
commented:
subject_own: '[OpenStreetMap] %{commenter} ha commentate un de tu gruppos
partial_changeset_without_comment: sin commento
details: Plus detalios sur le gruppo de modificationes pote esser trovate a
%{url}.
+ unsubscribe: Pro disabonar te del actualisationes de iste gruppo de modificationes,
+ visita %{url} e clicca sur "Disabonar".
message:
inbox:
title: Cassa de entrata
header: Stratos de carta
notes: Notas de carta
data: Datos de carta
+ gps: Tracias GPS public
overlays: Activar superpositiones pro resolver problemas in le carta
title: Stratos
copyright: © <a href='%{copyright_url}'>contributores de OpenStreetMap</a>
no_place: Iste loco non ha essite trovate.
instructions:
continue_without_exit: Continuar sur %{name}
- slight_right_without_exit: Curva suave a dextra verso %{name}
+ slight_right_without_exit: Girar legiermente a dextra verso %{name}
offramp_right_without_exit: Prende le rampa a dextra verso %{name}
onramp_right_without_exit: Girar a dextra sur le rampa verso %{name}
endofroad_right_without_exit: Al fin del strata, girar a dextra verso %{name}
endofroad_left_without_exit: Al fin del strata, girar a sinistra verso %{name}
merge_left_without_exit: Junger a sinistra verso %{name}
fork_left_without_exit: Al bifurcation, girar a sinistra verso %{name}
- slight_left_without_exit: Curva suave a sinistra verso %{name}
+ slight_left_without_exit: Girar legiermente a sinistra verso %{name}
via_point_without_exit: (puncto intermedie)
follow_without_exit: Sequer %{name}
roundabout_without_exit: Al rotunda prender %{name}
against_oneway_without_exit: Ir contra direction obligatori sur %{name}
end_oneway_without_exit: Fin del direction obligatori sur %{name}
roundabout_with_exit: Al rotunda prende le exito %{exit} sur %{name}
+ turn_left_with_exit: Al rotunda, girar a sinistra verso %{name}
+ slight_left_with_exit: Al rotunda, girar legiermente a sinistra verso %{name}
+ turn_right_with_exit: Al rotunda, girar a dextra verso %{name}
+ slight_right_with_exit: Al rotunda, girar legiermente a dextra verso %{name}
+ continue_with_exit: Al rotunda, continuar toto recte verso %{name}
unnamed: cammino sin nomine
courtesy: Itinerario fornite per %{link}
time: Tempore
weir: Sbarramento idrico
"yes": Corso d'acqua
admin_levels:
- level2: Confine di Stato Nazionale
- level4: Confine di Regione
- level5: Confine d'Area Regionale
- level6: Confine di Provincia
- level8: Confine di Città
- level9: Confine di Borgo
- level10: Confine di Quartiere
+ level2: Confine Amministrativo 2^Livello - Stato Nazionale
+ level4: Confine amministrativo 4^livello - Subnazionale
+ level5: Confine amministrativo 5^livello - Area regionale
+ level6: Confine amministrativo 6^livello - Subregionale
+ level8: Confine amministrativo 8^livello - Città
+ level9: Confine amministrativo 9^livello - Subcittadino, borgo
+ level10: Confine amministrativo 10^livello - Subcittadino, quartiere
description:
title:
osm_nominatim: Località da <a href="http://nominatim.openstreetmap.org/">OpenStreetMap
notifier:
diary_comment_notification:
subject: '[OpenStreetMap] %{user} ha commentato una voce del diario'
- hi: Salve %{to_user},
+ hi: Ciao %{to_user},
header: '%{from_user} ha commentato la voce del diario OpenStreetMap con l''oggetto
%{subject}:'
footer: Puoi anche leggere il commento su %{readurl} e puoi commentare su %{commenturl}
La nota si trova vicino a %{place}.'
details: Ulteriori dettagli sulla nota possono essere trovati su %{url}.
changeset_comment_notification:
+ hi: Ciao %{to_user},
greeting: Ciao,
commented:
subject_own: '[OpenStreetMap] %{commenter} ha commentato uno dei tuoi changeset'
partial_changeset_without_comment: senza commento
details: Ulteriori dettagli sul gruppo di modifiche possono essere trovati su
%{url}.
+ unsubscribe: Per cancellarsi dagli aggiornamenti di questo insieme di modifiche,
+ visita %{url} e fai clic su "Cancellazione".
message:
inbox:
title: Posta in arrivo
title: password persa
heading: Password dimenticata?
email address: 'Indirizzo email:'
- new password button: Spediscimi una nuova password
+ new password button: Reimposta password
help_text: Inserire l'indirizzo email che si è utilizzato per l'iscrizione,
a cui verrà inviato un collegamento che permetterà la reimpostazione della
propria password.
terminal: 터미널
amenity:
animal_shelter: 동물 보호소
- arts_centre: ì\98\88ì\88 í\9a\8cê´\80
+ arts_centre: ì\95\84í\8a¸ ì\84¼í\84°
atm: ATM
bank: 은행
bar: 주점
기여하고 유지하는 매퍼 공동체에 의해 구축됩니다.
local_knowledge_title: 지역 지식
local_knowledge_html: |-
- OpenStreetMap은 지역 지식을 강조합니다. 기여자는 OSM이 정확하고
- ìµ\9cì\8b ì\9c¼ë¡\9c 검증하기 위해 항공 영상, GPS 장치와, 낮은 기술 분야 지도를
+ OpenStreetMap은 지역 지식을 강조합니다. 기여자는 OSM이 정확하고 최신 정보로
+ ì\9c ì§\80ë\90\9cë\8b¤ë\8a\94 ê²\83ì\9d\84 검증하기 위해 항공 영상, GPS 장치와, 낮은 기술 분야 지도를
사용합니다.
community_driven_title: 공동체 주도
community_driven_html: |-
<a href='http://blogs.openstreetmap.org/'>공동체 블로그</a>와, <a href='http://www.osmfoundation.org/'>OSM 재단</a> 웹사이트를 참조하세요.
open_data_title: 오픈 데이터
open_data_html: |-
- OpenStreetMap은 <i>오픈 데이터</i>입니다: OpenStreetMap과 기여자를 제작진으로
- 어떤 목적으로도 자유롭게 사용할 수 있습니다. 특정 방법으로 바꾸거나
+ OpenStreetMap은 <i>오픈 데이터</i>입니다: OpenStreetMap 기여자를 제작진으로
+ 명시하는 한 어떤 목적으로도 자유롭게 사용할 수 있습니다. 특정 방법으로 바꾸거나
데이터에 빌드한다면, 동일한 라이선스에 따라 결과를 배포할 수 있습니다.
자세한 내용은 <a href='%{copyright_path}'>저작권 및 라이선스 페이지</a>를
참조하세요.
legal_title: 법률
legal_html: |-
- 이 사이트와 많은 다른 관련된 서비스는 공동체 뒤의 <a href='http://osmfoundation.org/'>OpenStreetMap 재단</a> (OSMF)에
- 의해 공식적으로 운영하고 있고 공동체를 대표하여 사용된 모든 OSMF 서비스의 사용은 다음과 같습니다.
- 우리의<a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy">허용되는 사용 정책</a>과 <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy">개인정보 정책</a>
- 을 참고하시기 바랍니다.
+ 이 사이트와 많은 다른 관련 사이트는 공동체를 대표하여 <a href='http://osmfoundation.org/'>OpenStreetMap 재단</a> (OSMF)
+ 에 의해 운영됩니다. OSMF가 운영하는 서비스의 사용은 <a href="http://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy">
+ 허용 가능한 사용 정책</a>과 <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy">개인정보 정책</a>에 의해 규율됩니다.
<br>
- 라이선싱, 저작권 또는 다른 법률 질문과 이슈가 있다면 <a href='http://osmfoundation.org/Contact'>OSMF에 문의</a>하시기 바랍니다.
+ 라이선싱, 저작권, 기타 다른 법률적 문제가 있다면 <a href='http://osmfoundation.org/Contact'>OSMF에 연락</a>하기 바랍니다.
partners_title: 파트너
notifier:
diary_comment_notification:
근처에 있습니다.'
details: 참고에 대한 자세한 사항은 %{url}에서 찾을 수 있습니다.
changeset_comment_notification:
+ hi: 안녕하세요 %{to_user}님,
greeting: 안녕하세요,
commented:
subject_own: '[OpenStreetMap] %{commenter}님이 당신의 바뀜집합 중 하나에 댓글을 남겼습니다'
Hãy đọc thêm chi tiết về việc sử dụng dữ liệu của chúng tôi và cách ghi công chúng tôi tại <a href="http://osmfoundation.org/Licence">OSMF Licence page</a> and the community <a
<a href="http://wiki.openstreetmap.org/wiki/Legal_FAQ?uselang=vi">Hỏi đáp Pháp lý</a>.
more_2_html: Tuy OpenStreetMap là một nguồn dữ liệu mở, nhưng chúng tôi không
- thể cung cấp API miễn phí cho những nhà phát triển bên thứ ba truy cập bản
- đồ. Hãy xem <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy?uselang=vi">Quy
- định Sử dụng API</a>, <a href="http://wiki.openstreetmap.org/wiki/Tile_usage_policy?uselang=vi">Quy
- định Sử dụng Mảnh Bản đồ</a>, và <a href="http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy">Quy
+ thể cung cấp API miễn phí cho bên thứ ba truy cập bản đồ. Hãy xem <a href="https://operations.osmfoundation.org/policies/api/">Quy
+ định Sử dụng API</a>, <a href="https://operations.osmfoundation.org/policies/tiles/">Quy
+ định Sử dụng Mảnh Bản đồ</a>, và <a href="https://operations.osmfoundation.org/policies/nominatim/">Quy
định Sử dụng Nominatim</a>.
contributors_title_html: Những người đóng góp vào đây
contributors_intro_html: 'Dự án này nhờ công sức đóng góp của hàng ngàn cá nhân
Bản quyền và Giấy phép</a>.'
legal_title: Pháp luật
legal_html: |-
- Trang Web này và nhiều dịch vụ có liên quan được hoạt động chính thức bởi <a href='http://osmfoundation.org/?uselang=vi'>Quỹ OpenStreetMap</a> (OSMF) thay mặt cho cộng đồng.
+ Trang Web này và nhiều dịch vụ có liên quan được hoạt động chính thức bởi <a href='http://osmfoundation.org/?uselang=vi'>Quỹ OpenStreetMap</a> (OSMF) thay mặt cho cộng đồng. Việc sử dụng các dịch vụ do OSMF hoạt động phải tuân theo <a href="https://wiki.openstreetmap.org/wiki/Acceptable_Use_Policy?uselang=vi">các Quy định Sử dụng Hợp lý</a> và <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy?uselang=vi">Quy định về Quyền Riêng tư</a> của chúng tôi.
<br>
Xin vui lòng <a href='http://osmfoundation.org/Contact?uselang=vi'>liên lạc với OSMF</a> nếu bạn có thắc mắc về giấy phép, bản quyền, hoặc vấn đề pháp luật khác.
partners_title: Nhà bảo trợ
notifier:
diary_comment_notification:
- subject: '[OpenStreetMap] %{user} đã bình luận về mục nhật ký của bạn'
+ subject: '[OpenStreetMap] %{user} đã bình luận về mục nhật ký'
hi: Chào %{to_user},
- header: '%{from_user} đã bình luận về mục nhật ký gần đây của bạn tại OpenStreetMap
+ header: '%{from_user} đã bình luận về mục nhật ký gần đây tại OpenStreetMap
với tiêu đề %{subject}:'
footer: Bạn cũng có thể đọc bình luận tại %{readurl}, bình luận tại %{commenturl},
hoặc trả lời tại %{replyurl}
chú gần %{place}.'
details: Xem chi tiết về ghi chú tại %{url}.
changeset_comment_notification:
+ hi: Chào %{to_user},
greeting: Chào bạn,
commented:
subject_own: '[OpenStreetMap] %{commenter} đã bình luận về một bộ thay đổi
partial_changeset_with_comment: với lời bình luận “%{changeset_comment}”
partial_changeset_without_comment: không có lời bình luận
details: Xem chi tiết về bộ thay đổi tại %{url}.
+ unsubscribe: Để ngừng nhận các thông báo về bộ thay đổi này, mở %{url} và bấm
+ “Không theo dõi”.
message:
inbox:
title: Hộp thư
github:
title: Đăng nhập qua GitHub
alt: Đăng nhập dùng tài khoản GitHub
+ wikipedia:
+ title: Đăng nhập qua Wikipedia
+ alt: Đăng nhập qua Tài khoản Wikipedia
yahoo:
title: Đăng nhập qua Yahoo!
alt: Đăng nhập dùng OpenID của Yahoo!
Điều kiện Đóng góp</a>.
email address: 'Địa chỉ Thư điện tử:'
confirm email address: 'Xác nhận Địa chỉ Thư điện tử:'
- not displayed publicly: Không được hiển thị công khai (xem <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy?uselang=vi"
- title="Quy định quyền riêng tư wiki, có đoạn nói về địa chỉ thư điện tử">quy
- định quyền riêng tư</a>)
+ not displayed publicly: Địa chỉ thư điện tử của bạn không được hiển thị công
+ khai (xem thêm chi tiết trong <a href="http://wiki.osmfoundation.org/wiki/Privacy_Policy?uselang=vi"
+ title="Quy định quyền riêng tư OSMF, có đoạn nói về địa chỉ thư điện tử">quy
+ định quyền riêng tư</a> của chúng tôi)
display name: 'Tên hiển thị:'
display name description: Tên người dùng của bạn được hiển thị công khai. Bạn
có thể thay đổi tên này về sau trong tùy chọn.
key:
title: Chú giải Bản đồ
tooltip: Chú giải Bản đồ
- tooltip_disabled: Bảng Chú giải chỉ có sẵn cho lớp Chuẩn
+ tooltip_disabled: Bảng Chú giải không có sẵn cho lớp này
map:
zoom:
in: Phóng to
header: Lớp Bản đồ
notes: Ghi chú Bản đồ
data: Dữ liệu Bản đồ
+ gps: Tuyến đường GPS Công khai
overlays: Bật lớp phủ để gỡ lỗi trên bản đồ
title: Lớp
copyright: © <a href='%{copyright_url}'>những người đóng góp vào OpenStreetMap</a>
against_oneway_without_exit: Chạy ngược chiều trên %{name}
end_oneway_without_exit: Kết thúc khúc một chiều trên %{name}
roundabout_with_exit: Tại bùng binh, đi ra tại đường thứ %{exit} tức %{name}
+ turn_left_with_exit: Tới bùng binh quẹo trái vào %{name}
+ slight_left_with_exit: Tới bùng binh nghiêng về bên trái vào %{name}
+ turn_right_with_exit: Tới bùng binh quẹo phải vào %{name}
+ slight_right_with_exit: Tới bùng binh nghiêng về bên phải vào %{name}
+ continue_with_exit: Tới bùng binh đi thẳng vào %{name}
unnamed: không tên
courtesy: Chỉ đường do %{link} cung cấp
time: Thời gian
)
end
- def test_new
+ def test_new_no_login
# Make sure that you are redirected to the login page when you
# are not logged in
get :new
assert_response :redirect
assert_redirected_to :controller => :user, :action => :login, :referer => "/diary/new"
+ end
+ def test_new_form
# Now try again when logged in
get :new, {}, { :user => users(:normal_user).id }
assert_response :success
assert_select "input", :count => 7
end
end
+ end
- new_title = "New Title"
- new_body = "This is a new body for the diary entry"
- new_latitude = "1.1"
- new_longitude = "2.2"
- new_language_code = "en"
+ def test_new_get_with_params
+ # Now try creating a diary entry using get
+ assert_difference "DiaryEntry.count", 0 do
+ get :new, { :commit => "save",
+ :diary_entry => { :title => "New Title", :body => "This is a new body for the diary entry", :latitude => "1.1",
+ :longitude => "2.2", :language_code => "en" } },
+ { :user => users(:normal_user).id }
+ end
+ assert_response :success
+ assert_template :edit
+ end
+ def test_new_no_body
# Now try creating a invalid diary entry with an empty body
assert_no_difference "DiaryEntry.count" do
post :new, { :commit => "save",
- :diary_entry => { :title => new_title, :body => "", :latitude => new_latitude,
- :longitude => new_longitude, :language_code => new_language_code } },
+ :diary_entry => { :title => "New Title", :body => "", :latitude => "1.1",
+ :longitude => "2.2", :language_code => "en" } },
{ :user => users(:normal_user).id }
end
assert_response :success
assert_template :edit
assert_nil UserPreference.where(:user_id => users(:normal_user).id, :k => "diary.default_language").first
+ end
+ def test_new_post
# Now try creating a diary entry
assert_difference "DiaryEntry.count", 1 do
post :new, { :commit => "save",
- :diary_entry => { :title => new_title, :body => new_body, :latitude => new_latitude,
- :longitude => new_longitude, :language_code => new_language_code } },
+ :diary_entry => { :title => "New Title", :body => "This is a new body for the diary entry", :latitude => "1.1",
+ :longitude => "2.2", :language_code => "en" } },
{ :user => users(:normal_user).id }
end
assert_response :redirect
assert_redirected_to :action => :list, :display_name => users(:normal_user).display_name
entry = DiaryEntry.order(:id).last
assert_equal users(:normal_user).id, entry.user_id
- assert_equal new_title, entry.title
- assert_equal new_body, entry.body
- assert_equal new_latitude.to_f, entry.latitude
- assert_equal new_longitude.to_f, entry.longitude
- assert_equal new_language_code, entry.language_code
+ assert_equal "New Title", entry.title
+ assert_equal "This is a new body for the diary entry", entry.body
+ assert_equal "1.1".to_f, entry.latitude
+ assert_equal "2.2".to_f, entry.longitude
+ assert_equal "en", entry.language_code
# checks if user was subscribed
assert_equal 1, entry.subscribers.length
- assert_equal new_language_code, UserPreference.where(:user_id => users(:normal_user).id, :k => "diary.default_language").first.v
+ assert_equal "en", UserPreference.where(:user_id => users(:normal_user).id, :k => "diary.default_language").first.v
+ end
- new_language_code = "de"
- create(:language, :code => new_language_code)
+ def test_new_german
+ create(:language, :code => "de")
# Now try creating a diary entry in a different language
assert_difference "DiaryEntry.count", 1 do
post :new, { :commit => "save",
- :diary_entry => { :title => new_title, :body => new_body, :latitude => new_latitude,
- :longitude => new_longitude, :language_code => new_language_code } },
+ :diary_entry => { :title => "New Title", :body => "This is a new body for the diary entry", :latitude => "1.1",
+ :longitude => "2.2", :language_code => "de" } },
{ :user => users(:normal_user).id }
end
assert_response :redirect
assert_redirected_to :action => :list, :display_name => users(:normal_user).display_name
entry = DiaryEntry.order(:id).last
assert_equal users(:normal_user).id, entry.user_id
- assert_equal new_title, entry.title
- assert_equal new_body, entry.body
- assert_equal new_latitude.to_f, entry.latitude
- assert_equal new_longitude.to_f, entry.longitude
- assert_equal new_language_code, entry.language_code
+ assert_equal "New Title", entry.title
+ assert_equal "This is a new body for the diary entry", entry.body
+ assert_equal "1.1".to_f, entry.latitude
+ assert_equal "2.2".to_f, entry.longitude
+ assert_equal "de", entry.language_code
# checks if user was subscribed
assert_equal 1, entry.subscribers.length
- assert_equal new_language_code, UserPreference.where(:user_id => users(:normal_user).id, :k => "diary.default_language").first.v
+ assert_equal "de", UserPreference.where(:user_id => users(:normal_user).id, :k => "diary.default_language").first.v
end
def test_new_spammy
end
##
- # test the new action
- def test_new
+ # test fetching new message page when not logged in
+ def test_new_no_login
# Check that the new message page requires us to login
get :new, :display_name => users(:public_user).display_name
assert_redirected_to login_path(:referer => new_message_path(:display_name => users(:public_user).display_name))
+ end
+ ##
+ # test fetching new message page when logged in
+ def test_new_form
# Login as a normal user
session[:user] = users(:normal_user).id
assert_select "textarea#message_body", :count => 1
assert_select "input[type='submit'][value='Send']", :count => 1
end
+ end
+
+ ##
+ # test fetching new message page with body and title
+ def test_new_get_with_params
+ # Login as a normal user
+ session[:user] = users(:normal_user).id
+
+ # Check that we can't send a message from a GET request
+ assert_difference "ActionMailer::Base.deliveries.size", 0 do
+ assert_difference "Message.count", 0 do
+ get :new,
+ :display_name => users(:public_user).display_name,
+ :message => { :title => "Test Message", :body => "Test message body" }
+ end
+ end
+ assert_response :success
+ assert_template "new"
+ assert_select "title", "OpenStreetMap | Send message"
+ assert_select "form[action='#{new_message_path(:display_name => users(:public_user).display_name)}']", :count => 1 do
+ assert_select "input#message_title", :count => 1 do
+ assert_select "[value='Test Message']"
+ end
+ assert_select "textarea#message_body", :text => "Test message body", :count => 1
+ assert_select "input[type='submit'][value='Send']", :count => 1
+ end
+ end
+
+ ##
+ # test posting new message page with no body
+ def test_new_post_no_body
+ # Login as a normal user
+ session[:user] = users(:normal_user).id
# Check that the subject is preserved over errors
assert_difference "ActionMailer::Base.deliveries.size", 0 do
assert_select "textarea#message_body", :text => "", :count => 1
assert_select "input[type='submit'][value='Send']", :count => 1
end
+ end
+
+ ##
+ # test posting new message page with no title
+ def test_new_post_no_title
+ # Login as a normal user
+ session[:user] = users(:normal_user).id
# Check that the body text is preserved over errors
assert_difference "ActionMailer::Base.deliveries.size", 0 do
assert_select "textarea#message_body", :text => "Test message body", :count => 1
assert_select "input[type='submit'][value='Send']", :count => 1
end
+ end
+
+ ##
+ # test posting new message page sends message
+ def test_new_post_send
+ # Login as a normal user
+ session[:user] = users(:normal_user).id
# Check that sending a message works
assert_difference "ActionMailer::Base.deliveries.size", 1 do