Merge branch 'master' into convert_roundabout_exits

This commit is contained in:
Jamie Guthrie 2018-04-29 19:53:57 +01:00 committed by GitHub
commit 76bc5eba06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
291 changed files with 114045 additions and 98685 deletions

View file

@ -35,7 +35,7 @@ Lint/AssignmentInCondition:
- 'app/controllers/notes_controller.rb' - 'app/controllers/notes_controller.rb'
- 'app/controllers/trace_controller.rb' - 'app/controllers/trace_controller.rb'
- 'app/controllers/user_controller.rb' - 'app/controllers/user_controller.rb'
- 'app/controllers/user_preference_controller.rb' - 'app/controllers/user_preferences_controller.rb'
- 'app/helpers/application_helper.rb' - 'app/helpers/application_helper.rb'
- 'app/helpers/browse_helper.rb' - 'app/helpers/browse_helper.rb'
- 'app/models/client_application.rb' - 'app/models/client_application.rb'

View file

@ -86,6 +86,8 @@ potlatch2_key: "8lFmZPsagHV4l3rkAHq0hWY5vV3Ctl3oEFY1aXth"
Follow the same process for registering and configuring iD (`id_key`) and the website/Notes (`oauth_key`), or to save time, simply reuse the same consumer key for each. Follow the same process for registering and configuring iD (`id_key`) and the website/Notes (`oauth_key`), or to save time, simply reuse the same consumer key for each.
**NOTE:** If you forget to set up OAuth, then you will get an error message similar to `uninitialized constant ActionView::CompiledTemplates::ID_KEY`.
## Troubleshooting ## Troubleshooting
Rails has its own log. To inspect the log, do this: Rails has its own log. To inspect the log, do this:

View file

@ -105,6 +105,8 @@ gem "logstasher"
# Gems useful for development # Gems useful for development
group :development do group :development do
gem "annotate" gem "annotate"
gem "better_errors"
gem "binding_of_caller"
gem "listen" gem "listen"
gem "vendorer" gem "vendorer"
end end

View file

@ -50,7 +50,13 @@ GEM
ast (2.4.0) ast (2.4.0)
autoprefixer-rails (8.2.0) autoprefixer-rails (8.2.0)
execjs execjs
better_errors (2.4.0)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bigdecimal (1.1.0) bigdecimal (1.1.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.3) builder (3.2.3)
canonical-rails (0.2.2) canonical-rails (0.2.2)
rails (>= 4.1, < 5.2) rails (>= 4.1, < 5.2)
@ -63,6 +69,7 @@ GEM
xpath (>= 2.0, < 4.0) xpath (>= 2.0, < 4.0)
climate_control (0.2.0) climate_control (0.2.0)
cliver (0.3.2) cliver (0.3.2)
coderay (1.1.2)
coffee-rails (4.2.2) coffee-rails (4.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0) railties (>= 4.0.0)
@ -83,6 +90,7 @@ GEM
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
crass (1.0.3) crass (1.0.3)
dalli (2.7.6) dalli (2.7.6)
debug_inspector (0.0.2)
docile (1.1.5) docile (1.1.5)
dynamic_form (1.1.4) dynamic_form (1.1.4)
erubi (1.7.1) erubi (1.7.1)
@ -357,7 +365,9 @@ DEPENDENCIES
actionpack-page_caching actionpack-page_caching
annotate annotate
autoprefixer-rails autoprefixer-rails
better_errors
bigdecimal (~> 1.1.0) bigdecimal (~> 1.1.0)
binding_of_caller
canonical-rails canonical-rails
capybara (~> 2.13) capybara (~> 2.13)
coffee-rails (~> 4.2) coffee-rails (~> 4.2)

View file

