Skip to content
Snippets Groups Projects
Commit 6a63e948 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

language

parent b41ace30
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ class Admin::ApplicationController < ApplicationController ...@@ -24,6 +24,7 @@ class Admin::ApplicationController < ApplicationController
def set_locale def set_locale
return unless current_user return unless current_user
# I18n.locale = current_user.locale return unless current_user.language
I18n.locale = current_user.language.iso_code
end end
end end
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<th><%= User.human_attribute_name('email') %></th> <th><%= User.human_attribute_name('email') %></th>
<th><%= User.human_attribute_name('first_name') %></th> <th><%= User.human_attribute_name('first_name') %></th>
<th><%= User.human_attribute_name('last_name') %></th> <th><%= User.human_attribute_name('last_name') %></th>
<th><%= User.human_attribute_name('role') %></th> <th><%= User.human_attribute_name('language') %></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<td><%= link_to user.email, [:admin, user] %></td> <td><%= link_to user.email, [:admin, user] %></td>
<td><%= user.first_name %></td> <td><%= user.first_name %></td>
<td><%= user.last_name %></td> <td><%= user.last_name %></td>
<td><%= user.role %></td> <td><%= user.language %></td>
<td class="text-end"> <td class="text-end">
<%= edit_link user %> <%= edit_link user %>
<%= destroy_link user %> <%= destroy_link user %>
......
...@@ -31,7 +31,7 @@ module Osuny ...@@ -31,7 +31,7 @@ module Osuny
config.sass.preferred_syntax = :sass config.sass.preferred_syntax = :sass
config.i18n.available_locales = [:fr] config.i18n.available_locales = [:fr, :en]
config.i18n.default_locale = :fr config.i18n.default_locale = :fr
config.i18n.load_path += Dir["#{Rails.root.to_s}/config/locales/**/*.yml"] config.i18n.load_path += Dir["#{Rails.root.to_s}/config/locales/**/*.yml"]
......
en:
true: Yes
false: No
home: Home
dashboard: Dashboard
show: Show
create: Create
edit: Edit
delete: Delete
please-confirm: Are you sure?
activerecord:
models:
university:
one: University
other: Universities
language:
one: Language
other: Languages
user:
one: User
other: Users
attributes:
university:
name: Name
address: Address
zipcode: Zipcode
city: City
country: Country
private: Private
public_or_private: Public/private
public: Public
private: Private
user:
email: Email
first_name: First name
last_name: Last name
role: Role
researcher: Researcher profile
language: Favourite language
simple_form:
hints:
...@@ -36,5 +36,6 @@ fr: ...@@ -36,5 +36,6 @@ fr:
last_name: Nom last_name: Nom
role: Rôle role: Rôle
researcher: Profil de chercheur researcher: Profil de chercheur
language: Langue préférée
simple_form: simple_form:
hints: hints:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment