tenon 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/tenon/features/asset_detachment.js.coffee +1 -1
  3. data/app/assets/javascripts/tenon/features/asset_uploader.js.coffee +1 -1
  4. data/app/assets/javascripts/tenon/features/modal_windows.js.coffee +0 -2
  5. data/app/assets/javascripts/tenon/features/nested_fields.js +2 -2
  6. data/app/assets/javascripts/tenon/features/new_item_version_handler.js.coffee +2 -2
  7. data/app/assets/javascripts/tenon/features/protect_changes.js.coffee +1 -1
  8. data/app/assets/javascripts/tenon/features/record_approval.js.coffee +3 -3
  9. data/app/assets/javascripts/tenon/features/record_boolean_toggle.js.coffee +1 -1
  10. data/app/assets/javascripts/tenon/features/record_list.js.coffee +3 -3
  11. data/app/assets/javascripts/tenon/features/record_list_updater.js.coffee +1 -1
  12. data/app/assets/javascripts/tenon/features/tenon_content/asset_link.js.coffee +1 -1
  13. data/app/assets/javascripts/tenon/templates/assets/asset_field.jst.eco +2 -2
  14. data/app/assets/javascripts/tenon/templates/assets/asset_row.jst.eco +2 -2
  15. data/app/assets/javascripts/tenon/templates/assets/asset_select.jst.eco +1 -1
  16. data/app/assets/javascripts/tenon/templates/contacts/contact_row.jst.eco +9 -9
  17. data/app/assets/javascripts/tenon/templates/errors.jst.eco +2 -2
  18. data/app/assets/javascripts/tenon/templates/events/event_row.jst.eco +2 -2
  19. data/app/assets/javascripts/tenon/templates/item_versions/item_version_row.jst.eco +2 -2
  20. data/app/assets/javascripts/tenon/templates/pages/page_row.jst.eco +1 -1
  21. data/app/assets/javascripts/tenon/templates/post_categories/post_category_row.jst.eco +1 -1
  22. data/app/assets/javascripts/tenon/templates/posts/post_row.jst.eco +3 -3
  23. data/app/assets/javascripts/tenon/templates/users/user_row.jst.eco +2 -2
  24. data/app/controllers/tenon/assets_controller.rb +1 -1
  25. data/app/controllers/tenon/base_controller.rb +4 -4
  26. data/app/controllers/tenon/comments_controller.rb +2 -2
  27. data/app/controllers/tenon/contacts_controller.rb +4 -4
  28. data/app/controllers/tenon/resources_controller.rb +3 -3
  29. data/app/decorators/tenon/asset_decorator.rb +3 -3
  30. data/app/decorators/tenon/comment_decorator.rb +1 -1
  31. data/app/decorators/tenon/contact_decorator.rb +2 -2
  32. data/app/decorators/tenon/event_decorator.rb +2 -2
  33. data/app/helpers/tenon/application_helper.rb +6 -0
  34. data/app/helpers/tenon/asset_helper.rb +1 -1
  35. data/app/helpers/tenon/item_version_helper.rb +5 -5
  36. data/app/helpers/tenon/tenon_content_helper.rb +1 -1
  37. data/app/helpers/tenon/tenon_helper.rb +7 -7
  38. data/app/mailers/tenon/comment_mailer.rb +1 -1
  39. data/app/mailers/tenon/contact_mailer.rb +1 -1
  40. data/app/models/tenon/asset.rb +1 -1
  41. data/app/models/tenon/page.rb +3 -3
  42. data/app/models/tenon/tenon_content/row_types.rb +17 -17
  43. data/app/views/layouts/tenon/application.html.haml +4 -0
  44. data/app/views/layouts/tenon/login.html.haml +3 -0
  45. data/app/views/tenon/assets/_form.html.haml +2 -2
  46. data/app/views/tenon/assets/_sidebar_index.html.haml +6 -6
  47. data/app/views/tenon/assets/crop.html.haml +3 -4
  48. data/app/views/tenon/assets/edit.html.haml +1 -1
  49. data/app/views/tenon/assets/index.html.haml +2 -2
  50. data/app/views/tenon/comment_mailer/comment_notification.html.haml +2 -2
  51. data/app/views/tenon/comments/_sidebar_index.html.haml +6 -6
  52. data/app/views/tenon/comments/index.html.haml +2 -2
  53. data/app/views/tenon/comments/index.json.jbuilder +1 -1
  54. data/app/views/tenon/contact_mailer/contact_notification.html.haml +4 -4
  55. data/app/views/tenon/contacts/_sidebar_index.html.haml +8 -8
  56. data/app/views/tenon/contacts/index.html.haml +2 -2
  57. data/app/views/tenon/contacts/index.json.jbuilder +4 -4
  58. data/app/views/tenon/events/_form.html.haml +7 -7
  59. data/app/views/tenon/events/edit.html.haml +1 -1
  60. data/app/views/tenon/events/index.html.haml +4 -4
  61. data/app/views/tenon/events/index.json.jbuilder +1 -1
  62. data/app/views/tenon/events/new.html.haml +1 -1
  63. data/app/views/tenon/fields/_asset.html.haml +3 -3
  64. data/app/views/tenon/galleries/_form.html.haml +7 -7
  65. data/app/views/tenon/galleries/edit.html.haml +1 -1
  66. data/app/views/tenon/galleries/index.html.haml +5 -5
  67. data/app/views/tenon/galleries/new.html.haml +1 -1
  68. data/app/views/tenon/index/index.html.haml +4 -4
  69. data/app/views/tenon/item_assets/new.html.haml +6 -6
  70. data/app/views/tenon/item_versions/_item_version.json.jbuilder +4 -4
  71. data/app/views/tenon/item_versions/index.html.haml +2 -5
  72. data/app/views/tenon/item_versions/new.html.haml +1 -1
  73. data/app/views/tenon/pages/_form.html.haml +14 -14
  74. data/app/views/tenon/pages/edit.html.haml +1 -1
  75. data/app/views/tenon/pages/index.html.haml +5 -5
  76. data/app/views/tenon/pages/index.json.jbuilder +4 -4
  77. data/app/views/tenon/pages/new.html.haml +1 -1
  78. data/app/views/tenon/post_categories/_form.html.haml +1 -1
  79. data/app/views/tenon/post_categories/_post_category.json.jbuilder +1 -1
  80. data/app/views/tenon/post_categories/index.html.haml +5 -5
  81. data/app/views/tenon/posts/_form.html.haml +14 -14
  82. data/app/views/tenon/posts/edit.html.haml +1 -1
  83. data/app/views/tenon/posts/index.html.haml +6 -6
  84. data/app/views/tenon/posts/index.json.jbuilder +2 -2
  85. data/app/views/tenon/posts/new.html.haml +1 -1
  86. data/app/views/tenon/redirects/_form.html.haml +10 -10
  87. data/app/views/tenon/redirects/_redirect.json.jbuilder +1 -1
  88. data/app/views/tenon/redirects/edit.html.haml +1 -1
  89. data/app/views/tenon/redirects/index.html.haml +8 -8
  90. data/app/views/tenon/redirects/new.html.haml +1 -1
  91. data/app/views/tenon/settings/_contact.html.haml +8 -8
  92. data/app/views/tenon/settings/_general.html.haml +4 -4
  93. data/app/views/tenon/settings/_seo.html.haml +4 -4
  94. data/app/views/tenon/settings/show.html.haml +9 -9
  95. data/app/views/tenon/shared/_i18n_language_nav.html.haml +3 -3
  96. data/app/views/tenon/shared/_main_nav.html.haml +11 -11
  97. data/app/views/tenon/shared/_posts_nav.html.haml +3 -3
  98. data/app/views/tenon/shared/_seo_fields.html.haml +3 -3
  99. data/app/views/tenon/shared/_util_nav.html.haml +2 -2
  100. data/app/views/tenon/shared/_version_warning.html.haml +5 -6
  101. data/app/views/tenon/shared/menu_items/_comments.html.haml +1 -1
  102. data/app/views/tenon/shared/menu_items/_events.html.haml +2 -2
  103. data/app/views/tenon/shared/menu_items/_galleries.html.haml +2 -2
  104. data/app/views/tenon/shared/menu_items/_pages.html.haml +2 -2
  105. data/app/views/tenon/shared/menu_items/_posts.html.haml +2 -2
  106. data/app/views/tenon/shared/section_header/_quick_search.html.haml +1 -1
  107. data/app/views/tenon/tenon_callouts/_form.html.haml +7 -9
  108. data/app/views/tenon/tenon_callouts/edit.html.haml +1 -1
  109. data/app/views/tenon/tenon_callouts/index.html.haml +5 -5
  110. data/app/views/tenon/tenon_callouts/new.html.haml +1 -1
  111. data/app/views/tenon/tenon_content/_builder.html.haml +2 -2
  112. data/app/views/tenon/tenon_content/_display.html.haml +3 -3
  113. data/app/views/tenon/tenon_content/_embed_modal.html.haml +3 -3
  114. data/app/views/tenon/tenon_content/_fields.html.haml +9 -10
  115. data/app/views/tenon/tenon_content/_row.html.haml +4 -4
  116. data/app/views/tenon/tenon_content/piece_types/form/_background_image.html.haml +6 -6
  117. data/app/views/tenon/tenon_content/piece_types/form/_embedded_content.html.haml +1 -2
  118. data/app/views/tenon/tenon_content/piece_types/form/_image.html.haml +17 -17
  119. data/app/views/tenon/users/_form.html.haml +11 -11
  120. data/app/views/tenon/users/edit.html.haml +1 -1
  121. data/app/views/tenon/users/index.html.haml +5 -5
  122. data/app/views/tenon/users/index.json.jbuilder +3 -3
  123. data/app/views/tenon/users/new.html.haml +1 -1
  124. data/config/locales/tenon.en.yml +313 -0
  125. data/lib/tenon/version.rb +1 -1
  126. metadata +4 -4
  127. data/app/models/tenon/thinger.rb +0 -4
@@ -7,7 +7,7 @@ module Tenon
7
7
  @contact = contact
8
8
  mail(
9
9
  to: Tenon::MySettings.contact_email,
10
- subject: "#{Tenon::MySettings.site_name} - New Contact Request",
10
+ subject: "#{Tenon::MySettings.site_name} - #{I18n.t('tenon.contact_mailer.new_contact_request')}",
11
11
  from: @contact.email
12
12
  )
13
13
  end
@@ -50,7 +50,7 @@ module Tenon
50
50
 
51
51
  def check_attached_items
52
52
  unless item_assets.count == 0
53
- errors.add(:base, "This asset has been attached to items in your site and can't be deleted.")
53
+ errors.add(:base, t('tenon.assets.in_use'))
54
54
  return false
55
55
  end
56
56
  end
@@ -22,7 +22,7 @@ module Tenon
22
22
  before_validation :set_slug_and_path
23
23
  after_move :set_slug_and_path
24
24
  validates_presence_of :title
25
- validates_presence_of :slug, message: 'must exist in order to have a properly generated URL.'
25
+ validates_presence_of :slug, message: I18n.t('tenon.pages.must_exist_in_order_to_have')
26
26
  validates_uniqueness_of :slug, scope: :parent_id
27
27
  validate :path_is_not_route
