From 29bb92f841b59d25e000eb524d127ed503b95e35 Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Wed, 6 Feb 2013 17:44:38 +0800 Subject: [PATCH] fix member sidebar add i18n for modules and default_widgets --- app/views/layouts/_side_bar.html.erb | 3 +-- config/locales/en.yml | 2 ++ config/locales/zh_tw.yml | 1 + lib/orbit_app/module/widget.rb | 2 +- vendor/built_in_modules/ad_banner/config/locales/en.yml | 4 ++++ .../built_in_modules/ad_banner/config/locales/zh_tw.yml | 4 ++++ vendor/built_in_modules/ad_banner/init.rb | 2 +- .../built_in_modules/announcement/config/locales/en.yml | 2 ++ vendor/built_in_modules/announcement/init.rb | 2 +- vendor/built_in_modules/archive/config/locales/en.yml | 4 +++- vendor/built_in_modules/archive/config/locales/zh_tw.yml | 2 ++ vendor/built_in_modules/archive/init.rb | 8 ++++---- vendor/built_in_modules/calendar/config/locales/en.yml | 1 + vendor/built_in_modules/gallery/init.rb | 4 ++-- vendor/built_in_modules/location/config/locales/en.yml | 3 +++ .../built_in_modules/location/config/locales/zh_tw.yml | 3 +++ vendor/built_in_modules/location/init.rb | 4 ++-- .../miss_module/config/locales/zh_tw.yml | 9 +-------- 18 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 vendor/built_in_modules/ad_banner/config/locales/en.yml create mode 100644 vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml create mode 100644 vendor/built_in_modules/location/config/locales/en.yml create mode 100644 vendor/built_in_modules/location/config/locales/zh_tw.yml diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index fa2d332c..af7a5c79 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -13,8 +13,7 @@
diff --git a/config/locales/en.yml b/config/locales/en.yml index b499353e..68e299e1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -150,6 +150,8 @@ en: deadline: Deadline default: Default default_css: Default CSS + default_widget: + default_widget: Default Widget delete: file: Delete file success: diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 0bbb1755..8578514c 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -116,6 +116,7 @@ zh_tw: delete: 刪除 delete_file: 刪除檔案 default_widget: + default_widget: 預設樣板 name: 預設樣式 no_support_setting: 沒有可以使用的設定 no_value: 不設定(全部) diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb index a02a2427..38b15a76 100644 --- a/lib/orbit_app/module/widget.rb +++ b/lib/orbit_app/module/widget.rb @@ -98,7 +98,7 @@ module OrbitApp def self.get_interface_args #will need to work with design - {:name=>"default_widget",:field=>nil,:label=>'label',:style=>STYLE} + {:name=>"default_widget",:field=>nil,:label=>'label',:style=>STYLE,:i18n=>'default_widget.default_widget'} end def to_module_app_format diff --git a/vendor/built_in_modules/ad_banner/config/locales/en.yml b/vendor/built_in_modules/ad_banner/config/locales/en.yml new file mode 100644 index 00000000..c52a82f7 --- /dev/null +++ b/vendor/built_in_modules/ad_banner/config/locales/en.yml @@ -0,0 +1,4 @@ +en: + + ad_banner: + ad_banner: Ad Banner \ No newline at end of file diff --git a/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml b/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml new file mode 100644 index 00000000..9b3771f7 --- /dev/null +++ b/vendor/built_in_modules/ad_banner/config/locales/zh_tw.yml @@ -0,0 +1,4 @@ +zh_tw: + + ad_banner: + ad_banner: 廣告輪播 \ No newline at end of file diff --git a/vendor/built_in_modules/ad_banner/init.rb b/vendor/built_in_modules/ad_banner/init.rb index 4a9aafba..e9aec9c7 100644 --- a/vendor/built_in_modules/ad_banner/init.rb +++ b/vendor/built_in_modules/ad_banner/init.rb @@ -33,7 +33,7 @@ module AdBanner # end side_bar do - head_label_i18n 'admin.ad_banner',:icon_class=>"icons-landscape" + head_label_i18n 'ad_banner.ad_banner',:icon_class=>"icons-landscape" available_for [:admin,:guest,:manager,:sub_manager] active_for_controllers ({:public=>['admin/ad_banners', 'admin/ad_images']}) diff --git a/vendor/built_in_modules/announcement/config/locales/en.yml b/vendor/built_in_modules/announcement/config/locales/en.yml index 5dc236b5..d57797d9 100644 --- a/vendor/built_in_modules/announcement/config/locales/en.yml +++ b/vendor/built_in_modules/announcement/config/locales/en.yml @@ -15,3 +15,5 @@ en: search: Search for Announcement update_bulletin_success: Announcement was successfully updated update_bulletin_category_success: Announcement category was successfully updated + all_articles: All Articles + add_new: New \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index c1174dac..30ce57b8 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -40,7 +40,7 @@ module Announcement end side_bar do - head_label_i18n 'admin.announcement',:icon_class=>"icons-megaphone" + head_label_i18n 'announcement.announcement',:icon_class=>"icons-megaphone" available_for [:admin,:guest,:manager,:sub_manager] active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']}) active_for_object_auth ['BulletinCategory'] diff --git a/vendor/built_in_modules/archive/config/locales/en.yml b/vendor/built_in_modules/archive/config/locales/en.yml index 4fcaafe7..27ba2c9f 100644 --- a/vendor/built_in_modules/archive/config/locales/en.yml +++ b/vendor/built_in_modules/archive/config/locales/en.yml @@ -4,7 +4,9 @@ en: _locale: English - + archive: + all: All + archive: Archive add: Add back: Back create: Create diff --git a/vendor/built_in_modules/archive/config/locales/zh_tw.yml b/vendor/built_in_modules/archive/config/locales/zh_tw.yml index c2790d32..d110eaf1 100644 --- a/vendor/built_in_modules/archive/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/archive/config/locales/zh_tw.yml @@ -2,6 +2,8 @@ zh_tw: _locale: 中文 archive: + archive: 檔案室 + all: 全部檔案 widget: archive_files: 檔案室Wiget add: 新增 diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb index 53d57479..b29fe2ca 100644 --- a/vendor/built_in_modules/archive/init.rb +++ b/vendor/built_in_modules/archive/init.rb @@ -1,9 +1,9 @@ module Archive OrbitApp.registration "Archive",:type=> 'ModuleApp' do - module_label 'miss_module_i18n.archive' + module_label 'archive.archive' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'miss_plugin_i18n.archive' + personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive' # ======= # personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'admin.archive' # >>>>>>> 858e942da234fffa3053a995231f2b0d9eee43d1 @@ -33,14 +33,14 @@ module Archive end side_bar do - head_label_i18n 'miss_module_i18n.archive',:icon_class=>"icons-archive" + head_label_i18n 'archive.archive',:icon_class=>"icons-archive" available_for [:admin,:guest,:manager,:sub_manager] active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']}) active_for_object_auth ['BulletinCategory'] head_link_path "panel_archive_back_end_archive_files_path" - context_link 'miss_module_i18n._archive.all', + context_link 'archive.all', :link_path=>"panel_archive_back_end_archive_files_path" , :priority=>1, :active_for_action=>{:archive_files=>:index}, diff --git a/vendor/built_in_modules/calendar/config/locales/en.yml b/vendor/built_in_modules/calendar/config/locales/en.yml index 32396ad2..6e645481 100644 --- a/vendor/built_in_modules/calendar/config/locales/en.yml +++ b/vendor/built_in_modules/calendar/config/locales/en.yml @@ -1,5 +1,6 @@ en: calendar: + calendar_: Calendar calendar: Calendar calendars: Calendars color: Color diff --git a/vendor/built_in_modules/gallery/init.rb b/vendor/built_in_modules/gallery/init.rb index 615d6593..d71b8af5 100644 --- a/vendor/built_in_modules/gallery/init.rb +++ b/vendor/built_in_modules/gallery/init.rb @@ -1,6 +1,6 @@ module Gallery OrbitApp.registration "Gallery",:type=> 'ModuleApp' do - module_label 'miss_module_i18n.gallery' + module_label 'gallery.gallery' base_url File.expand_path File.dirname(__FILE__) # personal_plugin :enable => true,:path=>"panel/gallery/plugin/profile",:i18n=>'admin.gallery' @@ -41,7 +41,7 @@ module Gallery end side_bar do - head_label_i18n 'miss_module_i18n.gallery',:icon_class=>"icons-pictures" + head_label_i18n 'gallery.gallery',:icon_class=>"icons-pictures" available_for [:admin,:guest,:manager,:sub_manager] active_for_controllers ({:private=>['albums','album_images','gallery_categories','/panel/gallery/back_end/tags']}) active_for_object_auth ['BulletinCategory'] diff --git a/vendor/built_in_modules/location/config/locales/en.yml b/vendor/built_in_modules/location/config/locales/en.yml new file mode 100644 index 00000000..5f7ec8ea --- /dev/null +++ b/vendor/built_in_modules/location/config/locales/en.yml @@ -0,0 +1,3 @@ +en: + location: + location: Location \ No newline at end of file diff --git a/vendor/built_in_modules/location/config/locales/zh_tw.yml b/vendor/built_in_modules/location/config/locales/zh_tw.yml new file mode 100644 index 00000000..ce53ff5b --- /dev/null +++ b/vendor/built_in_modules/location/config/locales/zh_tw.yml @@ -0,0 +1,3 @@ +zh_tw: + location: + location: 地標 \ No newline at end of file diff --git a/vendor/built_in_modules/location/init.rb b/vendor/built_in_modules/location/init.rb index 021ddcc1..566bf5c1 100644 --- a/vendor/built_in_modules/location/init.rb +++ b/vendor/built_in_modules/location/init.rb @@ -1,6 +1,6 @@ module Location OrbitApp.registration "Location",:type=> 'ModuleApp' do - module_label 'miss_module_i18n.location' + module_label 'location.location' base_url File.expand_path File.dirname(__FILE__) # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' @@ -32,7 +32,7 @@ module Location # end side_bar do - head_label_i18n 'miss_module_i18n.location',:icon_class=>"icons-location" + head_label_i18n 'location.location',:icon_class=>"icons-location" available_for [:admin,:guest,:manager,:sub_manager] active_for_controllers ({:private=>['locations']}) diff --git a/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml b/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml index 3b727355..664dc7c9 100644 --- a/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/miss_module/config/locales/zh_tw.yml @@ -1,13 +1,6 @@ zh_tw: miss_module_i18n: - archive: 檔案室 - _archive: - all: 全部檔案 - calendars: 日曆 - gallery: 相簿 - location: 地標 - ad_banner: 廣告輪播 miss_plugin_i18n: personal_book: Personal Book @@ -19,5 +12,5 @@ zh_tw: personal_patent: Personal Patent personal_project: Personal Project personal_research: Personal Research - personal_seminar: Personal Seminar + personal_conference: Personal Conference