From cc162a8e6742c68133fc5225def0f18e09967166 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 19 Jan 2018 17:08:03 +0800 Subject: [PATCH] languages fix --- .../admin/pseudo_members_controller.rb | 2 +- .../admin/pseudo_members/settings.html.erb | 6 ++-- config/locales/en.yml | 5 +++ config/locales/zh_tw.yml | 35 ++++++++++--------- lib/pseudo_member/engine.rb | 8 ++--- 5 files changed, 32 insertions(+), 24 deletions(-) diff --git a/app/controllers/admin/pseudo_members_controller.rb b/app/controllers/admin/pseudo_members_controller.rb index 2ae825c..1295b28 100644 --- a/app/controllers/admin/pseudo_members_controller.rb +++ b/app/controllers/admin/pseudo_members_controller.rb @@ -1,6 +1,6 @@ class Admin::PseudoMembersController < OrbitAdminController 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) end diff --git a/app/views/admin/pseudo_members/settings.html.erb b/app/views/admin/pseudo_members/settings.html.erb index 3769e91..f3ce629 100644 --- a/app/views/admin/pseudo_members/settings.html.erb +++ b/app/views/admin/pseudo_members/settings.html.erb @@ -17,14 +17,14 @@
- +
- <%= f.number_field :timeout, :min => 5 %>   Minutes + <%= f.number_field :timeout, :min => 5 %>   <%= t("pseudo_members.minutes") %>
- +
<%= f.text_field :member_dashboard_path %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 5308540..6822db7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,5 +1,9 @@ en: + restful_actions: + pseudo_members: Pseudo Members + settings: Settings module_name: + pseudo_members: Pseudo Members pseudo_member: Pseudo Members pseudo_member: pseudo_member: Pseudo Members @@ -12,6 +16,7 @@ en: after_login_path: Login success redirection first_name: First Name last_name: Last Name + minutes: Minutes password: Password password_confirmation: Confirm Password email: Email \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 3787604..094d440 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,19 +1,22 @@ zh_tw: + restful_actions: + pseudo_members: 偽成員 + settings: 設定 module_name: - pseudo_members: Pseudo Members + pseudo_members: 偽成員 + pseudo_member: 偽成員 pseudo_members: - pseudo_members: Pseudo Members - members: Members - settings: Settings - name: Name - user_name: Username - last_login: Last Login - timeout: Login Timeout - after_login_path: Login success redirection - first_name: First Name - last_name: Last Name - password: Password - password_confirmation: Confirm Password - email: Email - - \ No newline at end of file + pseudo_members: 偽成員 + members: 成員 + settings: 設定 + name: 名字 + user_name: 使用者名字 + last_login: 最後登入 + timeout: 登入逾時 + after_login_path: 登入成功轉址 + first_name: 名 + last_name: 姓 + password: 密碼 + minutes: 分鐘 + password_confirmation: 確認密碼 + email: 電子郵件 \ No newline at end of file diff --git a/lib/pseudo_member/engine.rb b/lib/pseudo_member/engine.rb index 0e8c2d5..e2afbb8 100644 --- a/lib/pseudo_member/engine.rb +++ b/lib/pseudo_member/engine.rb @@ -2,24 +2,24 @@ module PseudoMember class Engine < ::Rails::Engine initializer "pseudo_member" 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__) frontend_enabled data_count 1..30 set_keyword_contstraints ["/pseudo_users/"] 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" active_for_controllers (['admin/pseudo_members']) head_link_path "admin_pseudo_members_path" - context_link 'pseudo_member.members', + context_link 'pseudo_members.members', :link_path=>"admin_pseudo_members_path" , :priority=>1, :active_for_action=>{'admin/pseudo_members'=>"index"}, :available_for => 'admin' - context_link 'pseudo_member.settings', + context_link 'pseudo_members.settings', :link_path=>"settings_admin_pseudo_members_path" , :priority=>1, :active_for_action=>{'admin/pseudo_members'=>"settings"},