forked from External/greenlight
localize app
This commit is contained in:
parent
84fb5c617f
commit
bea502a5a2
|
@ -84,14 +84,14 @@
|
|||
info: false,
|
||||
ordering: false,
|
||||
language: {
|
||||
emptyTable: "Past recordings are shown here."
|
||||
emptyTable: " "
|
||||
},
|
||||
columns: [
|
||||
{ title: "Date Recorded", data: "start_time" },
|
||||
{ title: "Presentation", data: "previews"},
|
||||
{ title: "Duration", data: "duration" },
|
||||
{ title: "Views", data: "playbacks" },
|
||||
{ title: "Actions", data: "id" }
|
||||
{ data: "start_time" },
|
||||
{ data: "previews"},
|
||||
{ data: "duration" },
|
||||
{ data: "playbacks" },
|
||||
{ data: "id" }
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
|
|
|
@ -19,14 +19,6 @@ class User < ApplicationRecord
|
|||
auth_hash['info']['nickname']
|
||||
end
|
||||
|
||||
def ownership_name
|
||||
if username.end_with? 's'
|
||||
"#{username}'"
|
||||
else
|
||||
"#{username}'s"
|
||||
end
|
||||
end
|
||||
|
||||
def room_url
|
||||
"/rooms/#{username}"
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ unless @response.blank?
|
|||
end
|
||||
json.playbacks do
|
||||
json.array!(recording[:playbacks]) do |playback|
|
||||
json.type playback[:type]
|
||||
json.type t(playback[:type]) # translates the playback type
|
||||
json.url playback[:url]
|
||||
json.previews do
|
||||
json.array!(playback[:previews]) do |preview|
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<% content_for :title do %>
|
||||
<div class="title">
|
||||
Hi Everyone
|
||||
<%= t('hi_all') %>
|
||||
</div>
|
||||
<small>
|
||||
The session will be taking place using the following URL
|
||||
<%= t('session_url_explanation') %>
|
||||
</small>
|
||||
<% end %>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
<% content_for :footer do %>
|
||||
<div class="panel-footer">
|
||||
<div class="text-center">
|
||||
<a href="#" class="generate-link">Click refresh</a> to generate a new meeting URL
|
||||
<%= t('refresh_html') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<div class="page-wrapper meetings">
|
||||
<div class='container-fluid'>
|
||||
|
||||
<%= render 'shared/title', title: 'Start A New Session' %>
|
||||
<%= render 'shared/title', title: t('start_new_session') %>
|
||||
|
||||
<%= render layout: 'shared/center_panel' do %>
|
||||
<div class="center-block col-sm-8">
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<% if current_user %>
|
||||
<% page_title = "Welcome, #{current_user.name.split(' ').first}" %>
|
||||
<% page_title = t('greet_user', name: current_user.name) %>
|
||||
<% else %>
|
||||
<% page_title = "Welcome to #{@user.ownership_name} Meeting Space" %>
|
||||
<% page_title= t('greet_guest', name: @user.username) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
<div class="title">
|
||||
<% if current_user == @user %>
|
||||
Start a new session
|
||||
<%= t('start_new_session') %>
|
||||
<% elsif current_user && current_user != @user %>
|
||||
<%= "Join #{@user.ownership_name} session" %>
|
||||
<%= t('join_session_user', name: @user.username) %>
|
||||
<% else %>
|
||||
Join the current session
|
||||
<%= t('join_session_guest') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -35,8 +35,16 @@
|
|||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<h3>Past Recordings</h3>
|
||||
<table id="recordings" class="table" width="100%"></table>
|
||||
<h3><%= t('past_recordings') %></h3>
|
||||
<table id="recordings" class="table" width="100%">
|
||||
<thead>
|
||||
<th><%= t('date_recorded') %></th>
|
||||
<th><%= t('presentation') %></th>
|
||||
<th><%= t('duration') %></th>
|
||||
<th><%= t('views') %></th>
|
||||
<th><%= t('actions') %></th>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<% content_for :title do %>
|
||||
<div class="title">
|
||||
Looks like you're the first one here...
|
||||
<%= t('wait_for_mod_msg') %>
|
||||
</div>
|
||||
<small>
|
||||
You will automatically join when the meeting starts
|
||||
<%= t('wait_for_mod_explanation') %>
|
||||
</small>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -17,22 +17,22 @@
|
|||
<!-- Header -->
|
||||
<div class='header'>
|
||||
<span class="logo-wrapper pull-left">
|
||||
<%= link_to image_tag("bbb-logo.png", :alt => "BigBlueButton Demo", :class => "logo"), root_path %>
|
||||
<%= link_to image_tag("bbb-logo.png", :alt => "BigBlueButton", :class => "logo"), root_path %>
|
||||
</span>
|
||||
<span class="signup pull-right">
|
||||
<% if current_user %>
|
||||
<%= current_user.name %> |
|
||||
<% if current_user.username %>
|
||||
<%= link_to 'my room', current_user.room_url %> |
|
||||
<%= link_to t('my_room'), current_user.room_url %> |
|
||||
<% else %>
|
||||
<%= link_to 'my room', edit_user_path(current_user) %> |
|
||||
<%= link_to t('my_room'), edit_user_path(current_user) %> |
|
||||
<% end %>
|
||||
<%= link_to 'logout', user_logout_url %>
|
||||
<%= link_to t('logout'), user_logout_url %>
|
||||
<% elsif @user %>
|
||||
Are you <%= @user.username %> ? |
|
||||
<%= link_to 'login', "/auth/#{@user.provider}" %>
|
||||
<%= t('are_you', name: @user.username) %> |
|
||||
<%= link_to t('login'), "/auth/#{@user.provider}" %>
|
||||
<% else %>
|
||||
Signup for customized sessions
|
||||
<%= t('oauth_signup') %>
|
||||
<%= link_to('/auth/twitter', :class => "btn icon btn-lg btn-social-icon btn-twitter") do %>
|
||||
<span class="fa fa-twitter"></span>
|
||||
<% end %>
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
<!-- Footer -->
|
||||
<div class='footer text-center'>
|
||||
Powered by BigBlueButton
|
||||
<%= t('powered_bigbluebutton') %>
|
||||
</div>
|
||||
<!-- End of Footer -->
|
||||
</body>
|
||||
|
|
|
@ -3,20 +3,20 @@
|
|||
<% @current_user = user %>
|
||||
<%= text_field :current_user, :name, class: 'form-control meeting-user-name', type: 'hidden' %>
|
||||
<% else %>
|
||||
<%= text_field :nil, :nil, class: 'form-control meeting-user-name', placeholder: 'Enter your name' %>
|
||||
<%= text_field :nil, :nil, class: 'form-control meeting-user-name', placeholder: t('enter_name') %>
|
||||
<% end %>
|
||||
<% if admin? %>
|
||||
<button type="button" class="btn btn-primary center-block meeting-join">
|
||||
Start
|
||||
<%= t('start') %>
|
||||
</button>
|
||||
<% elsif current_user %>
|
||||
<button type="button" class="btn btn-primary center-block meeting-join">
|
||||
Join
|
||||
<%= t('join') %>
|
||||
</button>
|
||||
<% else %>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary meeting-join">
|
||||
Join
|
||||
<%= t('join') %>
|
||||
</button>
|
||||
</span>
|
||||
<% end %>
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
</span>
|
||||
</div>
|
||||
<small>
|
||||
<em>Copy this URL to invite others to the meeting</em>
|
||||
<em><%= t('url_copy_explanation') %></em>
|
||||
</small>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Rails.application.config.middleware.use OmniAuth::Builder do
|
||||
provider :twitter, ENV['TWITTER_ID'], ENV['TWITTER_SECRET']
|
||||
provider :google_oauth2, ENV['GOOGLE_OAUTH2_ID'], ENV['GOOGLE_OAUTH2_SECRET'],
|
||||
scope: 'profile', access_type: 'online', name: 'google'
|
||||
scope: ['profile'], access_type: 'online', name: 'google'
|
||||
end
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
# Files in the config/locales directory are used for internationalization
|
||||
# and are automatically loaded by Rails. If you want to use locales other
|
||||
# than English, add the necessary files in this directory.
|
||||
#
|
||||
# To use the locales, use `I18n.t`:
|
||||
#
|
||||
# I18n.t 'hello'
|
||||
#
|
||||
# In views, this is aliased to just `t`:
|
||||
#
|
||||
# <%= t('hello') %>
|
||||
#
|
||||
# To use a different locale, set it with `I18n.locale`:
|
||||
#
|
||||
# I18n.locale = :es
|
||||
#
|
||||
# This would use the information in config/locales/es.yml.
|
||||
#
|
||||
# To learn more, please read the Rails Internationalization guide
|
||||
# available at http://guides.rubyonrails.org/i18n.html.
|
||||
|
||||
en-US:
|
||||
actions: Actions
|
||||
are_you: Are you %{name} ?
|
||||
date_recorded: Date Recorded
|
||||
duration: Duration
|
||||
enter_name: Enter your name
|
||||
greet_user: Welcome, %{name}
|
||||
greet_guest: Welcome to %{name} Meeting Space
|
||||
hi_all: Hi Everyone
|
||||
join: Join
|
||||
join_session_guest: Join the current session
|
||||
join_session_user: Join %{name} session
|
||||
login: login
|
||||
logout: logout
|
||||
my_room: my room
|
||||
oauth_signup: Signup for customized sessions
|
||||
past_recordings: Past Recordings
|
||||
powered_bigbluebutton: Powered by BigBlueButton
|
||||
presentation: Presentation
|
||||
refresh_html: <a href="#" class="generate-link">Click refresh</a> to generate a new meeting URL
|
||||
session_url_explanation: The session will be taking place using the following URL
|
||||
start: Start
|
||||
start_new_session: Start a new session
|
||||
url_copy_explanation: Copy this URL to invite others to the meeting
|
||||
video: Video
|
||||
views: Views
|
||||
wait_for_mod_msg: Looks like you're the first one here...
|
||||
wait_for_mod_explanation: You will automatically join when the meeting starts
|
|
@ -1,23 +0,0 @@
|
|||
# Files in the config/locales directory are used for internationalization
|
||||
# and are automatically loaded by Rails. If you want to use locales other
|
||||
# than English, add the necessary files in this directory.
|
||||
#
|
||||
# To use the locales, use `I18n.t`:
|
||||
#
|
||||
# I18n.t 'hello'
|
||||
#
|
||||
# In views, this is aliased to just `t`:
|
||||
#
|
||||
# <%= t('hello') %>
|
||||
#
|
||||
# To use a different locale, set it with `I18n.locale`:
|
||||
#
|
||||
# I18n.locale = :es
|
||||
#
|
||||
# This would use the information in config/locales/es.yml.
|
||||
#
|
||||
# To learn more, please read the Rails Internationalization guide
|
||||
# available at http://guides.rubyonrails.org/i18n.html.
|
||||
|
||||
en:
|
||||
hello: "Hello world"
|
Loading…
Reference in New Issue