From d36bf02fb698aafdd4a38a338669c778ae7dda9b Mon Sep 17 00:00:00 2001 From: franpb14 Date: Wed, 17 Mar 2021 11:49:30 +0100 Subject: [PATCH 1/8] fix: deactivated users cannot browse through the timebank A user whose account has been deativated and tries to navigate through any opttion will be redirected to a page showing all the timebanks to which they are a member and they can see the information to contact the admin. Issue #472 --- app/controllers/application_controller.rb | 8 ++ app/controllers/organizations_controller.rb | 10 +++ app/controllers/posts_controller.rb | 2 + app/controllers/users_controller.rb | 2 +- .../select_organization.html.erb | 78 +++++++++++++++++++ config/routes.rb | 2 + 6 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 app/views/organizations/select_organization.html.erb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a1dc69389..a3a8a620a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -123,4 +123,12 @@ def user_not_authorized def resource_not_found render 'errors/not_found', status: 404 end + + def member_should_be_active + if !current_member.active + flash[:error] = "Your account have been deactivated from this timebank" + redirect_to "/select_organization" + end + end + end diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 91af5ea85..9c1f9d034 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -12,6 +12,7 @@ def index end def show + member_should_be_active @movements = @organization. account. movements. @@ -49,6 +50,15 @@ def set_current redirect_to root_path end + def select_organization + @members = Member.where(user_id: current_user.id) + @organizations = Array.new + @members.each do |member| + @organizations << Organization.find(member.organization_id) + end + + end + private def load_resource diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 373c6cee8..a81c14cd5 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -2,6 +2,8 @@ class PostsController < ApplicationController has_scope :by_category, as: :cat has_scope :tagged_with, as: :tag has_scope :by_organization, as: :org + + before_action :member_should_be_active def index context = model.active.of_active_members diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 09247ed38..02a14402c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,5 +1,5 @@ class UsersController < ApplicationController - before_action :authenticate_user! + before_action :authenticate_user!, :member_should_be_active def index search_and_load_members current_organization.members.active, { s: 'user_last_sign_in_at DESC' } diff --git a/app/views/organizations/select_organization.html.erb b/app/views/organizations/select_organization.html.erb new file mode 100644 index 000000000..205b2fd0a --- /dev/null +++ b/app/views/organizations/select_organization.html.erb @@ -0,0 +1,78 @@ +
+ + + + + + + + + + <% @organizations.each_with_index do |organization, index| %> + + + + + + + + <% end %> + + +
+ Name + + Information + + Enter to timebank +
<%= organization.name %> See + <%if Member.where(organization_id:organization.id, user_id:current_user.id).first.active %> + <%= link_to set_current_organization_path(organization), method: :post do %> + + Enter + <% end %> + <% else %> + Deactivated + <% end %> +
+ + + *If you think your account might have been deactivated by mistake, please contact the administrator with the information provided below. + +
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 2179e4f83..813144c61 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -34,6 +34,8 @@ end end + get "/select_organization", to: "organizations#select_organization" + resources :users, concerns: :accountable, except: :destroy, :path => "members" do collection do get 'manage' From e21ee36fce5f392e6fe866f2ccd96aa79937e7a8 Mon Sep 17 00:00:00 2001 From: franpb14 Date: Wed, 17 Mar 2021 18:16:56 +0100 Subject: [PATCH 2/8] fix: now the messages can be translated I put the messages directly in the html, now I changed all. --- .../select_organization.html.erb | 34 +++++++++---------- config/locales/en.yml | 5 +++ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/app/views/organizations/select_organization.html.erb b/app/views/organizations/select_organization.html.erb index 205b2fd0a..e254b953d 100644 --- a/app/views/organizations/select_organization.html.erb +++ b/app/views/organizations/select_organization.html.erb @@ -3,13 +3,13 @@ - Name + <%= t 'activerecord.attributes.organization.name'%> - Information + <%= t 'global.Information'%> - Enter to timebank + <%= t 'global.enter_to_timebank'%> @@ -17,21 +17,21 @@ <% @organizations.each_with_index do |organization, index| %> <%= organization.name %> - See + <%= t 'global.see'%> <%if Member.where(organization_id:organization.id, user_id:current_user.id).first.active %> <%= link_to set_current_organization_path(organization), method: :post do %> - Enter + <%= t 'application.landing.button' %> <% end %> <% else %> - Deactivated + <%= t 'activerecord.attributes.user.deactivated'%> <% end %> -<% if !current_user || post.organization != current_organization %> +<% if !current_user || post.organization != current_organization || !member_active %>
<%= t 'posts.show.info', type: post.class.model_name.human, From 24abdf6aaab8ab4d7418442ffac2e480299a0af0 Mon Sep 17 00:00:00 2001 From: franpb14 Date: Wed, 17 Mar 2021 20:24:16 +0100 Subject: [PATCH 4/8] tests: testing the new methods I tested both the new controller and the method in applicaction_controller. Issue #472 --- app/controllers/organizations_controller.rb | 1 - .../organizations_controller_spec.rb | 10 ++++++++++ spec/controllers/users_controller_spec.rb | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 7ca3e23ad..614a84812 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -55,7 +55,6 @@ def select_organization @members.each do |member| @organizations << Organization.find(member.organization_id) end - end private diff --git a/spec/controllers/organizations_controller_spec.rb b/spec/controllers/organizations_controller_spec.rb index 1adb6f57b..1663fc8fc 100644 --- a/spec/controllers/organizations_controller_spec.rb +++ b/spec/controllers/organizations_controller_spec.rb @@ -20,6 +20,16 @@ end end + describe 'GET #select_organization' do + it 'it shows the organizations in which the user is a member' do + login(member.user) + get :select_organization + + expect(assigns(:organizations)).to eq([organization]) + expect(response.status).to eq(200) + end + end + describe 'POST #create' do it 'only superdamins are authorized create to new organizations' do login(member.user) diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 31a20a77d..3cd36e742 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -25,12 +25,19 @@ organization: test_organization, manager: false) end + let(:member_deactivate) do + Fabricate(:member, + organization: test_organization, + active: false, + manager: false) + end let!(:user) { member.user } let!(:another_user) { another_member.user } let!(:admin_user) { member_admin.user } let!(:wrong_user) { wrong_email_member.user } let!(:empty_email_user) { empty_email_member.user } + let!(:deactivate_user) { member_deactivate.user } describe "GET #index" do before { login(user) } @@ -96,6 +103,16 @@ end end + + context "with a member deactivate" do + it 'is redirected to select organization' do + login(deactivate_user) + get :index + + assert_routing("/select_organization", :controller => "organizations", :action => "select_organization") + end + end + context 'when searching' do it 'allows to search by member_uid' do user = Fabricate(:user, username: 'foo', email: 'foo@email.com') From 04e19d74f197c3f20ab5187dc0c98a6e40db3040 Mon Sep 17 00:00:00 2001 From: franpb14 Date: Tue, 23 Mar 2021 16:16:13 +0100 Subject: [PATCH 5/8] fix: implemented the feedback received in the pull request I reseted my branch to the last commit (the one where the login behavior remained unchanged) and I applied the feedback received in the pull request. Resolves #472. --- app/controllers/application_controller.rb | 5 +- app/controllers/posts_controller.rb | 1 - .../select_organization.html.erb | 127 ++++++++---------- app/views/shared/_post.html.erb | 16 +-- config/routes.rb | 2 +- spec/controllers/users_controller_spec.rb | 5 +- 6 files changed, 64 insertions(+), 92 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a3a8a620a..8310bc187 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -126,9 +126,8 @@ def resource_not_found def member_should_be_active if !current_member.active - flash[:error] = "Your account have been deactivated from this timebank" - redirect_to "/select_organization" + flash[:error] = 'Your account have been deactivated from this timebank' + redirect_to '/select_organization' end end - end diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index cb34edc0a..bd0e1e48d 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -2,7 +2,6 @@ class PostsController < ApplicationController has_scope :by_category, as: :cat has_scope :tagged_with, as: :tag has_scope :by_organization, as: :org - def index context = model.active.of_active_members diff --git a/app/views/organizations/select_organization.html.erb b/app/views/organizations/select_organization.html.erb index e254b953d..be7a698f6 100644 --- a/app/views/organizations/select_organization.html.erb +++ b/app/views/organizations/select_organization.html.erb @@ -1,76 +1,63 @@ -
- - - - - - - - - - <% @organizations.each_with_index do |organization, index| %> - - - - - - -
- <%= t 'activerecord.attributes.organization.name'%> - - <%= t 'global.Information'%> - - <%= t 'global.enter_to_timebank'%> -
<%= organization.name %> <%= t 'global.see'%> - <%if Member.where(organization_id:organization.id, user_id:current_user.id).first.active %> - <%= link_to set_current_organization_path(organization), method: :post do %> - - <%= t 'application.landing.button' %> - <% end %> - <% else %> - <%= t 'activerecord.attributes.user.deactivated'%> - <% end %> -
+ + + + + + + + + <% @organizations.each_with_index do |organization, index| %> + + + + + + + - <% end %> - - -
+ <%= t 'activerecord.attributes.organization.name'%> + + <%= t 'global.Information'%> + + <%= t 'global.enter_to_timebank'%> +
<%= organization.name %> <%= t 'global.see'%> + <% if current_user.active?(organization) %> + <%= link_to set_current_organization_path(organization), method: :post do %> + <%= t 'application.landing.button' %> + <% end %> + <% else %> + <%= t 'activerecord.attributes.user.deactivated'%> + <% end %> +
- -
- *<%= t 'users.index.deactivated_warning' %> -
+ <% end %> + + +
+
+ * <%= t 'users.index.deactivated_warning' %>
\ No newline at end of file diff --git a/app/views/shared/_post.html.erb b/app/views/shared/_post.html.erb index 959f34f6d..f0847b2e1 100644 --- a/app/views/shared/_post.html.erb +++ b/app/views/shared/_post.html.erb @@ -32,19 +32,7 @@ <% end %>
- - <% if current_user %> - <% member = Member.where(user_id:current_user.id, organization_id: post.organization_id).first %> - <% if member %> - <% member_active = member.active %> - <% else %> - <% member_active = false %> - <% end %> - <% else %> - <% member_active = false %> - <% end %> - - <% if current_user && current_organization == post.organization && member_active %> + <% if current_user && current_organization == post.organization && current_user.active?(current_organization) %>

@@ -81,7 +69,7 @@

-<% if !current_user || post.organization != current_organization || !member_active %> +<% if !current_user || post.organization != current_organization || !current_user.active?(current_organization) %>
<%= t 'posts.show.info', type: post.class.model_name.human, diff --git a/config/routes.rb b/config/routes.rb index f5a4b97aa..953f72cae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -34,7 +34,7 @@ end end - get "/select_organization", to: "organizations#select_organization" + get '/select_organization', to: 'organizations#select_organization' resources :users, concerns: :accountable, except: :destroy, :path => "members" do collection do diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 3cd36e742..eb361334a 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -103,13 +103,12 @@ end end - - context "with a member deactivate" do + context 'with a member deactivate' do it 'is redirected to select organization' do login(deactivate_user) get :index - assert_routing("/select_organization", :controller => "organizations", :action => "select_organization") + assert_routing('/select_organization', controller: 'organizations', action: 'select_organization') end end From 42bc0f2d9ea412ba27079d06c4bdbe86201c4861 Mon Sep 17 00:00:00 2001 From: franpb14 Date: Thu, 25 Mar 2021 17:24:13 +0100 Subject: [PATCH 6/8] refactoring: I implemented the new feedback received Identation, simplify code, i18n... --- app/controllers/application_controller.rb | 6 ++-- app/controllers/organizations_controller.rb | 6 +--- app/controllers/posts_controller.rb | 2 +- .../select_organization.html.erb | 34 +++++++++---------- config/locales/en.yml | 1 + spec/controllers/users_controller_spec.rb | 1 + 6 files changed, 24 insertions(+), 26 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8310bc187..0cae57568 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -123,11 +123,11 @@ def user_not_authorized def resource_not_found render 'errors/not_found', status: 404 end - + def member_should_be_active if !current_member.active - flash[:error] = 'Your account have been deactivated from this timebank' - redirect_to '/select_organization' + flash[:error] = I18n.t('users.index.account_deactivated') + redirect_to select_organization_path end end end diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 614a84812..ea52cbe98 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -50,11 +50,7 @@ def set_current end def select_organization - @members = Member.where(user_id: current_user.id) - @organizations = Array.new - @members.each do |member| - @organizations << Organization.find(member.organization_id) - end + @organizations = current_user.organizations end private diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index bd0e1e48d..dcb5769ca 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -5,7 +5,7 @@ class PostsController < ApplicationController def index context = model.active.of_active_members - if current_organization.present? && current_member.active? + if current_organization.present? context = context.where( organization_id: current_organization.id ) diff --git a/app/views/organizations/select_organization.html.erb b/app/views/organizations/select_organization.html.erb index be7a698f6..033426380 100644 --- a/app/views/organizations/select_organization.html.erb +++ b/app/views/organizations/select_organization.html.erb @@ -1,12 +1,12 @@
- +
<% @organizations.each_with_index do |organization, index| %> - - - + + + <% else %> + <%= t 'activerecord.attributes.user.deactivated' %> + <% end %> + -
- <%= t 'activerecord.attributes.organization.name'%> + <%= t 'activerecord.attributes.organization.name' %> - <%= t 'global.Information'%> + <%= t 'global.information'%> <%= t 'global.enter_to_timebank'%> @@ -16,19 +16,19 @@
<%= organization.name %> <%= t 'global.see'%> - <% if current_user.active?(organization) %> - <%= link_to set_current_organization_path(organization), method: :post do %> + <%= organization.name %> <%= t 'global.see'%> + <% if current_user.active?(organization) %> + <%= link_to set_current_organization_path(organization), method: :post do %> <%= t 'application.landing.button' %> <% end %> - <% else %> - <%= t 'activerecord.attributes.user.deactivated'%> - <% end %> -
- - - - - - - - - <% @organizations.each_with_index do |organization, index| %> +
+
+
- <%= t 'activerecord.attributes.organization.name' %> - - <%= t 'global.information'%> - - <%= t 'global.enter_to_timebank'%> -
+ - - - + + + - + + <% @organizations.each_with_index do |organization, index| %> + + + + + + + - - <% end %> - -
<%= organization.name %> <%= t 'global.see'%> - <% if current_user.active?(organization) %> - <%= link_to set_current_organization_path(organization), method: :post do %> - <%= t 'application.landing.button' %> - <% end %> - <% else %> - <%= t 'activerecord.attributes.user.deactivated' %> - <% end %> - <%= t 'activerecord.attributes.organization.name' %><%= t 'global.information' %><%= t 'global.enter_to_timebank' %>
<%= organization.name %> <%= t 'global.show' %> + <% if current_user.active?(organization) %> + <%= link_to set_current_organization_path(organization), method: :post do %> + <%= glyph 'arrow-right' %> + <%= t 'application.landing.button' %> + <% end %> + <% else %> + <%= t 'activerecord.attributes.user.deactivated' %> + <% end %> +
+ <% end %> + + +
- * <%= t 'users.index.deactivated_warning' %> -
\ No newline at end of file + * <%= t 'users.index.deactivated_warning' %> + diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 21d975f26..380888dcb 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -143,9 +143,7 @@
<% if @member.manager %> -