28
28
  validate :parent_is_not_in_tree
@@ -81,7 +81,7 @@ module Tenon
81
81
 
82
82
  def path_is_not_route
83
83
  match = Rails.application.routes.recognize_path(path, method: :get) rescue nil
84
- errors.add(:base, "There's already something happening at #{MySettings.site_url}#{path}. Try giving the page a different name.") if match && !match[:slugs]
84
+ errors.add(:base, I18n.t('tenon.pages.theres_already_something_happening', path: "#{MySettings.site_url}#{path}")) if match && !match[:slugs]
85
85
  end
86
86
 
87
87
  def set_slug_and_path
@@ -97,7 +97,7 @@ module Tenon
97
97
 
98
98
  def parent_is_not_in_tree
99
99
  if id && [id, descendants.map(&:id)].flatten.include?(parent_id)
100
- msg = 'cannot be itself or one of its subpages.'
100
+ msg = I18n.t('tenon.pages.cannot_be_itself_or_one_of_its_subpages')
101
101
  errors.add(:parent_id, msg)
102
102
  end
103
103
  end
@@ -2,23 +2,23 @@ module Tenon
2
2
  module TenonContent
3
3
  module RowTypes
4
4
  LIBRARY_ROW_TYPES = {
5
- 'One Column of Text' => 'FullWidthText',
6
- 'One Column Image' => 'FullWidthImage',
7
- 'Two Columns of Text' => 'TwoColumnText',
8
- 'Two Images' => 'TwoColumnImage',
9
- 'Three Columns of Text' => 'ThreeColumnText',
10
- 'Three Images' => 'ThreeColumnImage',
11
- 'Four Columns of Text' => 'FourColumnText',
12
- 'Four Images' => 'FourColumnImage',
13
- 'Wrapped Image with Text' => 'LeftWrappedImageWithText',
14
- 'Six Images' => 'SixColumnImage',
15
- 'Embedded Content' => 'FullWidthEmbeddedContent',
16
- 'Image and Text (No Wrap)' => 'LeftImageRightText',
17
- 'Two Column Image and Text' => 'TwoColumnImageAndText',
18
- 'Three Column Image and Text' => 'ThreeColumnImageAndText',
19
- 'Four Column Image and Text' => 'FourColumnImageAndText',
20
- 'Six Column Image and Text' => 'SixColumnImageAndText',
21
- 'Two Columns with Background Image' => 'TwoColumnWithBackgroundImage'
5
+ I18n.t('tenon.row_types.one_column_of_text') => 'FullWidthText',
6
+ I18n.t('tenon.row_types.one_column_image') => 'FullWidthImage',
7
+ I18n.t('tenon.row_types.two_columns_of_text') => 'TwoColumnText',
8
+ I18n.t('tenon.row_types.two_images') => 'TwoColumnImage',
9
+ I18n.t('tenon.row_types.three_columns_of_text') => 'ThreeColumnText',
10
+ I18n.t('tenon.row_types.three_images') => 'ThreeColumnImage',
11
+ I18n.t('tenon.row_types.four_columns_of_text') => 'FourColumnText',
12
+ I18n.t('tenon.row_types.four_images') => 'FourColumnImage',
13
+ I18n.t('tenon.row_types.wrapped_image_with_text') => 'LeftWrappedImageWithText',
14
+ I18n.t('tenon.row_types.six_images') => 'SixColumnImage',
15
+ I18n.t('tenon.row_types.embedded_content') => 'FullWidthEmbeddedContent',
16
+ I18n.t('tenon.row_types.image_and_text_no_wrap') => 'LeftImageRightText',
17
+ I18n.t('tenon.row_types.two_column_image_and_text') => 'TwoColumnImageAndText',
18
+ I18n.t('tenon.row_types.three_column_image_and_text') => 'ThreeColumnImageAndText',
19
+ I18n.t('tenon.row_types.four_column_image_and_text') => 'FourColumnImageAndText',
20
+ I18n.t('tenon.row_types.six_column_image_and_text') => 'SixColumnImageAndText',
21
+ I18n.t('tenon.row_types.two_columns_with_background_image') => 'TwoColumnWithBackgroundImage'
22
22
  }
