Skip to content

Instantly share code, notes, and snippets.

@jpoz
Created November 16, 2009 05:54
Show Gist options
  • Select an option

  • Save jpoz/235777 to your computer and use it in GitHub Desktop.

Select an option

Save jpoz/235777 to your computer and use it in GitHub Desktop.
diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb
index 9b33c31..ac6d091 100644
--- a/app/controllers/site_controller.rb
+++ b/app/controllers/site_controller.rb
@@ -59,6 +59,8 @@ class SiteController < ApplicationController
participant_registration and return if request.post?
layout = "minimal_#{manage_or_participate}"
+
+ I18n.locale = @project_role.segment.language rescue I18n.locale = :en
render :layout => layout, :template => "site/#{manage_or_participate}_invite_key"
end
diff --git a/app/views/invitation_mailer/invite.text.plain.rhtml b/app/views/invitation_mailer/invite.text.plain.rhtml
index 9ea1a73..6cdad4f 100644
--- a/app/views/invitation_mailer/invite.text.plain.rhtml
+++ b/app/views/invitation_mailer/invite.text.plain.rhtml
@@ -1,6 +1,5 @@
<%- role = @project.role_for(@user) %>
<%= t(:'invite.welcome') %>
-
<%= t(:'invite.you_ve_been_invited', :role => h(role.to_s), :project_name => @project.name) %>
<%= register_by_invite_key_url(:invite_key => role.invite_key, :host => @project.host) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 9c22055..9477f16 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -153,7 +153,6 @@ en:
all_the_best: All the best,
subject: Welcome to {{project}}
you_ve_been_invited: "You've been invited to be a {{role}} in the {{project_name}}. We are very glad to have you! To get started, please click on or type in the web address below to sign into the project site. Once
- you_ve_been_invited: "このたびは、コンタクトレンズの調査にご協力いただきましてありがとうございます 下のリンクをクリックして、調査用のウェブサイトにアクセスし、パスワードの設定などを行ってください"
project_moderator: Project Moderator
comments:
new: New
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment