diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb
index c3adb71..450f87a 100644
--- a/app/controllers/conferences_controller.rb
+++ b/app/controllers/conferences_controller.rb
@@ -832,7 +832,7 @@ class ConferencesController < ApplicationController
@workshop = Workshop.find_by_id_and_conference_id(params[:workshop_id], @this_conference.id)
do_404 unless @workshop
@can_edit = @workshop.can_edit?(current_user)
- do_403 unless @can_edit || @workshop.can_translate?(current_user)
+ do_403 unless @can_edit || @workshop.can_translate?(current_user, I18n.locale)
@title = @workshop.title
@info = @workshop.info
@needs = JSON.parse(@workshop.needs || '[]').map &:to_sym
@@ -888,7 +888,7 @@ class ConferencesController < ApplicationController
end
can_edit = workshop.can_edit?(current_user)
- do_403 unless can_edit || workshop.can_translate?(current_user)
+ do_403 unless can_edit || workshop.can_translate?(current_user, I18n.locale)
workshop.title = params[:title]
workshop.info = params[:info]
diff --git a/app/models/workshop.rb b/app/models/workshop.rb
index f76ee28..290c920 100644
--- a/app/models/workshop.rb
+++ b/app/models/workshop.rb
@@ -83,8 +83,8 @@ class Workshop < ActiveRecord::Base
interested ? interested.size : 0
end
- def can_translate?(user)
- user.can_translate? || can_edit?(user)
+ def can_translate?(user, lang)
+ (user.can_translate? && lang.to_sym != locale.to_sym) || can_edit?(user)
end
private
diff --git a/app/views/workshops/show.html.haml b/app/views/workshops/show.html.haml
index 1046bc1..caec851 100644
--- a/app/views/workshops/show.html.haml
+++ b/app/views/workshops/show.html.haml
@@ -12,10 +12,10 @@
= form_tag toggle_workshop_interest_path(@this_conference.slug, @workshop.id) do
= button_tag (@workshop.interested?(current_user) ? :remove_interest : :show_interest), :value => :toggle_interest, :class => (@workshop.interested?(current_user) ? 'delete' : 'add')
=markdown _!(@workshop.info) || ''
- - if @workshop.can_translate?(current_user)
+ - if current_user.can_translate?
.actions
- I18n.backend.enabled_locales.each do |locale|
- = (link_to (_'actions.workshops.Translate', "Translate into #{language_name(locale)}", :vars => {:language => language_name(locale)}), edit_workshop_url(@this_conference.slug, @workshop.id, url_params(locale)), :class => 'button translate') if locale.to_sym != I18n.locale.to_sym
+ = (link_to (_'actions.workshops.Translate', "Translate into #{language_name(locale)}", :vars => {:language => language_name(locale)}), edit_workshop_url(@this_conference.slug, @workshop.id, url_params(locale)), :class => 'button translate') if @workshop.can_translate?(current_user, locale)
= columns(medium: 6) do
%h3=_'articles.workshops.headings.facilitators'
.facilitators
diff --git a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--.html b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--.html
index 79350b6..97a8d9b 100644
--- a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--.html
+++ b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--.html
@@ -46,7 +46,7 @@
Guadalajara, Jalisco, Mexico
-August 20 – 24, 2015
+August 22 – 26, 2015
diff --git a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html
index a3d681a..75d25d4 100644
--- a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html
+++ b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html
@@ -51,7 +51,7 @@
-Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo
+
Mauris Enim Leo, Rhoncus Sed, Vestibulum Sit Amet, Cursus Id, Turpis
You are interested in this workshop
-
Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.
+
Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.
Facilitators
diff --git a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html
index 0933a50..0e8807a 100644
--- a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html
+++ b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html
@@ -51,7 +51,7 @@
-Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo
+
Mauris Enim Leo, Rhoncus Sed, Vestibulum Sit Amet, Cursus Id, Turpis
No one is interested in this workshop yet
-
Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.
+
Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.
Facilitators
diff --git a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html
index 0933a50..0e8807a 100644
--- a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html
+++ b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html
@@ -51,7 +51,7 @@
-Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo
+
Mauris Enim Leo, Rhoncus Sed, Vestibulum Sit Amet, Cursus Id, Turpis
No one is interested in this workshop yet
-
Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.
+
Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.
Facilitators
diff --git a/config/locales/data/html_records/Broadcast-message--.html b/config/locales/data/html_records/Broadcast-message--.html
index 8490bf3..c4e65bc 100644
--- a/config/locales/data/html_records/Broadcast-message--.html
+++ b/config/locales/data/html_records/Broadcast-message--.html
@@ -46,7 +46,7 @@
San Marcos, Texas
-August 20 – 24, 2015
+August 22 – 26, 2015
diff --git a/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html b/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html
index 56c2a0f..8b2df9a 100644
--- a/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html
+++ b/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html
@@ -78,7 +78,7 @@
-
+
|
@@ -93,7 +93,7 @@
-© Bike!Bike! 2015
+© Bike!Bike! 2015
|
diff --git a/config/locales/data/html_records/Create-workshop--.html b/config/locales/data/html_records/Create-workshop--.html
index 8490bf3..c4e65bc 100644
--- a/config/locales/data/html_records/Create-workshop--.html
+++ b/config/locales/data/html_records/Create-workshop--.html
@@ -46,7 +46,7 @@
San Marcos, Texas
-August 20 – 24, 2015
+August 22 – 26, 2015
diff --git a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-1.html b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-1.html
index 525d8ff..bf8e1cd 100644
--- a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-1.html
+++ b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-1.html
@@ -57,11 +57,6 @@
Lorem Ipsum
-
Facilitators
diff --git a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-2.html b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-2.html
index e990ffc..8c8319e 100644
--- a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-2.html
+++ b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-2.html
@@ -57,11 +57,6 @@
Lorem Ipsum
-
Facilitators
diff --git a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-3.html b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-3.html
index e990ffc..8c8319e 100644
--- a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-3.html
+++ b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1-3.html
@@ -57,11 +57,6 @@
Lorem Ipsum
-
Facilitators
diff --git a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1.html b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1.html
index 525d8ff..bf8e1cd 100644
--- a/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1.html
+++ b/config/locales/data/html_records/Create-workshop--conferences.MyBikeBike.workshops.1.html
@@ -57,11 +57,6 @@
Lorem Ipsum
-
Facilitators
diff --git a/config/locales/data/html_records/Edit-a-conference--.html b/config/locales/data/html_records/Edit-a-conference--.html
index fcec57d..eb5ead3 100644
--- a/config/locales/data/html_records/Edit-a-conference--.html
+++ b/config/locales/data/html_records/Edit-a-conference--.html
@@ -46,7 +46,7 @@
Portland, Oregon
-August 20 – 24, 2015
+August 22 – 26, 2015
diff --git a/config/locales/data/html_records/Edit-a-conference--conferences.MyBikeBike.edit.html b/config/locales/data/html_records/Edit-a-conference--conferences.MyBikeBike.edit.html
index a56fd27..d4169ac 100644
--- a/config/locales/data/html_records/Edit-a-conference--conferences.MyBikeBike.edit.html
+++ b/config/locales/data/html_records/Edit-a-conference--conferences.MyBikeBike.edit.html
@@ -57,7 +57,7 @@