23
23
  end
24
24
  end
@@ -13,6 +13,10 @@
13
13
  = javascript_include_tag '/ckeditor/ckeditor'
14
14
  = javascript_include_tag 'tenon/tenon_manifest'
15
15
 
16
+ :javascript
17
+ window.I18n = #{current_translations.to_json.html_safe}
18
+
19
+
16
20
  %body{data: { controller: params[:controller], action: params[:action] }, class: ('menu-open' if content_for?(:sidebar))}
17
21
  = render 'tenon/shared/util_nav'
18
22
  = render 'tenon/shared/main_nav'
@@ -12,5 +12,8 @@
12
12
  = stylesheet_link_tag 'tenon/tenon', '//fonts.googleapis.com/css?family=Open+Sans:400,700'
13
13
  = javascript_include_tag 'tenon/tenon_manifest'
14
14
 
15
+ :javascript
16
+ window.I18n = #{current_translations.to_json.html_safe}
17
+
15
18
  %body{data: { controller: params[:controller], action: params[:action] }, class: ('menu-open' if content_for?(:sidebar))}
16
19
  .tenon-login= yield
@@ -4,12 +4,12 @@
4
4
  = error_messages_for :asset
5
5
  .fields.full
6
6
  .form-group.full
7
- = f.text_field :title, placeholder: '--', explanation: "Enter a title for your asset. You can leave this blank to just use the file name as the title. #{defined?(multiple) ? 'If you upload multiple assets a numerical series will be created.' : '' }"
7
+ = f.text_field :title, placeholder: '--', explanation: "#{t('tenon.assets.enter_a_title_for_your_asset')} #{defined?(multiple) ? t('tenon.assets.multiple_assets') : '' }"
8
8
 
9
9
  .form-group
10
10
  .browse-button-holder
11
11
  .fileupload.btn.btn-comp.browse
12
- %span#choose-files= defined?(multiple) ? 'Choose Files' : 'Choose File'
12
+ %span#choose-files= defined?(multiple) ? t('tenon.assets.choose_file') : t('tenon.assets.choose_files')
13
13
  %input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
14
14
 
15
15
  .spacer
@@ -2,17 +2,17 @@
2
2
  #new-asset{:style => "display: none;"}= render "form", multiple: true
3
3
  .sidebar
4
4
  .content
5
- %h2 Asset Library
6
- = link_to "Upload New", '#', class: 'btn btn-primary btn-block', data: {'modal-target' => '#new-asset', 'modal-title' => 'Upload Assets', 'keyboard' => 'false' }
5
+ %h2= t('tenon.assets.asset_library')
6
+ = link_to t('tenon.assets.upload_new'), '#', class: 'btn btn-primary btn-block', data: {'modal-target' => '#new-asset', 'modal-title' => t('tenon.assets.upload_assets'), 'keyboard' => 'false' }
7
7
 
8
- %h4 File Types
8
+ %h4= t('tenon.assets.file_types')
9
9
  %nav.list-toggles
10
10
  %ul
11
11
  %li
12
- = link_to 'All Assets', assets_path, :class => 'record-list-updater', 'data-clear-record-list-params' => true
12
+ = link_to t('tenon.assets.all_assets'), assets_path, :class => 'record-list-updater', 'data-clear-record-list-params' => true
13
13
 
14
14
  %li
15
- = link_to 'Images', '?type=images', class: 'record-list-updater'
15
+ = link_to t('tenon.assets.images'), '?type=images', class: 'record-list-updater'
16
16
 
17
17
  %li
18
- = link_to 'Documents', '?type=documents', class: 'record-list-updater'
18
+ = link_to t('tenon.assets.documents'), '?type=documents', class: 'record-list-updater'
@@ -3,8 +3,7 @@
3
3
  .preview
4
4
  .modal-header
5
5
  %button{ type: 'button', class: 'close', data: { dismiss: 'modal' }, :'aria-hidden' => 'true' } ×
6
- %h4#myModalLabel{ class: 'modal-title'}
7
- Crop
6
+ %h4#myModalLabel{ class: 'modal-title'}= t('tenon.assets.crop')
8
7
  .image-holder= image_tag(@asset.attachment.url, id: 'cropbox', data: { width: @asset.dimensions(:original)[0], height: @asset.dimensions(:original)[1] })
9
8
  .spinner= fa_icon('spinner spin')
10
9
 
@@ -13,5 +12,5 @@
13
12
  = f.hidden_field field
14
13
  .crop_buttons.right.full
15
14
  = f.check_box :duplicate, checked: true, class: 'tn-checkbox-right'