- ADMIN -

+

ADMIN

<% end %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 88b618457..bd60b6554 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -310,14 +310,12 @@ en: member_count: 'Number of users:' more: More movements: Transactions - no_information_available: No information available promote: Promote to administrator reason: Reason required_field: "* Required field" save: Save search: Search show: Show - see: See source_destination: From/to statistics: Statistics table: diff --git a/config/routes.rb b/config/routes.rb index 953f72cae..91d3d73ff 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -33,8 +33,7 @@ post :set_current end end - - get '/select_organization', to: 'organizations#select_organization' + get :select_organization, to: 'organizations#select_organization' resources :users, concerns: :accountable, except: :destroy, :path => "members" do collection do @@ -47,7 +46,6 @@ put :delete_reason end end - match "multi/step/:step", to: "multi_transfers#step", via: [:get, :post], as: :multi_transfers_step post "multi/create", to: "multi_transfers#create", as: :multi_transfers_create diff --git a/spec/controllers/organizations_controller_spec.rb b/spec/controllers/organizations_controller_spec.rb index 1663fc8fc..d40fb8f79 100644 --- a/spec/controllers/organizations_controller_spec.rb +++ b/spec/controllers/organizations_controller_spec.rb @@ -23,6 +23,7 @@ describe 'GET #select_organization' do it 'it shows the organizations in which the user is a member' do login(member.user) + get :select_organization expect(assigns(:organizations)).to eq([organization]) diff --git a/spec/controllers/tags_controller_spec.rb b/spec/controllers/tags_controller_spec.rb index 0b5701d94..7f633698c 100644 --- a/spec/controllers/tags_controller_spec.rb +++ b/spec/controllers/tags_controller_spec.rb @@ -6,11 +6,11 @@ let! (:offer) { Fabricate(:offer, user: member.user, organization: organization, tags: tags) } let! (:inquiry) { Fabricate(:inquiry, user: member.user, organization: organization, tags: more_tags) } - describe "GET index" do - before(:each) do - login(member.user) - end + before(:each) do + login(member.user) + end + describe "GET index" do it "returns http success" do get :index expect(response).to have_http_status(:ok) diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index a9dee2ef3..da6f59000 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -106,10 +106,10 @@ context 'with a member deactivate' do it 'is redirected to select organization' do login(deactivate_user) + get :index - expect(subject).to redirect_to('/select_organization') - assert_routing('/select_organization', controller: 'organizations', action: 'select_organization') + expect(response).to redirect_to('/select_organization') end end From 089955c1fa3014c3d89c7b3435db342ea500136c Mon Sep 17 00:00:00 2001 From: sseerrggii Date: Fri, 26 Mar 2021 13:30:19 +0100 Subject: [PATCH 8/8] New translations --- config/locales/ca.yml | 9 +- config/locales/es.yml | 5 + config/locales/eu.yml | 229 ++++++++++++++++++++------------------- config/locales/gl.yml | 7 +- config/locales/pt-BR.yml | 7 +- 5 files changed, 143 insertions(+), 114 deletions(-) diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 4d7426db7..512f21c66 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -61,6 +61,7 @@ ca: alt_phone: Telèfon alternatiu created_at: Creat date_of_birth: Data de naixement + deactivated: Desactivat description: Descripció email: Correu gender: Gènere @@ -135,6 +136,7 @@ ca: admin: Administrar administration: Administració adminshort: Admin + all_transfers: Totes les transferències categories: Serveis demographics: Dades demogràfiques global_activity: Activitat global @@ -146,7 +148,7 @@ ca: reports: Informes sign_out: Desconnectar statistics: Estadístiques - statistics_all_transfers: Totes les transferències + statistics_all_transfers: Totes les Transferències stats: Estadístiques tags: Etiquetes type_of_swaps: Tipus d'intercanvis @@ -297,6 +299,7 @@ ca: delete: Esborrar demote: Convertir en usuari normal edit: Modificar + enter_to_timebank: Entrar al Banc de Temps filter: Filtre from: Des de give_time: Transferir temps @@ -384,7 +387,7 @@ ca: offered_by: Oferents organization_notifier: recent_posts: - subject: Boletín semanal + subject: Butlletí setmanal text1: 'Últimas ofertas publicadas:' text2: 'Últimas demandas publicadas:' organizations: @@ -528,12 +531,14 @@ ca: give_time: give_time: Donar Temps a index: + account_deactivated: El teu compte ha estat desactivat per aquest Banc de Temps actions: Accions active_warning: Estàs a punt de canviar l'estat de l'usuari %{username} active_warning_angular: Vas a canviar l'estat del compte de l'usuari {{username}} cancel_warning: Estàs a punt d'esborrar el compte de l'usuari %{username} cancel_warning_angular: Vas a eliminar del banc a l'usuari {{username}} create: Crear nou usuari + deactivated_warning: 'Si creus que el vostre compte es podria haver desactivat per error, poseu-vos en contacte amb l''administrador amb la informació que es proporciona a continuació. ' manage_warning: Estàs a punt de canviar els permisos de l'usuari %{username} manage_warning_angular: Vas a canviar els permisos de l'usuari {{username}} members: Membres diff --git a/config/locales/es.yml b/config/locales/es.yml index 746709934..1ba853d5b 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -61,6 +61,7 @@ es: alt_phone: Teléfono alternativo created_at: Creado date_of_birth: Fecha de nacimiento + deactivated: Desactivado description: Descripción email: Correo gender: Género @@ -135,6 +136,7 @@ es: admin: Administrar administration: Administración adminshort: Admin + all_transfers: Todas las transferencias categories: Servicios demographics: Datos demográficos global_activity: Actividad global @@ -297,6 +299,7 @@ es: delete: Borrar demote: Convertir en usuario normal edit: Modificar + enter_to_timebank: Entrar al Banco de Tiempo filter: Filtro from: De give_time: Transferir tiempo @@ -528,12 +531,14 @@ es: give_time: give_time: Dar Tiempo a index: + account_deactivated: Tu cuenta ha sido desactivada para este Banco de Tiempo actions: Acciones active_warning: Estás a punto de cambiar el estado del usuario %{username} active_warning_angular: Va a cambiar el estado de la cuenta del usuario {{username}} cancel_warning: Estás a punto de borrar la cuenta al usuario %{username} cancel_warning_angular: Va a eliminar del banco al usuario {{username}} create: Crear nuevo usuario + deactivated_warning: 'Si crees que tu cuenta podría haber sido desactivada por error, comunícate con el administrador con la información que se proporciona a continuación. ' manage_warning: Estás a punto de cambiar los permisos del usuario %{username} manage_warning_angular: Va a cambiar los privilegios del usuario {{username}} members: Miembros diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 8f60c09ce..359a3b660 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -2,21 +2,21 @@ eu: active_admin: comments: author_type: " Egile mota" - resource_type: 'Errekurtso mota ' + resource_type: Baliabide mota users: organization: Denbora Bankua upload_csv: Fitxategia - upload_from_csv: CSVa inportatu + upload_from_csv: Igo CSVa activerecord: attributes: account: balance: Balantzea - organization: Antolaketa + organization: Erakundea category: created_at: Sortua name: Izena - name_translations: Izena ( itzulpena) - parent: kategoria nagusia + name_translations: Izena (itzulpenak) + parent: Kategoria-nagusia updated_at: Eguneratua common: created_at: Sortua @@ -30,50 +30,55 @@ eu: city: Herria created_at: Sortua description: Deskribapena - email: Helbide elektronikoa - name: Izena + email: Eposta + name: 'Izena + +' neighborhood: Auzoa - phone: Telefono zenbakia + phone: Telefonoa public_opening_times: Hasiera orduak reg_number_seq: Erbiltzailearen sekuentzia zenbakia. - theme: Gaia - updated_at: Eguneratu + theme: Itxura + updated_at: Eguneratua post: category: Kategoria created_at: Sortua description: Deskribapena - end_on: Bukatuko da. - start_on: Hasiko da - tag_list: Etiketa + end_on: 'Bukatzen da:' + start_on: 'Hasten da:' + tag_list: Etiketak title: Izenburua - updated_at: Eguneratu + updated_at: Eguneratua transfer: - amount: kopurua + amount: Kopurua created_at: Sortua hours: Orduak - minutes: Minutuak - post: Eskaintza - reason: Oharrak + minutes: 'Minutuak + +' + post: Iragarkia + reason: Iruzkinak source: Jatorria updated_at: Eguneratua user: - admin: Administratzailea - alt_phone: Ordezko telefono zenbakia + admin: Erakundeko Administratzailea + alt_phone: Ordezko telefonoa created_at: Sortua - date_of_birth: Jaiotze eguna. + date_of_birth: Jaiotze-data + deactivated: description: Deskribapena - email: Imeila + email: Eposta gender: 'Generoa ' identity_document: Nortasun agiria - last_sign_in_at: Azken konexioaren unea. - notifications: Jasotako jakinarazpenak - organization: Antolaketa - phone: Telefono zenbakia - push_notifications: Mugikorrean mezuak jaso - registration_date: Erregistratze eguna + last_sign_in_at: Azken saioa + notifications: Jaso eposta jakinarazpenak + organization: Erakundea + phone: Telefonoa + push_notifications: Jaso jakinarazpenak sakelakoan + registration_date: Erregistratze-da registration_number: Erabiltzaile kodea - superadmin: Sistemaren administratzailea - unconfirmed_email: imeila ez da konfirmatua izan + superadmin: Sistema administratzailea + unconfirmed_email: Baieztatu gabeko eposta updated_at: Eguneratua username: Izena errors: @@ -81,22 +86,22 @@ eu: organization: attributes: web: - url_format_invalid: URL formatua baliogabea da + url_format_invalid: URL formatu baliogabea transfer: attributes: base: - same_account: Ezin da mugimendurik egin kontu berdinera . + same_account: Ezin da transferentziarik egin kontu berera user: attributes: email: - invalid: Baliogabea + invalid: baliogabea models: category: - one: Gaia - other: gaiak + one: Kategoria + other: Kategoriak comment: - one: Azalpena - other: Azalpenak + one: Iruzkina + other: Iruzkinak inquiry: one: Eskaera other: Eskaerak @@ -122,85 +127,86 @@ eu: sub_slogan: Zugandik gertu, denbora banku bat dago login_form: button: Sartu - email: posta elektronikoa - password: pasahitza + email: Eposta + password: Pasahitza remember_check: Gogora nazazu menu: - sign_in: Sartu - sing_out: Saioa amaitu + sign_in: Hasi saioa + sing_out: Itxi saioa menus: offers_by_tag_link: - tags: Gaika + tags: Etiketak navbar: - admin: kudeatu - administration: Kudeaketa - adminshort: Kudeatzailea + admin: Kudeatu + administration: Administrazioa + adminshort: Admin + all_transfers: Transferentzia guztiak categories: Zerbitzuak demographics: Demografia datuak global_activity: Jarduera orokorra - inactive_users: Jarduera gabeko erabiltzaileak - inquiry_public_link: Eskaeretarako lotura zuzena - last_login: Azken konexioa - offer_public_link: Eskaintzetarako lotura zuzena - organizations: Elkarteak - reports: txostenak - sign_out: Saioa amaitu - statistics: estatistikak - statistics_all_transfers: Transferentzia guztiak + inactive_users: Erabiltzaile ez aktiboak + inquiry_public_link: Eskaeren esteka publikoa + last_login: Azken saioa + offer_public_link: Eskaintzen esteka publikoa + organizations: Erakundeak + reports: Txostenak + sign_out: Itxi saioa + statistics: Estatistikak + statistics_all_transfers: stats: Estatistikak tags: Etiketak - type_of_swaps: Truke motak + type_of_swaps: Transferentzia motak users: Erabiltzaileak - without_offers: Zerbitzurik ez da ageri + without_offers: Eskaintzarik ez organization_list: address: Helbidea city: Herria description: Deskribapena - email: Helbide elektronikoa + email: Eposta neighborhood: Auzoa - not_member: Ez zara inongo denbora bankutako partaide beraz, plataforma hau erabili ahal izateko, plataforma honen parte den eta zure inguruan dagoen denbora bankuren batekin jarri beharko duzu harremanetan. - phone: Telefono zenbakia + not_member: Une honetan ez zara denbora banku bateko partaide, beraz, plataforma hau erabili ahal izateko, plataforma honen parte den denbora banku batekin jarri behar duzu harremanetan. + phone: Telefonoa public_opening_times: Harretarako ordutegia - time_bank: Denbora bankuaa - welcome: Ongi etorri Timeoverflow era %{user}. + time_bank: Denbora Bankua + welcome: "%{user}, ongi etorri Timeoverflow-era." terms_conditions: Zerbitzuaren baldintzak tips: - entertag: Etiketak, komen bidez banandurik, idatzi + entertag: Sartu etiketak komekin banatuta user_not_found: Erabiltzailea ez da aurkitu. categories: index: - add: " Zerbitzua Gehitu" + add: Gehitu zerbitzua all: Denak global: Orokorrak - local: Bertakoak + local: Tokikoa tree: Oinarrizkoa devise: confirmations: - confirmed: Zure kontua onartua izan da. - confirmed_and_signed_in: Zure kontua onartua izan da. Izena eman duzu jada. + confirmed: Zure kontua ondo baieztatu da. + confirmed_and_signed_in: Zure kontua ondo baieztatu da. Izena eman duzu jada. new: resend_instructions: Baieztatze argibideak berbidali resend_instructions_button: Berbidali resend_instructions_description: Zure pasahitza aldatu baduzu, aldaketa behin betikoa izan dadin , ekintza hau egin behar duzu. - send_instructions: " Imeil bat jasoko duzu, zure kontua nola baieztatu behar duzun azalduz," - send_paranoid_instructions: " Zure imeila gure datu basean baldin badago, imeil bat jasoko duzu bereala, zure kontua nola baieztatu behar duzun azalduz," + send_instructions: Minutu gutxi barru zure kontua nola baieztatu azaltzen duen mezu elektronikoa jasoko duzu. + send_paranoid_instructions: Zure helbide elektronikoa gure datu-basean baldin badago, minutu gutxi barru zure kontua nola baieztatu azaltzen duen mezu elektronikoa jasoko duzu. failure: already_authenticated: Jadanik erregistraturik zaude. - inactive: Zure kontua ez da aktibatua izan. - invalid: Imeila edo pasahitza okerrak dira - invalid_token: identifikazio kodea ez da egokia - locked: Zure kontua blokeatua izan da, egin klik "Desblokeatzeko kodea bidali" loturan. - not_found_in_database: imeil edo pasahitz okerra - timeout: Zure saioa zaharkitu da. + inactive: Zure kontua ez da aktibatu oraindik. + invalid: Eposta edo pasahitza baliogabea. + invalid_token: Autentikazio gako balioagabea. + locked: Zure kontua blokeatuta dago. + not_found_in_database: Eposta edo pasahitza baliogabea. + timeout: Zure saioa iraungi da. Mesedez, jarraitzeko hasi saioa berriro. unauthenticated: Jarraitu ahal izateko erregistratu egin behar duzu. unconfirmed: Jarraitu ahal izateko, kontua baieztatu behar duzu. user: - last_attempt: Kontuz,saikera bakarra gelditzen zaizu , kontua blokeatu baino lehen. + last_attempt: Kontuz,saikera bakarra gelditzen zaizu kontua blokeatu baino lehen. mailer: confirmation_instructions: subject: Baieztatzeko argibideak reset_password_instructions: - subject: Zure pasahitz berrezartzeko argibideak + subject: Zure pasahitza berrezartzeko argibideak unlock_instructions: subject: Kontua desblokeatzeko argibideak omniauth_callbacks: @@ -213,36 +219,36 @@ eu: new_password: Pasahitz berria passwords_not_match: Pasahitzak ez dira berdinak new: - forgot_question: Sortu pasahitz berria - forgot_question_description: Sartu lotuta dagoen imeila eta bertara bidaliko dizugu, pasahitza berreskuratzeko lotura. + forgot_question: Sortu pasahitza berria + forgot_question_description: Sartu lotuta dagoen helbide elektronikoa eta bertara bidaliko dizugu, pasahitza berreskuratzeko lotura. send_instructions: Lotura bidali - no_token: Pasahitza berrezartzeko imeil batetik ez bazatoz, ezin zara orrialde honetara sartu. Pasahitza berrezartzeko imeil batetik bazatoz,begiratu, URLaosoa idatzi duzula. - send_instructions: Segidan jasoko duzu, pasahitza nola berreskuratu azalduko dizun imeila. - send_paranoid_instructions: Zure imeila gure datu baseetan badago, segidan jasoko duzu pashitza berreskuaratu ahal izateko lotura, zure imeilean. + no_token: Pasahitza berrezartzeko, mezu elektroniko batetik ez bazatoz, ezin zara orrialde honetara sartu. Pasahitza berrezartzeko mezu elektroniko batetik bazatoz,begiratu URL osoa idatzi duzula. + send_instructions: Segidan jasoko duzu, pasahitza nola berreskuratu azalduko dizun mezu elektronikoa. + send_paranoid_instructions: Zure helbide elektronikoa gure datu baseetan badago, segidan jasoko duzu pasahitza berreskuaratu ahal izateko lotura, zure posta elektrikoan. updated: Zure pasahitza aldatua izan da. Konektaturik zaude? - updated_not_active: Pasahitz aldaketa bete da. + updated_not_active: Pasahitza aldaketa egin da. registrations: - destroyed: Zure kontua ezabatu egin da. Berriz laxter ikusiko garelakoa, Agur!! + destroyed: Zure kontua ezabatu egin da. Berriz laister ikusiko garelakoan, Agur!! edit: cancel_account: Nire kontua ezabatu current_password: Gaur egungo pasahitza edit_user: Erabiltzailea editatu help_current_password: Zure pasahitza behar dugu aldaketak baieztatzeko - help_password: Aldatu nahi ez baduzu, utzi zurian. + help_password: Aldatu nahi ez baduzu, utzi txuri password: Pasahitza password_confirmation: Pasahitza baieztatu - unhappy: Triste + unhappy: Goibel update: Eguneratu new: password: Pasahitza - password_confirmation: Pasahitza baieztatu. - sign_me_up: Erregistratu - sign_up: Erregistroa - signed_up: Ongietorri!!! zure izen ematea egokia izan da. - signed_up_but_inactive: Zure izen ematea egoki egin da. baina zure kontua aktibatu arte ezin zara sartu. - signed_up_but_locked: Zure izen ematea egoki egin da.Baina , zure kontua blokeatua dago. Egin klik, "Desblokeatzeko imeila bidali" loturan. - signed_up_but_unconfirmed: Zure imeila baieztatzeko imeil bat bidali dizugu. Ireki lotura zure kontua aktibatzeko. - update_needs_confirmation: Kontuaren berritzea egin da baina zure imeila baieztatzeko beharra dugu. Zure imeila begiratu eta erabili bidali dizugun lotura. + password_confirmation: Pasahitza baieztatu + sign_me_up: Eman izena + sign_up: Izena-ematea + signed_up: Ongi etorri!!! zure izen-ematea egokia izan da. + signed_up_but_inactive: Zure izen-ematea egoki egin da baina zure kontua aktibatu arte ezin zara sartu. + signed_up_but_locked: Zure izen ematea egoki egin da.Baina , zure kontua blokeatua dago. Egin klik, "Desblokeatzeko mezu elektronikoa bidali" loturan. + signed_up_but_unconfirmed: Zure helbide elektronikoa baieztatzeko mezu elektronikoa bidali dizugu. Ireki lotura zure kontua aktibatzeko. + update_needs_confirmation: Kontuaren berritzea egin da baina zure helbide elektronikoa baieztatzeko beharra dugu. Zure posta begiratu eta erabili bidali dizugun lotura. updated: Kontuaren berritzea egina sessions: new: @@ -299,6 +305,7 @@ eu: delete: Ezabatu demote: Ohiko erabiltzaile biurtu edit: Aldaketak egin + enter_to_timebank: filter: Iragazkia from: tik give_time: Denbora eman @@ -401,7 +408,7 @@ eu: pages: about: app-mobile: Mugikorrerako Appa - app-mobile-text: TimeOverflow mugikorrean erabiltzeko Appa prest da
App hau Bartzelonako udaletxearen laguntzari esker sortu da . %{impulsem_link} (Barcelona Activa) 2017-2018 programaren bitartez. + app-mobile-text: TimeOverflow mugikorrerako app-a prest dago.
App hau Bartzelonako udaletxearen laguntzari esker sortu da, %{impulsem_link} (Barcelona Activa) 2017-2018 programaren bitartez. banner-button: Sartzea eskatzen du banner-subtitle: Martxan jartzen edo erakustaldi bat eginez lagunduko dizugu banner-title: Denbora banku bat al zara? @@ -431,7 +438,7 @@ eu: title2: Denbora bankuentzat posts: show: - info: + info: "%{type} hau %{organization}(e)ri dagokio." reports: cat_with_users: title: Eskaintzen diren zerbitzuak @@ -443,8 +450,8 @@ eu: delete_reason: Zihur zaude , azalpen hau ezabatu nahi duzula? movements: Mugimenduak post_form: - group_inquiry: - group_offer: + group_inquiry: Taldeko eskaera da? + group_offer: Taldeko eskaintza da? you_can_use: Erabil dezakezu simple_form: error_notification: @@ -456,7 +463,7 @@ eu: female: Emakumea male: Gizona others: Beste - prefer_not_to_answer: + prefer_not_to_answer: Nahiago dut ez erantzutea required: mark: "*" text: Beharrezkoa @@ -521,7 +528,7 @@ eu: one: "%{count}minutu" other: "%{count} minutu" new: - error_amount: + error_amount: Denbora 0 baino handiagoa izan behar da users: edit: edit_user: Erabiltzailea aldatu @@ -530,19 +537,21 @@ eu: give_time: give_time: honi denbora eman index: + account_deactivated: actions: Ekintzak - active_warning: + active_warning: "%{username} erabiltzaile-kontua aldatuko duzu" active_warning_angular: " {{username}} erabiltzailearen kontuaren egoera, aldatuko duzu." - cancel_warning: + cancel_warning: Denbora Bankuan %{username} erabiltzaileak duen kontua ezabatuko duzu cancel_warning_angular: " {{username}} erabiltzailea D bankutik ezabatuko duzu." create: Erabiltzaile berria sortu - manage_warning: + deactivated_warning: + manage_warning: "%{username} erabiltzailearentzako baimenak aldatuko dituzu" manage_warning_angular: " {{username}} erabiltzailearen onurak, aldatuko diztuzu" members: Kideak user_created: "%{uid} %{name} erabiltzailea gorde da" member_card: - active_ago: - no_activity: + active_ago: Aktibo %{time}-tik + no_activity: Aktibitaterik ez new: cancel: Deuseztatu create_more_users_button: Beste erabiltzaile bat sortu eta sartu @@ -553,7 +562,7 @@ eu: accounts: Kontuak balance: 'Balantzea:' categories: Eskainiriko zerbitzuak - change_your_image: + change_your_image: Aldartu zure irudia created_at: 'Alta:' data: Erabiltzailearen datuak date: Eguna @@ -576,8 +585,8 @@ eu: manage_warning: "%{user} erabiltzailearen onurak aldatuko dituzu" views: pagination: - first: - last: - next: - previous: - truncate: + first: Lehenengoa + last: Azkena + next: Hurrengoa + previous: Aurrekoa + truncate: Eten diff --git a/config/locales/gl.yml b/config/locales/gl.yml index aa6e9824c..f696bbc24 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -61,6 +61,7 @@ gl: alt_phone: Teléfono alternativo created_at: Creado date_of_birth: Data de nacemento + deactivated: description: Descrición email: Correo electrónico gender: Xénero @@ -135,6 +136,7 @@ gl: admin: Xestionar administration: Administración adminshort: Persona administradora + all_transfers: Todas as transferencias categories: Servizos demographics: Datos demográficos global_activity: Actividade global @@ -146,7 +148,7 @@ gl: reports: Informes sign_out: Saír statistics: Estatísticas - statistics_all_transfers: Todas as transferencias + statistics_all_transfers: stats: Estatísticas tags: Etiquetas type_of_swaps: Tipo de transaccións @@ -297,6 +299,7 @@ gl: delete: Eliminar demote: Degradar a usuario/a normal edit: Actualización + enter_to_timebank: filter: Filtro from: Desde give_time: Transferencia de tempo @@ -528,12 +531,14 @@ gl: give_time: give_time: Dálle tempo index: + account_deactivated: actions: Accións active_warning: Vas cambiar o estado da conta de usuario/a %{username} active_warning_angular: Vas cambiar o estado da conta de usuario/a para {{username}} cancel_warning: Vas borrar a conta do Banco de tempo para o usuario/a %{username} cancel_warning_angular: Vas borrar a conta do Banco de tempo para o usuario/a {{username}} create: Crea unha nova persoa usuaria + deactivated_warning: manage_warning: Vas cambiar privilexios para o usuario/a %{username} manage_warning_angular: Vas cambiar privilexios para o usuario/a {{username}} members: Persoas usuarias diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index e86b1b00d..5c5fe8c1f 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -61,6 +61,7 @@ pt-BR: alt_phone: Telefone alternativo created_at: Criado date_of_birth: Data de nascimento + deactivated: description: Descrição email: E-mail gender: Gênero @@ -135,6 +136,7 @@ pt-BR: admin: Administrar administration: Administração adminshort: Admin + all_transfers: Todas as transferências categories: Serviços demographics: Dados demográficos global_activity: Atividade global @@ -146,7 +148,7 @@ pt-BR: reports: Informes sign_out: Desconectar statistics: Estatísticas - statistics_all_transfers: Todas as transferências + statistics_all_transfers: stats: Estatísticas tags: Etiquetas type_of_swaps: Tipos de trocas @@ -297,6 +299,7 @@ pt-BR: delete: Apagar demote: Converter em usuário normal edit: Modificar + enter_to_timebank: filter: Filtro from: De give_time: Transferir tempo @@ -528,12 +531,14 @@ pt-BR: give_time: give_time: Dar Tempo a index: + account_deactivated: actions: Ações active_warning: Você mudará o status da conta para %{username} active_warning_angular: Mudará o estado da conta do usuário {{username}} cancel_warning: Você deletará a conta do Banco de Tempo %{username} cancel_warning_angular: Eliminará o usuário do banco {{username}} create: Criar novo usuário + deactivated_warning: manage_warning: Você mudará privilégios para o usuário %{username} manage_warning_angular: Mudará os privilégios do usuário {{username}} members: Membros