languages fix

This commit is contained in:
Harry Bomrah 2018-01-19 17:08:03 +08:00
parent d6f8143238
commit cc162a8e67
5 changed files with 32 additions and 24 deletions

View File

@ -1,6 +1,6 @@
class Admin::PseudoMembersController < OrbitAdminController class Admin::PseudoMembersController < OrbitAdminController
def index def index
@table_fields = ["pseudo_member.name", "pseudo_member.user_name", "pseudo_member.last_login"] @table_fields = ["pseudo_members.name", "pseudo_members.user_name", "pseudo_members.last_login"]
@members = PseudoUser.all.desc(:created_at).page(params[:page]).per(10) @members = PseudoUser.all.desc(:created_at).page(params[:page]).per(10)
end end

View File

@ -17,14 +17,14 @@
<!-- Basic Module --> <!-- Basic Module -->
<div class="tab-pane fade in active" id="basic"> <div class="tab-pane fade in active" id="basic">
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("pseudo_member.timeout") %></label> <label class="control-label muted"><%= t("pseudo_members.timeout") %></label>
<div class="controls"> <div class="controls">
<%= f.number_field :timeout, :min => 5 %> &nbsp; Minutes <%= f.number_field :timeout, :min => 5 %> &nbsp; <%= t("pseudo_members.minutes") %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("pseudo_member.after_login_path") %></label> <label class="control-label muted"><%= t("pseudo_members.after_login_path") %></label>
<div class="controls"> <div class="controls">
<%= f.text_field :member_dashboard_path %> <%= f.text_field :member_dashboard_path %>
</div> </div>

View File

@ -1,5 +1,9 @@
en: en:
restful_actions:
pseudo_members: Pseudo Members
settings: Settings
module_name: module_name:
pseudo_members: Pseudo Members
pseudo_member: Pseudo Members pseudo_member: Pseudo Members
pseudo_member: pseudo_member:
pseudo_member: Pseudo Members pseudo_member: Pseudo Members
@ -12,6 +16,7 @@ en:
after_login_path: Login success redirection after_login_path: Login success redirection
first_name: First Name first_name: First Name
last_name: Last Name last_name: Last Name
minutes: Minutes
password: Password password: Password
password_confirmation: Confirm Password password_confirmation: Confirm Password
email: Email email: Email

View File

@ -1,19 +1,22 @@
zh_tw: zh_tw:
restful_actions:
pseudo_members: 偽成員
settings: 設定
module_name: module_name:
pseudo_members: Pseudo Members pseudo_members: 偽成員
pseudo_member: 偽成員
pseudo_members: pseudo_members:
pseudo_members: Pseudo Members pseudo_members: 偽成員
members: Members members: 成員
settings: Settings settings: 設定
name: Name name: 名字
user_name: Username user_name: 使用者名字
last_login: Last Login last_login: 最後登入
timeout: Login Timeout timeout: 登入逾時
after_login_path: Login success redirection after_login_path: 登入成功轉址
first_name: First Name first_name:
last_name: Last Name last_name:
password: Password password: 密碼
password_confirmation: Confirm Password minutes: 分鐘
email: Email password_confirmation: 確認密碼
email: 電子郵件

View File

@ -2,24 +2,24 @@ module PseudoMember
class Engine < ::Rails::Engine class Engine < ::Rails::Engine
initializer "pseudo_member" do initializer "pseudo_member" do
OrbitApp.registration "PseudoMember", :type => "ModuleApp" do OrbitApp.registration "PseudoMember", :type => "ModuleApp" do
module_label "pseudo_member.pseudo_member" module_label "pseudo_members.pseudo_members"
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
frontend_enabled frontend_enabled
data_count 1..30 data_count 1..30
set_keyword_contstraints ["/pseudo_users/"] set_keyword_contstraints ["/pseudo_users/"]
side_bar do side_bar do
head_label_i18n 'pseudo_member.pseudo_member', icon_class: "icons-user-add" head_label_i18n 'pseudo_members.pseudo_members', icon_class: "icons-user-add"
available_for "admin" available_for "admin"
active_for_controllers (['admin/pseudo_members']) active_for_controllers (['admin/pseudo_members'])
head_link_path "admin_pseudo_members_path" head_link_path "admin_pseudo_members_path"
context_link 'pseudo_member.members', context_link 'pseudo_members.members',
:link_path=>"admin_pseudo_members_path" , :link_path=>"admin_pseudo_members_path" ,
:priority=>1, :priority=>1,
:active_for_action=>{'admin/pseudo_members'=>"index"}, :active_for_action=>{'admin/pseudo_members'=>"index"},
:available_for => 'admin' :available_for => 'admin'
context_link 'pseudo_member.settings', context_link 'pseudo_members.settings',
:link_path=>"settings_admin_pseudo_members_path" , :link_path=>"settings_admin_pseudo_members_path" ,
:priority=>1, :priority=>1,
:active_for_action=>{'admin/pseudo_members'=>"settings"}, :active_for_action=>{'admin/pseudo_members'=>"settings"},