]> git.openstreetmap.org Git - rails.git/commitdiff
merging master into html-mail-fixes
authorHerve Saint-Amand <git@saintamh.org>
Sun, 12 Feb 2017 21:05:38 +0000 (21:05 +0000)
committerHerve Saint-Amand <git@saintamh.org>
Sun, 12 Feb 2017 21:05:38 +0000 (21:05 +0000)
17 files changed:
app/controllers/diary_entry_controller.rb
app/controllers/message_controller.rb
app/controllers/trace_controller.rb
app/views/notifier/note_comment_notification.html.erb
app/views/notifier/note_comment_notification.text.erb
config/locales/be-Tarask.yml
config/locales/bg.yml
config/locales/en.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/ia.yml
config/locales/it.yml
config/locales/ko.yml
config/locales/vi.yml
test/controllers/diary_entry_controller_test.rb
test/controllers/message_controller_test.rb

index 61d95ba11b9f7fffe891c18915b4e78383a70f7e..6fb255a36fc481dab4711ec2da7f75d5e5f70463 100644 (file)
@@ -12,7 +12,7 @@ class DiaryEntryController < ApplicationController
   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
 
@@ -35,7 +35,7 @@ class DiaryEntryController < ApplicationController
     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
@@ -218,6 +218,8 @@ class DiaryEntryController < ApplicationController
   # 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
 
   ##
index 0ec1c8eb6cadc1d918607252ddd6d1bdeb767824..450313e6247ca6262f14f0dd892cd4ad084770e4 100644 (file)
@@ -13,7 +13,7 @@ class MessageController < ApplicationController
   # 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
@@ -30,7 +30,7 @@ class MessageController < ApplicationController
       end
     end
 
-    @message ||= Message.new(:recipient => @this_user)
+    @message ||= Message.new(message_params.merge(:recipient => @this_user))
     @title = t "message.new.title"
   end
 
@@ -139,5 +139,7 @@ class MessageController < ApplicationController
   # return permitted message parameters
   def message_params
     params.require(:message).permit(:title, :body)
+  rescue ActionController::ParameterMissing
+    ActionController::Parameters.new.permit(:title, :body)
   end
 end
index f3fa81fd8e2fdeecf9075991dcf9bbc077e77836..e41bd01f31008e4bcf1c1c204555569b874c5350 100644 (file)
@@ -103,7 +103,7 @@ class TraceController < ApplicationController
   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)
@@ -170,7 +170,7 @@ class TraceController < ApplicationController
     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]
index ecaff81dc54c193be45c922cb832e10209035049..909bffaa664c087873694dae8b8356d1a073d8d8 100644 (file)
@@ -6,8 +6,10 @@
   <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>
index c8a967450d4b5a2d22b73e0f7030bf599fcc01ef..5924c8a9d2036975a35ce07db95439b83f351748 100644 (file)
@@ -6,8 +6,10 @@
 <%= 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 %>
index 301e5ade3539c7371559e4ea3126d77a6dbf24f0..6916b98cfb2144da79033dd140507b5dd2da846b 100644 (file)
@@ -104,6 +104,8 @@ be-Tarask:
       feed:
         title: Набор зьменаў %{id}
         title_comment: Набор зьменаў %{id} - %{comment}
+    way:
+      nodes: Вузлы
     relation_member:
       entry_role: '%{type} %{name} як %{role}'
       type:
@@ -748,11 +750,8 @@ be-Tarask:
         ліцэнзіі</a> растлумачыць Вам правы і адказнасьці.
       credit_title_html: Як спасылацца на OpenStreetMap
       credit_1_html: |-
-        Калі Вы выкарыстоўваеце выявы мапаў OpenStreetMap, мы патрабуем, каб
-        Вы рабілі спасылку хаця б &ldquo;&copy; удзельнікі OpenStreetMap
-        , CC BY-SA&rdquo;. Калі Вы выкарыстоўваеце толькі картаграфічныя зьвесткі,
-        мы патрабуем наяўнасьць &ldquo;Картаграфічныя зьвесткі &copy; Удзельнікі OpenStreetMap,
-        CC BY-SA&rdquo;.
+        Мы патрабуем, каб
+        Вы пазначалі &ldquo;&copy; удзельнікі OpenStreetMap&rdquo;.
       credit_2_html: |-
         Дзе магчыма, павінна быць гіпэр-спасылка на OpenStreetMap <a
         href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a>
@@ -765,8 +764,8 @@ be-Tarask:
         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 павінны памятаць пра тое, што забаронена дадаваць зьвесткі
@@ -1121,7 +1120,7 @@ be-Tarask:
       trace_not_found: Трэк ня знойдзены!
       visibility: 'Бачнасьць:'
     trace_paging_nav:
-      showing_page: Ð\9fаказанаÑ\8f Ñ\81таронка %{page}
+      showing_page: Ð¡таронка %{page}
     trace:
       pending: ЧАКАЕ
       count_points: '%{count} пунктаў'
@@ -1190,8 +1189,7 @@ be-Tarask:
       url: 'URL-адрас ключа запыту:'
       access_url: 'URL-адрас ключа доступу:'
       authorize_url: 'URL-адрас аўтарызацыі:'
-      support_notice: Мы падтрымліваем HMAC-SHA1 (рэкамэндуецца) і звычайны тэкст
-        у SSL-рэжыме.
+      support_notice: Мы падтрымліваем HMAC-SHA1 (рэкамэндуецца) і подпісы RSA-SHA1.
       edit: Рэдагаваць падрабязнасьці
       requests: 'Запыт наступных дазволаў ад удзельніка:'
       allow_read_prefs: чытаць іх налады ўдзельніка.
@@ -1284,7 +1282,7 @@ be-Tarask:
       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>
@@ -1344,10 +1342,10 @@ be-Tarask:
       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: 'Умовы супрацоўніцтва:'
@@ -1458,7 +1456,7 @@ be-Tarask:
         электроннай пошты.
       flash update success: Зьвесткі пра карыстальніка пасьпяхова абноўленыя.
     confirm:
-      heading: Пацьверджаньне рахунку
+      heading: Праверце электронную пошту!
       press confirm button: Націсьніце кнопку «Пацьвердзіць» для актывацыі Вашага
         рахунку.
       button: Пацьвердзіць
index a506d7b21b7712b0a0c903e19f9dd8574c0f246d..dfbd128bbc7691906a13d77b53b49a5c0db5ec5c 100644 (file)
@@ -16,7 +16,7 @@ bg:
       friendly: '%e %B %Y в %H:%M'
   activerecord:
     models:
-      changeset: Списък промени
+      changeset: Списък с промени
       country: Държава
       friend: Приятел
       language: Език
@@ -62,6 +62,7 @@ bg:
       user:
         email: Електронна поща
         active: Активен
+        display_name: Видимо потребителско име
         description: Описание
         languages: Езици
         pass_crypt: Парола
@@ -133,13 +134,13 @@ bg:
         node: възел
         way: път
         relation: релация
-        changeset: списък промени
+        changeset: списък с промени
         note: Бележка
     timeout:
       type:
         way: път
         relation: релация
-        changeset: списък промени
+        changeset: списък с промени
         note: бележка
     redacted:
       type:
@@ -169,7 +170,7 @@ bg:
       comment: Коментар
       area: Област
     list:
-      title: Списък промени
+      title: Списък с промени
       empty: Няма намерени списъци с промени.
       empty_area: Няма списъци с промени в този район.
       empty_user: Няма списъци с промени от този потребител.
@@ -267,8 +268,12 @@ bg:
         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: Приют за животни
@@ -370,6 +375,7 @@ bg:
           phone: Телефон за спешни повиквания
         highway:
           abandoned: Изоставена железопътна линия
+          bridleway: Конен път
           bus_stop: Автобусна спирка
           construction: Магистрала в строеж
           cycleway: Велосипедна пътека
@@ -431,11 +437,13 @@ bg:
           construction: Строителство
           farm: Ферма
           farmland: Обработваема земя
+          farmyard: Стопански двор
           forest: Гора
           garages: Гаражи
           grass: Трева
           industrial: Промишлена зона
           landfill: Сметище
+          meadow: Ливада
           military: Военна зона
           mine: Рудник
           orchard: Овощна градина
@@ -542,6 +550,7 @@ bg:
           historic_station: Гара с историческо значение
           junction: Железопътен възел
           level_crossing: Прелез
+          light_rail: Бърз трамвай
           monorail: Монорелсов  път
           narrow_gauge: Теснолинейка
           platform: Железопътна платформа
@@ -684,6 +693,8 @@ bg:
       title: Добре дошли в OSM
     beginners_guide:
       title: Наръчник за начинаещи
+    mailing_lists:
+      title: Пощенски списъци
     forums:
       title: Форуми
     irc:
@@ -771,6 +782,7 @@ bg:
       search: Търсене
       get_directions_title: Намерете маршрут между две точки
       from: От
+      to: До
       where_am_i: Къде съм аз?
       submit_text: Напред
     key:
@@ -781,16 +793,54 @@ bg:
           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: Преглед
@@ -851,10 +901,23 @@ bg:
       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:
@@ -896,6 +959,9 @@ bg:
       preferred languages: 'Предпочитани езици:'
       preferred editor: 'Предпочитан редактор:'
       image: 'Изображение:'
+      new image: Добавяне на изображение
+      keep image: Запазване на текущото изображение
+      replace image: Заменяне на текущото изображение
       latitude: 'Географска ширина:'
       longitude: 'Географска дължина:'
       flash update success confirm needed: Сведенията за потребителя са успешно обновени.
@@ -920,13 +986,22 @@ bg:
     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: Увеличаване
@@ -936,21 +1011,32 @@ bg:
       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:
@@ -959,6 +1045,7 @@ bg:
         turn_left_without_exit: Завийте наляво по %{name}
         endofroad_left_without_exit: В края на пътя завийте наляво по %{name}
         roundabout_without_exit: На кръговото движение вземете %{name}
+        start_without_exit: Тръгнете от края на %{name}
         destination_without_exit: Пристигнахте на местоназначението
         unnamed: неименуван път
       time: Време
index 9389c0e2f9c403038ea3f12939dd7e4b4594a15e..2414fcd1f0ef3c6a2c789f5e03110bc224a3f29b 100644 (file)
@@ -782,7 +782,6 @@ en:
           car_parts: "Car Parts"
           car_repair: "Car Repair"
           carpet: "Carpet Shop"
-          car_repair: "Car Repair"
           charity: "Charity Shop"
           chemist: "Chemist"
           clothes: "Clothes Shop"
index f2ac67d9ed3cdf589fe426d6e3c3bc632952634e..d2a4e5912aca2ddbc8590754c8a4e97f4c19249a 100644 (file)
@@ -1334,6 +1334,7 @@ fi:
           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
index 6d6048039f4fafdbdbb52ac2d1359f2fcf3fe36c..c088db13f7b02d3ad80a6a99be03ed5b7232f173 100644 (file)
@@ -1382,6 +1382,7 @@ fr:
           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
@@ -1396,6 +1397,8 @@ fr:
         partial_changeset_with_comment: avec le commentaire «&nbsp;%{changeset_comment}'&nbsp;»
         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
index fb5fb382c58eca6309ff296c64f635131c277a02..d65124fe9ae47ba07ea69ad3547282ce6c9623de 100644 (file)
@@ -1345,6 +1345,7 @@ gl:
           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
@@ -1358,6 +1359,8 @@ gl:
         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
