if user
@entries = DiaryEntry.find(:all, :conditions => ['user_id = ?', user.id], :order => 'created_at DESC', :limit => 20)
- @title = I18n.t('diary_entry.feed.user.title', :user => user.display_name, :locale => I18n.locale)
+ @title = I18n.t('diary_entry.feed.user.title', :user => user.display_name)
@description = I18n.t('diary_entry.feed.user.description', :user => user.display_name)
@link = "http://#{SERVER_URL}/user/#{user.display_name}/diary"
else
@entries = DiaryEntry.find(:all, :include => :user,
:conditions => ["users.visible = ? AND diary_entries.language_code = ?", true, params[:language]],
:order => 'created_at DESC', :limit => 20)
- @title = I18n.t('diary_entry.feed.language.title', Language.find(params[:language]).english_name)
- @description = I18n.t('diary_entry.feed.language.description', 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)
@link = "http://#{SERVER_URL}/diary/#{params[:language]}"
else
@entries = DiaryEntry.find(:all, :include => :user,
layout 'site'
before_filter :authorize_web
+ before_filter :set_locale
before_filter :require_user
-
+
def index
@client_applications = @user.client_applications
@tokens = @user.oauth_tokens.find :all, :conditions => 'oauth_tokens.invalidated_at is null and oauth_tokens.authorized_at is not null'
def create
@client_application = @user.client_applications.build(params[:client_application])
if @client_application.save
- flash[:notice] = "Registered the information successfully"
+ flash[:notice] = t'oauth_clients.create.flash'
redirect_to :action => "show", :id => @client_application.id
else
render :action => "new"
end
end
-
+
def show
@client_application = @user.client_applications.find(params[:id])
rescue ActiveRecord::RecordNotFound
def edit
@client_application = @user.client_applications.find(params[:id])
end
-
+
def update
@client_application = @user.client_applications.find(params[:id])
if @client_application.update_attributes(params[:client_application])
- flash[:notice] = "Updated the client information successfully"
+ flash[:notice] = t'oauth_clients.update.flash'
redirect_to :action => "show", :id => @client_application.id
else
render :action => "edit"
def destroy
@client_application = @user.client_applications.find(params[:id])
@client_application.destroy
- flash[:notice] = "Destroyed the client application registration"
+ flash[:notice] = t'oauth_clients.destroy.flash'
redirect_to :action => "index"
end
end
class OauthController < ApplicationController
layout 'site'
- before_filter :authorize_web, :except => [:request_token, :access_token]
+ before_filter :authorize_web, :only => [:oauthorize, :revoke]
+ before_filter :set_locale, :only => [:oauthorize, :revoke]
before_filter :require_user, :only => [:oauthorize]
before_filter :verify_oauth_consumer_signature, :only => [:request_token]
before_filter :verify_oauth_request_token, :only => [:access_token]
def request_token
@token = current_client_application.create_request_token
- logger.info "in REQUEST TOKEN"
if @token
logger.info "request token params: #{params.inspect}"
# request tokens indicate what permissions the client *wants*, not
# necessarily the same as those which the user allows.
current_client_application.permissions.each do |pref|
- logger.info "PARAMS found #{pref}"
@token.write_attribute(pref, true)
end
@token.save!
else
render :nothing => true, :status => 401
end
- end
-
+ end
+
def access_token
@token = current_token && current_token.exchange!
if @token
def oauthorize
@token = RequestToken.find_by_token params[:oauth_token]
- unless @token.invalidated?
- if request.post?
+ unless @token.invalidated?
+ if request.post?
any_auth = false
@token.client_application.permissions.each do |pref|
if params[pref]
- logger.info "OAUTHORIZE PARAMS found #{pref}"
@token.write_attribute(pref, true)
any_auth ||= true
else
@token.write_attribute(pref, false)
end
end
-
+
if any_auth
@token.authorize!(@user)
redirect_url = params[:oauth_callback] || @token.client_application.callback_url
render :action => "authorize_failure"
end
end
-
+
def revoke
@token = @user.oauth_tokens.find_by_token params[:token]
if @token
@token.invalidate!
- flash[:notice] = "You've revoked the token for #{@token.client_application.name}"
+ flash[:notice] = t('oauth.revoke.flash', :application => @token.client_application.name)
end
- logger.info "about to redirect"
redirect_to :controller => 'oauth_clients', :action => 'index'
end
-
end
if @user.save
flash[:notice] = t 'user.new.flash create success message'
- Notifier.deliver_signup_confirm(@user, @user.tokens.create)
+ Notifier.deliver_signup_confirm(@user, @user.tokens.create(:referer => params[:referer]))
redirect_to :action => 'login'
else
render :action => 'new'
@user.active = true
@user.email_valid = true
@user.save!
+ referer = token.referer
token.destroy
flash[:notice] = t 'user.confirm.success'
session[:user] = @user.id
- redirect_to :action => 'account', :display_name => @user.display_name
+ unless referer.nil?
+ redirect_to referer
+ else
+ redirect_to :action => 'account', :display_name => @user.display_name
+ end
else
@notice = t 'user.confirm.failure'
end
<h1>Authorize access to your account</h1>
-<p><%= t('oauth.client_application.request_access', :app_name => link_to(@token.client_application.name,@token.client_application.url)) %></p>
+<p><%= t('oauth.oauthorize.request_access', :app_name => link_to(@token.client_application.name,@token.client_application.url)) %></p>
<% form_tag authorize_url do %>
<%= hidden_field_tag "oauth_token", @token.token %>
<%- if params[:oauth_callback] -%>
- <%= hidden_field_tag "oauth_callback", params[:oauth_callback] %>
-<%- end -%>
-<p><%= t 'oauth.client_application.allow_to' %></p>
-<ul style="list-style:none">
-<% @token.client_application.permissions.each do |perm| %>
- <li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t "oauth.client_application.#{perm}" %></li>
-<% end %>
-</ul>
-<p>
- <%= submit_tag %>
-</p>
+ <%= hidden_field_tag "oauth_callback", params[:oauth_callback] %>
+ <%- end -%>
+ <p><%= t 'oauth.oauthorize.allow_to' %></p>
+ <ul style="list-style:none">
+ <% @token.client_application.permissions.each do |perm| %>
+ <li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t "oauth.oauthorize.#{perm}" %></li>
+ <% end %>
+ </ul>
+ <p><%= submit_tag %></p>
<% end %>
<div class="field">
- <label for="client_application_name"><%= t'oauth.client_application.form.name' %> (<%= t'oauth.client_application.form.required' %>)</label><br/>
- <%= f.text_field :name %>
+ <label for="client_application_name"><%= t'oauth_clients.form.name' %> (<%= t'oauth_clients.form.required' %>)</label><br/>
+ <%= f.text_field :name %>
</div>
<div class="field">
- <label for="client_application_url"><%= t'oauth.client_application.form.url' %> (<%= t'oauth.client_application.form.required' %>)</label><br/>
- <%= f.text_field :url %>
+ <label for="client_application_url"><%= t'oauth_clients.form.url' %> (<%= t'oauth_clients.form.required' %>)</label><br/>
+ <%= f.text_field :url %>
</div>
<div class="field">
- <label for="client_application_callback_url"><%= t'oauth.client_application.form.callback_url' %></label><br/>
- <%= f.text_field :callback_url %>
+ <label for="client_application_callback_url"><%= t'oauth_clients.form.callback_url' %></label><br/>
+ <%= f.text_field :callback_url %>
</div>
<div class="field">
- <label for="client_application_support_url"><%= t'oauth.client_application.form.support_url' %></label><br/>
- <%= f.text_field :support_url %>
+ <label for="client_application_support_url"><%= t'oauth_clients.form.support_url' %></label><br/>
+ <%= f.text_field :support_url %>
</div>
-<p><%= t'oauth.client_application.form.requests' %></p>
+<p><%= t'oauth_clients.form.requests' %></p>
<% ClientApplication.all_permissions.each do |perm| %>
<div class="field">
<%= f.check_box perm %>
- <label for="client_application_<%= perm.to_s %>"><%= t('oauth.client_application.form.' + perm.to_s) %></label><br/>
+ <label for="client_application_<%= perm.to_s %>"><%= t('oauth_clients.form.' + perm.to_s) %></label><br/>
</div>
<% end %>
-<h1><%= t'oauth.client_application.edit.title' %></h1>
+<h1><%= t'oauth_clients.edit.title' %></h1>
<% form_for :client_application, @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %>
- <%= render :partial => "form", :locals => { :f => f } %>
- <br/>
- <%= submit_tag t'oauth.client_application.edit.submit' %>
+ <%= render :partial => "form", :locals => { :f => f } %>
+ <br/>
+ <%= submit_tag t'oauth_clients.edit.submit' %>
<% end %>
-<h1><%= t'oauth.client_application.index.title' %></h1>
+<h1><%= t'oauth_clients.index.title' %></h1>
<% unless @tokens.empty? %>
-<h3><%= t'oauth.client_application.index.my_tokens' %></h3>
-<p><%= t'oauth.client_application.index.list_tokens' %></p>
+<h3><%= t'oauth_clients.index.my_tokens' %></h3>
+<p><%= t'oauth_clients.index.list_tokens' %></p>
<table>
- <tr><th><%= t'oauth.client_application.index.application' %></th>
- <th><%= t'oauth.client_application.index.issued_at' %></th><th> </th></tr>
+ <tr><th><%= t'oauth_clients.index.application' %></th>
+ <th><%= t'oauth_clients.index.issued_at' %></th><th> </th></tr>
<% @tokens.each do |token|%>
<% content_tag_for :tr, token do %>
<td><%= link_to token.client_application.name, token.client_application.url %></td>
<td>
<% form_tag :controller => 'oauth', :action => 'revoke' do %>
<%= hidden_field_tag 'token', token.token %>
- <%= submit_tag t('oauth.client_application.index.revoke') %>
+ <%= submit_tag t('oauth_clients.index.revoke') %>
<% end %>
</td>
<% end %>
<% end %>
</table>
<% end %>
-<h3><%= t'oauth.client_application.index.my_apps' %></h3>
+<h3><%= t'oauth_clients.index.my_apps' %></h3>
<% if @client_applications.empty? %>
-<p><%= t('oauth.client_application.index.no_apps', :oauth => "<a href=\"http://oauth.net\">OAuth</a>") %></p>
+<p><%= t('oauth_clients.index.no_apps', :oauth => "<a href=\"http://oauth.net\">OAuth</a>") %></p>
<% else %>
-<p><%= t'oauth.client_application.index.registered_apps' %></p>
+<p><%= t'oauth_clients.index.registered_apps' %></p>
<% @client_applications.each do |client|%>
<% div_for client do %>
<%= link_to client.name, :action => :show, :id => client.id %>
<% end %>
<% end %>
<% end %>
-<h3><%= link_to t('oauth.client_application.index.register_new'), :action => :new %></h3>
+<h3><%= link_to t('oauth_clients.index.register_new'), :action => :new %></h3>
-<h1><%= t'oauth.client_application.new.title' %></h1>
+<h1><%= t'oauth_clients.new.title' %></h1>
<% form_for :client_application, :url => { :action => :create } do |f| %>
<%= render :partial => "form", :locals => { :f => f } %>
<br />
- <%= submit_tag t'oauth.client_application.new.submit' %>
+ <%= submit_tag t('oauth_clients.new.submit') %>
<% end %>
-<p><%= t('oauth.client_application.not_found', :type => @type) %></p>
+<p><%= t('oauth_clients.not_found.sorry', :type => @type) %></p>
-<h1><%= t('oauth.client_application.show.title', :app_name => @client_application.name) %></h1>
+<h1><%= t('oauth_clients.show.title', :app_name => @client_application.name) %></h1>
<p>
- <b><%= t'oauth.client_application.show.key' %></b> <%=@client_application.key %>
+ <b><%= t'oauth_clients.show.key' %></b> <%=@client_application.key %>
</p>
<p>
- <b><%= t'oauth.client_application.show.secret' %></b> <%=@client_application.secret %>
+ <b><%= t'oauth_clients.show.secret' %></b> <%=@client_application.secret %>
</p>
<p>
- <b><%= t'oauth.client_application.show.url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %>
+ <b><%= t'oauth_clients.show.url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %>
</p>
<p>
- <b><%= t'oauth.client_application.show.access_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %>
+ <b><%= t'oauth_clients.show.access_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %>
</p>
<p>
- <b><%= t'oauth.client_application.show.authorize_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %>
+ <b><%= t'oauth_clients.show.authorize_url' %></b> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %>
</p>
-<p><%= t'oauth.client_application.show.requests' %></p>
+<p><%= t'oauth_clients.show.requests' %></p>
<ul><% @client_application.permissions.each do |perm| %>
<div class="field">
- <li><%= t('oauth.client_application.form.' + perm.to_s) %></li>
+ <li><%= t('oauth_clients.form.' + perm.to_s) %></li>
</div>
<% end %></ul>
-<p><%= t'oauth.client_application.show.support_notice' %></p>
-
-<p><%= link_to t('oauth.client_application.show.edit'), edit_oauth_client_url(@client_application.user.display_name, @client_application) %></p>
+<p><%= t'oauth_clients.show.support_notice' %></p>
+<p><%= link_to t('oauth_clients.show.edit'), edit_oauth_client_url(@client_application.user.display_name, @client_application) %></p>
<h1><%= t 'user.login.heading' %></h1>
-<p><%= t 'user.login.please login', :create_user_link => link_to(t('user.login.create_account'), :controller => 'user', :action => 'new') %></p>
+<p><%= t 'user.login.please login', :create_user_link => link_to(t('user.login.create_account'), :controller => 'user', :action => 'new', :referer => params[:referer]) %></p>
<% form_tag :action => 'login' do %>
<%= hidden_field_tag('referer', h(params[:referer])) %>
<%= error_messages_for 'user' %>
<% form_tag :action => 'save' do %>
+<%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %>
<table id="loginForm">
<tr><td class="fieldName"><%= t 'user.new.email address' %></td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255, :tabindex => 1}) %></td></tr>
<tr><td class="fieldName"><%= t 'user.new.confirm email address' %></td><td><%= text_field('user', 'email_confirmation',{:size => 50, :maxlength => 255, :tabindex => 2}) %></td></tr>
make_public:
made_public: "Track made public"
oauth:
- client_application:
+ oauthorize:
request_access: "The application {{app_name}} is requesting access to your account. Please check whether you would like the application to have the following capabilities. You may choose as many or as few as you like."
allow_to: "Allow the client application to:"
allow_read_prefs: "read your user preferences."
allow_write_api: "modify the map."
allow_read_gpx: "read your private GPS traces."
allow_write_gpx: "upload GPS traces."
- new:
- title: "Register a new application"
- submit: "Register"
- edit:
- title: "Edit your application"
- submit: "Edit"
- show:
- title: "OAuth details for {{app_name}}"
- key: "Consumer Key:"
- secret: "Consumer Secret:"
- url: "Request Token URL:"
- access_url: "Access Token URL:"
- authorize_url: "Authorise URL:"
- support_notice: "We support hmac-sha1 (recommended) as well as plain text in ssl mode."
- edit: "Edit Details"
- requests: "Requesting the following permissions from the user:"
- allow_read_prefs: "read their user preferences."
- allow_write_prefs: "modify their user preferences."
- allow_write_diary: "create diary entries, comments and make friends."
- allow_write_api: "modify the map."
- allow_read_gpx: "read their private GPS traces."
- allow_write_gpx: "upload GPS traces."
- index:
- title: "My OAuth Details"
- my_tokens: "My Authorised Applications"
- list_tokens: "The following tokens have been issued to applications in your name:"
- application: "Application Name"
- issued_at: "Issued At"
- revoke: "Revoke!"
- my_apps: "My Client Applications"
- no_apps: "Do you have an application you would like to register for use with us using the {{oauth}} standard? You must register your web application before it can make OAuth requests to this service."
- registered_apps: "You have the following client applications registered:"
- register_new: "Register your application"
- form:
- name: "Name"
- required: "Required"
- url: "Main Application URL"
- callback_url: "Callback URL"
- support_url: "Support URL"
- requests: "Request the following permissions from the user:"
- allow_read_prefs: "read their user preferences."
- allow_write_prefs: "modify their user preferences."
- allow_write_diary: "create diary entries, comments and make friends."
- allow_write_api: "modify the map."
- allow_read_gpx: "read their private GPS traces."
- allow_write_gpx: "upload GPS traces."
- not_found: "Sorry, that {{type}} could not be found."
+ revoke:
+ flash: "You've revoked the token for {{application}}"
+ oauth_clients:
+ new:
+ title: "Register a new application"
+ submit: "Register"
+ edit:
+ title: "Edit your application"
+ submit: "Edit"
+ show:
+ title: "OAuth details for {{app_name}}"
+ key: "Consumer Key:"
+ secret: "Consumer Secret:"
+ url: "Request Token URL:"
+ access_url: "Access Token URL:"
+ authorize_url: "Authorise URL:"
+ support_notice: "We support hmac-sha1 (recommended) as well as plain text in ssl mode."
+ edit: "Edit Details"
+ requests: "Requesting the following permissions from the user:"
+ allow_read_prefs: "read their user preferences."
+ allow_write_prefs: "modify their user preferences."
+ allow_write_diary: "create diary entries, comments and make friends."
+ allow_write_api: "modify the map."
+ allow_read_gpx: "read their private GPS traces."
+ allow_write_gpx: "upload GPS traces."
+ index:
+ title: "My OAuth Details"
+ my_tokens: "My Authorised Applications"
+ list_tokens: "The following tokens have been issued to applications in your name:"
+ application: "Application Name"
+ issued_at: "Issued At"
+ revoke: "Revoke!"
+ my_apps: "My Client Applications"
+ no_apps: "Do you have an application you would like to register for use with us using the {{oauth}} standard? You must register your web application before it can make OAuth requests to this service."
+ registered_apps: "You have the following client applications registered:"
+ register_new: "Register your application"
+ form:
+ name: "Name"
+ required: "Required"
+ url: "Main Application URL"
+ callback_url: "Callback URL"
+ support_url: "Support URL"
+ requests: "Request the following permissions from the user:"
+ allow_read_prefs: "read their user preferences."
+ allow_write_prefs: "modify their user preferences."
+ allow_write_diary: "create diary entries, comments and make friends."
+ allow_write_api: "modify the map."
+ allow_read_gpx: "read their private GPS traces."
+ allow_write_gpx: "upload GPS traces."
+ not_found:
+ sorry: "Sorry, that {{type}} could not be found."
+ create:
+ flash: "Registered the information successfully"
+ update:
+ flash: "Updated the client information successfully"
+ destroy:
+ flash: "Destroyed the client application registration"
user:
login:
title: "Login"
download: "{{changeset_xml_link}} vagy {{osmchange_xml_link}} letöltése"
changesetxml: "Changeset XML"
osmchangexml: "osmChange XML"
+ feed:
+ title: "Módosításcsomag: {{id}}"
+ title_comment: "Módosításcsomag: {{id}} - {{comment}}"
changeset_navigation:
user:
name_tooltip: "{{user}} szerkesztéseinek megtekintése"
edit_link: Ezen bejegyzés szerkesztése
diary_comment:
comment_from: "{{link_user}} hozzászólása ekkor: {{comment_created_at}}"
+ feed:
+ user:
+ title: "{{user}} OpenStreetMap naplóbejegyzései"
+ description: "Legutóbbi OpenStreetMap naplóbejegyzések {{user}} felhasználótól"
+ language:
+ title: "OpenStreetMap naplóbejegyzések {{language_name}} nyelven"
+ description: "Legutóbbi naplóbejegyzések az OpenStreetMap felhasználóitól {{language_name}} nyelven"
+ all:
+ title: "OpenStreetMap naplóbejegyzések"
+ description: "Legutóbbi naplóbejegyzések az OpenStreetMap felhasználóitól"
export:
start:
area_to_export: "Exportálandó terület"
destination: "Csak célforgalom"
construction: "Utak építés alatt"
trace:
+ visibility:
+ private: "Magán (megosztva csak névtelenül, rendezetlen pontok)"
+ public: "Nyilvános (megjelenik a nyomvonalak listáján névtelenül, rendezetlen pontok)"
+ trackable: "Követhető (megosztva csak névtelenül, rendezett pontok időbélyeggel)"
+ identifiable: "Azonosítható (megjelenik a nyomvonalak listáján, és azonodítható, rendezett pontok időbélyeggel)"
create:
upload_trace: "GPS nyomvonal feltöltése"
trace_uploaded: "A GPX fájl feltöltése megtörtént, és várakozik az adatbázisba való beillesztésre. Ez általában fél órán belül megtörténik, és fogsz kapni egy e-mailt, amint elkészült."
tags: "Címkék:"
tags_help: "vesszővel elválasztva"
save_button: "Módosítások mentése"
+ visibility: "Láthatóság:"
+ visibility_help: "Mit jelent ez?"
+ visibility_help_url: "http://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces"
no_such_user:
title: "Nincs ilyen felhasználó"
heading: "{{user}} felhasználó nem létezik"
description: "Leírás"
tags: "Címkék"
tags_help: "vesszővel elválasztva"
- public: "Nyilvános?"
- public_help: "mit jelent ez?"
- public_help_url: "http://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces"
+ visibility: "Láthatóság"
+ visibility_help: "Mit jelent ez?"
+ visibility_help_url: "http://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces"
upload_button: "Feltöltés"
help: "Segítség"
help_url: "http://wiki.openstreetmap.org/wiki/Upload"
description: "Leírás:"
tags: "Címkék:"
none: "nincsenek"
- make_public: "Ezen nyomvonal nyilvánossá tétele véglegesen"
edit_track: "Ezen nyomvonal szerkesztése"
delete_track: "Ezen nyomvonal törlése"
trace_not_found: "Nem található nyomvonal!"
+ visibility: "Láthatóság:"
trace_paging_nav:
showing: "Jelenlegi oldal:"
of: "összesen:"
scheduled_for_deletion: "A nyomvonal törlésre kijelölve"
make_public:
made_public: "A nyomvonal nyilvános lett"
+ oauth:
+ oauthorize:
+ request_access: "A(z) {{app_name}} alkalmazás hozzáférést kér a felhasználói fiókodhoz. Kérlek, jelöld, ha azt szeretnéd, hogy az alkalmazás rendelkezzen a következő képességekkel. Választhatsz olyan sokat vagy keveset, amennyit szeretnél."
+ allow_to: "Az alábbiak engedélyezése a kliensalkalmazásnak:"
+ allow_read_prefs: "felhasználói beállítások olvasása."
+ allow_write_prefs: "felhasználói beállítások módosítása."
+ allow_write_diary: "naplóbejegyzések, hozzászólások készítése és barátok hozzáadása."
+ allow_write_api: "a térkép módosítása."
+ allow_read_gpx: "magán GPS nyomvonalak olvasása."
+ allow_write_gpx: "GPS nyomvonalak feltöltése."
+ revoke:
+ flash: "Visszavontad az utalványt a(z) {{application}} alkalmazáshoz"
+ oauth_clients:
+ new:
+ title: "Új alkalmazás regisztrálása"
+ submit: "Regisztrálás"
+ edit:
+ title: "Alkalmazás szerkesztése"
+ submit: "Szerkesztés"
+ show:
+ title: "{{app_name}} OAuth részletei"
+ key: "Consumer Key:"
+ secret: "Consumer Secret:"
+ url: "Request Token URL:"
+ access_url: "Access Token URL:"
+ authorize_url: "Authorise URL:"
+ support_notice: "Támogatjuk a hmac-sha1 hitelesítést (ajánlott), valamint a sima szöveget ssl módban."
+ edit: "Részletek szerkesztése"
+ requests: "A következő engedélyek kérése a felhasználótól:"
+ allow_read_prefs: "felhasználó beállításainak olvasása."
+ allow_write_prefs: "felhasználó beállításainak módosítása."
+ allow_write_diary: "naplóbejegyzések, hozzászólások készítése és barátok hozzáadása."
+ allow_write_api: "a térkép módosítása."
+ allow_read_gpx: "magán GPS nyomvonalainak olvasása."
+ allow_write_gpx: "GPS nyomvonalak feltöltése."
+ index:
+ title: "OAuth részletek"
+ my_tokens: "Engedélyezett alkalmazások"
+ list_tokens: "A következő utalványok kerültek kibocsátásra a nevedben:"
+ application: "Alkalmazás neve"
+ issued_at: "Kibocsátva ekkor"
+ revoke: Visszavonás!"
+ my_apps: "Kliensalkalmazások"
+ no_apps: "Van olyan alkalmazásod, amit szeretnél regisztrálni a velünk való használathoz a(z) {{oauth}} szabvány használatával? Regisztrálnod kell a webalkalmazásod, mielőtt OAuth kéréseket küld ehhez a szolgáltatáshoz."
+ registered_apps: "A következő kliensalkalmazások vannak regisztrálva:"
+ register_new: "Alkalmazás regisztrálása"
+ form:
+ name: "Név"
+ required: "Szükséges"
+ url: "Main Application URL"
+ callback_url: "Callback URL"
+ support_url: "Support URL"
+ requests: "A következő engedélyek kérése a felhasználótól:"
+ allow_read_prefs: "felhasználó beállításainak olvasása."
+ allow_write_prefs: "felhasználó beállításainak módosítása."
+ allow_write_diary: "naplóbejegyzések, hozzászólások készítése és barátok hozzáadása."
+ allow_write_api: "a térkép módosítása."
+ allow_read_gpx: "magán GPS nyomvonalainak olvasása."
+ allow_write_gpx: "GPS nyomvonalak feltöltése."
+ not_found:
+ sorry: "Sajnálom, a(z) {{type}} nem található."
+ create:
+ flash: "Az információ sikeresen regisztrálva"
+ update:
+ flash: "A kliens információi sikeresen frissítve"
+ destroy:
+ flash: "A kliensalkalmazás regisztrációja törölve"
user:
login:
title: "Bejelentkezés"
nearby users: "Közeli felhasználók: "
no nearby users: "Még nincsenek felhasználók, akik megadták, hogy a közelben szerkesztenek."
change your settings: beállítások módosítása
+ my_oauth_details: "OAuth részletek megtekintése"
friend_map:
your location: Helyed
nearby mapper: "Közeli térképszerkesztők: "
"hint_pointselected": pont kijelölve\n(shift+kattintás a pontra\núj vonal kezdéséhez)
"action_movepoint": pont mozgatása
"hint_drawmode": kattintás pont hozzáadásához\ndupla kattintás/Enter\na vonal befejezéséhez
+"action_insertnode": pont hozzáadása vonalhoz
"hint_overendpoint": végpont fölött ($1)\nkattintás a csatlakoztatáshoz\nshift+kattintás az egyesítéshez
"hint_overpoint": pont fölött ($1)\nkattintás a csatlakoztatáshoz
"closechangeset": Módosításcsomag bezárása
"cancel": Mégse
"ok": OK
"prompt_changesetcomment": "Adj leírást a módosításaidhoz:"
+"newchangeset": "\nKérlek, próbáld újra: a Potlatch egy új módosításcsomagot fog kezdeni."
"emailauthor": \n\nKérlek, jelentsd a hibát (angolul) a richard\@systemeD.net e-mail címre, és írd le, hogy mit csináltál akkor, amikor a hiba történt.
"retry": Újra
"error_connectionfailed": Sajnálom - az OpenStreetMap szerverhez való kapcsolódás sikertelen. A legutóbbi módosítások nem lettek elmentve.\n\nSzeretnéd megpróbálni újra?
"error_readfailed": Sajnálom - az OpenStreetMap szerver az adatok lekérdezésekor nem válaszolt.\n\nSzeretnéd megpróbálni újra?
"conflict_waychanged": Amióta elkezdtél szerkeszteni, valaki más módosította a(z) $1$2 vonalat.
-"conflict_visitway": "A vonal megtekintéséhez kattints az 'OK'-ra."
+"conflict_visitway": A vonal megtekintéséhez kattints az OK-ra.
"conflict_poichanged": Amióta elkezdtél szerkeszteni, valaki más módosította a(z) $1$2 pontot.
-"conflict_visitpoi": "A pont megtekintéséhez kattints az 'OK'-ra."
+"conflict_visitpoi": A pont megtekintéséhez kattints az OK-ra.
"conflict_relchanged": Amióta elkezdtél szerkeszteni, valaki más módosította a(z) $1$2 kapcsolatot.
"conflict_download": Az ő változatának letöltése
"conflict_overwrite": Az ő változatának felülírása
"tip_repeattag": Az előzőleg kiválasztott vonal címkéinek megismétlése (R)
"tip_alert": Hiba történt - kattints a részletekért
"help": Súgó
-"manual": Kézikönyv
+"advanced_parallel": Párhuzamos vonal
+"advanced_history": Vonal története
+"advanced_inspector": Felügyelő
+"advanced_undelete": Törlés visszavonása
+"advanced_close": Módosításcsomag lezárása
+"advanced_maximise": Ablak maximalizálása
"way": Vonal
"advice_toolong": Túl hosszú a feloldáshoz - vágd rövidebb szakaszokra
"deleting": törlése
"action_deletepoint": pont törlése
+"advice_deletingway": Vonal törlése (Z a visszavonáshoz)
+"advice_revertingway": Visszaállítás a legutóbb mentett vonalra (Z a viszavonáshoz)
"action_cancelchanges": "módosítások elvetése:"
-"custom": "Egyéni:"
+"advice_revertingpoi": Visszaállítás a legutóbb mentett POI-ra (Z a viszavonáshoz)
+"advice_deletingpoi": POI törlése (Z a visszavonáshoz)
+"custom": "Egyéni: "
"nobackground": Nincs háttérkép
"option_fadebackground": Áttetsző háttér
"option_thinlines": Vékony vonalak használata minden méretaránynál
"error_noway": A(z) $1 nem található (talán már eltávolítottad?), így nem vonható vissza.
"error_nosharedpoint": A(z) $1 és a(z) $2 vonalaknak már nincs közös pontja, így nem vonható vissza a kettévágás.
"error_nopoi": A POI nem található (talán már eltávolítottad?), így nem vonható vissza.
-"action_tidyway": vonal tisztítása
"delete": Törlés
"prompt_taggedpoints": Ezen a vonalon van néhány címkézett pont. Biztosan törlöd?
"a_way": vonal $1
+"action_changeway": módosítások vonalhoz
"advice_waydragged": Vonal áthelyezve (Z a visszavonáshoz)
"action_moveway": vonal mozgatása
"action_splitway": vonal kettévágása
"advice_tagconflict": A címkék nem egyeznek - ellenőrizd (Z a visszavonáshoz)
"advice_nocommonpoint": A vonalaknak nincs közös pontjuk
"action_reverseway": vonal megfordítása
-"action_insertnode": pont hozzáadása vonalhoz
"prompt_createparallel": Párhuzamos vonal készítése
"offset_dual": Osztott pályás út (D2)
"offset_motorway": Autópálya (D3)
"offset_choose": Válassz eltolást (m)
"action_createparallel": párhuzamos vonalak készítése
"action_addpoint": pont hozzáadása a vonal végéhez
+"advanced_minimise": Ablak minimalizálása
--- /dev/null
+class AddRefererToUserToken < ActiveRecord::Migration
+ def self.up
+ add_column :user_tokens, :referer, :text
+ end
+
+ def self.down
+ remove_column :user_tokens, :referer
+ end
+end
code: de
english_name: German
native_name: Deutsch
+
+sl:
+ code: sl
+ english_name: Slovenian
+ native_name: slovenščina
def test_rss
get :rss
- assert_response :success
+ assert_response :success, "Should be able to get a diary RSS"
+ assert_select "rss:root", :count => 1 do
+ assert_select "channel", :count => 1 do
+ assert_select "channel>title", :count => 1
+ assert_select "image", :count => 1
+ assert_select "channel>item", :count => 2
+ end
+ end
+ end
+
+ def test_rss_language
+ get :rss, {:language => diary_entries(:normal_user_entry_1).language_code}
+ assert_response :success, "Should be able to get a specific language diary RSS"
+ assert_select "rss>channel>item", :count => 1 #, "Diary entries should be filtered by language"
+ end
+
+# def test_rss_nonexisting_language
+# get :rss, {:language => 'xx'}
+# assert_response :not_found, "Should not be able to get a nonexisting language diary RSS"
+# end
+
+ def test_rss_language_with_no_entries
+ get :rss, {:language => 'sl'}
+ assert_response :success, "Should be able to get a specific language diary RSS"
+ assert_select "rss>channel>item", :count => 0 #, "Diary entries should be filtered by language"
+ end
+
+ def test_rss_user
+ get :rss, {:display_name => users(:normal_user).display_name}
+ assert_response :success, "Should be able to get a specific users diary RSS"
+ assert_select "rss>channel>item", :count => 2 #, "Diary entries should be filtered by user"
end
+ def test_rss_nonexisting_user
+ get :rss, {:display_name => 'fakeUsername76543'}
+ assert_response :not_found, "Should not be able to get a nonexisting users diary RSS"
+ end
+
def test_viewing_diary_entry
get :view, {:display_name => users(:normal_user).display_name, :id => diary_entries(:normal_user_entry_1).id}
assert_response :success
# Submit the reset password token
# Check that the password has changed, and the user can login
end
+
+ def test_user_create_redirect
+ new_email = "redirect_tester@osm.org"
+ display_name = "redirect_tester"
+ password = "testtest"
+ # nothing special about this page, just need a protected page to redirect back to.
+ referer = "/traces/mine"
+ assert_difference('User.count') do
+ assert_difference('ActionMailer::Base.deliveries.size', 1) do
+ post_via_redirect "/user/save",
+ {:user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :pass_crypt => password, :pass_crypt_confirmation => password}, :referer => referer }
+ end
+ end
+
+ # Check the e-mail
+ register_email = ActionMailer::Base.deliveries.first
+
+ assert_equal register_email.to[0], new_email
+ # Check that the confirm account url is correct
+ confirm_regex = Regexp.new("/user/confirm\\?confirm_string=([a-zA-Z0-9]*)")
+ assert_match(confirm_regex, register_email.body)
+ confirm_string = confirm_regex.match(register_email.body)[1]
+
+ # Check the page
+ assert_response :success
+ assert_template 'login'
+
+ ActionMailer::Base.deliveries.clear
+
+ # Go to the confirmation page
+ get 'user/confirm', { :confirm_string => confirm_string }
+ assert_response :success
+ assert_template 'user/confirm'
+
+ post 'user/confirm', { :confirm_string => confirm_string, :confirm_action => 'submit' }
+ assert_response :redirect
+ follow_redirect!
+ assert_response :success
+ assert_template "trace/mine"
+ end
end
class LanguageTest < ActiveSupport::TestCase
test "language count" do
- assert_equal 2, Language.count
+ assert_equal 3, Language.count
end
end