refinerycms-core 0.9.9.8 → 0.9.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,27 +4,29 @@
4
4
  hide_children = RefinerySetting.find_or_set(:menu_hide_children, false) if hide_children.nil?
5
5
  # Select top menu items unless 'roots' is supplied.
6
6
  collection ||= @menu_pages.includes(:slugs)
7
- if (roots ||= collection.select{|p| p.parent_id.nil?}).present?
8
- # In order to match items that aren't shown in menu and highlight their associations.
9
- # This can be supplied if the logic is different in your case.
10
- unless defined?(selected_item)
11
- selected_item = collection.detect{|page| selected_page?(page)}
12
- selected_item = @page if selected_item.nil?
13
- end
14
- sibling_count = roots.length - 1
15
- -%>
16
- <nav id='<%= dom_id %>' class='<%= %W(#{css} clearfix).join(' ') %>'>
17
- <ul>
18
- <%= render :partial => "/shared/menu_branch",
19
- :collection => roots,
20
- :locals => {
21
- :hide_children => hide_children,
22
- :sibling_count => sibling_count,
23
- :collection => collection,
24
- :selected_item => selected_item,
25
- :apply_css => true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed.
26
- }
27
- -%>
28
- </ul>
29
- </nav>
7
+ caching = ((defined?(cache_menu) && cache_menu) || RefinerySetting.find_or_set(:cache_menu, false)) && File.writable?(Rails.cache.cache_path)
8
+ cache_if(caching, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, request.path].join('_')) do
9
+ if (roots ||= collection.select{|p| p.parent_id.nil?}).present?
10
+ # In order to match items that aren't shown in menu and highlight their associations.
11
+ # This can be supplied if the logic is different in your case.
12
+ unless defined?(selected_item)
13
+ selected_item = collection.detect{|page| selected_page?(page)}
14
+ selected_item = @page if selected_item.nil?
15
+ end
16
+ -%>
17
+ <nav id='<%= dom_id %>' class='<%= %W(#{css} clearfix).join(' ') %>'>
18
+ <ul>
19
+ <%= render :partial => "/shared/menu_branch",
20
+ :collection => roots,
21
+ :locals => {
22
+ :hide_children => hide_children,
23
+ :sibling_count => (roots.length - 1),
24
+ :collection => collection,
25
+ :selected_item => selected_item,
26
+ :apply_css => true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed.
27
+ }
28
+ -%>
29
+ </ul>
30
+ </nav>
31
+ <% end -%>
30
32
  <% end -%>
@@ -5,7 +5,11 @@
5
5
  dom_id = ("id='item_#{menu_branch_counter}'" if menu_branch.parent_id.nil? and menu_branch.title.present?)
6
6
 
7
7
  hide_children = (defined?(hide_children) && hide_children)
8
- children = (hide_children || !menu_branch.has_descendants?) ? [] : collection.select { |p| p.parent_id == menu_branch.id }
8
+ children = if (hide_children || !menu_branch.has_descendants?)
9
+ []
10
+ else
11
+ collection.select { |p| p.parent_id == menu_branch.id }
12
+ end
9
13
  -%>
10
14
  <li<%= ['', css, dom_id].compact.join(' ').gsub(/\ *$/, '') %>>
11
15
  <%= link_to menu_branch.title, menu_branch.url -%>
@@ -18,7 +18,8 @@
18
18
  <%= RefinerySetting.find_or_set(:site_name, 'Company Name') %>
19
19
  </span>
20
20
 
21
- <%= link_to t('.log_out'), destroy_user_session_path, :id => 'logout' %>
21
+ <%= link_to t('.log_out', :locale => ::Refinery::I18n.current_locale),
22
+ destroy_user_session_path, :id => 'logout' %>
22
23
  </div>
23
24
  </div>
24
25
  </div>
@@ -0,0 +1,75 @@
1
+ jp:
2
+ plugins:
3
+ refinery_core:
4
+ title: Refinery
5
+ description: Refineryのコアプラグイン
6
+ refinery_dialogs:
7
+ title: ダイアログ
8
+ description: Refineryのダイアログプラグイン
9
+ welcome:
10
+ there_are_no_users: あなたを最初のユーザとして登録します。
11
+ remember_admin_location: "Refineryの管理画面は"
12
+ lets_start: それでは始めましょう。
13
+ continue: 続く…
14
+ admin:
15
+ menu:
16
+ reorder_menu: メニューを並べ替える
17
+ reorder_menu_done: 並べ替えを終了
18
+ dialogs:
19
+ show:
20
+ save: セーブ
21
+ cancel: キャンセル
22
+ refinery:
23
+ crudify:
24
+ created: '%{what} を追加しました。'
25
+ updated: '%{what}を更新しました。'
26
+ destroyed: '%{what} を削除しました。'
27
+ shared:
28
+ site_bar:
29
+ log_out: ログアウト
30
+ switch_to_your_website: サイトに移行
31
+ switch_to_your_website_editor: サイトエディタに移行
32
+ admin:
33
+ continue_editing:
34
+ save_and_continue_editing: セーブして更に更新する
35
+ form_actions:
36
+ save: セーブ
37
+ cancel: キャンセル
38
+ cancel_lose_changes: セーブされていない更新が無くなってしまいますが宜しいですか。
39
+ delete: 削除
40
+ close: 閉じる
41
+ image_picker:
42
+ none_selected: '%{what}は選択されていません。ここをクリックして追加して下さい。'
43
+ remove_current: '選択されている%{what}を削除'
44
+ change: クリックして画像を選択
45
+ show: 表示
46
+ resource_picker:
47
+ download_current: このファイルをダウンロードする
48
+ opens_in_new_window: 新しいウィンドウで開く
49
+ remove_current: このファイルを削除する
50
+ no_resource_selected: ファイルが選択されていません。ここをクリックして選択して下さい。
51
+ name: ファイルを追加
52
+ current: 選択されているファイル
53
+ search:
54
+ button_text: 検索
55
+ results_for: '「%{query}」の検索結果'
56
+ no_results: 見つかりませんでした。
57
+ delete:
58
+ message: '「%{title}」を消します。宜しいですか。'
59
+ error_messages:
60
+ problems_in_following_fields: 以下のフィールドに問題がありました。
61
+ help: ヘルプ
62
+ message:
63
+ close: 閉じる
64
+ close_this_message: このメッセージを閉じる
65
+ draft_page_message:
66
+ not_live: このページはまだ公開されていません。
67
+ footer:
68
+ copyright: '著作権© %{year} %{site_name}'
69
+ no_script:
70
+ enable_javascript: このページを快適にお使いになるにはJavaScriptを有効にする必要があります。
71
+ here_are:
72
+ instructions_enable_javascript: お使いのブラウザでJavaScriptを有効にする方法はこちら
73
+ time:
74
+ formats:
75
+ short: "%A, %d %B %Y"
@@ -31,7 +31,7 @@ module Refinery
31
31
  base.config.filter_parameters += [:password, :password_confirmation]
32
32
 
33
33
  # Specify a cache store to use
34
- base.config.cache_store = :file_store, File.join(Dir.tmpdir, base.name.to_s.gsub(':', File::SEPARATOR))
34
+ base.config.cache_store = :file_store, File.join(Dir.tmpdir, base.name.to_s.gsub(':', '-'))
35
35
 
36
36
  # Include the refinery controllers and helpers dynamically
37
37
  base.config.to_prepare do
@@ -87,7 +87,7 @@ module Refinery
87
87
 
88
88
  # get all the pages to be displayed in the site menu.
89
89
  def find_pages_for_menu
90
- @menu_pages = Page.live.in_menu.order('lft ASC')
90
+ @menu_pages = Page.in_menu.live.order('lft ASC')
91
91
  end
92
92
 
93
93
  # use a different model for the meta information.
@@ -4,13 +4,13 @@ module Refinery
4
4
 
5
5
  # Generates the link to determine where the site bar switch button returns to.
6
6
  def site_bar_switch_link
7
- link_to_if(admin?, t('.switch_to_your_website'),
7
+ link_to_if(admin?, t('.switch_to_your_website', :locale => ::Refinery::I18n.current_locale),
8
8
  (if session.keys.include?(:website_return_to) and session[:website_return_to].present?
9
9
  session[:website_return_to]
10
10
  else
11
11
  root_path(:locale => (::Refinery::I18n.default_frontend_locale if defined?(::Refinery::I18n) && ::Refinery::I18n.enabled?))
12
12
  end)) do
13
- link_to t('.switch_to_your_website_editor'),
13
+ link_to t('.switch_to_your_website_editor', :locale => ::Refinery::I18n.current_locale),
14
14
  (if session.keys.include?(:refinery_return_to) and session[:refinery_return_to].present?
15
15
  session[:refinery_return_to]
16
16
  else
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{refinerycms-core}
5
- s.version = %q{0.9.9.8}
5
+ s.version = %q{0.9.9.9}
6
6
  s.summary = %q{Core engine for Refinery CMS}
7
7
  s.description = %q{The core of Refinery CMS. This handles the common functionality and is required by most engines}
8
- s.date = %q{2011-03-11}
8
+ s.date = %q{2011-03-15}
9
9
  s.email = %q{info@refinerycms.com}
10
10
  s.homepage = %q{http://refinerycms.com}
11
11
  s.rubyforge_project = %q{refinerycms}
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
14
14
  s.require_paths = %w(lib)
15
15
  s.executables = %w()
16
16
 
17
- s.add_dependency 'refinerycms-base', '~> 0.9.9.8'
18
- s.add_dependency 'refinerycms-settings', '~> 0.9.9.8'
17
+ s.add_dependency 'refinerycms-base', '~> 0.9.9.9'
18
+ s.add_dependency 'refinerycms-settings', '~> 0.9.9.9'
19
19
  s.add_dependency 'refinerycms-generators', '~> 1.0'
20
20
  s.add_dependency 'acts_as_indexed', '~> 0.7'
21
21
  s.add_dependency 'friendly_id_globalize3', '~> 3.2.1'
@@ -87,6 +87,7 @@ Gem::Specification.new do |s|
87
87
  'config/locales/es.yml',
88
88
  'config/locales/fr.yml',
89
89
  'config/locales/it.yml',
90
+ 'config/locales/jp.yml',
90
91
  'config/locales/lolcat.yml',
91
92
  'config/locales/lt.yml',
92
93
  'config/locales/lv.yml',
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: refinerycms-core
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.9.8
5
+ version: 0.9.9.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Resolve Digital
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2011-03-11 00:00:00 +13:00
16
+ date: 2011-03-15 00:00:00 +13:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
@@ -24,7 +24,7 @@ dependencies:
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 0.9.9.8
27
+ version: 0.9.9.9
28
28
  type: :runtime
29
29
  version_requirements: *id001
30
30
  - !ruby/object:Gem::Dependency
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ~>
37
37
  - !ruby/object:Gem::Version
38
- version: 0.9.9.8
38
+ version: 0.9.9.9
39
39
  type: :runtime
40
40
  version_requirements: *id002
41
41
  - !ruby/object:Gem::Dependency
@@ -193,6 +193,7 @@ files:
193
193
  - config/locales/es.yml
194
194
  - config/locales/fr.yml
195
195
  - config/locales/it.yml
196
+ - config/locales/jp.yml
196
197
  - config/locales/lolcat.yml
197
198
  - config/locales/lt.yml
198
199
  - config/locales/lv.yml