index 53de0675dd0e0ad910b3da9e32a621c9f4967fb6..eebb71d0294ec85ed1f2cbb395b3f997352696d8 100644 (file)
@@ -1324,6 +1324,7 @@ ia:
           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
@@ -1338,6 +1339,8 @@ ia:
         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
@@ -2313,6 +2316,7 @@ ia:
         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>
@@ -2368,7 +2372,7 @@ ia:
         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}
@@ -2384,7 +2388,7 @@ ia:
         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}
@@ -2395,6 +2399,11 @@ ia:
         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
index c1bfd6ef52dc2f59834d23bac7b2f51b7169b371..e82a2bd1eec6847716f49fbce3de6dd0e0b6d66f 100644 (file)
@@ -941,13 +941,13 @@ it:
           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
@@ -1266,7 +1266,7 @@ it:
   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}
@@ -1364,6 +1364,7 @@ it:
           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'
@@ -1377,6 +1378,8 @@ it:
         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
@@ -1862,7 +1865,7 @@ it:
       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.
index 3b8748a9bfbb7b63640ee07b6f59812501768a21..a8fb1cb3c89c32784644fd57e556c3fd7195b315 100644 (file)
@@ -421,7 +421,7 @@ ko:
           terminal: 터미널
         amenity:
           animal_shelter: 동물 보호소
-          arts_centre: ì\98\88ì\88  í\9a\8cê´\80
+          arts_centre: ì\95\84í\8a¸ ì\84¼í\84°
           atm: ATM
           bank: 은행
           bar: 주점
@@ -1209,8 +1209,8 @@ ko:
       기여하고 유지하는 매퍼 공동체에 의해 구축됩니다.
     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: |-
@@ -1222,19 +1222,18 @@ ko:
       <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:
@@ -1316,6 +1315,7 @@ ko:
           근처에 있습니다.'
       details: 참고에 대한 자세한 사항은 %{url}에서 찾을 수 있습니다.
     changeset_comment_notification:
+      hi: 안녕하세요 %{to_user}님,
       greeting: 안녕하세요,
       commented:
         subject_own: '[OpenStreetMap] %{commenter}님이 당신의 바뀜집합 중 하나에 댓글을 남겼습니다'
index 5aeba831b1bc8e154e376bb8f356ee03f4dd00d7..b9281dc07664d53f347bf889aa20229d9f145b13 100644 (file)
@@ -1023,10 +1023,9 @@ vi:
         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
@@ -1206,15 +1205,15 @@ vi:
       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}
@@ -1310,6 +1309,7 @@ vi:
           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
@@ -1323,6 +1323,8 @@ vi:
         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ư
@@ -1775,6 +1777,9 @@ vi:
         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!
@@ -1821,9 +1826,10 @@ vi:
         Đ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.
@@ -2262,7 +2268,7 @@ vi:
     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
@@ -2279,6 +2285,7 @@ vi:
         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>
@@ -2361,6 +2368,11 @@ vi:
         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
index 5e53cb6b0cb137c92b4812e8eaf7d54fe0d66a1e..26883401947f510ff4751818e4078ac4487a1121 100644 (file)
@@ -101,13 +101,15 @@ class DiaryEntryControllerTest < ActionController::TestCase
     )
   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
@@ -128,71 +130,82 @@ class DiaryEntryControllerTest < ActionController::TestCase
         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
index 60192abcece5c4571fe822643af7151c07016712..210a052884c3c7a868aa5c45631166def79836d7 100644 (file)
@@ -45,12 +45,16 @@ class MessageControllerTest < ActionController::TestCase
   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
 
@@ -64,6 +68,39 @@ class MessageControllerTest < ActionController::TestCase
       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
@@ -83,6 +120,13 @@ class MessageControllerTest < ActionController::TestCase
       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
@@ -102,6 +146,13 @@ class MessageControllerTest < ActionController::TestCase
       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