From dfadcc797cead0cc1877dbc211b7a081bf8e769c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 22 Jun 2009 23:43:53 +0000 Subject: [PATCH] Fixed up the /<h2> mess in trace/edit and trace/view * @title was never set on trace editing, and thus <h2></h2> was produced * Changed split 'trace.view.viewing_trace' into 'trace.view.title' and 'trace.view.heading' * Introduced corresponding 'trace.edit.title' and 'trace.edit.heading' --- app/controllers/trace_controller.rb | 3 ++- app/views/trace/edit.html.erb | 2 +- app/views/trace/view.html.erb | 2 +- config/locales/be.yml | 2 +- config/locales/de.yml | 2 +- config/locales/en.yml | 5 ++++- config/locales/es.yml | 2 +- config/locales/he.yml | 2 +- config/locales/hi.yml | 2 +- config/locales/it.yml | 2 +- config/locales/ja.yml | 2 +- config/locales/ko.yml | 2 +- config/locales/nl.yml | 2 +- config/locales/pl.yml | 2 +- config/locales/pt-BR.yml | 2 +- config/locales/ru.yml | 2 +- config/locales/sl.yml | 2 +- config/locales/yo.yml | 2 +- config/locales/zh-CN.yml | 2 +- config/locales/zh-TW.yml | 2 +- 20 files changed, 24 insertions(+), 20 deletions(-) diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 667f85774..17b667969 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -111,7 +111,7 @@ class TraceController < ApplicationController if @trace and @trace.visible? and (@trace.public? or @trace.user == @user) - @title = t 'trace.view.viewing_trace', :name => @trace.name + @title = t 'trace.view.title', :name => @trace.name else flash[:notice] = t 'trace.view.trace_not_found' redirect_to :controller => 'trace', :action => 'list' @@ -168,6 +168,7 @@ class TraceController < ApplicationController @trace = Trace.find(params[:id]) if @user and @trace.user == @user + @title = t 'trace.edit.title', :name => @trace.name if params[:trace] @trace.description = params[:trace][:description] @trace.tagstring = params[:trace][:tagstring] diff --git a/app/views/trace/edit.html.erb b/app/views/trace/edit.html.erb index d3b655cc4..d8fc46f3e 100644 --- a/app/views/trace/edit.html.erb +++ b/app/views/trace/edit.html.erb @@ -1,4 +1,4 @@ -<h2><%= h(@title) %></h2> +<h2><%= t 'trace.edit.heading', :name => @trace.name %></h2> <img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>"> diff --git a/app/views/trace/view.html.erb b/app/views/trace/view.html.erb index 65957b45d..80733844d 100644 --- a/app/views/trace/view.html.erb +++ b/app/views/trace/view.html.erb @@ -1,4 +1,4 @@ -<h2><%= h(@title) %></h2> +<h2><%= t 'trace.view.heading', :name => @trace.name %></h2> <% if @trace.inserted %> <img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>"> diff --git a/config/locales/be.yml b/config/locales/be.yml index 2b1516e5d..000a70be9 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -485,7 +485,7 @@ be: make_public: "Зрабіць гэты трэк агульнадаступным назаўсёды" edit_track: "Змяніць бягучы трэк" delete_track: "Выдаліць гэты трэк" - viewing_trace: "Прагляд трэку {{name}}" + heading: "Прагляд трэку {{name}}" trace_not_found: "Трэк не знойдзены!" trace_paging_nav: showing: "Прагляд старонкі" diff --git a/config/locales/de.yml b/config/locales/de.yml index ab95e5b2c..69c0aced7 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -616,7 +616,7 @@ de: make_public: "Mache diesen Track öffentlich" edit_track: "Diesen Track bearbeiten" delete_track: "Diesen Track löschen" - viewing_trace: "Track {{name}} betrachten" + heading: "Track {{name}} betrachten" trace_not_found: "Track nicht gefunden!" trace_paging_nav: showing: "Zeige Seite" diff --git a/config/locales/en.yml b/config/locales/en.yml index 8bd0f085f..1bf9048e5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -572,6 +572,8 @@ en: upload_trace: "Upload GPS Trace" trace_uploaded: "Your GPX file has been uploaded and is awaiting insertion in to the database. This will usually happen within half an hour, and an email will be sent to you on completion." edit: + title: "Editing trace {{name}}" + heading: "Editing trace {{name}}" filename: "Filename:" download: "download" uploaded_at: "Uploaded at:" @@ -602,6 +604,8 @@ en: trace_optionals: tags: "Tags" view: + title: "Viewing trace {{name}}" + heading: "Viewing trace {{name}}" pending: "PENDING" filename: "Filename:" download: "download" @@ -617,7 +621,6 @@ en: make_public: "Make this track public permanently" edit_track: "Edit this track" delete_track: "Delete this track" - viewing_trace: "Viewing trace {{name}}" trace_not_found: "Trace not found!" trace_paging_nav: showing: "Showing page" diff --git a/config/locales/es.yml b/config/locales/es.yml index d0a1d28d1..26ff065b0 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -551,7 +551,7 @@ es: make_public: "Hacer esta traza pública de forma permanente" edit_track: "Editar esta traza" delete_track: "Borrar esta traza" - viewing_trace: "Viendo traza {{name}}" + heading: "Viendo traza {{name}}" trace_not_found: "¡No se ha encontrado la traza!" trace_paging_nav: showing: "Mostrando página" diff --git a/config/locales/he.yml b/config/locales/he.yml index 57e238396..94c496029 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -488,7 +488,7 @@ he: make_public: "Make this track public permanently" edit_track: "Edit this track" delete_track: "Delete this track" - viewing_trace: "Viewing trace {{name}}" + heading: "Viewing trace {{name}}" trace_not_found: "Trace not found!" trace_paging_nav: showing: "Showing page" diff --git a/config/locales/hi.yml b/config/locales/hi.yml index 93b565892..ee2c5ef28 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -552,7 +552,7 @@ hi: make_public: "Make this track public permanently" edit_track: "Edit this track" delete_track: "Delete this track" - viewing_trace: "Viewing trace {{name}}" + heading: "Viewing trace {{name}}" trace_not_found: "Trace not found!" trace_paging_nav: showing: "Showing page" diff --git a/config/locales/it.yml b/config/locales/it.yml index 869d467be..200a5aa2f 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -486,7 +486,7 @@ it: make_public: "Rendi pubblico questo tracciato in modo permanente" edit_track: "Modifica questo tracciato" delete_track: "Elimina questo tracciato" - viewing_trace: "Visualizzazione del tracciato {{name}}" + heading: "Visualizzazione del tracciato {{name}}" trace_not_found: "Tracciato non trovato!" trace_paging_nav: showing: "Visualizzata la pagina" diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 069999db6..7f76c30b4 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -618,7 +618,7 @@ ja: make_public: "このトラックを今後公開する" edit_track: "このトラックの編集" delete_track: "このトラックの削除" - viewing_trace: "トレース{{name}}の表示" + heading: "トレース{{name}}の表示" trace_not_found: "トレースが見つかりません!" trace_paging_nav: showing: "ページ表示" diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 332804274..1bb75ac50 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -614,7 +614,7 @@ ko: make_public: "Make this track public permanently" edit_track: "Edit this track" delete_track: "Delete this track" - viewing_trace: "Viewing trace {{name}}" + heading: "Viewing trace {{name}}" trace_not_found: "Trace not found!" trace_paging_nav: showing: "Showing page" diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 90fdc0e09..87f588f6e 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -486,7 +486,7 @@ nl: make_public: "Deze track permanent openbaar maken" edit_track: "Deze track bewerken" delete_track: "Deze track wissen" - viewing_trace: "Track {{name}} bekijken" + heading: "Track {{name}} bekijken" trace_not_found: "Track niet gevonden!" trace_paging_nav: showing: "Pagina" diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 8ca69e7d7..17afacacf 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -500,7 +500,7 @@ pl: make_public: "Na stałe oznacz ten ślad jako publiczny" edit_track: "Edytuj ten ślad" delete_track: "Wykasuj ten ślad" - viewing_trace: "Przeglądanie śladu {{name}}" + heading: "Przeglądanie śladu {{name}}" trace_not_found: "Ślad nie znaleziony!" trace_paging_nav: showing: "Widoczna jest strona" diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 1e9d64dbf..e53dd8833 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -614,7 +614,7 @@ OpenStreetMap em:" make_public: "Torne esta trilha permanentemente pública" edit_track: "Edite esta trilha" delete_track: "Apague esta trilha" - viewing_trace: "Visualizando trilha {{name}}" + heading: "Visualizando trilha {{name}}" trace_not_found: "Trilha não encontrada!" trace_paging_nav: showing: "Mostrando página" diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 544a1d187..a4022ddc4 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -486,7 +486,7 @@ ru: make_public: "Сделать этот трек публичным бессрочно" edit_track: "Редактировать свойства" delete_track: "Удалить трек" - viewing_trace: "Просмотр трека {{name}}" + heading: "Просмотр трека {{name}}" trace_not_found: "Трек не найден!" trace_paging_nav: showing: "Страница" diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 9c09d0b0c..ab542855d 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -593,7 +593,7 @@ sl: make_public: "Naj ta sled postane trajno javna" edit_track: "Uredi to sled" delete_track: "Izbriši to sled" - viewing_trace: "Prikaz sledi {{name}}" + heading: "Prikaz sledi {{name}}" trace_not_found: "Sledi ni bilo mogoče najti!" trace_paging_nav: showing: "Prikaz strani" diff --git a/config/locales/yo.yml b/config/locales/yo.yml index e55c44e96..82ed28cd8 100644 --- a/config/locales/yo.yml +++ b/config/locales/yo.yml @@ -614,7 +614,7 @@ yo: make_public: "Make this track public permanently" edit_track: "Edit this track" delete_track: "Delete this track" - viewing_trace: "Viewing trace {{name}}" + heading: "Viewing trace {{name}}" trace_not_found: "Trace not found!" trace_paging_nav: showing: "Showing page" diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index f82200561..83209757b 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -511,7 +511,7 @@ zh-CN: make_public: "永久公开这条路径" edit_track: "编辑这条路径" delete_track: "删除这条路径" - viewing_trace: "查看路径 {{name}}" + heading: "查看路径 {{name}}" trace_not_found: "路径为找到!" trace_paging_nav: showing: "显示页" diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index c93f5e0eb..e24e9a8cd 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -614,7 +614,7 @@ zh-TW: make_public: "將這個追蹤永遠標記為公開" edit_track: "編輯這個追蹤" delete_track: "刪除這個追蹤" - viewing_trace: "正在檢視追蹤 {{name}}" + heading: "正在檢視追蹤 {{name}}" trace_not_found: "找不到追蹤!" trace_paging_nav: showing: "正在顯示頁面" -- 2.43.2