@ -2,9 +2,9 @@ $(document).ready(function () {
var id = $("#id-embed"); var id = $("#id-embed");
if (id.data("key")) { if (id.data("key")) {
var hashParams = OSM.params(location.hash.substring(1)), var hashParams = OSM.params(location.hash.substring(1));
mapParams = OSM.mapParams(), var mapParams = OSM.mapParams();
params = {}; var params = {};
if (mapParams.object) { if (mapParams.object) {
params.id = mapParams.object.type[0] + mapParams.object.id; params.id = mapParams.object.type[0] + mapParams.object.id;
@ -20,8 +20,9 @@ $(document).ready(function () {
if (hashParams.background) params.background = hashParams.background; if (hashParams.background) params.background = hashParams.background;
if (hashParams.comment) params.comment = hashParams.comment; if (hashParams.comment) params.comment = hashParams.comment;
if (hashParams.disable_features) params.disable_features = hashParams.disable_features;
if (hashParams.hashtags) params.hashtags = hashParams.hashtags; if (hashParams.hashtags) params.hashtags = hashParams.hashtags;
if (hashParams.source) params.source = hashParams.source;
if (hashParams.disable_features) params.disable_features = hashParams.disable_features;
if (hashParams.offset) params.offset = hashParams.offset; if (hashParams.offset) params.offset = hashParams.offset;
if (hashParams.walkthrough) params.walkthrough = hashParams.walkthrough; if (hashParams.walkthrough) params.walkthrough = hashParams.walkthrough;

View file

@ -40,7 +40,8 @@ OSM.Directions = function (map) {
shadowUrl: OSM.MARKER_SHADOW, shadowUrl: OSM.MARKER_SHADOW,
shadowSize: [41, 41] shadowSize: [41, 41]
}), }),
draggable: true draggable: true,
autoPan: true
}); });
endpoint.marker.on('drag dragend', function (e) { endpoint.marker.on('drag dragend', function (e) {
@ -53,6 +54,10 @@ OSM.Directions = function (map) {
} }
}); });
input.on("keydown", function() {
input.removeClass("error");
});
input.on("change", function (e) { input.on("change", function (e) {
awaitingGeocode = true; awaitingGeocode = true;
@ -64,6 +69,7 @@ OSM.Directions = function (map) {
endpoint.setValue = function(value, latlng) { endpoint.setValue = function(value, latlng) {
endpoint.value = value; endpoint.value = value;
delete endpoint.latlng; delete endpoint.latlng;
input.removeClass("error");
input.val(value); input.val(value);
if (latlng) { if (latlng) {
@ -86,7 +92,8 @@ OSM.Directions = function (map) {
endpoint.awaitingGeocode = false; endpoint.awaitingGeocode = false;
endpoint.hasGeocode = true; endpoint.hasGeocode = true;
if (json.length === 0) { if (json.length === 0) {
alert(I18n.t('javascripts.directions.errors.no_place')); input.addClass("error");
alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
return; return;
} }

View file

@ -938,6 +938,10 @@ header .search_forms,
border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;
} }
input.error {
background-color: rgba($red, 0.4);
}
select { select {
/* this next line is to polyfill the vertical alignment of text within a select element, /* this next line is to polyfill the vertical alignment of text within a select element,
* which is different between firefox and chrome. */ * which is different between firefox and chrome. */

View file

@ -175,7 +175,7 @@ class ApplicationController < ActionController::Base
end end
def authorize(realm = "Web Password", errormessage = "Couldn't authenticate you") def authorize(realm = "Web Password", errormessage = "Couldn't authenticate you")
# make the @user object from any auth sources we have # make the current_user object from any auth sources we have
setup_user_auth setup_user_auth
# handle authenticate pass/fail # handle authenticate pass/fail
@ -377,9 +377,9 @@ class ApplicationController < ActionController::Base
end end
## ##
# ensure that there is a "this_user" instance variable # ensure that there is a "user" instance variable
def lookup_this_user def lookup_user
render_unknown_user params[:display_name] unless @this_user = User.active.find_by(:display_name => params[:display_name]) render_unknown_user params[:display_name] unless @user = User.active.find_by(:display_name => params[:display_name])
end end
## ##

View file

@ -3,7 +3,7 @@ class BrowseController < ApplicationController
before_action :authorize_web before_action :authorize_web
before_action :set_locale before_action :set_locale
before_action :except => [:query] { |c| c.check_database_readable(true) } before_action(:except => [:query]) { |c| c.check_database_readable(true) }
before_action :require_oauth before_action :require_oauth
around_action :web_timeout around_action :web_timeout

View file

@ -4,7 +4,7 @@ class DiaryEntryController < ApplicationController
before_action :authorize_web before_action :authorize_web
before_action :set_locale before_action :set_locale
before_action :require_user, :only => [:new, :edit, :comment, :hide, :hidecomment, :subscribe, :unsubscribe] before_action :require_user, :only => [:new, :edit, :comment, :hide, :hidecomment, :subscribe, :unsubscribe]
before_action :lookup_this_user, :only => [:view, :comments] before_action :lookup_user, :only => [:view, :comments]
before_action :check_database_readable before_action :check_database_readable
before_action :check_database_writable, :only => [:new, :edit, :comment, :hide, :hidecomment, :subscribe, :unsubscribe] before_action :check_database_writable, :only => [:new, :edit, :comment, :hide, :hidecomment, :subscribe, :unsubscribe]
before_action :require_administrator, :only => [:hide, :hidecomment] before_action :require_administrator, :only => [:hide, :hidecomment]
@ -101,11 +101,11 @@ class DiaryEntryController < ApplicationController
def list def list
if params[:display_name] if params[:display_name]
@this_user = User.active.find_by(:display_name => params[:display_name]) @user = User.active.find_by(:display_name => params[:display_name])
if @this_user if @user
@title = t "diary_entry.list.user_title", :user => @this_user.display_name @title = t "diary_entry.list.user_title", :user => @user.display_name
@entries = @this_user.diary_entries @entries = @user.diary_entries
else else
render_unknown_user params[:display_name] render_unknown_user params[:display_name]
return return
@ -157,7 +157,7 @@ class DiaryEntryController < ApplicationController
@entries = user.diary_entries @entries = user.diary_entries
@title = I18n.t("diary_entry.feed.user.title", :user => user.display_name) @title = I18n.t("diary_entry.feed.user.title", :user => user.display_name)
@description = I18n.t("diary_entry.feed.user.description", :user => user.display_name) @description = I18n.t("diary_entry.feed.user.description", :user => user.display_name)
@link = "#{SERVER_PROTOCOL}://#{SERVER_URL}/user/#{user.display_name}/diary" @link = url_for :controller => "diary_entry", :action => "list", :display_name => user.display_name, :host => SERVER_URL, :protocol => SERVER_PROTOCOL
else else
head :not_found head :not_found
return return
@ -169,11 +169,11 @@ class DiaryEntryController < ApplicationController
@entries = @entries.where(:language_code => params[:language]) @entries = @entries.where(:language_code => params[:language])
@title = I18n.t("diary_entry.feed.language.title", :language_name => Language.find(params[:language]).english_name) @title = I18n.t("diary_entry.feed.language.title", :language_name => Language.find(params[:language]).english_name)
@description = I18n.t("diary_entry.feed.language.description", :language_name => Language.find(params[:language]).english_name) @description = I18n.t("diary_entry.feed.language.description", :language_name => Language.find(params[:language]).english_name)
@link = "#{SERVER_PROTOCOL}://#{SERVER_URL}/diary/#{params[:language]}" @link = url_for :controller => "diary_entry", :action => "list", :language => params[:language], :host => SERVER_URL, :protocol => SERVER_PROTOCOL
else else
@title = I18n.t("diary_entry.feed.all.title") @title = I18n.t("diary_entry.feed.all.title")
@description = I18n.t("diary_entry.feed.all.description") @description = I18n.t("diary_entry.feed.all.description")
@link = "#{SERVER_PROTOCOL}://#{SERVER_URL}/diary" @link = url_for :controller => "diary_entry", :action => "list", :host => SERVER_URL, :protocol => SERVER_PROTOCOL
end end
end end
@ -181,7 +181,7 @@ class DiaryEntryController < ApplicationController
end end
def view def view
@entry = @this_user.diary_entries.visible.where(:id => params[:id]).first @entry = @user.diary_entries.visible.where(:id => params[:id]).first
if @entry if @entry
@title = t "diary_entry.view.title", :user => params[:display_name], :title => @entry.title @title = t "diary_entry.view.title", :user => params[:display_name], :title => @entry.title
else else
@ -205,7 +205,7 @@ class DiaryEntryController < ApplicationController
def comments def comments
@comment_pages, @comments = paginate(:diary_comments, @comment_pages, @comments = paginate(:diary_comments,
:conditions => { :conditions => {
:user_id => @this_user, :user_id => @user,
:visible => true :visible => true
}, },
:order => "created_at DESC", :order => "created_at DESC",

View file

@ -4,7 +4,7 @@ class MessageController < ApplicationController
before_action :authorize_web before_action :authorize_web
before_action :set_locale before_action :set_locale
before_action :require_user before_action :require_user
before_action :lookup_this_user, :only => [:new] before_action :lookup_user, :only => [:new]
before_action :check_database_readable before_action :check_database_readable
before_action :check_database_writable, :only => [:new, :reply, :mark] before_action :check_database_writable, :only => [:new, :reply, :mark]
before_action :allow_thirdparty_images, :only => [:new, :read] before_action :allow_thirdparty_images, :only => [:new, :read]
@ -19,7 +19,7 @@ class MessageController < ApplicationController
flash[:error] = t "message.new.limit_exceeded" flash[:error] = t "message.new.limit_exceeded"
else else
@message = Message.new(message_params) @message = Message.new(message_params)
@message.recipient = @this_user @message.recipient = @user
@message.sender = current_user @message.sender = current_user
@message.sent_on = Time.now.getutc @message.sent_on = Time.now.getutc
@ -31,7 +31,7 @@ class MessageController < ApplicationController
end end
end end
@message ||= Message.new(message_params.merge(:recipient => @this_user)) @message ||= Message.new(message_params.merge(:recipient => @user))
@title = t "message.new.title" @title = t "message.new.title"
end end

View file

@ -278,14 +278,14 @@ class NotesController < ApplicationController
# Display a list of notes by a specified user # Display a list of notes by a specified user
def mine def mine
if params[:display_name] if params[:display_name]
if @this_user = User.active.find_by(:display_name => params[:display_name]) if @user = User.active.find_by(:display_name => params[:display_name])
@params = params.permit(:display_name) @params = params.permit(:display_name)
@title = t "note.mine.title", :user => @this_user.display_name @title = t "notes.mine.title", :user => @user.display_name
@heading = t "note.mine.heading", :user => @this_user.display_name @heading = t "notes.mine.heading", :user => @user.display_name
@description = t "note.mine.subheading", :user => render_to_string(:partial => "user", :object => @this_user) @description = t "notes.mine.subheading", :user => render_to_string(:partial => "user", :object => @user)
@page = (params[:page] || 1).to_i @page = (params[:page] || 1).to_i
@page_size = 10 @page_size = 10
@notes = @this_user.notes @notes = @user.notes
@notes = @notes.visible unless current_user && current_user.moderator? @notes = @notes.visible unless current_user && current_user.moderator?
@notes = @notes.order("updated_at DESC, id").distinct.offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author).to_a @notes = @notes.order("updated_at DESC, id").distinct.offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author).to_a
else else

View file

@ -30,7 +30,7 @@ class OauthController < ApplicationController
@token = current_user.oauth_tokens.find_by :token => params[:token] @token = current_user.oauth_tokens.find_by :token => params[:token]
if @token if @token
@token.invalidate! @token.invalidate!
flash[:notice] = t("oauth.revoke.flash", :application => @token.client_application.name) flash[:notice] = t(".flash", :application => @token.client_application.name)
end end
redirect_to oauth_clients_url(:display_name => @token.user.display_name) redirect_to oauth_clients_url(:display_name => @token.user.display_name)
end end
@ -41,7 +41,7 @@ class OauthController < ApplicationController
append_content_security_policy_directives(:form_action => %w[*]) append_content_security_policy_directives(:form_action => %w[*])
if @token.invalidated? if @token.invalidated?
@message = t "oauth.oauthorize_failure.invalid" @message = t "oauth.authorize_failure.invalid"
render :action => "authorize_failure" render :action => "authorize_failure"
elsif request.post? elsif request.post?
if user_authorizes_token? if user_authorizes_token?
@ -69,7 +69,7 @@ class OauthController < ApplicationController
end end
else else
@token.invalidate! @token.invalidate!
@message = t("oauth.oauthorize_failure.denied", :app_name => @token.client_application.name) @message = t("oauth.authorize_failure.denied", :app_name => @token.client_application.name)
render :action => "authorize_failure" render :action => "authorize_failure"
end end
end end

View file

@ -25,7 +25,7 @@ class RedactionsController < ApplicationController
# note that the description format will default to 'markdown' # note that the description format will default to 'markdown'
if @redaction.save if @redaction.save
flash[:notice] = t("redaction.create.flash") flash[:notice] = t(".flash")
redirect_to @redaction redirect_to @redaction
else else
render :action => "new" render :action => "new"
@ -42,7 +42,7 @@ class RedactionsController < ApplicationController
@redaction.description = params[:redaction][:description] @redaction.description = params[:redaction][:description]
if @redaction.save if @redaction.save
flash[:notice] = t("redaction.update.flash") flash[:notice] = t(".flash")
redirect_to @redaction redirect_to @redaction
else else
render :action => "edit" render :action => "edit"
@ -54,14 +54,14 @@ class RedactionsController < ApplicationController
@redaction.old_ways.empty? && @redaction.old_ways.empty? &&
@redaction.old_relations.empty? @redaction.old_relations.empty?
if @redaction.destroy if @redaction.destroy
flash[:notice] = t("redaction.destroy.flash") flash[:notice] = t(".flash")
redirect_to :redactions redirect_to :redactions
else else
flash[:error] = t("redaction.destroy.error") flash[:error] = t(".error")
redirect_to @redaction redirect_to @redaction
end end
else else
flash[:error] = t("redaction.destroy.not_empty") flash[:error] = t(".not_empty")
redirect_to @redaction redirect_to @redaction
end end
end end

View file

@ -5,7 +5,7 @@ class UserBlocksController < ApplicationController
before_action :set_locale before_action :set_locale
before_action :require_user, :only => [:new, :create, :edit, :update, :revoke] before_action :require_user, :only => [:new, :create, :edit, :update, :revoke]
before_action :require_moderator, :only => [:new, :create, :edit, :update, :revoke] before_action :require_moderator, :only => [:new, :create, :edit, :update, :revoke]
before_action :lookup_this_user, :only => [:new, :create, :blocks_on, :blocks_by] before_action :lookup_user, :only => [:new, :create, :blocks_on, :blocks_by]
before_action :lookup_user_block, :only => [:show, :edit, :update, :revoke] before_action :lookup_user_block, :only => [:show, :edit, :update, :revoke]
before_action :require_valid_params, :only => [:create, :update] before_action :require_valid_params, :only => [:create, :update]
before_action :check_database_readable before_action :check_database_readable
@ -37,7 +37,7 @@ class UserBlocksController < ApplicationController
def create def create
if @valid_params if @valid_params
@user_block = UserBlock.new( @user_block = UserBlock.new(
:user => @this_user, :user => @user,
:creator => current_user, :creator => current_user,
:reason => params[:user_block][:reason], :reason => params[:user_block][:reason],
:ends_at => Time.now.getutc + @block_period.hours, :ends_at => Time.now.getutc + @block_period.hours,
@ -45,7 +45,7 @@ class UserBlocksController < ApplicationController
) )
if @user_block.save if @user_block.save
flash[:notice] = t("user_block.create.flash", :name => @this_user.display_name) flash[:notice] = t(".flash", :name => @user.display_name)
redirect_to @user_block redirect_to @user_block
else else
render :action => "new" render :action => "new"
@ -58,14 +58,14 @@ class UserBlocksController < ApplicationController
def update def update
if @valid_params if @valid_params
if @user_block.creator != current_user if @user_block.creator != current_user
flash[:error] = t("user_block.update.only_creator_can_edit") flash[:error] = t(".only_creator_can_edit")
redirect_to :action => "edit" redirect_to :action => "edit"
elsif @user_block.update( elsif @user_block.update(
:ends_at => Time.now.getutc + @block_period.hours, :ends_at => Time.now.getutc + @block_period.hours,
:reason => params[:user_block][:reason], :reason => params[:user_block][:reason],
:needs_view => params[:user_block][:needs_view] :needs_view => params[:user_block][:needs_view]
) )
flash[:notice] = t("user_block.update.success") flash[:notice] = t(".success")
redirect_to(@user_block) redirect_to(@user_block)
else else
render :action => "edit" render :action => "edit"
@ -80,7 +80,7 @@ class UserBlocksController < ApplicationController
def revoke def revoke
if params[:confirm] if params[:confirm]
if @user_block.revoke! current_user if @user_block.revoke! current_user
flash[:notice] = t "user_block.revoke.flash" flash[:notice] = t ".flash"
redirect_to(@user_block) redirect_to(@user_block)
end end
end end
@ -92,7 +92,7 @@ class UserBlocksController < ApplicationController
@params = params.permit(:display_name) @params = params.permit(:display_name)
@user_blocks_pages, @user_blocks = paginate(:user_blocks, @user_blocks_pages, @user_blocks = paginate(:user_blocks,
:include => [:user, :creator, :revoker], :include => [:user, :creator, :revoker],
:conditions => { :user_id => @this_user.id }, :conditions => { :user_id => @user.id },
:order => "user_blocks.ends_at DESC", :order => "user_blocks.ends_at DESC",
:per_page => 20) :per_page => 20)
end end
@ -103,7 +103,7 @@ class UserBlocksController < ApplicationController
@params = params.permit(:display_name) @params = params.permit(:display_name)
@user_blocks_pages, @user_blocks = paginate(:user_blocks, @user_blocks_pages, @user_blocks = paginate(:user_blocks,
:include => [:user, :creator, :revoker], :include => [:user, :creator, :revoker],
:conditions => { :creator_id => @this_user.id }, :conditions => { :creator_id => @user.id },
:order => "user_blocks.ends_at DESC", :order => "user_blocks.ends_at DESC",
:per_page => 20) :per_page => 20)
end end
@ -128,10 +128,10 @@ class UserBlocksController < ApplicationController
@valid_params = false @valid_params = false
if !UserBlock::PERIODS.include?(@block_period) if !UserBlock::PERIODS.include?(@block_period)
flash[:error] = t("user_block.filter.block_period") flash[:error] = t("user_blocks.filter.block_period")
elsif @user_block && !@user_block.active? elsif @user_block && !@user_block.active?
flash[:error] = t("user_block.filter.block_expired") flash[:error] = t("user_blocks.filter.block_expired")
else else
@valid_params = true @valid_params = true

View file

@ -377,7 +377,7 @@ class UserController < ApplicationController
end end
def api_read def api_read
if @this_user.visible? if @user.visible?
render :action => :api_read, :content_type => "text/xml" render :action => :api_read, :content_type => "text/xml"
else else
head :gone head :gone
@ -385,7 +385,7 @@ class UserController < ApplicationController
end end
def api_details def api_details
@this_user = current_user @user = current_user
render :action => :api_read, :content_type => "text/xml" render :action => :api_read, :content_type => "text/xml"
end end
@ -398,11 +398,11 @@ class UserController < ApplicationController
end end
def view def view
@this_user = User.find_by(:display_name => params[:display_name]) @user = User.find_by(:display_name => params[:display_name])
if @this_user && if @user &&
(@this_user.visible? || (current_user && current_user.administrator?)) (@user.visible? || (current_user && current_user.administrator?))
@title = @this_user.display_name @title = @user.display_name
else else
render_unknown_user params[:display_name] render_unknown_user params[:display_name]
end end
@ -462,15 +462,15 @@ class UserController < ApplicationController
## ##
# sets a user's status # sets a user's status
def set_status def set_status
@this_user.status = params[:status] @user.status = params[:status]
@this_user.save @user.save
redirect_to :action => "view", :display_name => params[:display_name] redirect_to :action => "view", :display_name => params[:display_name]
end end
## ##
# delete a user, marking them as deleted and removing personal data # delete a user, marking them as deleted and removing personal data
def delete def delete
@this_user.delete @user.delete
redirect_to :action => "view", :display_name => params[:display_name] redirect_to :action => "view", :display_name => params[:display_name]
end end
@ -761,17 +761,17 @@ class UserController < ApplicationController
end end
## ##
# ensure that there is a "this_user" instance variable # ensure that there is a "user" instance variable
def lookup_user_by_id def lookup_user_by_id
@this_user = User.find(params[:id]) @user = User.find(params[:id])
end end
## ##
# ensure that there is a "this_user" instance variable # ensure that there is a "user" instance variable
def lookup_user_by_name def lookup_user_by_name
@this_user = User.find_by(:display_name => params[:display_name]) @user = User.find_by(:display_name => params[:display_name])
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
redirect_to :action => "view", :display_name => params[:display_name] unless @this_user redirect_to :action => "view", :display_name => params[:display_name] unless @user
end end
## ##

View file

@ -1,5 +1,5 @@
# Update and read user preferences, which are arbitrayr key/val pairs # Update and read user preferences, which are arbitrayr key/val pairs
class UserPreferenceController < ApplicationController class UserPreferencesController < ApplicationController
skip_before_action :verify_authenticity_token skip_before_action :verify_authenticity_token
before_action :authorize before_action :authorize
before_action :require_allow_read_prefs, :only => [:read_one, :read] before_action :require_allow_read_prefs, :only => [:read_one, :read]

View file

@ -3,25 +3,25 @@ class UserRolesController < ApplicationController
before_action :authorize_web before_action :authorize_web
before_action :require_user before_action :require_user
before_action :lookup_this_user before_action :lookup_user
before_action :require_administrator before_action :require_administrator
before_action :require_valid_role before_action :require_valid_role
before_action :not_in_role, :only => [:grant] before_action :not_in_role, :only => [:grant]
before_action :in_role, :only => [:revoke] before_action :in_role, :only => [:revoke]
def grant def grant
@this_user.roles.create(:role => @role, :granter => current_user) @user.roles.create(:role => @role, :granter => current_user)
redirect_to user_path(@this_user) redirect_to user_path(@user)
end end
def revoke def revoke
# checks that administrator role is not revoked from current user # checks that administrator role is not revoked from current user
if current_user == @this_user && @role == "administrator" if current_user == @user && @role == "administrator"
flash[:error] = t("user_role.filter.not_revoke_admin_current_user") flash[:error] = t("user_role.filter.not_revoke_admin_current_user")
else else
UserRole.where(:user_id => @this_user.id, :role => @role).delete_all UserRole.where(:user_id => @user.id, :role => @role).delete_all
end end
redirect_to user_path(@this_user) redirect_to user_path(@user)
end end
private private
@ -32,7 +32,7 @@ class UserRolesController < ApplicationController
def require_administrator def require_administrator
unless current_user.administrator? unless current_user.administrator?
flash[:error] = t "user_role.filter.not_an_administrator" flash[:error] = t "user_role.filter.not_an_administrator"
redirect_to user_path(@this_user) redirect_to user_path(@user)
end end
end end
@ -43,25 +43,25 @@ class UserRolesController < ApplicationController
@role = params[:role] @role = params[:role]
unless UserRole::ALL_ROLES.include?(@role) unless UserRole::ALL_ROLES.include?(@role)
flash[:error] = t("user_role.filter.not_a_role", :role => @role) flash[:error] = t("user_role.filter.not_a_role", :role => @role)
redirect_to user_path(@this_user) redirect_to user_path(@user)
end end
end end
## ##
# checks that the user doesn't already have this role # checks that the user doesn't already have this role
def not_in_role def not_in_role
if @this_user.has_role? @role if @user.has_role? @role
flash[:error] = t("user_role.filter.already_has_role", :role => @role) flash[:error] = t("user_role.filter.already_has_role", :role => @role)
redirect_to user_path(@this_user) redirect_to user_path(@user)
end end
end end
## ##
# checks that the user already has this role # checks that the user already has this role
def in_role def in_role
unless @this_user.has_role? @role unless @user.has_role? @role
flash[:error] = t("user_role.filter.doesnt_have_role", :role => @role) flash[:error] = t("user_role.filter.doesnt_have_role", :role => @role)
redirect_to user_path(@this_user) redirect_to user_path(@user)
end end
end end
end end

View file

@ -7,19 +7,19 @@ module UserBlocksHelper
# if the block hasn't expired yet show the date, if the user just needs to login show that # if the block hasn't expired yet show the date, if the user just needs to login show that
if block.needs_view? if block.needs_view?
if block.ends_at > Time.now.getutc if block.ends_at > Time.now.getutc
I18n.t("user_block.helper.time_future_and_until_login", :time => friendly_date(block.ends_at)).html_safe I18n.t("user_blocks.helper.time_future_and_until_login", :time => friendly_date(block.ends_at)).html_safe
else else
I18n.t("user_block.helper.until_login") I18n.t("user_blocks.helper.until_login")
end end
else else
I18n.t("user_block.helper.time_future", :time => friendly_date(block.ends_at)).html_safe I18n.t("user_blocks.helper.time_future", :time => friendly_date(block.ends_at)).html_safe
end end
else else
# the max of the last update time or the ends_at time is when this block finished # the max of the last update time or the ends_at time is when this block finished
# either because the user viewed the block (updated_at) or it expired or was # either because the user viewed the block (updated_at) or it expired or was
# revoked (ends_at) # revoked (ends_at)
last_time = [block.ends_at, block.updated_at].max last_time = [block.ends_at, block.updated_at].max
I18n.t("user_block.helper.time_past", :time => friendly_date(last_time)).html_safe I18n.t("user_blocks.helper.time_past", :time => friendly_date(last_time)).html_safe
end end
end end
end end

View file

@ -8,9 +8,7 @@ class Notifier < ActionMailer::Base
def signup_confirm(user, token) def signup_confirm(user, token)
with_recipient_locale user do with_recipient_locale user do
@url = url_for(:host => SERVER_URL, @url = url_for(:controller => "user", :action => "confirm",
:protocol => SERVER_PROTOCOL,
:controller => "user", :action => "confirm",
:display_name => user.display_name, :display_name => user.display_name,
:confirm_string => token.token) :confirm_string => token.token)
@ -22,9 +20,7 @@ class Notifier < ActionMailer::Base
def email_confirm(user, token) def email_confirm(user, token)
with_recipient_locale user do with_recipient_locale user do
@address = user.new_email @address = user.new_email
@url = url_for(:host => SERVER_URL, @url = url_for(:controller => "user", :action => "confirm_email",
:protocol => SERVER_PROTOCOL,
:controller => "user", :action => "confirm_email",
:confirm_string => token.token) :confirm_string => token.token)
mail :to => user.new_email, mail :to => user.new_email,
@ -34,9 +30,7 @@ class Notifier < ActionMailer::Base
def lost_password(user, token) def lost_password(user, token)
with_recipient_locale user do with_recipient_locale user do
@url = url_for(:host => SERVER_URL, @url = url_for(:controller => "user", :action => "reset_password",
:protocol => SERVER_PROTOCOL,
:controller => "user", :action => "reset_password",
:token => token.token) :token => token.token)
mail :to => user.email, mail :to => user.email,
@ -75,13 +69,9 @@ class Notifier < ActionMailer::Base
@from_user = message.sender.display_name @from_user = message.sender.display_name
@text = message.body @text = message.body
@title = message.title @title = message.title
@readurl = url_for(:host => SERVER_URL, @readurl = url_for(:controller => "message", :action => "read",
:protocol => SERVER_PROTOCOL,
:controller => "message", :action => "read",
:message_id => message.id) :message_id => message.id)
@replyurl = url_for(:host => SERVER_URL, @replyurl = url_for(:controller => "message", :action => "reply",
:protocol => SERVER_PROTOCOL,
:controller => "message", :action => "reply",
:message_id => message.id) :message_id => message.id)
@author = @from_user @author = @from_user
@ -99,26 +89,21 @@ class Notifier < ActionMailer::Base
@from_user = comment.user.display_name @from_user = comment.user.display_name
@text = comment.body @text = comment.body
@title = comment.diary_entry.title @title = comment.diary_entry.title
@readurl = url_for(:host => SERVER_URL, @readurl = url_for(:controller => "diary_entry",
:protocol => SERVER_PROTOCOL,
:controller => "diary_entry",
:action => "view", :action => "view",
:display_name => comment.diary_entry.user.display_name, :display_name => comment.diary_entry.user.display_name,
:id => comment.diary_entry.id, :id => comment.diary_entry.id,
:anchor => "comment#{comment.id}") :anchor => "comment#{comment.id}")
@commenturl = url_for(:host => SERVER_URL, @commenturl = url_for(:controller => "diary_entry",
:protocol => SERVER_PROTOCOL,
:controller => "diary_entry",
:action => "view", :action => "view",
:display_name => comment.diary_entry.user.display_name, :display_name => comment.diary_entry.user.display_name,
:id => comment.diary_entry.id, :id => comment.diary_entry.id,
:anchor => "newcomment") :anchor => "newcomment")
@replyurl = url_for(:host => SERVER_URL, @replyurl = url_for(:controller => "message",
:protocol => SERVER_PROTOCOL,
:controller => "message",
:action => "new", :action => "new",
:display_name => comment.user.display_name, :display_name => comment.user.display_name,
:title => "Re: #{comment.diary_entry.title}") :title => "Re: #{comment.diary_entry.title}")
@author = @from_user @author = @from_user
attach_user_avatar(comment.user) attach_user_avatar(comment.user)
@ -132,13 +117,9 @@ class Notifier < ActionMailer::Base
def friend_notification(friend) def friend_notification(friend)
with_recipient_locale friend.befriendee do with_recipient_locale friend.befriendee do
@friend = friend @friend = friend
@viewurl = url_for(:host => SERVER_URL, @viewurl = url_for(:controller => "user", :action => "view",
:protocol => SERVER_PROTOCOL,
:controller => "user", :action => "view",
:display_name => @friend.befriender.display_name) :display_name => @friend.befriender.display_name)
@friendurl = url_for(:host => SERVER_URL, @friendurl = url_for(:controller => "user", :action => "make_friend",
:protocol => SERVER_PROTOCOL,
:controller => "user", :action => "make_friend",
:display_name => @friend.befriender.display_name) :display_name => @friend.befriender.display_name)
@author = @friend.befriender.display_name @author = @friend.befriender.display_name
@ -150,7 +131,7 @@ class Notifier < ActionMailer::Base
def note_comment_notification(comment, recipient) def note_comment_notification(comment, recipient)
with_recipient_locale recipient do with_recipient_locale recipient do
@noteurl = browse_note_url(comment.note, :host => SERVER_URL) @noteurl = browse_note_url(comment.note)
@place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, I18n.locale) @place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, I18n.locale)
@comment = comment.body @comment = comment.body
@owner = recipient == comment.note.author @owner = recipient == comment.note.author
@ -178,7 +159,7 @@ class Notifier < ActionMailer::Base
def changeset_comment_notification(comment, recipient) def changeset_comment_notification(comment, recipient)
with_recipient_locale recipient do with_recipient_locale recipient do
@to_user = recipient.display_name @to_user = recipient.display_name
@changeset_url = changeset_url(comment.changeset, :host => SERVER_URL) @changeset_url = changeset_url(comment.changeset)
@comment = comment.body @comment = comment.body
@owner = recipient == comment.changeset.user @owner = recipient == comment.changeset.user
@commenter = comment.author.display_name @commenter = comment.author.display_name
@ -202,7 +183,7 @@ class Notifier < ActionMailer::Base
private private
def set_shared_template_vars def set_shared_template_vars
@root_url = root_url(:host => SERVER_URL) @root_url = root_url
end end
def attach_project_logo def attach_project_logo

View file

@ -1,8 +1,8 @@
<li><%= <li><%=
linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s
if containing_relation.member_role.blank? if containing_relation.member_role.blank?
raw t 'browse.containing_relation.entry', :relation_name => linked_name raw t '.entry', :relation_name => linked_name
else else
raw t 'browse.containing_relation.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role) raw t '.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
end end
%></li> %></li>

View file

@ -16,7 +16,7 @@
<% end %> <% end %>
<% unless relation.relation_members.empty? %> <% unless relation.relation_members.empty? %>
<h4><%= t'browse.relation.members' %></h4> <h4><%= t '.members' %></h4>
<ul><%= render :partial => "relation_member", :collection => relation.relation_members %></ul> <ul><%= render :partial => "relation_member", :collection => relation.relation_members %></ul>
<% end %> <% end %>
</div> </div>

View file

@ -1,12 +1,12 @@
<% <%
member_class = link_class(relation_member.member_type.downcase, relation_member.member) member_class = link_class(relation_member.member_type.downcase, relation_member.member)
linked_name = link_to printable_name(relation_member.member), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, :title => link_title(relation_member.member), :rel => link_follow(relation_member.member) linked_name = link_to printable_name(relation_member.member), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, :title => link_title(relation_member.member), :rel => link_follow(relation_member.member)
type_str = t'browse.relation_member.type.' + relation_member.member_type.downcase type_str = t '.type.' + relation_member.member_type.downcase
%> %>
<li class="<%= member_class %>"><%= <li class="<%= member_class %>"><%=
if relation_member.member_role.blank? if relation_member.member_role.blank?
raw t'browse.relation_member.entry', :type => type_str, :name => linked_name raw t '.entry', :type => type_str, :name => linked_name
else else
raw t'browse.relation_member.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role) raw t '.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
end end
%></li> %></li>

View file

@ -1,5 +1,5 @@
<% unless tag_details.empty? %> <% unless tag_details.empty? %>
<h4><%= t 'browse.tag_details.tags' %></h4> <h4><%= t '.tags' %></h4>
<table class='browse-tag-list'> <table class='browse-tag-list'>
<%= render :partial => "tag", :collection => tag_details.sort %> <%= render :partial => "tag", :collection => tag_details.sort %>
</table> </table>

View file

@ -18,14 +18,14 @@
<% end %> <% end %>
<% unless way.way_nodes.empty? %> <% unless way.way_nodes.empty? %>
<h4><%= t'browse.way.nodes' %></h4> <h4><%= t '.nodes' %></h4>
<ul> <ul>
<% way.way_nodes.each do |wn| %> <% way.way_nodes.each do |wn| %>
<li> <li>
<%= link_to printable_name(wn.node), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node), :rel => link_follow(wn.node) %> <%= link_to printable_name(wn.node), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node), :rel => link_follow(wn.node) %>
<% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %> <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
<% if related_ways.size > 0 then %> <% if related_ways.size > 0 then %>
(<%= raw t 'browse.way.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>) (<%= raw t '.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>)
<% end %> <% end %>
</li> </li>
<% end %> <% end %>

View file

@ -1,8 +1,8 @@
<% set_title(t('browse.changeset.title', :id => @changeset.id)) %> <% set_title(t('.title', :id => @changeset.id)) %>
<h2> <h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a> <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t('browse.changeset.title', :id => @changeset.id) %> <%= t('.title', :id => @changeset.id) %>
</h2> </h2>
<div class="browse-section"> <div class="browse-section">
@ -11,7 +11,7 @@
<%= render :partial => "tag_details", :object => @changeset.tags.except('comment') %> <%= render :partial => "tag_details", :object => @changeset.tags.except('comment') %>
<h4 class="comments-header"><%= t('browse.changeset.discussion') %></h4> <h4 class="comments-header"><%= t('.discussion') %></h4>
<div class="buttons clearfix subscribe-buttons"> <div class="buttons clearfix subscribe-buttons">
<form action="#" class="hide_unless_logged_in"> <form action="#" class="hide_unless_logged_in">
@ -33,7 +33,7 @@
<% if comment.visible %> <% if comment.visible %>
<li id="c<%= comment.id %>"> <li id="c<%= comment.id %>">
<small class='deemphasize'> <small class='deemphasize'>
<%= t("browse.changeset.commented_by", <%= t(".commented_by",
:when => friendly_date(comment.created_at), :exact_time => l(comment.created_at), :when => friendly_date(comment.created_at), :exact_time => l(comment.created_at),
:user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %> :user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
<% if current_user and current_user.moderator? %> <% if current_user and current_user.moderator? %>
@ -45,7 +45,7 @@
<% elsif current_user and current_user.moderator? %> <% elsif current_user and current_user.moderator? %>
<li id="c<%= comment.id %>"> <li id="c<%= comment.id %>">
<small class='deemphasize'> <small class='deemphasize'>
<%= t("browse.changeset.hidden_commented_by", <%= t(".hidden_commented_by",
:when => friendly_date(comment.created_at), :exact_time => l(comment.created_at), :when => friendly_date(comment.created_at), :exact_time => l(comment.created_at),
:user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %> :user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
— <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_unhide_url(comment.id) %>"><%= t('javascripts.changesets.show.unhide_comment') %></span> — <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_unhide_url(comment.id) %>"><%= t('javascripts.changesets.show.unhide_comment') %></span>
@ -60,7 +60,7 @@
<% end %> <% end %>
<div class="notice hide_if_logged_in"> <div class="notice hide_if_logged_in">
<%= link_to(t("browse.changeset.join_discussion"), :controller => 'user', :action => 'login', :referer => request.fullpath) %> <%= link_to(t(".join_discussion"), :controller => 'user', :action => 'login', :referer => request.fullpath) %>
</div> </div>
<% unless @changeset.is_open? %> <% unless @changeset.is_open? %>
@ -72,7 +72,7 @@
</form> </form>
<% else %> <% else %>
<div class="notice hide_unless_logged_in"> <div class="notice hide_unless_logged_in">
<%= t('browse.changeset.still_open') %> <%= t('.still_open') %>
</div> </div>
<% end %> <% end %>
@ -131,7 +131,7 @@
<% end %> <% end %>
<div class='secondary-actions'> <div class='secondary-actions'>
<%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %> <%= link_to(t('.changesetxml'), :controller => "changeset", :action => "read") %>
&middot; &middot;
<%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %> <%= link_to(t('.osmchangexml'), :controller => "changeset", :action => "download") %>
</div> </div>

View file

@ -1,12 +1,12 @@
<% <%
browse_not_found_type = { browse_not_found_type = {
'node' => I18n.t('browse.not_found.type.node'), 'node' => I18n.t('.type.node'),
'way' => I18n.t('browse.not_found.type.way'), 'way' => I18n.t('.type.way'),
'relation' => I18n.t('browse.not_found.type.relation'), 'relation' => I18n.t('.type.relation'),
'changeset' => I18n.t('browse.not_found.type.changeset'), 'changeset' => I18n.t('.type.changeset'),
}; };
%> %>
<h2> <h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a> <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t'browse.not_found.sorry', :type=> browse_not_found_type[@type] , :id => params[:id] %></h2> <%= t '.sorry', :type=> browse_not_found_type[@type] , :id => params[:id] %></h2>

View file

@ -1,12 +1,12 @@
<% set_title(t('browse.note.title', :id => @note.id)) %> <% set_title(t('.title', :id => @note.id)) %>
<h2> <h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a> <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t "browse.note.#{@note.status}_title", :note_name => @note.id %> <%= t ".#{@note.status}_title", :note_name => @note.id %>
</h2> </h2>
<div class="browse-section"> <div class="browse-section">
<h4><%= t('browse.note.description') %></h4> <h4><%= t('.description') %></h4>
<div class="note-description"> <div class="note-description">
<%= h(@note_comments.first.body.to_html) %> <%= h(@note_comments.first.body.to_html) %>
</div> </div>

View file

@ -1,22 +1,22 @@
<% set_title(t "browse.query.title") %> <% set_title(t ".title") %>
<h2> <h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a> <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t "browse.query.title" %> <%= t ".title" %>
</h2> </h2>
<div class="query-intro"> <div class="query-intro">
<p><%= t("browse.query.introduction") %></p> <p><%= t(".introduction") %></p>
</div> </div>
<div id="query-nearby" class="query-results"> <div id="query-nearby" class="query-results">
<h3><%= t("browse.query.nearby") %></h3> <h3><%= t(".nearby") %></h3>
<%= image_tag "searching.gif", :class => "loader" %> <%= image_tag "searching.gif", :class => "loader" %>
<ul class="query-results-list"></ul> <ul class="query-results-list"></ul>
</div> </div>
<div id="query-isin" class="query-results"> <div id="query-isin" class="query-results">
<h3><%= t("browse.query.enclosing") %></h3> <h3><%= t(".enclosing") %></h3>
<%= image_tag "searching.gif", :class => "loader" %> <%= image_tag "searching.gif", :class => "loader" %>
<ul class="query-results-list"></ul> <ul class="query-results-list"></ul>
</div> </div>

View file

@ -1,12 +1,12 @@
<% <%
browse_timeout_type = { browse_timeout_type = {
'node' => I18n.t('browse.timeout.type.node'), 'node' => I18n.t('.type.node'),
'way' => I18n.t('browse.timeout.type.way'), 'way' => I18n.t('.type.way'),
'relation' => I18n.t('browse.timeout.type.relation'), 'relation' => I18n.t('.type.relation'),
'changeset' => I18n.t('browse.timeout.type.changeset'), 'changeset' => I18n.t('.type.changeset'),
}; };
%> %>
<div class="browse-section"> <div class="browse-section">
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a> <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t'browse.timeout.sorry', :type=> browse_timeout_type[@type] , :id => params[:id] %> <%= t '.sorry', :type=> browse_timeout_type[@type] , :id => params[:id] %>
</div> </div>

View file

@ -4,14 +4,14 @@
</ol> </ol>
<% if @edits.size == 20 -%> <% if @edits.size == 20 -%>
<div class="changeset_more"> <div class="changeset_more">
<%= link_to t('changeset.list.load_more'), url_for(@params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %> <%= link_to t('.load_more'), url_for(@params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %>
<%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %> <%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %>
</div> </div>
<% end -%> <% end -%>
<% elsif params[:bbox] %> <% elsif params[:bbox] %>
<div class="inner22"><%= t(params[:max_id] ? 'changeset.list.no_more_area' : 'changeset.list.empty_area') %></div> <div class="inner22"><%= t(params[:max_id] ? '.no_more_area' : '.empty_area') %></div>
<% elsif params[:display_name] %> <% elsif params[:display_name] %>
<div class="inner22"><%= t(params[:max_id] ? 'changeset.list.no_more_user' : 'changeset.list.empty_user') %></div> <div class="inner22"><%= t(params[:max_id] ? '.no_more_user' : '.empty_user') %></div>
<% else %> <% else %>
<div class="inner22"><%= t(params[:max_id] ? 'changeset.list.no_more' : 'changeset.list.empty') %></div> <div class="inner22"><%= t(params[:max_id] ? '.no_more' : '.empty') %></div>
<% end %> <% end %>

View file

@ -6,7 +6,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
feed.subtitle :type => "xhtml" do |xhtml| feed.subtitle :type => "xhtml" do |xhtml|
xhtml.p do |p| xhtml.p do |p|
p << t("changeset.timeout.sorry") p << t(".sorry")
end end
end end
end end

View file

@ -1 +1 @@
<p><%= t'changeset.timeout.sorry' %></p> <p><%= t '.sorry' %></p>

View file

@ -1,8 +1,8 @@
<div class="clearfix diary-comment"> <div class="clearfix diary-comment">
<%= user_thumbnail diary_comment.user %> <%= user_thumbnail diary_comment.user %>
<p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %></p> <p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('.comment_from', :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %></p>
<div class="richtext"><%= diary_comment.body.to_html %></div> <div class="richtext"><%= diary_comment.body.to_html %></div>
<%= if_administrator(:span) do %> <%= if_administrator(:span) do %>
<%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %> <%= link_to t('.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('.confirm') } %>
<% end %> <% end %>
</div> </div>

View file

@ -1,13 +1,13 @@
<div class='diary_post'> <div class='diary_post'>
<div class='post_heading clearfix'> <div class='post_heading clearfix'>
<% if !@this_user %> <% if !@user %>
<%= user_thumbnail diary_entry.user %> <%= user_thumbnail diary_entry.user %>
<% end %> <% end %>
<h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2> <h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2>
<small class='deemphasize'> <small class='deemphasize'>
<%= raw(t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %> <%= raw(t '.posted_by', :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %>
</small> </small>
</div> </div>
@ -22,17 +22,17 @@
<ul class='secondary-actions clearfix'> <ul class='secondary-actions clearfix'>
<% if params[:action] == 'list' %> <% if params[:action] == 'list' %>
<li><%= link_to t('diary_entry.diary_entry.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %></li> <li><%= link_to t('.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %></li>
<li><%= link_to t('diary_entry.diary_entry.reply_link'), :controller => 'message', :action => 'new', :display_name => diary_entry.user.display_name, :title => "Re: #{diary_entry.title}" %></li> <li><%= link_to t('.reply_link'), :controller => 'message', :action => 'new', :display_name => diary_entry.user.display_name, :message => { :title => "Re: #{diary_entry.title}" } %></li>
<li><%= link_to t('diary_entry.diary_entry.comment_count', :count => diary_entry.visible_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %></li> <li><%= link_to t('.comment_count', :count => diary_entry.visible_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %></li>
<% end %> <% end %>
<%= if_user(diary_entry.user, :li) do %> <%= if_user(diary_entry.user, :li) do %>
<%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %> <%= link_to t('.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
<% end %> <% end %>
<%= if_administrator(:li) do %> <%= if_administrator(:li) do %>
<%= link_to t('diary_entry.diary_entry.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('diary_entry.diary_entry.confirm') } %> <%= link_to t('.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('.confirm') } %>
<% end %> <% end %>
</ul> </ul>
</div> </div>

View file

@ -1,4 +1,4 @@
<%= t 'diary_entry.location.location' %> <%= t '.location' %>
<a href="<%= url_for :controller => 'site', :action => 'index', :anchor => "map=14/#{location.latitude}/#{location.longitude}" %>"> <a href="<%= url_for :controller => 'site', :action => 'index', :anchor => "map=14/#{location.latitude}/#{location.longitude}" %>">
<abbr class="geo" title="<%= number_with_precision(location.latitude, :precision => 4) %>; <%= number_with_precision(location.longitude, :precision => 4) %>"> <abbr class="geo" title="<%= number_with_precision(location.latitude, :precision => 4) %>; <%= number_with_precision(location.longitude, :precision => 4) %>">

View file

@ -1,24 +1,24 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t('diary_entry.comments.has_commented_on', :display_name => @this_user.display_name) %></h1> <h1><%= t('.has_commented_on', :display_name => @user.display_name) %></h1>
<% end %> <% end %>
<table class="messages" width="100%"> <table class="messages" width="100%">
<tr> <tr>
<th width="25%"><%= t 'diary_entry.comments.post' %></th> <th width="25%"><%= t '.post' %></th>
<th width="25%"><%= t 'diary_entry.comments.when' %></th> <th width="25%"><%= t '.when' %></th>
<th width="50%"><%= t 'diary_entry.comments.comment' %></th> <th width="50%"><%= t '.comment' %></th>
</tr> </tr>
<% @comments.each do |comment| -%> <% @comments.each do |comment| -%>
<% cl = cycle('table0', 'table1') %> <% cl = cycle('table0', 'table1') %>
<tr class="<%= cl %>"> <tr class="<%= cl %>">
<td width="25%"><%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %></td> <td width="25%"><%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %></td>
<td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= t 'diary_entry.comments.ago', :ago => time_ago_in_words(comment.created_at) %></span></td> <td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= t '.ago', :ago => time_ago_in_words(comment.created_at) %></span></td>
<td width="50%" class="richtext"><%= comment.body.to_html %></td> <td width="50%" class="richtext"><%= comment.body.to_html %></td>
</tr> </tr>
<% end -%> <% end -%>
</table> </table>
<div class='secondary-actions clearfix'> <div class='secondary-actions clearfix'>
<span><%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %> <span><%= link_to t('.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %>
<%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %></span> <%= link_to t('.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %></span>
</div> </div>

View file

@ -12,32 +12,32 @@
<div class="diary_entry standard-form"> <div class="diary_entry standard-form">
<fieldset> <fieldset>
<div class='form-row'> <div class='form-row'>
<label class="standard-label"><%= t 'diary_entry.edit.subject' -%></label> <label class="standard-label"><%= t '.subject' -%></label>
<%= f.text_field :title, :class => "richtext_title" %> <%= f.text_field :title, :class => "richtext_title" %>
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class="standard-label"><%= t 'diary_entry.edit.body' -%></label> <label class="standard-label"><%= t '.body' -%></label>
<%= richtext_area :diary_entry, :body, :cols => 80, :rows => 20, :format => @diary_entry.body_format %> <%= richtext_area :diary_entry, :body, :cols => 80, :rows => 20, :format => @diary_entry.body_format %>
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class="standard-label"><%= t 'diary_entry.edit.language' -%></label> <label class="standard-label"><%= t '.language' -%></label>
<%= f.collection_select :language_code, Language.order(:english_name), :code, :name %> <%= f.collection_select :language_code, Language.order(:english_name), :code, :name %>
</div> </div>
</fieldset> </fieldset>
<fieldset class='location'> <fieldset class='location'>
<label class="standard-label"><%= t 'diary_entry.edit.location' -%></label> <label class="standard-label"><%= t '.location' -%></label>
<%= content_tag "div", "", :id => "map", :data => {:lat => @lat, :lon => @lon, :zoom => @zoom} %> <%= content_tag "div", "", :id => "map", :data => {:lat => @lat, :lon => @lon, :zoom => @zoom} %>
<div class='form-row clearfix'> <div class='form-row clearfix'>
<div class='form-column'> <div class='form-column'>
<label class="secondary standard-label"><%= t 'diary_entry.edit.latitude' -%></label> <label class="secondary standard-label"><%= t '.latitude' -%></label>
<%= f.text_field :latitude, :size => 20, :id => "latitude" %> <%= f.text_field :latitude, :size => 20, :id => "latitude" %>
</div> </div>
<div class='form-column'> <div class='form-column'>
<label class="secondary standard-label"><%= t 'diary_entry.edit.longitude' -%></label> <label class="secondary standard-label"><%= t '.longitude' -%></label>
<%= f.text_field :longitude, :size => 20, :id => "longitude" %> <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
</div> </div>
<div class='form-column'> <div class='form-column'>
<a href="#" id="usemap"><%= t 'diary_entry.edit.use_map_link' -%></a> <a href="#" id="usemap"><%= t '.use_map_link' -%></a>
</div> </div>
</div> </div>
</fieldset> </fieldset>
@ -45,7 +45,7 @@
<% if action_name == 'new' %> <% if action_name == 'new' %>
<%= submit_tag t('diary_entry.new.publish_button') %> <%= submit_tag t('diary_entry.new.publish_button') %>
<% else %> <% else %>
<%= submit_tag t('diary_entry.edit.save_button') %> <%= submit_tag t('.save_button') %>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>

View file

@ -1,7 +1,7 @@
<% content_for :heading do %> <% content_for :heading do %>
<div <% if @this_user %> id="userinformation"<% end %> > <div <% if @user %> id="userinformation"<% end %> >
<% if @this_user %> <% if @user %>
<%= user_image @this_user %> <%= user_image @user %>
<% end %> <% end %>
<h1><%= h(@title) %></h1> <h1><%= h(@title) %></h1>
@ -10,13 +10,13 @@
<li><%= rss_link_to :action => 'rss', :language => params[:language] %></li> <li><%= rss_link_to :action => 'rss', :language => params[:language] %></li>
<% end -%> <% end -%>
<% if @this_user %> <% if @user %>
<%= if_user(@this_user) do %> <%= if_user(@user) do %>
<li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %></li> <li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('.new_title')} %></li>
<% end %> <% end %>
<% else %> <% else %>
<%= if_logged_in do %> <%= if_logged_in do %>
<li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %></li> <li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('.new_title')} %></li>
<% end %> <% end %>
<% end %> <% end %>
</ul> </ul>
@ -24,11 +24,11 @@
<% end %> <% end %>
<% if @entries.empty? %> <% if @entries.empty? %>
<h4><%= t 'diary_entry.list.no_entries' %></h4> <h4><%= t '.no_entries' %></h4>
<% else %> <% else %>
<h4><%= t 'diary_entry.list.recent_entries' %></h4> <h4><%= t '.recent_entries' %></h4>
<% if @this_user %> <% if @user %>
<%= render :partial => 'diary_entry', :collection => @entries %> <%= render :partial => 'diary_entry', :collection => @entries %>
<% else %> <% else %>
<%= render :partial => 'diary_list_entry', :collection => @entries %> <%= render :partial => 'diary_list_entry', :collection => @entries %>
@ -36,17 +36,17 @@
<div class="pagination"> <div class="pagination">
<% if @entries.size < @page_size -%> <% if @entries.size < @page_size -%>
<%= t('diary_entry.list.older_entries') %> <%= t('.older_entries') %>
<% else -%> <% else -%>
<%= link_to t('diary_entry.list.older_entries'), @params.merge(:page => @page + 1 ) %> <%= link_to t('.older_entries'), @params.merge(:page => @page + 1 ) %>
<% end -%> <% end -%>
| |
<% if @page > 1 -%> <% if @page > 1 -%>
<%= link_to t('diary_entry.list.newer_entries'), @params.merge(:page => @page - 1) %> <%= link_to t('.newer_entries'), @params.merge(:page => @page - 1) %>
<% else -%> <% else -%>
<%= t('diary_entry.list.newer_entries') %> <%= t('.newer_entries') %>
<% end -%> <% end -%>
</div> </div>
<% end %> <% end %>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= t 'diary_entry.no_such_entry.heading', :id => h(params[:id]) %></h2> <h2><%= t '.heading', :id => h(params[:id]) %></h2>
<% end %> <% end %>
<p><%= t 'diary_entry.no_such_entry.body', :id => h(params[:id]) %></p> <p><%= t '.body', :id => h(params[:id]) %></p>

View file

@ -1,7 +1,7 @@
<% content_for :heading do %> <% content_for :heading do %>
<div id="userinformation" > <div id="userinformation" >
<%= user_image @entry.user %> <%= user_image @entry.user %>
<h2><%= link_to t('diary_entry.view.user_title', :user => h(@entry.user.display_name)), :action => :list %></h2> <h2><%= link_to t('.user_title', :user => h(@entry.user.display_name)), :action => :list %></h2>
<p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p> <p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p>
</div> </div>
<% end %> <% end %>
@ -13,13 +13,13 @@
<%= render :partial => 'diary_comment', :collection => @entry.visible_comments %> <%= render :partial => 'diary_comment', :collection => @entry.visible_comments %>
</div> </div>
<%= if_logged_in(:div) do %> <%= if_logged_in(:div) do %>
<h3 id="newcomment"><%= t 'diary_entry.view.leave_a_comment' %></h3> <h3 id="newcomment"><%= t '.leave_a_comment' %></h3>
<%= error_messages_for 'diary_comment' %> <%= error_messages_for 'diary_comment' %>
<%= form_for :diary_comment, :url => { :action => 'comment' } do |f| %> <%= form_for :diary_comment, :url => { :action => 'comment' } do |f| %>
<%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %> <%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
<%= submit_tag t('diary_entry.view.save_button') %> <%= submit_tag t('.save_button') %>
<% end %> <% end %>
<% if current_user and @entry.subscribers.exists?(current_user.id) %> <% if current_user and @entry.subscribers.exists?(current_user.id) %>
<div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.unsubscribe'), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div> <div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.unsubscribe'), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div>
@ -29,7 +29,7 @@
<% end %> <% end %>
<%= if_not_logged_in(:div) do %> <%= if_not_logged_in(:div) do %>
<h3 id="newcomment"><%= raw t("diary_entry.view.login_to_leave_a_comment", :login_link => link_to(t("diary_entry.view.login"), :controller => 'user', :action => 'login', :referer => request.fullpath)) %></h3> <h3 id="newcomment"><%= raw t(".login_to_leave_a_comment", :login_link => link_to(t(".login"), :controller => 'user', :action => 'login', :referer => request.fullpath)) %></h3>
<% end %> <% end %>
<% content_for :auto_discovery_link_tag do -%> <% content_for :auto_discovery_link_tag do -%>

View file

@ -1,5 +1,5 @@
<% if @results.empty? %> <% if @results.empty? %>
<p class="search_results_entry inner12"><%= t 'geocoder.results.no_results' %></p> <p class="search_results_entry inner12"><%= t '.no_results' %></p>
<% else %> <% else %>
<ul class='results-list'> <ul class='results-list'>
<% @results.each do |result| %> <% @results.each do |result| %>
@ -8,7 +8,7 @@
</ul> </ul>
<% if @more_params %> <% if @more_params %>
<div class="search_more"> <div class="search_more">
<%= link_to t('geocoder.results.more_results'), url_for(@more_params), :class => "button load_more" %> <%= link_to t('.more_results'), url_for(@more_params), :class => "button load_more" %>
<%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %> <%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %>
</div> </div>
<% end %> <% end %>

View file

@ -3,7 +3,7 @@
<%= t('site.sidebar.search_results') %> <%= t('site.sidebar.search_results') %>
</h2> </h2>
<% @sources.each do |source| %> <% @sources.each do |source| %>
<h4 class="inner12"><%= raw(t "geocoder.search.title.#{source}") %></h4> <h4 class="inner12"><%= raw(t ".title.#{source}") %></h4>
<div class="search_results_entry" data-href="<%= url_for @params.merge(:action => "search_#{source}") %>"> <div class="search_results_entry" data-href="<%= url_for @params.merge(:action => "search_#{source}") %>">
<%= image_tag "searching.gif", :class => "loader" %> <%= image_tag "searching.gif", :class => "loader" %>
</div> </div>

View file

@ -2,7 +2,7 @@
<td class="inbox-sender"><%= link_to h(message_summary.sender.display_name), user_path(message_summary.sender) %></td> <td class="inbox-sender"><%= link_to h(message_summary.sender.display_name), user_path(message_summary.sender) %></td>
<td class="inbox-subject"><%= link_to h(message_summary.title), :controller => 'message', :action => 'read', :message_id => message_summary.id %></td> <td class="inbox-subject"><%= link_to h(message_summary.title), :controller => 'message', :action => 'read', :message_id => message_summary.id %></td>
<td class="inbox-sent"><%= l message_summary.sent_on, :format => :friendly %></td> <td class="inbox-sent"><%= l message_summary.sent_on, :format => :friendly %></td>
<td class="inbox-mark-unread"><%= button_to t('message.message_summary.unread_button'), {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'unread'}, { :remote => true } %></td> <td class="inbox-mark-unread"><%= button_to t('.unread_button'), {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'unread'}, { :remote => true } %></td>
<td class="inbox-mark-read"><%= button_to t('message.message_summary.read_button'), {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'read'}, { :remote => true } %></td> <td class="inbox-mark-read"><%= button_to t('.read_button'), {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'read'}, { :remote => true } %></td>
<td class="inbox-delete"><%= button_to t('message.message_summary.delete_button'), {:controller => 'message', :action => 'delete', :message_id => message_summary.id, :referer => request.fullpath}, { :remote => true } %></td> <td class="inbox-delete"><%= button_to t('.delete_button'), {:controller => 'message', :action => 'delete', :message_id => message_summary.id, :referer => request.fullpath}, { :remote => true } %></td>
</tr> </tr>

View file

@ -2,5 +2,5 @@
<td class="inbox-sender"><%= link_to h(sent_message_summary.recipient.display_name), user_path(sent_message_summary.recipient) %></td> <td class="inbox-sender"><%= link_to h(sent_message_summary.recipient.display_name), user_path(sent_message_summary.recipient) %></td>
<td class="inbox-subject"><%= link_to h(sent_message_summary.title), :controller => 'message', :action => 'read', :message_id => sent_message_summary.id %></td> <td class="inbox-subject"><%= link_to h(sent_message_summary.title), :controller => 'message', :action => 'read', :message_id => sent_message_summary.id %></td>
<td class="inbox-sent"><%= l sent_message_summary.sent_on, :format => :friendly %></td> <td class="inbox-sent"><%= l sent_message_summary.sent_on, :format => :friendly %></td>
<td class="inbox-delete"><%= button_to t('message.sent_message_summary.delete_button'), :controller => 'message', :action => 'delete', :message_id => sent_message_summary.id, :referer => request.fullpath %></td> <td class="inbox-delete"><%= button_to t('.delete_button'), :controller => 'message', :action => 'delete', :message_id => sent_message_summary.id, :referer => request.fullpath %></td>
</tr> </tr>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= t'message.inbox.my_inbox'%>/<%= link_to t('message.inbox.outbox'), outbox_path(current_user.display_name) %></h2> <h2><%= t '.my_inbox'%>/<%= link_to t('.outbox'), outbox_path(current_user.display_name) %></h2>
<% end %> <% end %>
<h4><%= render :partial => "message_count" %></h4> <h4><%= render :partial => "message_count" %></h4>
@ -8,9 +8,9 @@
<table class="messages"> <table class="messages">
<thead> <thead>
<tr> <tr>
<th><%= t'message.inbox.from' %></th> <th><%= t '.from' %></th>
<th><%= t'message.inbox.subject' %></th> <th><%= t '.subject' %></th>
<th><%= t'message.inbox.date' %></th> <th><%= t '.date' %></th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@ -20,5 +20,5 @@
</tbody> </tbody>
</table> </table>
<% else %> <% else %>
<div><%= raw(t'message.inbox.no_messages_yet', :people_mapping_nearby_link => link_to(t('message.inbox.people_mapping_nearby'), user_path(current_user))) %></div> <div><%= raw(t '.no_messages_yet', :people_mapping_nearby_link => link_to(t('.people_mapping_nearby'), user_path(current_user))) %></div>
<% end %> <% end %>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= raw(t'message.new.send_message_to', :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient))) %></h2> <h2><%= raw(t '.send_message_to', :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient))) %></h2>
<% end %> <% end %>
<%= error_messages_for 'message' %> <%= error_messages_for 'message' %>
@ -7,16 +7,16 @@
<%= form_for :message, :html => { :class => 'standard-form' }, :url => { :action => "new", :display_name => @message.recipient.display_name } do |f| %> <%= form_for :message, :html => { :class => 'standard-form' }, :url => { :action => "new", :display_name => @message.recipient.display_name } do |f| %>
<fieldset> <fieldset>
<div class='form-row'> <div class='form-row'>
<label class="standard-label"><%= t'message.new.subject' %></label> <label class="standard-label" for="message_title"><%= t '.subject' %></label>
<%= f.text_field :title, :size => 60, :class => "richtext_title" %> <%= f.text_field :title, :size => 60, :class => "richtext_title" %>
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class="standard-label"><%= t'message.new.body' %></label> <label class="standard-label" for="message_body"><%= t '.body' %></label>
<%= richtext_area :message, :body, :cols => 80, :rows => 20 %> <%= richtext_area :message, :body, :cols => 80, :rows => 20 %>
</div> </div>
<div class='buttons'> <div class='buttons'>
<%= submit_tag t('message.new.send_button') %> <%= submit_tag t('.send_button') %>
<%= link_to t('message.new.back_to_inbox'), { :controller => 'message', :action => 'inbox', :display_name => current_user.display_name }, :class => 'deemphasize button' %> <%= link_to t('.back_to_inbox'), { :controller => 'message', :action => 'inbox', :display_name => current_user.display_name }, :class => 'deemphasize button' %>
</div> </div>
</fieldset> </fieldset>
<% end %> <% end %>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t'message.no_such_message.heading' %></h1> <h1><%= t '.heading' %></h1>
<% end %> <% end %>
<p><%= t'message.no_such_message.body' %></p> <p><%= t '.body' %></p>

View file

@ -1,16 +1,16 @@
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= raw(t'message.outbox.my_inbox', :inbox_link => link_to(t('message.outbox.inbox'), inbox_path(current_user.display_name))) %>/<%= t'message.outbox.outbox' %></h2> <h2><%= raw(t '.my_inbox', :inbox_link => link_to(t('.inbox'), inbox_path(current_user.display_name))) %>/<%= t'.outbox' %></h2>
<% end %> <% end %>
<h4><%= t'message.outbox.messages', :count => current_user.sent_messages.size %></h4> <h4><%= t '.messages', :count => current_user.sent_messages.size %></h4>
<% if current_user.sent_messages.size > 0 %> <% if current_user.sent_messages.size > 0 %>
<table class="messages"> <table class="messages">
<thead> <thead>
<tr> <tr>
<th><%= t'message.outbox.to' %></th> <th><%= t '.to' %></th>
<th><%= t'message.outbox.subject' %></th> <th><%= t '.subject' %></th>
<th><%= t'message.outbox.date' %></th> <th><%= t '.date' %></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
@ -19,5 +19,5 @@
</tbody> </tbody>
</table> </table>
<% else %> <% else %>
<div class="messages"><%= raw(t'message.outbox.no_sent_messages', :people_mapping_nearby_link => link_to(t('message.outbox.people_mapping_nearby'), user_path(current_user))) %></div> <div class="messages"><%= raw(t '.no_sent_messages', :people_mapping_nearby_link => link_to(t('.people_mapping_nearby'), user_path(current_user))) %></div>
<% end %> <% end %>

View file

@ -14,9 +14,9 @@
<div class="richtext"><%= @message.body.to_html %></div> <div class="richtext"><%= @message.body.to_html %></div>
<div class='message-buttons buttons'> <div class='message-buttons buttons'>
<%= button_to t('message.read.reply_button'), {:controller => 'message', :action => 'reply', :message_id => @message.id}, :class => 'reply-button' %> <%= button_to t('.reply_button'), {:controller => 'message', :action => 'reply', :message_id => @message.id}, :class => 'reply-button' %>
<%= button_to t('message.read.unread_button'), {:controller => 'message', :action => 'mark', :message_id => @message.id, :mark => 'unread'}, :class => 'mark-unread-button' %> <%= button_to t('.unread_button'), {:controller => 'message', :action => 'mark', :message_id => @message.id, :mark => 'unread'}, :class => 'mark-unread-button' %>
<%= button_to t('message.read.delete_button'), {:controller => 'message', :action => 'delete', :message_id => @message.id}, :class => 'delete-button' %> <%= button_to t('.delete_button'), {:controller => 'message', :action => 'delete', :message_id => @message.id}, :class => 'delete-button' %>
<% else %> <% else %>
@ -36,5 +36,5 @@
<% end %> <% end %>
<%= link_to t('message.read.back'), {:controller => 'message', :action => 'outbox', :display_name => current_user.display_name }, :class => "button deemphasize" %> <%= link_to t('.back'), {:controller => 'message', :action => 'outbox', :display_name => current_user.display_name }, :class => "button deemphasize" %>
</div> </div>

View file

@ -1,8 +1,8 @@
<div class="note-comment" style="margin-top: 5px"> <div class="note-comment" style="margin-top: 5px">
<% if comment.author.nil? -%> <% if comment.author.nil? -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_html", :when => friendly_date(comment.created_at) %></div> <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_html", :when => friendly_date(comment.created_at) %></div>
<% else -%> <% else -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div> <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
<% end -%> <% end -%>
<div class="note-comment-text"><%= comment.body %></div> <div class="note-comment-text"><%= comment.body %></div>
</div> </div>

View file

@ -1,4 +1,4 @@
<h2><%= t "note.entry.comment" %></h2> <h2><%= t ".comment" %></h2>
<%= render :partial => "comment", :object => entry %> <%= render :partial => "comment", :object => entry %>
<h2><%= t "note.entry.full" %></h2> <h2><%= t ".full" %></h2>
<%= render :partial => "description", :object => entry.note %> <%= render :partial => "description", :object => entry.note %>

View file

@ -2,11 +2,11 @@ xml.item do
location = describe_location(note.lat, note.lon, 14, locale) location = describe_location(note.lat, note.lon, 14, locale)
if note.closed? if note.closed?
xml.title t("note.rss.closed", :place => location) xml.title t("notes.rss.closed", :place => location)
elsif note.comments.length > 1 elsif note.comments.length > 1
xml.title t("note.rss.commented", :place => location) xml.title t("notes.rss.commented", :place => location)
else else
xml.title t("note.rss.opened", :place => location) xml.title t("notes.rss.opened", :place => location)
end end
xml.link browse_note_url(note) xml.link browse_note_url(note)

View file

@ -5,15 +5,15 @@ xml.rss("version" => "2.0",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do "xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do xml.channel do
xml.title t("note.rss.title") xml.title t("notes.rss.title")
xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.description t("notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml.link url_for(:controller => "site", :action => "index", :only_path => false)
@comments.each do |comment| @comments.each do |comment|
location = describe_location(comment.note.lat, comment.note.lon, 14, locale) location = describe_location(comment.note.lat, comment.note.lon, 14, locale)
xml.item do xml.item do
xml.title t("note.rss.#{comment.event}", :place => location) xml.title t("notes.rss.#{comment.event}", :place => location)
xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)

View file

@ -5,8 +5,8 @@ xml.rss("version" => "2.0",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do "xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do xml.channel do
xml.title t("note.rss.title") xml.title t("notes.rss.title")
xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.description t("notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml.link url_for(:controller => "site", :action => "index", :only_path => false)
xml << (render(:partial => "note", :collection => @notes) || "") xml << (render(:partial => "note", :collection => @notes) || "")

View file

@ -8,11 +8,11 @@
<table class="note_list"> <table class="note_list">
<tr> <tr>
<th></th> <th></th>
<th><%= t'note.mine.id' %></th> <th><%= t '.id' %></th>
<th><%= t'note.mine.creator' %></th> <th><%= t '.creator' %></th>
<th><%= t'note.mine.description' %></th> <th><%= t '.description' %></th>
<th><%= t'note.mine.created_at' %></th> <th><%= t '.created_at' %></th>
<th><%= t'note.mine.last_changed' %></th> <th><%= t '.last_changed' %></th>
</tr> </tr>
<% @notes.each do |note| -%> <% @notes.each do |note| -%>
<tr<% if note.author != @user2 %> class="creator"<% end %>> <tr<% if note.author != @user2 %> class="creator"<% end %>>
@ -25,9 +25,9 @@
</td> </td>
<td><%= link_to note.id.to_s, :controller => "browse", :action => "note", :id => note.id %></td> <td><%= link_to note.id.to_s, :controller => "browse", :action => "note", :id => note.id %></td>
<td><%= note_author(note.author) %></td> <td><%= note_author(note.author) %></td>
<td><%= note.comments.first.body.to_html %></td> <td><%= note.comments.first.body.to_html %></td>
<td><%= t 'note.mine.ago_html', :when => friendly_date(note.created_at) %></td> <td><%= t '.ago_html', :when => friendly_date(note.created_at) %></td>
<td><%= t 'note.mine.ago_html', :when => friendly_date(note.updated_at) %></td> <td><%= t '.ago_html', :when => friendly_date(note.updated_at) %></td>
</tr> </tr>
<% end -%> <% end -%>
</table> </table>

View file

@ -4,8 +4,8 @@ xml.rss("version" => "2.0",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do "xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do xml.channel do
xml.title t("note.rss.title") xml.title t("notes.rss.title")
xml.description t("note.rss.description_item", :id => @note.id) xml.description t("notes.rss.description_item", :id => @note.id)
xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml.link url_for(:controller => "site", :action => "index", :only_path => false)
xml << render(:partial => "note", :object => @note) xml << render(:partial => "note", :object => @note)

View file

@ -10,7 +10,7 @@
height: 50, height: 50,
border: 0 border: 0
), ),
user_url(@author, :host => SERVER_URL), user_url(@author),
:target => "_blank" :target => "_blank"
) %> ) %>
</td> </td>

View file

@ -1,16 +1,16 @@
<p> <p>
<%= t 'notifier.changeset_comment_notification.hi', :to_user => @to_user %> <%= t '.hi', :to_user => @to_user %>
</p> </p>
<p> <p>
<% if @owner %> <% if @owner %>
<%= raw t "notifier.changeset_comment_notification.commented.your_changeset", :commenter => link_to_user(@commenter), :time => @time %> <%= raw t ".commented.your_changeset", :commenter => link_to_user(@commenter), :time => @time %>
<% else %> <% else %>
<%= raw t "notifier.changeset_comment_notification.commented.commented_changeset", :commenter => link_to_user(@commenter), :time => @time, :changeset_author => @changeset_author %> <%= raw t ".commented.commented_changeset", :commenter => link_to_user(@commenter), :time => @time, :changeset_author => @changeset_author %>
<% end %> <% end %>
<% if @changeset_comment %> <% if @changeset_comment %>
<%= raw t "notifier.changeset_comment_notification.commented.partial_changeset_with_comment", :changeset_comment => content_tag("em", @changeset_comment) %> <%= raw t ".commented.partial_changeset_with_comment", :changeset_comment => content_tag("em", @changeset_comment) %>
<% else %> <% else %>
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_without_comment" %> <%= t ".commented.partial_changeset_without_comment" %>
<% end %> <% end %>
</p> </p>
@ -19,11 +19,11 @@
<% end %> <% end %>
<p> <p>
<%= raw t 'notifier.changeset_comment_notification.details', :url => link_to(@changeset_url, @changeset_url) %> <%= raw t '.details', :url => link_to(@changeset_url, @changeset_url) %>
</p> </p>
<% content_for :footer do %> <% content_for :footer do %>
<p> <p>
<%= raw t 'notifier.changeset_comment_notification.unsubscribe', :url => link_to(@changeset_url, @changeset_url, :style => "color: #222") %> <%= raw t '.unsubscribe', :url => link_to(@changeset_url, @changeset_url, :style => "color: #222") %>
</p> </p>
<% end %> <% end %>

View file

@ -1,20 +1,20 @@
<%= t 'notifier.changeset_comment_notification.hi', :to_user => @to_user %> <%= t '.hi', :to_user => @to_user %>
<% if @owner %> <% if @owner %>
<%= t "notifier.changeset_comment_notification.commented.your_changeset", :commenter => @commenter, :time => @time %> <%= t ".commented.your_changeset", :commenter => @commenter, :time => @time %>
<% else %> <% else %>
<%= t "notifier.changeset_comment_notification.commented.commented_changeset", :commenter => @commenter, :time => @time, :changeset_author => @changeset_author %> <%= t ".commented.commented_changeset", :commenter => @commenter, :time => @time, :changeset_author => @changeset_author %>
<% end %> <% end %>
<% if @changeset_comment %> <% if @changeset_comment %>
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_with_comment", :changeset_comment => @changeset_comment %> <%= t ".commented.partial_changeset_with_comment", :changeset_comment => @changeset_comment %>
<% else %> <% else %>
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_without_comment" %> <%= t ".commented.partial_changeset_without_comment" %>
<% end %> <% end %>
== ==
<%= @comment.to_text %> <%= @comment.to_text %>
== ==
<%= t 'notifier.changeset_comment_notification.details', :url => @changeset_url %> <%= t '.details', :url => @changeset_url %>
<%= t 'notifier.changeset_comment_notification.unsubscribe', :url => @changeset_url %> <%= t '.unsubscribe', :url => @changeset_url %>

View file

@ -1,8 +1,8 @@
<p> <p>
<%= t'notifier.diary_comment_notification.hi', :to_user => @to_user %> <%= t '.hi', :to_user => @to_user %>
</p> </p>
<p> <p>
<%= raw t'notifier.diary_comment_notification.header', :from_user => link_to_user(@from_user), :subject => content_tag("em", @title) %> <%= raw t '.header', :from_user => link_to_user(@from_user), :subject => content_tag("em", @title) %>
</p> </p>
<%= message_body do %> <%= message_body do %>
@ -10,7 +10,7 @@
<% end %> <% end %>
<% content_for :footer do %> <% content_for :footer do %>
<p><%= raw t'notifier.diary_comment_notification.footer', <p><%= raw t '.footer',
:readurl => link_to(@readurl, @readurl) + tag(:br), :readurl => link_to(@readurl, @readurl) + tag(:br),
:commenturl => link_to(@commenturl, @commenturl) + tag(:br), :commenturl => link_to(@commenturl, @commenturl) + tag(:br),
:replyurl => link_to(@replyurl, @replyurl) :replyurl => link_to(@replyurl, @replyurl)

View file

@ -1,9 +1,9 @@
<%= t'notifier.diary_comment_notification.hi', :to_user => @to_user %> <%= t '.hi', :to_user => @to_user %>
<%= t'notifier.diary_comment_notification.header', :from_user => @from_user, :subject => @title %> <%= t '.header', :from_user => @from_user, :subject => @title %>
== ==
<%= raw @text.to_text %> <%= raw @text.to_text %>
== ==
<%= t'notifier.diary_comment_notification.footer', :readurl => @readurl, :commenturl => @commenturl, :replyurl => @replyurl %> <%= t '.footer', :readurl => @readurl, :commenturl => @commenturl, :replyurl => @replyurl %>

View file

@ -1,9 +1,9 @@
<p><%= t 'notifier.friend_notification.had_added_you', :user => @friend.befriender.display_name %></p> <p><%= t '.had_added_you', :user => @friend.befriender.display_name %></p>
<%= message_body do %> <%= message_body do %>
<p><%= raw t 'notifier.friend_notification.see_their_profile', :userurl => link_to(@viewurl, @viewurl) %></p> <p><%= raw t '.see_their_profile', :userurl => link_to(@viewurl, @viewurl) %></p>
<% unless @friend.befriendee.is_friends_with?(@friend.befriender) -%> <% unless @friend.befriendee.is_friends_with?(@friend.befriender) -%>
<p><%= raw t 'notifier.friend_notification.befriend_them', :befriendurl => link_to(@friendurl, @friendurl) %></p> <p><%= raw t '.befriend_them', :befriendurl => link_to(@friendurl, @friendurl) %></p>
<% end -%> <% end -%>
<% end %> <% end %>

View file

@ -1,7 +1,7 @@
<%= t 'notifier.friend_notification.had_added_you', :user => @friend.befriender.display_name %> <%= t '.had_added_you', :user => @friend.befriender.display_name %>
<%= t 'notifier.friend_notification.see_their_profile', :userurl => @viewurl %> <%= t '.see_their_profile', :userurl => @viewurl %>
<% unless @friend.befriendee.is_friends_with?(@friend.befriender) -%> <% unless @friend.befriendee.is_friends_with?(@friend.befriender) -%>
<%= t 'notifier.friend_notification.befriend_them', :befriendurl => @friendurl %> <%= t '.befriend_them', :befriendurl => @friendurl %>
<% end -%> <% end -%>

View file

@ -1,8 +1,8 @@
<p> <p>
<%= t'notifier.message_notification.hi', :to_user => @to_user %> <%= t '.hi', :to_user => @to_user %>
</p> </p>
<p> <p>
<%= raw t'notifier.message_notification.header', <%= raw t '.header',
:from_user => link_to_user(@from_user), :from_user => link_to_user(@from_user),
:subject => content_tag("em", @title) :subject => content_tag("em", @title)
%> %>
@ -14,7 +14,7 @@
<% content_for :footer do %> <% content_for :footer do %>
<p> <p>
<%= t'notifier.message_notification.footer_html', <%= t '.footer_html',
:readurl => link_to(@readurl, @readurl) + tag(:br), :readurl => link_to(@readurl, @readurl) + tag(:br),
:replyurl => link_to(@replyurl, @replyurl) :replyurl => link_to(@replyurl, @replyurl)
%> %>

View file

@ -1,9 +1,9 @@
<%= raw t'notifier.message_notification.hi', :to_user => @to_user %> <%= raw t '.hi', :to_user => @to_user %>
<%= raw t'notifier.message_notification.header', :from_user => @from_user, :subject => @title %> <%= raw t '.header', :from_user => @from_user, :subject => @title %>
== ==
<%= raw @text.to_text %> <%= raw @text.to_text %>
== ==
<%= word_wrap(t'notifier.message_notification.footer_html', :readurl => @readurl, :replyurl => @replyurl) %> <%= word_wrap(t '.footer_html', :readurl => @readurl, :replyurl => @replyurl) %>

View file

@ -1,9 +1,9 @@
<p><%= t 'notifier.note_comment_notification.greeting' %></p> <p><%= t '.greeting' %></p>
<% if @owner %> <% if @owner %>
<p><%= raw t "notifier.note_comment_notification.#{@event}.your_note", :commenter => link_to_user(@commenter), :place => @place %></p> <p><%= raw t ".#{@event}.your_note", :commenter => link_to_user(@commenter), :place => @place %></p>
<% else %> <% else %>
<p><%= raw t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p> <p><%= raw t ".#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p>
<% end %> <% end %>
<% unless @comment.empty? %> <% unless @comment.empty? %>
@ -12,4 +12,4 @@
<% end %> <% end %>
<% end %> <% end %>
<p><%= raw t 'notifier.note_comment_notification.details', :url => link_to(@noteurl, @noteurl) %></p> <p><%= raw t '.details', :url => link_to(@noteurl, @noteurl) %></p>

View file

@ -1,9 +1,9 @@
<%= t 'notifier.note_comment_notification.greeting' %> <%= t '.greeting' %>
<% if @owner %> <% if @owner %>
<%= t "notifier.note_comment_notification.#{@event}.your_note", :commenter => @commenter, :place => @place %> <%= t ".#{@event}.your_note", :commenter => @commenter, :place => @place %>
<% else %> <% else %>
<%= t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => @commenter, :place => @place %> <%= t ".#{@event}.commented_note", :commenter => @commenter, :place => @place %>
<% end %> <% end %>
<% unless @comment.empty? %> <% unless @comment.empty? %>
@ -12,4 +12,4 @@
== ==
<% end %> <% end %>
<%= t 'notifier.note_comment_notification.details', :url => @noteurl %> <%= t '.details', :url => @noteurl %>

View file

@ -1,9 +1,9 @@
<p><%= t("notifier.signup_confirm.greeting") %></p> <p><%= t(".greeting") %></p>
<p><%= t("notifier.signup_confirm.created", :site_url => SERVER_URL) %></p> <p><%= t(".created", :site_url => SERVER_URL) %></p>
<p><%= t("notifier.signup_confirm.confirm") %></p> <p><%= t(".confirm") %></p>
<p><%= link_to @url, @url %></p> <p><%= link_to @url, @url %></p>
<p><%= t("notifier.signup_confirm.welcome") %></p> <p><%= t(".welcome") %></p>

View file

@ -1,9 +1,9 @@
<%= fp(t("notifier.signup_confirm.greeting")) %> <%= fp(t(".greeting")) %>
<%= fp(t("notifier.signup_confirm.created", :site_url => SERVER_URL)) %> <%= fp(t(".created", :site_url => SERVER_URL)) %>
<%= fp(t("notifier.signup_confirm.confirm")) %> <%= fp(t(".confirm")) %>
<%= @url %> <%= @url %>
<%= fp(t("notifier.signup_confirm.welcome")) %> <%= fp(t(".welcome")) %>

View file

@ -1,19 +1,19 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t "oauth.oauthorize.title" %></h1> <h1><%= t ".title" %></h1>
<% end %> <% end %>
<p><%= raw t("oauth.oauthorize.request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, :controller => :user, :action => :view, :display_name => current_user.display_name)) %></p> <p><%= raw t(".request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, :controller => :user, :action => :view, :display_name => current_user.display_name)) %></p>
<%= form_tag authorize_url do %> <%= form_tag authorize_url do %>
<%= hidden_field_tag "oauth_token", @token.token %> <%= hidden_field_tag "oauth_token", @token.token %>
<%- if params[:oauth_callback] -%> <%- if params[:oauth_callback] -%>
<%= hidden_field_tag "oauth_callback", params[:oauth_callback] %> <%= hidden_field_tag "oauth_callback", params[:oauth_callback] %>
<%- end -%> <%- end -%>
<p><%= t 'oauth.oauthorize.allow_to' %></p> <p><%= t '.allow_to' %></p>
<ul> <ul>
<% @token.client_application.permissions.each do |perm| %> <% @token.client_application.permissions.each do |perm| %>
<li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t "oauth.oauthorize.#{perm}" %></li> <li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t ".#{perm}" %></li>
<% end %> <% end %>
</ul> </ul>
<p><%= submit_tag t("oauth.oauthorize.grant_access") %></p> <p><%= submit_tag t(".grant_access") %></p>
<% end %> <% end %>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t "oauth.oauthorize_failure.title" %></h1> <h1><%= t ".title" %></h1>
<% end %> <% end %>
<p><%= @message %></p> <p><%= @message %></p>

View file

@ -1,9 +1,9 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t "oauth.oauthorize_success.title" %></h1> <h1><%= t ".title" %></h1>
<% end %> <% end %>
<p><%= raw t("oauth.oauthorize_success.allowed", :app_name => link_to(@token.client_application.name, @token.client_application.url)) %></p> <p><%= raw t(".allowed", :app_name => link_to(@token.client_application.name, @token.client_application.url)) %></p>
<% if @token.oob? and not @token.oauth10? %> <% if @token.oob? and not @token.oauth10? %>
<p><%= t "oauth.oauthorize_success.verification", :code => @token.verifier %></p> <p><%= t ".verification", :code => @token.verifier %></p>
<% end %> <% end %>

View file

@ -1,29 +1,29 @@
<div class='standard-form'> <div class='standard-form'>
<fieldset> <fieldset>
<div class="form-row"> <div class="form-row">
<label class='standard-label' for="client_application_name"><%= t'oauth_clients.form.name' %> (<%= t'oauth_clients.form.required' %>)</label> <label class='standard-label' for="client_application_name"><%= t '.name' %> (<%= t '.required' %>)</label>
<%= f.text_field :name %> <%= f.text_field :name %>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class='standard-label' for="client_application_url"><%= t'oauth_clients.form.url' %> (<%= t'oauth_clients.form.required' %>)</label> <label class='standard-label' for="client_application_url"><%= t '.url' %> (<%= t '.required' %>)</label>
<%= f.text_field :url %> <%= f.text_field :url %>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class='standard-label' for="client_application_callback_url"><%= t'oauth_clients.form.callback_url' %></label> <label class='standard-label' for="client_application_callback_url"><%= t '.callback_url' %></label>
<%= f.text_field :callback_url %> <%= f.text_field :callback_url %>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class='standard-label' for="client_application_support_url"><%= t'oauth_clients.form.support_url' %></label> <label class='standard-label' for="client_application_support_url"><%= t '.support_url' %></label>
<%= f.text_field :support_url %> <%= f.text_field :support_url %>
</div> </div>
</fieldset> </fieldset>
<fieldset class='form-divider'> <fieldset class='form-divider'>
<p><%= t'oauth_clients.form.requests' %></p> <p><%= t '.requests' %></p>
<% ClientApplication.all_permissions.each do |perm| %> <% ClientApplication.all_permissions.each do |perm| %>
<div class="form-row"> <div class="form-row">
<%= f.check_box perm %> <%= f.check_box perm %>
<label class='standard-label' for="client_application_<%= perm.to_s %>"><%= t('oauth_clients.form.' + perm.to_s) %></label> <label class='standard-label' for="client_application_<%= perm.to_s %>"><%= t('.' + perm.to_s) %></label>
</div> </div>
<% end %> <% end %>
</fieldset> </fieldset>
</div> </div>

View file

@ -1,8 +1,8 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t'oauth_clients.edit.title' %></h1> <h1><%= t '.title' %></h1>
<% end %> <% end %>
<%= form_for @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %> <%= form_for @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %>
<%= render :partial => "form", :locals => { :f => f } %> <%= render :partial => "form", :locals => { :f => f } %>
<%= submit_tag t'oauth_clients.edit.submit' %> <%= submit_tag t '.submit' %>
<% end %> <% end %>

View file

@ -1,13 +1,13 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t'oauth_clients.index.title' %></h1> <h1><%= t '.title' %></h1>
<% end %> <% end %>
<% unless @tokens.empty? %> <% unless @tokens.empty? %>
<h3><%= t'oauth_clients.index.my_tokens' %></h3> <h3><%= t '.my_tokens' %></h3>
<p><%= t'oauth_clients.index.list_tokens' %></p> <p><%= t '.list_tokens' %></p>
<table> <table>
<tr><th><%= t'oauth_clients.index.application' %></th> <tr><th><%= t '.application' %></th>
<th><%= t'oauth_clients.index.issued_at' %></th><th>&nbsp;</th></tr> <th><%= t '.issued_at' %></th><th>&nbsp;</th></tr>
<% @tokens.each do |token|%> <% @tokens.each do |token|%>
<%= content_tag_for :tr, token do %> <%= content_tag_for :tr, token do %>
<td><%= link_to token.client_application.name, token.client_application.url %></td> <td><%= link_to token.client_application.name, token.client_application.url %></td>
@ -15,22 +15,22 @@
<td> <td>
<%= form_tag :controller => 'oauth', :action => 'revoke' do %> <%= form_tag :controller => 'oauth', :action => 'revoke' do %>
<%= hidden_field_tag 'token', token.token %> <%= hidden_field_tag 'token', token.token %>
<%= submit_tag t('oauth_clients.index.revoke') %> <%= submit_tag t('.revoke') %>
<% end %> <% end %>
</td> </td>
<% end %> <% end %>
<% end %> <% end %>
</table> </table>
<% end %> <% end %>
<h3><%= t'oauth_clients.index.my_apps' %></h3> <h3><%= t '.my_apps' %></h3>
<% if @client_applications.empty? %> <% if @client_applications.empty? %>
<p><%= raw(t('oauth_clients.index.no_apps', :oauth => "<a href=\"https://oauth.net\">OAuth</a>")) %></p> <p><%= raw(t('.no_apps', :oauth => "<a href=\"https://oauth.net\">OAuth</a>")) %></p>
<% else %> <% else %>
<p><%= t'oauth_clients.index.registered_apps' %></p> <p><%= t '.registered_apps' %></p>
<% @client_applications.each do |client|%> <% @client_applications.each do |client|%>
<%= div_for client do %> <%= div_for client do %>
<%= link_to client.name, :action => :show, :id => client.id %> <%= link_to client.name, :action => :show, :id => client.id %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
<h3><%= link_to t('oauth_clients.index.register_new'), :action => :new %></h3> <h3><%= link_to t('.register_new'), :action => :new %></h3>

View file

@ -1,10 +1,10 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t'oauth_clients.new.title' %></h1> <h1><%= t '.title' %></h1>
<% end %> <% end %>
<div class='standard-form'> <div class='standard-form'>
<%= form_for :client_application, :url => { :action => :create } do |f| %> <%= form_for :client_application, :url => { :action => :create } do |f| %>
<%= render :partial => "form", :locals => { :f => f } %> <%= render :partial => "form", :locals => { :f => f } %>
<%= submit_tag t('oauth_clients.new.submit') %> <%= submit_tag t('.submit') %>
<% end %> <% end %>
</div> </div>

View file

@ -1 +1 @@
<p><%= t('oauth_clients.not_found.sorry', :type => @type) %></p> <p><%= t('.sorry', :type => @type) %></p>

View file

@ -1,33 +1,33 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t('oauth_clients.show.title', :app_name => @client_application.name) %></h1> <h1><%= t('.title', :app_name => @client_application.name) %></h1>
<% end %> <% end %>
<div class='prose'> <div class='prose'>
<p> <p>
<strong><%= t'oauth_clients.show.key' %></strong> <%=@client_application.key %> <strong><%= t '.key' %></strong> <%=@client_application.key %>
</p> </p>
<p> <p>
<strong><%= t'oauth_clients.show.secret' %></strong> <%=@client_application.secret %> <strong><%= t '.secret' %></strong> <%=@client_application.secret %>
</p> </p>
<p> <p>
<strong><%= t'oauth_clients.show.url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %> <strong><%= t '.url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %>
</p> </p>
<p> <p>
<strong><%= t'oauth_clients.show.access_url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %> <strong><%= t '.access_url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %>
</p> </p>
<p> <p>
<strong><%= t'oauth_clients.show.authorize_url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %> <strong><%= t '.authorize_url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %>
</p> </p>
<p><%= t'oauth_clients.show.requests' %></p> <p><%= t '.requests' %></p>
<ul><% @client_application.permissions.each do |perm| %> <ul><% @client_application.permissions.each do |perm| %>
<div class="field"> <div class="field">
<li><%= t('oauth_clients.form.' + perm.to_s) %></li> <li><%= t('oauth_clients.form.' + perm.to_s) %></li>
</div> </div>
<% end %></ul> <% end %></ul>
<p><%= t'oauth_clients.show.support_notice' %></p> <p><%= t '.support_notice' %></p>
</div> </div>
<div class="buttons"> <div class="buttons">
<%= button_to t('oauth_clients.show.edit'), edit_oauth_client_path(@client_application.user.display_name, @client_application), :method => :get, :class=> "oauth-edit" %> <%= button_to t('.edit'), edit_oauth_client_path(@client_application.user.display_name, @client_application), :method => :get, :class=> "oauth-edit" %>
<%= button_to t('oauth_clients.show.delete'), oauth_client_path(@client_application.user.display_name, @client_application), :method => :delete, :data => { :confirm => t('oauth_clients.show.confirm') }, :class=> "oauth-delete deemphasize" %> <%= button_to t('.delete'), oauth_client_path(@client_application.user.display_name, @client_application), :method => :delete, :data => { :confirm => t('.confirm') }, :class=> "oauth-delete deemphasize" %>
</div> </div>

View file

@ -1,22 +1,21 @@
<% @title = t 'redaction.edit.title' %> <% @title = t '.title' %>
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t 'redaction.edit.heading' %></h1> <h1><%= t '.heading' %></h1>
<% end %> <% end %>
<%= form_for(@redaction) do |f| %> <%= form_for(@redaction) do |f| %>
<%= f.error_messages %> <%= f.error_messages %>
<p> <p>
<%= f.label :title, t('redaction.edit.title') %><br /> <%= f.label :title, t('.title') %><br />
<%= f.text_field :title %> <%= f.text_field :title %>
</p> </p>
<p> <p>
<%= f.label :description, t('redaction.edit.description') %><br /> <%= f.label :description, t('.description') %><br />
<%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %> <%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %>
</p> </p>
<p> <p>
<%= f.submit t('redaction.edit.submit') %> <%= f.submit t('.submit') %>
</p> </p>
<% end %> <% end %>

View file

@ -1,10 +1,10 @@
<% @title = t('redaction.index.title') %> <% @title = t('.title') %>
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t('redaction.index.heading') %></h1> <h1><%= t('.heading') %></h1>
<% end %> <% end %>
<% unless @redactions.empty? %> <% unless @redactions.empty? %>
<%= render :partial => 'redactions' %> <%= render :partial => 'redactions' %>
<% else %> <% else %>
<p><%= t 'redaction.index.empty' %></p> <p><%= t '.empty' %></p>
<% end %> <% end %>

View file

@ -1,22 +1,20 @@
<% @title = t 'redaction.new.title' %> <% @title = t '.title' %>
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t 'redaction.new.heading' %></h1> <h1><%= t '.heading' %></h1>
<% end %> <% end %>
<%= form_for(@redaction) do |f| %> <%= form_for(@redaction) do |f| %>
<%= f.error_messages %> <%= f.error_messages %>
<p> <p>
<%= f.label :title, t('redaction.new.title') %><br /> <%= f.label :title, t('.title') %><br />
<%= f.text_field :title %> <%= f.text_field :title %>
</p> </p>
<p> <p>
<%= f.label :description, t('redaction.new.description') %><br /> <%= f.label :description, t('.description') %><br />
<%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %> <%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %>
</p> </p>
<p> <p>
<%= f.submit t('redaction.new.submit') %> <%= f.submit t('.submit') %>
</p> </p>
<% end %> <% end %>

View file

@ -1,20 +1,20 @@
<% @title = t('redaction.show.title') %> <% @title = t('.title') %>
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t('redaction.show.heading', :title => @redaction.title) %></h1> <h1><%= t('.heading', :title => @redaction.title) %></h1>
<% end %> <% end %>
<p> <p>
<b><%= t 'redaction.show.user' %></b> <b><%= t '.user' %></b>
<%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %> <%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %>
</p> </p>
<p class="richtext"> <p class="richtext">
<b><%= t 'redaction.show.description' %></b> <b><%= t '.description' %></b>
<%= @redaction.description.to_html %> <%= @redaction.description.to_html %>
</p> </p>
<% if current_user and current_user.moderator? %> <% if current_user and current_user.moderator? %>
<div class="buttons"> <div class="buttons">
<%= button_to t('redaction.show.edit'), edit_redaction_path(@redaction), :method => :get %></td> <%= button_to t('.edit'), edit_redaction_path(@redaction), :method => :get %></td>
<%= button_to t('redaction.show.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('redaction.show.confirm') } %> <%= button_to t('.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('.confirm') } %>
</div> </div>
<% end %> <% end %>

View file

@ -1,26 +1,26 @@
<h4 class='heading'><%= t "site.markdown_help.title_html" %></h4> <h4 class='heading'><%= t ".title_html" %></h4>
<ul> <ul>
<li> <li>
<h4><%= t "site.markdown_help.headings" %></h4> <h4><%= t ".headings" %></h4>
<p># <%= t "site.markdown_help.heading" %><br> <p># <%= t ".heading" %><br>
## <%= t "site.markdown_help.subheading" %></p> ## <%= t ".subheading" %></p>
</li> </li>
<li> <li>
<h4><%= t "site.markdown_help.unordered" %></h4> <h4><%= t ".unordered" %></h4>
<p>* <%= t "site.markdown_help.first" %><br> <p>* <%= t ".first" %><br>
* <%= t "site.markdown_help.second" %></p> * <%= t ".second" %></p>
</li> </li>
<li> <li>
<h4><%= t "site.markdown_help.ordered" %></h4> <h4><%= t ".ordered" %></h4>
<p>1. <%= t "site.markdown_help.first" %><br> <p>1. <%= t ".first" %><br>
2. <%= t "site.markdown_help.second" %></p> 2. <%= t ".second" %></p>
</li> </li>
<li> <li>
<h4><%= t "site.markdown_help.link" %></h4> <h4><%= t ".link" %></h4>
<span>[<%= t "site.markdown_help.text" %>](<%= t "site.markdown_help.url" %>)</span> <span>[<%= t ".text" %>](<%= t ".url" %>)</span>
</li> </li>
<li> <li>
<h4><%= t "site.markdown_help.image" %></h4> <h4><%= t ".image" %></h4>
<span>![<%= t "site.markdown_help.alt" %>](<%= t "site.markdown_help.url" %>)</span> <span>![<%= t ".alt" %>](<%= t ".url" %>)</span>
</li> </li>
</ul> </ul>

View file

@ -1,37 +1,37 @@
<div class='attr'> <div class='attr'>
<div class='byosm'> <div class='byosm'>
<%= t "about_page.copyright_html" %> <%= t ".copyright_html" %>
</div> </div>
<div class='user-image'></div> <div class='user-image'></div>
<h1><%= raw t "about_page.used_by", :name => "<span class='user-name'>OpenStreetMap</span>" %></h1> <h1><%= raw t ".used_by", :name => "<span class='user-name'>OpenStreetMap</span>" %></h1>
</div> </div>
<div class='text'> <div class='text'>
<div class='section'> <div class='section'>
<p><strong><%= t "about_page.lede_text" %></strong></p> <p><strong><%= t ".lede_text" %></strong></p>
<h2><div class='icon local'></div><%= t "about_page.local_knowledge_title" %></h2> <h2><div class='icon local'></div><%= t ".local_knowledge_title" %></h2>
<p><%= t "about_page.local_knowledge_html" %></p> <p><%= t ".local_knowledge_html" %></p>
</div> </div>
<div class='section'> <div class='section'>
<h2><div class='icon community'></div><%= t "about_page.community_driven_title" %></h2> <h2><div class='icon community'></div><%= t ".community_driven_title" %></h2>
<p><%= t "about_page.community_driven_html", :diary_path => diary_path %></p> <p><%= t ".community_driven_html", :diary_path => diary_path %></p>
</div> </div>
<div class='section' id='open-data'> <div class='section' id='open-data'>
<h2><div class='icon open'></div><%= t "about_page.open_data_title" %></h2> <h2><div class='icon open'></div><%= t ".open_data_title" %></h2>
<p><%= t "about_page.open_data_html", :copyright_path => copyright_path %></p> <p><%= t ".open_data_html", :copyright_path => copyright_path %></p>
</div> </div>
<div class='section' id='legal'> <div class='section' id='legal'>
<h2><div class='icon legal'></div><%= t "about_page.legal_title" %></h2> <h2><div class='icon legal'></div><%= t ".legal_title" %></h2>
<p><%= t "about_page.legal_html" %></p> <p><%= t ".legal_html" %></p>
</div> </div>
<div class='section' id='partners'> <div class='section' id='partners'>
<h2><div class='icon partners'></div><%= t "about_page.partners_title" %></h2> <h2><div class='icon partners'></div><%= t ".partners_title" %></h2>
<p><%= t 'layouts.partners_html', <p><%= t 'layouts.partners_html',
:ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"), :ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"),
:ic => link_to(t('layouts.partners_ic'), "https://www.imperial.ac.uk/"), :ic => link_to(t('layouts.partners_ic'), "https://www.imperial.ac.uk/"),

View file

@ -2,15 +2,15 @@
<% if @locale == 'en' %> <% if @locale == 'en' %>
<!-- Maybe ease foreigners back to their native page --> <!-- Maybe ease foreigners back to their native page -->
<% if t('license_page.legal_babble', :locale => I18n.locale) != t('license_page.legal_babble', :locale => :en) %> <% if t('.legal_babble', :locale => I18n.locale) != t('.legal_babble', :locale => :en) %>
<h1><%= t 'license_page.native.title' %></h1> <h1><%= t '.native.title' %></h1>
<p> <p>
<%= raw t 'license_page.native.text', <%= raw t '.native.text',
:native_link => link_to(t('license_page.native.native_link'), :native_link => link_to(t('.native.native_link'),
:controller => 'site', :controller => 'site',
:action => 'copyright', :action => 'copyright',
:copyright_locale => nil), :copyright_locale => nil),
:mapping_link => link_to(t('license_page.native.mapping_link'), :mapping_link => link_to(t('.native.mapping_link'),
:controller => 'site', :controller => 'site',
:action => 'index') %> :action => 'index') %>
</p> </p>
@ -18,11 +18,11 @@
<% end %> <% end %>
<% else %> <% else %>
<!-- Maybe note that this page has been translated --> <!-- Maybe note that this page has been translated -->
<% if t('license_page.legal_babble', :locale => @locale) != t('license_page.legal_babble', :locale => :en) %> <% if t('.legal_babble', :locale => @locale) != t('.legal_babble', :locale => :en) %>
<h1><%= t 'license_page.foreign.title' %></h1> <h1><%= t '.foreign.title' %></h1>
<p> <p>
<%= raw t 'license_page.foreign.text', <%= raw t '.foreign.text',
:english_original_link => link_to(t('license_page.foreign.english_link'), :english_original_link => link_to(t('.foreign.english_link'),
:controller => 'site', :controller => 'site',
:action => 'copyright', :action => 'copyright',
:copyright_locale => 'en') %> :copyright_locale => 'en') %>
@ -31,46 +31,46 @@
<% end %> <% end %>
<% end %> <% end %>
<h1><%= t "license_page.legal_babble.title_html", :locale => @locale %></h1> <h1><%= t ".legal_babble.title_html", :locale => @locale %></h1>
<% end %> <% end %>
<p><%= t "license_page.legal_babble.intro_1_html", :locale => @locale %></p> <p><%= t ".legal_babble.intro_1_html", :locale => @locale %></p>
<p><%= t "license_page.legal_babble.intro_2_html", :locale => @locale %></p> <p><%= t ".legal_babble.intro_2_html", :locale => @locale %></p>
<p><%= t "license_page.legal_babble.intro_3_html", :locale => @locale %></p> <p><%= t ".legal_babble.intro_3_html", :locale => @locale %></p>
<h3><%= t "license_page.legal_babble.credit_title_html", :locale => @locale %></h3> <h3><%= t ".legal_babble.credit_title_html", :locale => @locale %></h3>
<p><%= t "license_page.legal_babble.credit_1_html", :locale => @locale %></p> <p><%= t ".legal_babble.credit_1_html", :locale => @locale %></p>
<p><%= t "license_page.legal_babble.credit_2_html", :locale => @locale %></p> <p><%= t ".legal_babble.credit_2_html", :locale => @locale %></p>
<p><%= t "license_page.legal_babble.credit_3_html", :locale => @locale %></p> <p><%= t ".legal_babble.credit_3_html", :locale => @locale %></p>
<p><%= image_tag("attribution_example.png", <p><%= image_tag("attribution_example.png",
:alt => t('license_page.legal_babble.attribution_example.alt'), :alt => t('.legal_babble.attribution_example.alt'),
:border => 0, :border => 0,
:title => t('license_page.legal_babble.attribution_example.title')) %> :title => t('.legal_babble.attribution_example.title')) %>
<h3><%= t "license_page.legal_babble.more_title_html", :locale => @locale %></h3> <h3><%= t ".legal_babble.more_title_html", :locale => @locale %></h3>
<p><%= t "license_page.legal_babble.more_1_html", :locale => @locale %></p> <p><%= t ".legal_babble.more_1_html", :locale => @locale %></p>
<p><%= t "license_page.legal_babble.more_2_html", :locale => @locale %></p> <p><%= t ".legal_babble.more_2_html", :locale => @locale %></p>
<h3><%= t "license_page.legal_babble.contributors_title_html", :locale => @locale %></h3> <h3><%= t ".legal_babble.contributors_title_html", :locale => @locale %></h3>
<p><%= t "license_page.legal_babble.contributors_intro_html", :locale => @locale %></p> <p><%= t ".legal_babble.contributors_intro_html", :locale => @locale %></p>
<ul id="contributors"> <ul id="contributors">
<li><%= t "license_page.legal_babble.contributors_at_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_at_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_ca_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_ca_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_fi_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_fi_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_fr_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_fr_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_nl_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_nl_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_nz_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_nz_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_si_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_si_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_za_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_za_html", :locale => @locale %></li>
<li><%= t "license_page.legal_babble.contributors_gb_html", :locale => @locale %></li> <li><%= t ".legal_babble.contributors_gb_html", :locale => @locale %></li>
</ul> </ul>
<p><%= t "license_page.legal_babble.contributors_footer_1_html", :locale => @locale %></p> <p><%= t ".legal_babble.contributors_footer_1_html", :locale => @locale %></p>
<p><%= t "license_page.legal_babble.contributors_footer_2_html", :locale => @locale %></p> <p><%= t ".legal_babble.contributors_footer_2_html", :locale => @locale %></p>
<h3><%= t "license_page.legal_babble.infringement_title_html", :locale => @locale %></h3> <h3><%= t ".legal_babble.infringement_title_html", :locale => @locale %></h3>
<p><%= t "license_page.legal_babble.infringement_1_html", :locale => @locale %></p> <p><%= t ".legal_babble.infringement_1_html", :locale => @locale %></p>
<p><%= t "license_page.legal_babble.infringement_2_html", :locale => @locale %></p> <p><%= t ".legal_babble.infringement_2_html", :locale => @locale %></p>
<h3><%= t "license_page.legal_babble.trademarks_title_html", :locale => @locale %></h3> <h3><%= t ".legal_babble.trademarks_title_html", :locale => @locale %></h3>
<p><%= t "license_page.legal_babble.trademarks_1_html", :locale => @locale %></p> <p><%= t ".legal_babble.trademarks_1_html", :locale => @locale %></p>

View file

@ -4,9 +4,9 @@
<% elsif STATUS == :database_readonly or STATUS == :api_readonly %> <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
<p><%= t 'layouts.osm_read_only' %></p> <p><%= t 'layouts.osm_read_only' %></p>
<% elsif !current_user.data_public? %> <% elsif !current_user.data_public? %>
<p><%= t 'site.edit.not_public' %></p> <p><%= t '.not_public' %></p>
<p><%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => current_user.display_name, :anchor => 'public'}) %></p> <p><%= raw t '.not_public_description', :user_page => (link_to t('.user_page_link'), {:controller => 'user', :action => 'account', :display_name => current_user.display_name, :anchor => 'public'}) %></p>
<p><%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %></p> <p><%= raw t 'site.edit.anon_edits', :link => link_to(t('.anon_edits_link_text'), t('.anon_edits_link')) %></p>
<% else %> <% else %>
<%= render :partial => preferred_editor %> <%= render :partial => preferred_editor %>
<% end %> <% end %>

View file

@ -1,8 +1,8 @@
<% set_title(t('export.title')) %> <% set_title(t('.title')) %>
<h2> <h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a> <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t 'export.title' %> <%= t '.title' %>
</h2> </h2>
<%= form_tag({:controller => "export", :action => "finish"}, :class => "export_form") do %> <%= form_tag({:controller => "export", :action => "finish"}, :class => "export_form") do %>
@ -17,37 +17,37 @@
<br/><br/> <br/><br/>
<%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %> <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>
</div> </div>
<a id='drag_box' href="#"><%= t'export.start.manually_select' %></a> <a id='drag_box' href="#"><%= t '.manually_select' %></a>
</div> </div>
<h4><%= t'export.start.licence' %></h4> <h4><%= t '.licence' %></h4>
<p><%= raw t 'export.start.export_details' %></p> <p><%= raw t '.export_details' %></p>
<div id="export_osm_too_large"> <div id="export_osm_too_large">
<p class="warning"> <p class="warning">
<%= t'export.start.too_large.body' %> <%= t '.too_large.body' %>
</p> </p>
</div> </div>
<div id="export_commit"> <div id="export_commit">
<div class="export_button"> <div class="export_button">
<%= submit_tag t('export.start.export_button') %> <%= submit_tag t('.export_button') %>
</div> </div>
<p><%= t'export.start.too_large.advice' %></p> <p><%= t '.too_large.advice' %></p>
</div> </div>
<dl class="inner12"> <dl class="inner12">
<dt><a id="export_overpass" href="https://overpass-api.de/api/map?bbox="><%= t'export.start.too_large.overpass.title' %></a></dt> <dt><a id="export_overpass" href="https://overpass-api.de/api/map?bbox="><%= t '.too_large.overpass.title' %></a></dt>
<dd><%= t'export.start.too_large.overpass.description' %></dd> <dd><%= t '.too_large.overpass.description' %></dd>
<dt><a href="https://planet.openstreetmap.org/"><%= t'export.start.too_large.planet.title' %></a></dt>
<dd><%= t'export.start.too_large.planet.description' %></dd>
<dt><a href="https://download.geofabrik.de/"><%= t'export.start.too_large.geofabrik.title' %></a></dt> <dt><a href="https://planet.openstreetmap.org/"><%= t '.too_large.planet.title' %></a></dt>
<dd><%= t'export.start.too_large.geofabrik.description' %></dd> <dd><%= t '.too_large.planet.description' %></dd>
<dt><a href="https://wiki.openstreetmap.org/wiki/Download"><%= t'export.start.too_large.other.title' %></a></dt> <dt><a href="https://download.geofabrik.de/"><%= t '.too_large.geofabrik.title' %></a></dt>
<dd><%= t'export.start.too_large.other.description' %></dd> <dd><%= t '.too_large.geofabrik.description' %></dd>
<dt><a href="https://wiki.openstreetmap.org/wiki/Download"><%= t '.too_large.other.title' %></a></dt>
<dd><%= t '.too_large.other.description' %></dd>
</dl> </dl>
<% end %> <% end %>

View file

@ -3,35 +3,35 @@
<% end %> <% end %>
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t "fixthemap.title" %></h1> <h1><%= t ".title" %></h1>
<% end %> <% end %>
<h3><%= t "layouts.intro_header" %></h3> <h3><%= t "layouts.intro_header" %></h3>
<p><%= t "layouts.intro_text" %></p> <p><%= t "layouts.intro_text" %></p>
<h3><%= t "fixthemap.how_to_help.title" %></h3> <h3><%= t ".how_to_help.title" %></h3>
<div class='clearfix'> <div class='clearfix'>
<div class='col6 inner11'> <div class='col6 inner11'>
<h3><%= t "fixthemap.how_to_help.join_the_community.title" %></h3> <h3><%= t ".how_to_help.join_the_community.title" %></h3>
<%= t "fixthemap.how_to_help.join_the_community.explanation_html" %> <%= t ".how_to_help.join_the_community.explanation_html" %>
<div class='clearfix center'> <div class='clearfix center'>
<a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a> <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
</div> </div>
</div> </div>
<div class='col6 inner11'> <div class='col6 inner11'>
<h3><%= t "welcome_page.add_a_note.title" %></h3> <h3><%= t "site.welcome.add_a_note.title" %></h3>
<p><%= t "welcome_page.add_a_note.paragraph_1_html" %></p> <p><%= t "site.welcome.add_a_note.paragraph_1_html" %></p>
<p><%= t "fixthemap.how_to_help.add_a_note.instructions_html", :map_url => root_path %></p> <p><%= t ".how_to_help.add_a_note.instructions_html", :map_url => root_path %></p>
</div> </div>
</div> </div>
<h3><%= t "fixthemap.other_concerns.title" %></h3> <h3><%= t ".other_concerns.title" %></h3>
<p><%= t "fixthemap.other_concerns.explanation_html" %></p> <p><%= t ".other_concerns.explanation_html" %></p>
<div class='col12 clearfix icon-list'> <div class='col12 clearfix icon-list'>
<h3><%= t "welcome_page.questions.title" %></h3> <h3><%= t "site.welcome.questions.title" %></h3>
<span class='sprite small term question'></span> <span class='sprite small term question'></span>
<p><%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %></p> <p><%= t "site.welcome.questions.paragraph_1_html", :help_url => help_path %></p>
</div> </div>

View file

@ -1,18 +1,18 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t "help_page.title" %></h1> <h1><%= t ".title" %></h1>
<% end %> <% end %>
<p class='introduction'><%= t "help_page.introduction" %></p> <p class='introduction'><%= t ".introduction" %></p>
<% ['welcome', 'beginners_guide', 'help', 'mailing_lists', 'forums', 'irc', 'switch2osm', 'wiki'].each do |site| %> <% ['welcome', 'beginners_guide', 'help', 'mailing_lists', 'forums', 'irc', 'switch2osm', 'wiki'].each do |site| %>
<% unless site == 'welcome' && !current_user %> <% unless site == 'welcome' && !current_user %>
<div class='<%= site %> help-item'> <div class='<%= site %> help-item'>
<h3> <h3>
<a href='<%= t "help_page.#{site}.url" %>'> <a href='<%= t ".#{site}.url" %>'>
<%= t "help_page.#{site}.title" %> <%= t ".#{site}.title" %>
</a> </a>
</h3> </h3>
<p><%= t "help_page.#{site}.description" %></p> <p><%= t ".#{site}.description" %></p>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>

View file

@ -7,7 +7,7 @@
<%= image_tag "key/#{name}/#{entry['image']}" %> <%= image_tag "key/#{name}/#{entry['image']}" %>
</td> </td>
<td class="mapkey-table-value"> <td class="mapkey-table-value">
<%= [*t("site.key.table.entry.#{entry['name']}")].to_sentence %> <%= [*t(".table.entry.#{entry['name']}")].to_sentence %>
</td> </td>
</tr> </tr>
<% end %> <% end %>

View file

@ -3,71 +3,71 @@
<% end %> <% end %>
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t "welcome_page.title" %></h1> <h1><%= t ".title" %></h1>
<% end %> <% end %>
<p><%= t "welcome_page.introduction_html" %></p> <p><%= t ".introduction_html" %></p>
<h3><%= t "welcome_page.whats_on_the_map.title" %></h3> <h3><%= t ".whats_on_the_map.title" %></h3>
<div class=' clearfix'> <div class=' clearfix'>
<div class='col6 inner11'> <div class='col6 inner11'>
<div class='center clearfix inner11'> <div class='center clearfix inner11'>
<span class='sprite small check'></span> <span class='sprite small check'></span>
</div> </div>
<p><%= t "welcome_page.whats_on_the_map.on_html" %></p> <p><%= t ".whats_on_the_map.on_html" %></p>
</div> </div>
<div class='col6 inner11'> <div class='col6 inner11'>
<div class='center clearfix inner11'> <div class='center clearfix inner11'>
<span class='sprite small x'></span> <span class='sprite small x'></span>
</div> </div>
<p><%= t "welcome_page.whats_on_the_map.off_html" %></p> <p><%= t ".whats_on_the_map.off_html" %></p>
</div> </div>
</div> </div>
<h3><%= t "welcome_page.basic_terms.title" %></h3> <h3><%= t ".basic_terms.title" %></h3>
<p><%= t "welcome_page.basic_terms.paragraph_1_html" %></p> <p><%= t ".basic_terms.paragraph_1_html" %></p>
<div class='col12 clearfix icon-list'> <div class='col12 clearfix icon-list'>
<div class='clearfix'> <div class='clearfix'>
<span class='sprite small term editor'></span> <span class='sprite small term editor'></span>
<p><%= t "welcome_page.basic_terms.editor_html" %></p> <p><%= t ".basic_terms.editor_html" %></p>
</div> </div>
<div class='clearfix'> <div class='clearfix'>
<span class='sprite small term node'></span> <span class='sprite small term node'></span>
<p><%= t "welcome_page.basic_terms.node_html" %></p> <p><%= t ".basic_terms.node_html" %></p>
</div> </div>
<div class='clearfix'> <div class='clearfix'>
<span class='sprite small term way'></span> <span class='sprite small term way'></span>
<p><%= t "welcome_page.basic_terms.way_html" %></p> <p><%= t ".basic_terms.way_html" %></p>
</div> </div>
<div class='clearfix'> <div class='clearfix'>
<span class='sprite small term tag'></span> <span class='sprite small term tag'></span>
<p><%= t "welcome_page.basic_terms.tag_html" %></p> <p><%= t ".basic_terms.tag_html" %></p>
</div> </div>
</div> </div>
<div class='col12 clearfix icon-list'> <div class='col12 clearfix icon-list'>
<h3><%= t "welcome_page.rules.title" %></h3> <h3><%= t ".rules.title" %></h3>
<span class='sprite small term rules'></span> <span class='sprite small term rules'></span>
<p><%= t "welcome_page.rules.paragraph_1_html" %></p> <p><%= t ".rules.paragraph_1_html" %></p>
</div> </div>
<div class='col12 clearfix icon-list'> <div class='col12 clearfix icon-list'>
<h3><%= t "welcome_page.questions.title" %></h3> <h3><%= t ".questions.title" %></h3>
<span class='sprite small term question'></span> <span class='sprite small term question'></span>
<p><%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %></p> <p><%= t ".questions.paragraph_1_html", :help_url => help_path %></p>
</div> </div>
<div class='clearfix center'> <div class='clearfix center'>
<a href="<%= edit_path %>" class="button start-mapping"><%= t "welcome_page.start_mapping" %></a> <a href="<%= edit_path %>" class="button start-mapping"><%= t ".start_mapping" %></a>
</div> </div>
<div class='note-box'> <div class='note-box'>
<div class='inner22'> <div class='inner22'>
<h3><%= t "welcome_page.add_a_note.title" %></h3> <h3><%= t ".add_a_note.title" %></h3>
<p><%= t "welcome_page.add_a_note.paragraph_1_html" %></p> <p><%= t ".add_a_note.paragraph_1_html" %></p>
<p><%= t "welcome_page.add_a_note.paragraph_2_html", :map_url => root_path %></p> <p><%= t ".add_a_note.paragraph_2_html", :map_url => root_path %></p>
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
<%= image_tag(url_for(:controller => :trace, :action => :icon, :id => description.id, :display_name => description.user.display_name)) %> <%= image_tag(url_for(:controller => :trace, :action => :icon, :id => description.id, :display_name => description.user.display_name)) %>
<% if description.size -%> <% if description.size -%>
<%= t "trace.description.description_with_count", :count => description.size, :user => description.user.display_name %> <%= t ".description_with_count", :count => description.size, :user => description.user.display_name %>
<% else -%> <% else -%>
<%= t "trace.description.description_without_count", :user => description.user.display_name %> <%= t ".description_without_count", :user => description.user.display_name %>
<% end -%> <% end -%>

View file

@ -5,25 +5,25 @@
<% if trace.inserted %> <% if trace.inserted %>
<a href="<%= url_for :controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name %>"><img src="<%= url_for :controller => 'trace', :action => 'icon', :id => trace.id, :display_name => trace.user.display_name %>" border="0" alt="" /></a> <a href="<%= url_for :controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name %>"><img src="<%= url_for :controller => 'trace', :action => 'icon', :id => trace.id, :display_name => trace.user.display_name %>" border="0" alt="" /></a>
<% else %> <% else %>
<span class="trace_pending"><%= t'trace.trace.pending' %></span> <span class="trace_pending"><%= t '.pending' %></span>
<% end %> <% end %>
<% end %> <% end %>
</td> </td>
<td class="<%= cl %>"><%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %> <td class="<%= cl %>"><%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %>
<span class="trace_summary" title="<%= trace.timestamp %>"> ... <span class="trace_summary" title="<%= trace.timestamp %>"> ...
<% if trace.inserted %> <% if trace.inserted %>
(<%= t'trace.trace.count_points', :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>) (<%= t '.count_points', :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>)
<% end %> <% end %>
... <%= t'trace.trace.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %></span> ... <%= t '.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %></span>
<%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}"}, {:title => t('trace.trace.view_map')} %> / <%= link_to_if trace.inserted?, t('.map'), {:controller => 'site', :action => 'index', :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}"}, {:title => t('.view_map')} %> /
<%= link_to t('trace.trace.edit'), {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => t('trace.trace.edit_map')} %> <%= link_to t('.edit'), {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => t('.edit_map')} %>
<span class="trace_<%= trace.visibility %>"><%= t('trace.trace.' + trace.visibility) %></span> <span class="trace_<%= trace.visibility %>"><%= t('.' + trace.visibility) %></span>
<br /> <br />
<%= trace.description %> <%= trace.description %>
<br /> <br />
<%= t'trace.trace.by' %> <%=link_to h(trace.user.display_name), user_path(trace.user) %> <%= t '.by' %> <%=link_to h(trace.user.display_name), user_path(trace.user) %>
<% if !trace.tags.empty? %> <% if !trace.tags.empty? %>
<%= t'trace.trace.in' %> <%= t '.in' %>
<%= raw(trace.tags.collect { |tag| link_to_tag tag.tag }.join(", ")) %> <%= raw(trace.tags.collect { |tag| link_to_tag tag.tag }.join(", ")) %>
<% end %> <% end %>
</td> </td>

View file

@ -1,6 +1,6 @@
<% content_for :optionals do %> <% content_for :optionals do %>
<div class="optionalbox"> <div class="optionalbox">
<h4><%= t'trace.trace_optionals.tags' %></h4> <h4><%= t '.tags' %></h4>
<% if @all_tags %> <% if @all_tags %>
<% @all_tags.each do |tag| %> <% @all_tags.each do |tag| %>
<%= link_to_tag tag %><br /> <%= link_to_tag tag %><br />

View file

@ -2,17 +2,17 @@
<% if @traces.size > 1 %> <% if @traces.size > 1 %>
<% if @page > 1 %> <% if @page > 1 %>
<%= link_to t('trace.trace_paging_nav.newer'), @params.merge({ :page => @page - 1 }) %> <%= link_to t('.newer'), @params.merge({ :page => @page - 1 }) %>
<% else %> <% else %>
<%= t('trace.trace_paging_nav.newer') %> <%= t('.newer') %>
<% end %> <% end %>
| <%= t('trace.trace_paging_nav.showing_page', :page => @page) %> | | <%= t('.showing_page', :page => @page) %> |
<% if @traces.size < @page_size %> <% if @traces.size < @page_size %>
<%= t('trace.trace_paging_nav.older') %> <%= t('.older') %>
<% else %> <% else %>
<%= link_to t('trace.trace_paging_nav.older'), @params.merge({ :page => @page + 1 }) %> <%= link_to t('.older'), @params.merge({ :page => @page + 1 }) %>
<% end %> <% end %>
<% end %> <% end %>
</p> </p>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= t'trace.create.upload_trace' %></h1> <h1><%= t '.upload_trace' %></h1>
<% end %> <% end %>
<%= error_messages_for 'trace' %> <%= error_messages_for 'trace' %>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %> <% content_for :heading do %>
<h2><%= t 'trace.edit.heading', :name => h(@trace.name) %></h2> <h2><%= t '.heading', :name => h(@trace.name) %></h2>
<% end %> <% end %>
<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>"> <img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>">
@ -9,47 +9,47 @@
<div id='edit-trace-form' class='standard-form'> <div id='edit-trace-form' class='standard-form'>
<fieldset> <fieldset>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.filename' %></label> <label class='standard-label'><%= t '.filename' %></label>
<p class='deemphasize'><%= @trace.name %> (<%= link_to t('trace.edit.download'), trace_data_path(@trace) %>)</p> <p class='deemphasize'><%= @trace.name %> (<%= link_to t('.download'), trace_data_path(@trace) %>)</p>
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.uploaded_at' %></label> <label class='standard-label'><%= t '.uploaded_at' %></label>
<p class='deemphasize'><%= l @trace.timestamp, :format => :friendly %></p> <p class='deemphasize'><%= l @trace.timestamp, :format => :friendly %></p>
</div> </div>
<% if @trace.inserted? %> <% if @trace.inserted? %>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.points' %></label> <label class='standard-label'><%= t '.points' %></label>
<p class='deemphasize'><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %></p> <p class='deemphasize'><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %></p>
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.start_coord' %></label> <label class='standard-label'><%= t '.start_coord' %></label>
</div> </div>
<div class="geo"> <div class="geo">
<span class="latitude"><%= @trace.latitude %></span>; <span class="latitude"><%= @trace.latitude %></span>;
<span class="longitude"><%= @trace.longitude %></span> <span class="longitude"><%= @trace.longitude %></span>
</div> </div>
(<%=link_to t('trace.edit.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.edit.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) (<%=link_to t('.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)
<% end %> <% end %>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.owner' %></label> <label class='standard-label'><%= t '.owner' %></label>
<p class='deemphasize'><%= link_to h(@trace.user.display_name), user_path(@trace.user) %></p> <p class='deemphasize'><%= link_to h(@trace.user.display_name), user_path(@trace.user) %></p>
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.description' %></label> <label class='standard-label'><%= t '.description' %></label>
<%= f.text_field :description %> <%= f.text_field :description %>
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.tags' %></label> <label class='standard-label'><%= t '.tags' %></label>
<%= f.text_field :tagstring %> (<%= t'trace.edit.tags_help' %>) <%= f.text_field :tagstring %> (<%= t '.tags_help' %>)
</div> </div>
<div class='form-row'> <div class='form-row'>
<label class='standard-label'><%= t'trace.edit.visibility' %></label> <label class='standard-label'><%= t '.visibility' %></label>
<%= f.select :visibility, [[t('trace.visibility.private'),"private"],[t('trace.visibility.public'),"public"],[t('trace.visibility.trackable'),"trackable"],[t('trace.visibility.identifiable'),"identifiable"]] %> (<a href="<%= t'trace.edit.visibility_help_url' %>"><%= t'trace.edit.visibility_help' %></a>) <%= f.select :visibility, [[t('trace.visibility.private'),"private"], [t('trace.visibility.public'),"public"], [t('trace.visibility.trackable'),"trackable"], [t('trace.visibility.identifiable'),"identifiable"]] %> (<a href="<%= t '.visibility_help_url' %>"><%= t '.visibility_help' %></a>)
</div> </div>
</fieldset> </fieldset>
</div> </div>
<%= submit_tag t'trace.edit.save_button' %> <%= submit_tag t '.save_button' %>
<% end %> <% end %>

View file

@ -5,8 +5,8 @@ xml.rss("version" => "2.0",
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
"xmlns:georss" => "http://www.georss.org/georss") do "xmlns:georss" => "http://www.georss.org/georss") do
xml.channel do xml.channel do
xml.title t("trace.georss.title") xml.title t(".title")
xml.description t("trace.georss.title") xml.description t(".title")
xml.link url_for(:controller => :trace, :action => :list, :only_path => false) xml.link url_for(:controller => :trace, :action => :list, :only_path => false)
xml.image do xml.image do

View file

@ -1,7 +1,7 @@
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= h(@title) %></h1> <h1><%= h(@title) %></h1>
<ul class='secondary-actions clearfix'> <ul class='secondary-actions clearfix'>
<li><%= t('trace.list.description') %></li> <li><%= t('.description') %></li>
<li><%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %></li> <li><%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %></li>
<li><%= link_to t('trace.trace_header.upload_trace'), :action => 'create' %></li> <li><%= link_to t('trace.trace_header.upload_trace'), :action => 'create' %></li>
<% if @tag %> <% if @tag %>
@ -39,7 +39,7 @@
<%= render :partial => 'trace_paging_nav' %> <%= render :partial => 'trace_paging_nav' %>
<% else %> <% else %>
<h4><%= t 'trace.list.empty_html', :upload_link => trace_create_path %></h4> <h4><%= t '.empty_html', :upload_link => trace_create_path %></h4>
<% end %> <% end %>
<%= render :partial => 'trace_optionals' %> <%= render :partial => 'trace_optionals' %>

Some files were not shown because too many files have changed in this diff Show more