16
- = f.label :duplicate, "Create New Asset From Crop?", class: 'left'
17
- .right= f.submit "Save", class: 'save btn btn-comp', data: { disable_with: "Please wait..." }
15
+ = f.label :duplicate, t('tenon.assets.create_new_asset_from_crop'), class: 'left'
16
+ .right= f.submit t('tenon.common.save'), class: 'save btn btn-comp', data: { disable_with: t('tenon.common.please_wait') }
@@ -9,4 +9,4 @@
9
9
  .spacer
10
10
 
11
11
  .modal-footer
12
- = f.submit "Save", class: 'btn btn-comp', data: { disable_with: "Please wait..." }
12
+ = f.submit t('tenon.common.save'), class: 'btn btn-comp', data: { disable_with: t('tenon.common.please_wait') }
@@ -1,7 +1,7 @@
1
1
  = render "sidebar_index"
2
2
 
3
3
  %header
4
- %h1 Asset Library
4
+ %h1= t('tenon.assets.asset_library')
5
5
 
6
6
  .tools
7
7
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -16,4 +16,4 @@
16
16
  .main-content
17
17
  %ul#assets.record-grid{data: {role: 'records-list', records: {url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset'}}}
18
18
 
19
- = link_to "Load More Assets", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#assets'
19
+ = link_to t('tenon.assets.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#assets'
@@ -1,7 +1,7 @@
1
1
  %p
2
- A new comment has been added to
2
+ = t('tenon.comment_mailer.a_new_comment_has_been_added')
3
3
  = link_to @post.title, post_url(@post, host: Tenon::MySettings.full_url)
4
4
 
5
5
  %p{:style => "text-align:center"} --
6
6
 
7
- %p= simple_format(@comment.content)
7
+ %p= simple_format(@comment.content)
@@ -1,22 +1,22 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Comments
4
+ %h2= t('tenon.comments.comments')
5
5
 
6
- %h4 Filter
6
+ %h4= t('tenon.common.filter')
7
7
  %nav.list-toggles
8
8
  %ul
9
9
  %li
10
10
  = link_to(comments_path, :class => 'record-list-updater', 'data-clear-record-list-params' => true) do
11
- All
11
+ = t('tenon.common.all')
12
12
  %span.count= @counts[:all]
13
13
 
14
14
  %li
15
15
  = link_to(url_for(type: 'unapproved'), class: 'record-list-updater') do
16
- Unapproved
16
+ = t('tenon.common.unapproved')
17
17
  %span.count= @counts[:unapproved]
18
18
 
19
19
  %li
20
20
  = link_to(url_for(type: 'approved'), class: 'record-list-updater') do
21
- Approved
22
- %span.count= @counts[:approved]
21
+ = t('tenon.common.approved')
22
+ %span.count= @counts[:approved]
@@ -1,7 +1,7 @@
1
1
  = render "sidebar_index"
2
2
 
3
3
  %header
4
- %h1 Comments
4
+ %h1= t('tenon.comments.comments')
5
5
 
6
6
  .tools
7
7
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -16,4 +16,4 @@
16
16
  .main-content
17
17
  %ul#comments.record-list.with-thumbnail{data: {records: {url: comments_path(format: 'json'), template: 'tenon/templates/comments/comment_row', name: 'comment'}}}
18
18
 
19
- = link_to "Load More Comments", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#comments'
19
+ = link_to t('tenon.comments.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#comments'
@@ -9,7 +9,7 @@ json.records do
9
9
  json.commentable_link comment.commentable.title
10
10
  end
11
11
 
12
- json.read_link action_link("Read", '#', 'eye', 'data-modal-target' => "#comment-#{comment.id}", 'data-modal-title' => 'Read Comment')
12
+ json.read_link action_link(t('tenon.comments.read'), '#', 'eye', 'data-modal-target' => "#comment-#{comment.id}", 'data-modal-title' => t('tenon.comments.read_comment'))
13
13
  json.approval_link toggle_link(comment, 'approved', toggle_approved_comment_path(comment), ['thumbs-up', 'Approved'], ['thumbs-down', 'Not Approved'])
14
14
  json.delete_link delete_link(comment)
15
15
  end
@@ -1,15 +1,15 @@
1
1
  %p
2
- A new contact request has been recieved.
3
- Reply to this email to get in touch with the person who sent it.
2
+ = t('tenon.contact_mailer.new_contact_request_received')
3
+ = t('tenon.contact_mailer.reply_to_this_email')
4
4
 
5
5
  %p{:style => "text-align:center"} --
6
6
 
7
7
  %p
8
- %strong From:
8
+ %strong #{t('tenon.contact_mailer.from')}:
9
9
  = @contact.name
10
10
 
11
11
  %p
12
- %strong Email:
12
+ %strong #{t('tenon.contact_mailer.email')}:
13
13
  = @contact.email
14
14
 
15
15
  = simple_format(@contact.content)
@@ -1,32 +1,32 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Contacts
4
+ %h2= t('tenon.contacts.contacts')
5
5
 
6
- %h4 Filter
6
+ %h4= t('tenon.common.filter')
7
7
  %nav.list-toggles
8
8
  %ul
9
9
  %li
10
10
  = link_to(contacts_path, :class => 'record-list-updater', 'data-clear-record-list-params' => true) do
11
- All
11
+ = t('tenon.common.all')
12
12
  %span.count= @counts[:all]
13
13
 
14
14
  %li
15
15
  = link_to(url_for(type: 'unread'), class: 'record-list-updater') do
16
- Unread
16
+ = t('tenon.contacts.unread')
17
17
  %span.count= @counts[:unread]
18
18
 
19
19
  %li
20
20
  = link_to(url_for(type: 'read'), class: 'record-list-updater') do
21
- Read
21
+ = t('tenon.contacts.read')
22
22
  %span.count= @counts[:read]
23
23
 
24
24
  %li
25
25
  = link_to(url_for(type: 'unreplied'), class: 'record-list-updater') do
26
- Awaiting reply
26
+ = t('tenon.contacts.awaiting_reply')
27
27
  %span.count= @counts[:unreplied]
28
28
 
29
29
  %li
30
30
  = link_to(url_for(type: 'replied'), class: 'record-list-updater') do
31
- Replied
32
- %span.count= @counts[:replied]
31
+ = t('tenon.contacts.replied')
32
+ %span.count= @counts[:replied]
@@ -1,7 +1,7 @@
1
1
  = render "sidebar_index"
2
2
 
3
3
  %header
4
- %h1 Contacts
4
+ %h1= t('tenon.contacts.contacts')
5
5
 
6
6
  .tools
7
7
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -16,4 +16,4 @@
16
16
  .main-content
17
17
  %ul#contacts.record-list{data: {records: {url: contacts_path(format: 'json'), template: 'tenon/templates/contacts/contact_row', name: 'contact'}}}
18
18
 
19
- = link_to "Load More Contacts", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#contacts'
19
+ = link_to t('tenon.contacts.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#contacts'
@@ -1,9 +1,9 @@
1
1
  json.records do
2
2
  json.array!(@contacts) do |contact|
3
3
  json.extract!(contact, :id, :name, :email, :phone, :content, :sent_date, :user_ip, :user_agent, :referrer)
4
- json.display_link action_link("View Contact Details", '#', 'eye', 'data-modal-target' => "#contact-#{contact.id}", 'data-modal-title' => 'Contact Details')
5
- json.read_link toggle_link(contact, 'read', toggle_read_contact_path(contact), ['folder-open-o', 'Mark as Unread'], ['folder-o', 'Mark as Read'])
6
- json.reply_link toggle_link(contact, 'replied', toggle_replied_contact_path(contact), ['check', 'Mark as Pending'], ['reply', 'Mark as Replied'])
4
+ json.display_link action_link(t('tenon.contacts.view_contact_details'), '#', 'eye', 'data-modal-target' => "#contact-#{contact.id}", 'data-modal-title' => t('tenon.contacts.contact_details'))
5
+ json.read_link toggle_link(contact, 'read', toggle_read_contact_path(contact), ['folder-open-o', t('tenon.contacts.mark_as_unread')], ['folder-o', t('tenon.contacts.mark_as_read')])
6
+ json.reply_link toggle_link(contact, 'replied', toggle_replied_contact_path(contact), ['check', t('tenon.contacts.mark_as_pending')], ['reply', t('tenon.contacts.mark_as_replied')])
7
7
  json.delete_link delete_link(contact)
8
8
  end
9
9
  end
@@ -12,4 +12,4 @@ json.pagination do
12
12
  json.currentPage @contacts.current_page
13
13
  json.totalPages @contacts.total_pages
14
14
  json.totalEntries @contacts.total_entries
15
- end
15
+ end
@@ -1,8 +1,8 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Events
5
- = link_to "New Event", new_event_path, class: 'btn btn-block btn-primary'
4
+ %h2= t('tenon.events.events')
5
+ = link_to t('tenon.events.new_event'), new_event_path, class: 'btn btn-block btn-primary'
6
6
 
7
7
  = i18n_language_nav(:'tenon/events')
8
8
 
@@ -15,7 +15,7 @@
15
15
  = f.tenon_content :description
16
16
 
17
17
  .fields.small
18
- %h4.box-label Event Details
18
+ %h4.box-label= t('tenon.events.event_details')
19
19
  .box
20
20
  .form-group.bordered= f.text_field :location, :placeholder => '--'
21
21
  .form-group.bordered
@@ -23,14 +23,14 @@
23
23
  .form-group.bordered
24
24
  = f.text_field :ends_at, data: {behaviour: 'datetime-picker'}, placeholder: '--'
25
25
 
26
- %h4.box-label Publish Your Event
26
+ %h4.box-label= t('tenon.events.publish_your_event')
27
27
  .box
28
28
  .form-group
29
- = f.text_field :publish_at, label: "Publish Date", data: {behaviour: 'datetime-picker'}, placeholder: '--'
29
+ = f.text_field :publish_at, label: t('tenon.common.publish_date'), data: {behaviour: 'datetime-picker'}, placeholder: '--'
30
30
 
31
31
  .row.content
32
32
  - if can?(:publish, @event)
33
- %button.btn.btn-comp.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
33
+ %button.btn.btn-comp.btn-block.submit{ data: { disable_with: t('tenon.common.please_wait') } }= t('tenon.common.save')
34
34
  - if can?(:create, Tenon::ItemVersion)
35
35
  = save_draft_button(@event)
36
36
  .last-autosave
@@ -40,5 +40,5 @@
40
40
  = clear_draft_link if params[:version]
41
41
  = load_draft_link(@event)
42
42
  - if @event.persisted?
43
- = link_to "Delete", @event, :data => {:method => :delete, :confirm => "Are you sure you want to delete this?"}, :class => 'delete-link'
43
+ = link_to t('tenon.common.delete'), @event, :data => { :method => :delete, :confirm => t('tenon.common.are_you_sure') }, :class => 'delete-link'
44
44
 
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 Editing Event
2
+ %h1= t('tenon.events.editing_event')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,11 +1,11 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Events
5
- = link_to "New Event", new_event_path, class: 'btn btn-block btn-primary'
4
+ %h2= t('tenon.events.events')
5
+ = link_to t('tenon.events.new_event'), new_event_path, class: 'btn btn-block btn-primary'
6
6
 
7
7
  %header
8
- %h1 Events
8
+ %h1= t('tenon.events.events')
9
9
 
10
10
  .tools
11
11
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -20,4 +20,4 @@
20
20
  .main-content
21
21
  %ul#events.record-list{data: {role: 'records-list', records: {url: events_path(format: 'json'), template: 'tenon/templates/events/event_row', name: 'event'}}}
22
22
 
23
- = link_to "Load More Events", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#events'
23
+ = link_to t('tenon.events.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#events'
@@ -3,7 +3,7 @@ json.records do
3
3
  json.extract!(event, :id, :title, :display_date, :location, :edit_path, :edit_link, :delete_link)
4
4
 
5
5
  if event.published? && main_app.respond_to?(:event_path)
6
- json.view_link action_link("View on Site", main_app.event_path(event), "laptop")
6
+ json.view_link action_link(t('tenon.common.view_on_site'), main_app.event_path(event), "laptop")
7
7
  end
8
8
 
9
9
  end
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 Create a New Event
2
+ %h1= t('tenon.events.create_a_new_event')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -21,12 +21,12 @@
21
21
 
22
22
  .browse-button-holder{ class: ('with-remove' if opts[:remove_association]) }
23
23
  .browse-button
24
- = link_to 'Browse', new_item_asset_path, class: 'btn btn-comp browse', data: { modal_remote: true, modal_title: "Select #{field.to_s.titleize}", modal_handler: 'Tenon.features.AssetAttachment' }
24
+ = link_to t('tenon.common.browse'), new_item_asset_path, class: 'btn btn-comp browse', data: { modal_remote: true, modal_title: "#{t('tenon.fields.select')} #{field.to_s.titleize}", modal_handler: 'Tenon.features.AssetAttachment' }
25
25
  - if opts[:remove_association]
26
26
  %small
27
27
  or
28
- = link_to_remove_association "remove", f
28
+ = link_to_remove_association t('tenon.fields.remove'), f
29
29
  - else
30
30
  %small
31
31
  or
32
- = link_to "remove", '#', class: 'remove-asset', data: { confirm: 'Are you sure?' }
32
+ = link_to t('tenon.fields.remove'), '#', class: 'remove-asset', data: { confirm: t('tenon.common.are_you_sure') }
@@ -1,8 +1,8 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Galleries
5
- = link_to "New Gallery", new_gallery_path, class: 'btn btn-block btn-primary'
4
+ %h2= t('tenon.galleries.galleries')
5
+ = link_to t('tenon.galleries.new_gallery'), new_gallery_path, class: 'btn btn-block btn-primary'
6
6
 
7
7
  = error_messages_for :gallery
8
8
 
@@ -13,18 +13,18 @@
13
13
 
14
14
  .form-group
15
15
  %p
16
- = link_to_add_association "Add another photo", f, :photos, 'data-association-insertion-node' => '#photo-list', 'data-association-insertion-method' => 'append'
17
- = link_to 'Add several', new_item_asset_path(multiple: true), class: 'btn btn-comp browse', data: {'modal-remote' => true, 'modal-title' => "Select file", 'modal-handler' => 'Tenon.features.MultipleAssetAttachment', target: '.tn-tc-asset-fields' }
16
+ = link_to_add_association t('tenon.galleries.add_another_photo'), f, :photos, 'data-association-insertion-node' => '#photo-list', 'data-association-insertion-method' => 'append'
17
+ = link_to t('tenon.galleries.add_several'), new_item_asset_path(multiple: true), class: 'btn btn-comp browse', data: {'modal-remote' => true, 'modal-title' => "Select file", 'modal-handler' => 'Tenon.features.MultipleAssetAttachment', target: '.tn-tc-asset-fields' }
18
18
 
19
19
  %ul.nested-field-list.sortable#photo-list
20
20
  = f.nested_fields :photo
21
21
 
22
22
  .fields.small
23
- %h4.box-label Publish
23
+ %h4.box-label= t('tenon.common.publish')
24
24
  .box
25
25
  .content
26
26
  - if can?(:publish, @gallery)
27
- = f.submit 'Save', class: 'btn btn-block btn-comp', data: { disable_with: "Please wait..." }
27
+ = f.submit t('tenon.common.save'), class: 'btn btn-block btn-comp', data: { disable_with: t('tenon.common.please_wait') }
28
28
 
29
29
  - if can?(:create, Tenon::ItemVersion)
30
30
  = save_draft_button(@gallery)
@@ -35,4 +35,4 @@
35
35
  = clear_draft_link if params[:version]
36
36
  = load_draft_link(@gallery)
37
37
  - if @gallery.persisted?
38
- = link_to "Delete", @gallery, :data => {:method => :delete, :confirm => "Are you sure you want to delete this?"}, :class => 'delete-link'
38
+ = link_to t('tenon.common.delete'), @gallery, :data => { :method => :delete, :confirm => t('tenon.common.are_you_sure') }, :class => 'delete-link'
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 New Gallery
2
+ %h1= t('tenon.galleries.new_gallery')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,10 +1,10 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Galleries
5
- = link_to "New Gallery", new_gallery_path, class: 'btn btn-block btn-primary'
4
+ %h2= t('tenon.galleries.galleries')
5
+ = link_to t('tenon.galleries.new_gallery'), new_gallery_path, class: 'btn btn-block btn-primary'
6
6
  %header
7
- %h1 Galleries
7
+ %h1= t('tenon.galleries.galleries')
8
8
 
9
9
  .tools
10
10
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -17,6 +17,6 @@
17
17
  = render "tenon/shared/section_header/quick_search", record_list: '#galleries'
18
18
 
19
19
  .main-content
20
- %ul#galleries.record-list{data: {records: {url: galleries_path(format: 'json'), template: 'tenon/templates/galleries/gallery_row', name: 'gallery'}}}
20
+ %ul#galleries.record-list{ data: { records: { url: galleries_path(format: 'json'), template: 'tenon/templates/galleries/gallery_row', name: 'gallery' } } }
21
21
 
22
- = link_to "Load More Galleries", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#galleries'
22
+ = link_to t('tenon.galleries.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#galleries'
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 New Gallery
2
+ %h1= t('tenon.galleries.new_gallery')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,22 +1,22 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Notifications
4
+ %h2= t('tenon.index.notifications')
5
5
  - unless @warnings.empty?
6
- %h3 Some items need your attention!
6
+ %h3= t('tenon.index.some_items_need_your_attention')
7
7
 
8
8
  - @warnings.each do |warning|
9
9
  .notification= warning
10
10
 
11
11
  %header
12
- %h1 Welcome to Tenon
12
+ %h1= t('tenon.index.welcome_to_tenon')
13
13
 
14
14
  .tools
15
15
  = render "tenon/shared/section_header/sidebar_toggle"
16
16
 
17
17
  .main-content
18
18
  #dashboard-callouts.container
19
- // change the count to test various quantities of callouts - eimaj
19
+ - # change the count to test various quantities of callouts - eimaj
20
20
  - @tenon_callouts.each do |callout|
21
21
  .callout
22
22
  %h4.title
@@ -1,7 +1,7 @@
1
1
  .modal-tab-pane.tab-content
2
2
  - unless params[:hide_upload]
3
3
  #upload-asset
4
- %h5 From Your Computer
4
+ %h5= t('tenon.assets.from_your_computer')
5
5
  #progress
6
6
  = form_for Tenon::Asset.new, format: 'json', builder: Tenon::FormBuilder do |f|
7
7
  = error_messages_for :asset
@@ -9,16 +9,16 @@
9
9
  .form-group
10
10
  .browse-button-holder.solo
11
11
  .fileupload.btn.btn-comp.browse
12
- %span#choose-files Browse
12
+ %span#choose-files= t('tenon.common.browse')
13
13
  %input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
14
14
  .spacer
15
15
 
16
16
  #pick-asset
17
- %h5 From the Asset Library
17
+ %h5= t('tenon.assets.from_the_asset_library')
18
18
 
19
- .filter= text_field_tag :q, '', id: 'quick-search', class: 'filter search', placeholder: 'Filter Assets', data: { 'record-list' => '.asset-list' }
19
+ .filter= text_field_tag :q, '', id: 'quick-search', class: 'filter search', placeholder: t('tenon.assets.filter_assets'), data: { 'record-list' => '.asset-list' }
20
20
 
21
21
  .asset-list-scroller
22
- %ul#modal-asset-list.asset-list.record-grid.infinite-scroll{data: {records: {url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset'}}}
22
+ %ul#modal-asset-list.asset-list.record-grid.infinite-scroll{ data: { records: { url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset' } } }
23
23
 
24
- = link_to "Load More Assets", '#', :class => 'infinite-loader', 'data-record-list' => '#modal-asset-list'
24
+ = link_to t('tenon.assets.load_more'), '#', :class => 'infinite-loader', 'data-record-list' => '#modal-asset-list'