locomotivecms 3.0.0.rc1 → 3.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -3
  3. data/README.md +7 -1
  4. data/app/api/locomotive/api/entities/content_type_entity.rb +4 -1
  5. data/app/api/locomotive/api/forms/base_form.rb +4 -2
  6. data/app/api/locomotive/api/forms/content_type_form.rb +1 -0
  7. data/app/api/locomotive/api/forms/theme_asset_form.rb +1 -1
  8. data/app/api/locomotive/api/resources/content_type_resource.rb +4 -2
  9. data/app/assets/javascripts/locomotive/views/inputs/array_view.js.coffee +1 -0
  10. data/app/controllers/locomotive/current_site_controller.rb +8 -0
  11. data/app/helpers/locomotive/editable_elements_helper.rb +2 -2
  12. data/app/helpers/locomotive/errors_helper.rb +7 -3
  13. data/app/helpers/locomotive/pages_helper.rb +2 -2
  14. data/app/helpers/locomotive/shared/accounts_helper.rb +1 -1
  15. data/app/inputs/locomotive/api_key_input.rb +2 -2
  16. data/app/mailers/locomotive/notifications.rb +14 -3
  17. data/app/models/locomotive/concerns/content_type/entry_template.rb +7 -1
  18. data/app/models/locomotive/concerns/content_type/public_submission_title_template.rb +24 -0
  19. data/app/models/locomotive/concerns/site/access_points.rb +1 -0
  20. data/app/models/locomotive/concerns/site/url_redirections.rb +30 -0
  21. data/app/models/locomotive/content_entry.rb +9 -1
  22. data/app/models/locomotive/content_type.rb +1 -0
  23. data/app/models/locomotive/page.rb +1 -1
  24. data/app/models/locomotive/site.rb +1 -0
  25. data/app/policies/locomotive/site_policy.rb +4 -3
  26. data/app/uploaders/locomotive/theme_asset_uploader.rb +6 -9
  27. data/app/views/locomotive/content_assets/_list.html.slim +1 -1
  28. data/app/views/locomotive/content_entries/_entry.html.slim +1 -1
  29. data/app/views/locomotive/content_entries/_list.html.slim +1 -1
  30. data/app/views/locomotive/content_entries/edit.html.slim +2 -0
  31. data/app/views/locomotive/content_entries/form/_tabs.html.slim +3 -3
  32. data/app/views/locomotive/content_entries/new.html.slim +3 -0
  33. data/app/views/locomotive/current_site/_membership.html.slim +1 -1
  34. data/app/views/locomotive/current_site/_url_redirection.html.slim +17 -0
  35. data/app/views/locomotive/current_site/form/_access_points.html.slim +2 -0
  36. data/app/views/locomotive/current_site/form/_panes.html.slim +1 -1
  37. data/app/views/locomotive/current_site/form/_tabs.html.slim +3 -0
  38. data/app/views/locomotive/current_site/form/_url_redirections.html.slim +5 -0
  39. data/app/views/locomotive/custom_fields/select_options/_option.html.slim +3 -1
  40. data/app/views/locomotive/editable_elements/index_without_preview.html.slim +3 -3
  41. data/app/views/locomotive/notifications/new_content_entry.html.slim +4 -0
  42. data/app/views/locomotive/pages/form/_actions.html.slim +1 -1
  43. data/app/views/locomotive/pages/form/_tabs.html.slim +3 -3
  44. data/app/views/locomotive/passwords/edit.html.slim +1 -1
  45. data/app/views/locomotive/passwords/new.html.slim +1 -1
  46. data/app/views/locomotive/public_submission_accounts/edit.html.slim +1 -1
  47. data/app/views/locomotive/registrations/new.html.slim +1 -1
  48. data/app/views/locomotive/sessions/new.html.slim +1 -1
  49. data/app/views/locomotive/translations/index.html.slim +2 -1
  50. data/config/i18n-tasks.yml +110 -0
  51. data/config/locales/carrierwave.fr.yml +1 -1
  52. data/config/locales/default.en.yml +0 -49
  53. data/config/locales/default.fr.yml +1 -232
  54. data/config/locales/devise.fr.yml +1 -68
  55. data/config/locales/{admin_ui.en.yml → en.yml} +31 -91
  56. data/config/locales/flash.en.yml +8 -37
  57. data/config/locales/flash.fr.yml +1 -106
  58. data/config/locales/fr.yml +5 -0
  59. data/config/locales/inputs.fr.yml +1 -0
  60. data/config/locales/mongoid.en.yml +49 -0
  61. data/config/locales/mongoid.fr.yml +12 -0
  62. data/config/locales/simple_form.en.yml +26 -65
  63. data/config/locales/simple_form.fr.yml +1 -0
  64. data/config/{locales → old-locales}/admin_ui.bg.yml +0 -0
  65. data/config/{locales → old-locales}/admin_ui.cs.yml +0 -0
  66. data/config/{locales → old-locales}/admin_ui.de.yml +0 -0
  67. data/config/{locales → old-locales}/admin_ui.es.yml +0 -0
  68. data/config/{locales → old-locales}/admin_ui.et.yml +0 -0
  69. data/config/{locales → old-locales}/admin_ui.fr.yml +0 -0
  70. data/config/{locales → old-locales}/admin_ui.it.yml +0 -0
  71. data/config/{locales → old-locales}/admin_ui.ja.yml +0 -0
  72. data/config/{locales → old-locales}/admin_ui.nb.yml +0 -0
  73. data/config/{locales → old-locales}/admin_ui.nl.yml +0 -0
  74. data/config/{locales → old-locales}/admin_ui.pl.yml +0 -0
  75. data/config/{locales → old-locales}/admin_ui.pt-BR.yml +0 -0
  76. data/config/{locales → old-locales}/admin_ui.pt.yml +0 -0
  77. data/config/{locales → old-locales}/admin_ui.ru.yml +0 -0
  78. data/config/{locales → old-locales}/admin_ui.sk.yml +0 -0
  79. data/config/{locales → old-locales}/admin_ui.sr.yml +0 -0
  80. data/config/{locales → old-locales}/admin_ui.zh-CN.yml +0 -0
  81. data/config/{locales → old-locales}/carrierwave.bg.yml +0 -0
  82. data/config/{locales → old-locales}/carrierwave.cs.yml +0 -0
  83. data/config/{locales → old-locales}/carrierwave.de.yml +0 -0
  84. data/config/{locales → old-locales}/carrierwave.es.yml +0 -0
  85. data/config/{locales → old-locales}/carrierwave.et.yml +0 -0
  86. data/config/old-locales/carrierwave.fr.yml +4 -0
  87. data/config/{locales → old-locales}/carrierwave.it.yml +0 -0
  88. data/config/{locales → old-locales}/carrierwave.ja.yml +0 -0
  89. data/config/{locales → old-locales}/carrierwave.nb.yml +0 -0
  90. data/config/{locales → old-locales}/carrierwave.nl.yml +0 -0
  91. data/config/{locales → old-locales}/carrierwave.pl.yml +0 -0
  92. data/config/{locales → old-locales}/carrierwave.pt-BR.yml +0 -0
  93. data/config/{locales → old-locales}/carrierwave.pt.yml +0 -0
  94. data/config/{locales → old-locales}/carrierwave.ru.yml +0 -0
  95. data/config/{locales → old-locales}/carrierwave.sk.yml +0 -0
  96. data/config/{locales → old-locales}/carrierwave.sr.yml +0 -0
  97. data/config/{locales → old-locales}/carrierwave.zh-CN.yml +0 -0
  98. data/config/{locales → old-locales}/default.bg.yml +0 -0
  99. data/config/{locales → old-locales}/default.cs.yml +0 -0
  100. data/config/{locales → old-locales}/default.de.yml +0 -0
  101. data/config/{locales → old-locales}/default.es.yml +0 -0
  102. data/config/{locales → old-locales}/default.et.yml +0 -0
  103. data/config/old-locales/default.fr.yml +232 -0
  104. data/config/{locales → old-locales}/default.it.yml +0 -0
  105. data/config/{locales → old-locales}/default.ja.yml +0 -0
  106. data/config/{locales → old-locales}/default.nb.yml +0 -0
  107. data/config/{locales → old-locales}/default.nl.yml +0 -0
  108. data/config/{locales → old-locales}/default.pl.yml +0 -0
  109. data/config/{locales → old-locales}/default.pt-BR.yml +0 -0
  110. data/config/{locales → old-locales}/default.pt.yml +0 -0
  111. data/config/{locales → old-locales}/default.ru.yml +0 -0
  112. data/config/{locales → old-locales}/default.sk.yml +0 -0
  113. data/config/{locales → old-locales}/default.sr.yml +0 -0
  114. data/config/{locales → old-locales}/default.zh-CN.yml +0 -0
  115. data/config/{locales → old-locales}/devise.bg.yml +0 -0
  116. data/config/{locales → old-locales}/devise.cs.yml +0 -0
  117. data/config/{locales → old-locales}/devise.de.yml +0 -0
  118. data/config/{locales → old-locales}/devise.es.yml +0 -0
  119. data/config/{locales → old-locales}/devise.et.yml +0 -0
  120. data/config/old-locales/devise.fr.yml +68 -0
  121. data/config/{locales → old-locales}/devise.it.yml +0 -0
  122. data/config/{locales → old-locales}/devise.ja.yml +0 -0
  123. data/config/{locales → old-locales}/devise.nb.yml +0 -0
  124. data/config/{locales → old-locales}/devise.nl.yml +0 -0
  125. data/config/{locales → old-locales}/devise.pl.yml +0 -0
  126. data/config/{locales → old-locales}/devise.pt-BR.yml +0 -0
  127. data/config/{locales → old-locales}/devise.pt.yml +0 -0
  128. data/config/{locales → old-locales}/devise.ru.yml +0 -0
  129. data/config/{locales → old-locales}/devise.sk.yml +0 -0
  130. data/config/{locales → old-locales}/devise.sr.yml +0 -0
  131. data/config/{locales → old-locales}/devise.zh-CN.yml +0 -0
  132. data/config/{locales → old-locales}/flash.bg.yml +0 -0
  133. data/config/{locales → old-locales}/flash.cs.yml +0 -0
  134. data/config/{locales → old-locales}/flash.de.yml +0 -0
  135. data/config/{locales → old-locales}/flash.es.yml +0 -0
  136. data/config/{locales → old-locales}/flash.et.yml +0 -0
  137. data/config/old-locales/flash.fr.yml +106 -0
  138. data/config/{locales → old-locales}/flash.it.yml +0 -0
  139. data/config/{locales → old-locales}/flash.ja.yml +0 -0
  140. data/config/{locales → old-locales}/flash.nb.yml +0 -0
  141. data/config/{locales → old-locales}/flash.nl.yml +0 -0
  142. data/config/{locales → old-locales}/flash.pl.yml +0 -0
  143. data/config/{locales → old-locales}/flash.pt-BR.yml +0 -0
  144. data/config/{locales → old-locales}/flash.pt.yml +0 -0
  145. data/config/{locales → old-locales}/flash.ru.yml +0 -0
  146. data/config/{locales → old-locales}/flash.sk.yml +0 -0
  147. data/config/{locales → old-locales}/flash.sr.yml +0 -0
  148. data/config/{locales → old-locales}/flash.zh-CN.yml +0 -0
  149. data/config/routes.rb +1 -0
  150. data/lib/generators/locomotive/install/templates/carrierwave.rb +12 -7
  151. data/lib/generators/locomotive/install/templates/devise.rb +127 -55
  152. data/lib/generators/locomotive/install/templates/dragonfly.rb +1 -1
  153. data/lib/generators/locomotive/install/templates/locomotive.rb +2 -0
  154. data/lib/locomotive/carrierwave/asset.rb +23 -11
  155. data/lib/locomotive/carrierwave/patches.rb +18 -0
  156. data/lib/locomotive/configuration.rb +6 -5
  157. data/lib/locomotive/dependencies.rb +1 -0
  158. data/lib/locomotive/engine.rb +4 -0
  159. data/lib/locomotive/middlewares/site.rb +1 -0
  160. data/lib/locomotive/steam/middlewares/missing_translations.rb +1 -1
  161. data/lib/locomotive/steam/services/api_entry_submission_service.rb +8 -1
  162. data/lib/locomotive/steam_adaptor.rb +9 -7
  163. data/lib/locomotive/version.rb +1 -1
  164. data/spec/fixtures/assets/ruby_logo.svg +948 -0
  165. data/spec/lib/locomotive/steam/services/api_entry_submission_service_spec.rb +1 -1
  166. data/spec/mailers/locomotive/notifications_spec.rb +39 -1
  167. data/spec/models/locomotive/concerns/site/url_redirections_spec.rb +42 -0
  168. data/spec/models/locomotive/theme_asset_spec.rb +29 -0
  169. data/spec/support/factories.rb +15 -1
  170. data/spec/support/features/site_helpers.rb +8 -1
  171. data/spec/support/shared_contexts/api_site_setup.rb +1 -1
  172. metadata +120 -106
  173. data/app/views/locomotive/shared/_footer.html.slim +0 -2
  174. data/app/views/locomotive/shared/_form_actions.html.slim +0 -14
  175. data/app/views/locomotive/shared/actions/_contents.html.slim +0 -7
  176. data/config/cucumber.yml +0 -8
@@ -21,7 +21,7 @@
21
21
  == document_stamp(entry)
22
22
 
23
23
  .actions
24
- = link_to content_entry_path(current_site, content_type.slug, entry), title: t('locomotive.buttons.delete'), class: 'remove', data: { confirm: t('locomotive.messages.confirm') }, method: :delete do
24
+ = link_to content_entry_path(current_site, content_type.slug, entry), title: t(:delete, scope: 'simple_form.buttons.defaults.locomotive'), class: 'remove', data: { confirm: t('locomotive.messages.confirm') }, method: :delete do
25
25
  i.fa.fa-trash-o
26
26
 
27
27
 
@@ -7,6 +7,8 @@
7
7
  = locale_picker_link
8
8
  |  
9
9
 
10
+ = link_to t(:back, scope: 'locomotive.content_entries.shared').html_safe, content_entries_path(current_site, @content_type.slug), class: 'btn btn-sm btn-default'
11
+
10
12
  = locomotive_form_for @content_entry, as: :content_entry, url: content_entry_path(current_site, @content_type.slug, @content_entry), html: { multipart: true } do |f|
11
13
 
12
14
  = hidden_field_tag :active_tab, ''
@@ -1,13 +1,13 @@
1
1
  ul.nav.nav-tabs role='tablist'
2
2
  = form_nav_tab :main, true do
3
- = link_to t('simple_form.titles.locomotive.content'), '#main', role: 'tab', data: { toggle: 'tab' }
3
+ = link_to t('simple_form.titles.locomotive.content_entry.content'), '#main', role: 'tab', data: { toggle: 'tab' }
4
4
 
5
5
  - if display_content_entry_tab?(@content_type, :seo)
6
6
 
7
7
  = form_nav_tab :seo do
8
- = link_to t('simple_form.titles.locomotive.seo'), '#seo', role: 'tab', data: { toggle: 'tab' }
8
+ = link_to t('simple_form.titles.locomotive.content_entry.seo'), '#seo', role: 'tab', data: { toggle: 'tab' }
9
9
 
10
10
  - if display_content_entry_tab?(@content_type, :advanced)
11
11
 
12
12
  = form_nav_tab :advanced do
13
- = link_to t('simple_form.titles.locomotive.advanced'), '#advanced', role: 'tab', data: { toggle: 'tab' }
13
+ = link_to t('simple_form.titles.locomotive.content_entry.advanced'), '#advanced', role: 'tab', data: { toggle: 'tab' }
@@ -2,6 +2,9 @@
2
2
 
3
3
  = help @content_type.description
4
4
 
5
+ - content_for :actions do
6
+ = link_to t(:back, scope: 'locomotive.content_entries.shared').html_safe, content_entries_path(current_site, @content_type.slug), class: 'btn btn-sm btn-default'
7
+
5
8
  = locomotive_form_for @content_entry, as: :content_entry, url: content_entries_path(current_site, @content_type.slug), html: { multipart: true } do |f|
6
9
 
7
10
  = hidden_field_tag :active_tab, ''
@@ -17,7 +17,7 @@
17
17
 
18
18
  .buttons
19
19
  - if membership.account != current_locomotive_account && policy(membership).edit?
20
- = link_to t(:edit, scope: 'locomotive.shared.form.array_input'), edit_membership_path(current_site, membership), class: 'choose btn btn-primary btn-sm'
20
+ = link_to t(:edit, scope: 'locomotive.inputs.array'), edit_membership_path(current_site, membership), class: 'choose btn btn-primary btn-sm'
21
21
  |  
22
22
  = link_to membership_path(current_site, membership), class: 'delete', data: { confirm: t('locomotive.messages.confirm') }, method: :delete do
23
23
  i.fa.fa-trash-o
@@ -0,0 +1,17 @@
1
+ .item.row data-id=url_redirection.first
2
+
3
+ = hidden_field_tag "site[url_redirections][]", url_redirection.first
4
+ = hidden_field_tag "site[url_redirections][]", url_redirection.last
5
+
6
+ .inner-row.col-md-12
7
+
8
+ .text
9
+ = url_redirection.first
10
+ |    
11
+ i class="fa fa-arrow-right"
12
+ |    
13
+ = url_redirection.last
14
+
15
+ .buttons
16
+ = link_to '#', class: 'delete' do
17
+ i class="fa fa-trash-o"
@@ -4,5 +4,7 @@
4
4
 
5
5
  = f.input :domains, as: :array, hint: t(:domains, scope: 'simple_form.hints.locomotive.site', domain: Locomotive.config.host || request.host).html_safe, placeholder: true, collection: f.object.domains, template: :domain, template_url: new_domain_current_site_path(current_site)
6
6
 
7
+ = f.input :redirect_to_first_domain, as: :toggle
8
+
7
9
  = f.actions do
8
10
  = f.action
@@ -1,4 +1,4 @@
1
1
  .tab-content
2
- - %w(main access_points seo advanced).each_with_index do |name, index|
2
+ - %w(main access_points seo url_redirections advanced).each_with_index do |name, index|
3
3
  = form_tab_pane name.to_sym, index == 0 do
4
4
  = render "locomotive/current_site/form/#{name}", f: f
@@ -9,6 +9,9 @@ ul.nav.nav-tabs role='tablist'
9
9
  = form_nav_tab :seo do
10
10
  = link_to t('simple_form.titles.locomotive.site.seo'), '#seo', role: 'tab', data: { toggle: 'tab' }
11
11
 
12
+ = form_nav_tab :url_redirections do
13
+ = link_to t('simple_form.titles.locomotive.site.url_redirections'), '#url_redirections', role: 'tab', data: { toggle: 'tab' }
14
+
12
15
  - if policy(@site).update_advanced?
13
16
  = form_nav_tab :advanced do
14
17
  = link_to t('simple_form.titles.locomotive.site.advanced'), '#advanced', role: 'tab', data: { toggle: 'tab' }
@@ -0,0 +1,5 @@
1
+ = f.inputs :url_redirections do
2
+ = f.input :url_redirections, as: :array, hint: t(:url_redirections, scope: 'simple_form.hints.locomotive.site').html_safe, placeholder: true, collection: f.object.url_redirections.to_a, template: :url_redirection, template_url: new_url_redirection_current_site_path(current_site)
3
+
4
+ = f.actions do
5
+ = f.action
@@ -11,13 +11,15 @@
11
11
 
12
12
  = text_field_tag 'select_options[][name]', select_option.name, class: 'hide'
13
13
 
14
+ |  
14
15
  a.apply.btn.btn-sm.btn-primary.hide= t('.apply')
16
+ |  
15
17
  a.cancel.btn.btn-default.btn-sm.hide= t('.cancel')
16
18
 
17
19
  .buttons
18
20
  = link_to t('.edit'), '#', class: 'btn btn-sm btn-primary edit'
19
21
  |  
20
- = link_to '#', class: 'delete foo' do
22
+ = link_to '#', class: 'delete' do
21
23
  i.fa.fa-trash-o
22
24
 
23
25
  - if select_option.persisted?
@@ -6,10 +6,10 @@
6
6
 
7
7
  ul.nav.nav-tabs role='tablist'
8
8
  = form_nav_tab :content, true do
9
- = link_to t('simple_form.titles.locomotive.content'), '#content', role: 'tab', data: { toggle: 'tab' }
9
+ = link_to t('simple_form.titles.locomotive.page.content'), '#content', role: 'tab', data: { toggle: 'tab' }
10
10
 
11
11
  = form_nav_tab :main do
12
- = link_to t('simple_form.titles.locomotive.settings'), edit_page_path(current_site, @page)
12
+ = link_to t('simple_form.titles.locomotive.page.settings'), edit_page_path(current_site, @page)
13
13
 
14
14
  .tab-content
15
15
 
@@ -22,7 +22,7 @@
22
22
  .col-md-12
23
23
  br
24
24
  .alert.alert-warning.text-center role="alert"
25
- = t('.no_editable_elements')
25
+ = t(:no_editable_elements, scope: 'locomotive.editable_elements.edit')
26
26
 
27
27
  - else
28
28
  .col-md-12
@@ -15,6 +15,8 @@ ul
15
15
  |  - 
16
16
  i
17
17
  - case field.type.to_s
18
+ - when 'text'
19
+ = raw(value.gsub(/(\r\n|\r|\n)/, '<br/>'))
18
20
  - when 'file'
19
21
  - url = value.guess_url
20
22
  - url = url =~ /^http/ ? url : URI.join("http://#{@domain}", url).to_s # Amazon S3 (http/https) or local files ?
@@ -25,6 +27,8 @@ ul
25
27
  = value.try(:_label)
26
28
  - when 'has_many', 'many_to_many'
27
29
  = value.map(&:_label).join(', ')
30
+ - when 'time', 'date_time'
31
+ = I18n.l(value.in_time_zone(@site.timezone))
28
32
  - when 'tags'
29
33
  = value.join(', ')
30
34
  - else
@@ -2,7 +2,7 @@
2
2
  .row
3
3
  .col-sm-6.text-left
4
4
  - if policy(@page).destroy?
5
- = link_to t('.destroy'), page_path(current_site, @page), data: { confirm: I18n.t('locomotive.messages.confirm') }, class:'btn btn-sm btn-danger', method: :delete
5
+ = link_to t(:delete, scope: 'simple_form.buttons.locomotive.site'), page_path(current_site, @page), data: { confirm: I18n.t('locomotive.messages.confirm') }, class:'btn btn-sm btn-danger', method: :delete
6
6
 
7
7
  .col-sm-6.text-right
8
8
  = f.actions_with_back_button back_url: @page.default_response_type? ? editable_elements_path(current_site, @page) : nil, use_stored_location: @page.templatized?
@@ -1,11 +1,11 @@
1
1
  ul.nav.nav-tabs role='tablist'
2
2
  - unless @page.redirect?
3
3
  = form_nav_tab :content do
4
- = link_to t('simple_form.titles.locomotive.content'), editable_elements_path(current_site, @page)
4
+ = link_to t('simple_form.titles.locomotive.page.content'), editable_elements_path(current_site, @page)
5
5
 
6
6
  = form_nav_tab :main, true do
7
- = link_to t('simple_form.titles.locomotive.settings'), '#main', role: 'tab', data: { toggle: 'tab' }
7
+ = link_to t('simple_form.titles.locomotive.page.settings'), '#main', role: 'tab', data: { toggle: 'tab' }
8
8
 
9
9
  - if @page.default_response_type?
10
10
  = form_nav_tab :seo do
11
- = link_to t('simple_form.titles.locomotive.seo'), '#seo', role: 'tab', data: { toggle: 'tab' }
11
+ = link_to t('simple_form.titles.locomotive.page.seo'), '#seo', role: 'tab', data: { toggle: 'tab' }
@@ -9,7 +9,7 @@
9
9
  = f.input :password_confirmation, label: t('.password_confirmation'), required: false
10
10
 
11
11
  = f.actions do
12
- = f.button :submit, t('locomotive.buttons.change_password'), class: 'btn'
12
+ = f.button :submit, t('.submit'), class: 'btn'
13
13
 
14
14
  br
15
15
 
@@ -9,7 +9,7 @@
9
9
  = f.input :email, label: t('.email'), required: false
10
10
 
11
11
  = f.actions do
12
- = f.button :submit, t('locomotive.buttons.send_password'), class: 'btn'
12
+ = f.button :submit, t('.submit'), class: 'btn'
13
13
 
14
14
  br
15
15
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  = hidden_field_tag 'content_type[public_submission_accounts][]', nil
10
10
 
11
- = f.input :public_submission_accounts, as: :array, template: :account, template_url: new_account_public_submission_accounts_path(current_site, @content_type.slug), select_options: options_for_public_submission_accounts
11
+ = f.input :public_submission_accounts, as: :array, template: :account, template_url: new_account_public_submission_accounts_path(current_site, @content_type.slug), select_options: options_for_public_submission_accounts, label: t(:public_submission_accounts, scope: 'simple_form.labels.locomotive.content_type')
12
12
 
13
13
  = f.actions back_url: content_entries_path(current_site, @content_type.slug)
14
14
 
@@ -9,7 +9,7 @@
9
9
  = f.input :password_confirmation, required: true
10
10
 
11
11
  = f.actions do
12
- = f.button :submit, t('locomotive.buttons.sign_up'), class: 'btn'
12
+ = f.button :submit, t('.submit'), class: 'btn'
13
13
 
14
14
  br
15
15
 
@@ -11,7 +11,7 @@
11
11
  = f.input :password, label: t('.password'), hint: link_to(t('.link'), new_locomotive_account_password_path).html_safe, required: false, input_html: { tabindex: 2 }
12
12
 
13
13
  = f.actions do
14
- = f.button :submit, t('locomotive.buttons.sign_in'), class: 'btn'
14
+ = f.button :submit, t('.submit'), class: 'btn'
15
15
 
16
16
  - if current_site.nil?
17
17
 
@@ -38,4 +38,5 @@
38
38
  span.completion
39
39
  i.fa.fa-circle
40
40
 
41
- = paginate @translations, theme: 'twitter-bootstrap-3', pagination_class: 'pagination-sm'
41
+ .text-center
42
+ = paginate @translations, theme: 'twitter-bootstrap-3', pagination_class: 'pagination-sm'
@@ -0,0 +1,110 @@
1
+ # i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
2
+
3
+ # The "main" locale.
4
+ base_locale: en
5
+ ## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
6
+ # locales: [es, fr]
7
+ ## Reporting locale, default: en. Available: en, ru.
8
+ # internal_locale: en
9
+
10
+ # Read and write translations.
11
+ data:
12
+ ## Translations are read from the file system. Supported format: YAML, JSON.
13
+ ## Provide a custom adapter:
14
+ # adapter: I18n::Tasks::Data::FileSystem
15
+
16
+ # Locale files or `File.find` patterns where translations are read from:
17
+ read:
18
+ ## Default:
19
+ - config/locales/%{locale}.yml
20
+ - config/locales/carrierwave.%{locale}.yml
21
+ - config/locales/default.%{locale}.yml
22
+ - config/locales/devise.%{locale}.yml
23
+ - config/locales/flash.%{locale}.yml
24
+ - config/locales/inputs.%{locale}.yml
25
+ - config/locales/mongoid.%{locale}.yml
26
+ - config/locales/simple_form.%{locale}.yml
27
+ ## More files:
28
+ # - config/locales/**/*.%{locale}.yml
29
+ ## Another gem (replace %#= with %=):
30
+ # - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
31
+
32
+ # Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
33
+ # `i18n-tasks normalize -p` will force move the keys according to these rules
34
+ write:
35
+ ## For example, write devise and simple form keys to their respective files:
36
+ # - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
37
+ ## Catch-all default:
38
+ # - config/locales/%{locale}.yml
39
+
40
+ ## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
41
+ # router: convervative_router
42
+
43
+ yaml:
44
+ write:
45
+ # do not wrap lines at 80 characters
46
+ line_width: -1
47
+
48
+ ## Pretty-print JSON:
49
+ # json:
50
+ # write:
51
+ # indent: ' '
52
+ # space: ' '
53
+ # object_nl: "\n"
54
+ # array_nl: "\n"
55
+
56
+ # Find translate calls
57
+ search:
58
+ ## Paths or `File.find` patterns to search in:
59
+ # paths:
60
+ # - app/
61
+
62
+ ## Root directories for relative keys resolution.
63
+ # relative_roots:
64
+ # - app/controllers
65
+ # - app/helpers
66
+ # - app/mailers
67
+ # - app/presenters
68
+ # - app/views
69
+
70
+ ## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
71
+ ## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
72
+ exclude:
73
+ - app/assets/images
74
+ - app/assets/fonts
75
+
76
+ ## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
77
+ ## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
78
+ # include: ["*.rb", "*.html.slim"]
79
+
80
+ ## Default scanner finds t() and I18n.t() calls.
81
+ # scanner: I18n::Tasks::Scanners::PatternWithScopeScanner
82
+
83
+ ## Google Translate
84
+ # translation:
85
+ # # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
86
+ # api_key: "AbC-dEf5"
87
+
88
+ ## Do not consider these keys missing:
89
+ # ignore_missing:
90
+ # - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
91
+ # - '{devise,simple_form}.*'
92
+
93
+ ## Consider these keys used:
94
+ # ignore_unused:
95
+ # - 'activerecord.attributes.*'
96
+ # - '{devise,kaminari,will_paginate}.*'
97
+ # - 'simple_form.{yes,no}'
98
+ # - 'simple_form.{placeholders,hints,labels}.*'
99
+ # - 'simple_form.{error_notification,required}.:'
100
+
101
+ ## Exclude these keys from the `i18n-tasks eq-base' report:
102
+ # ignore_eq_base:
103
+ # all:
104
+ # - common.ok
105
+ # fr,es:
106
+ # - common.brand
107
+
108
+ ## Ignore these keys completely:
109
+ # ignore:
110
+ # - kaminari.*
@@ -1,4 +1,4 @@
1
1
  fr:
2
2
  carrierwave:
3
3
  errors:
4
- integrity: "n'est pas un type de fichier autorisé"
4
+ integrity: 'n''est pas un type de fichier autorisé'
@@ -10,55 +10,6 @@ en:
10
10
  default: "%m/%d/%Y %H:%M"
11
11
  time: "%H:%M"
12
12
 
13
- mongoid:
14
- errors:
15
- messages:
16
- blank_in_locale: "can't be blank"
17
- models:
18
- locomotive/page:
19
- attributes:
20
- layout_id:
21
- index_can_not_extend_parent: "The index page can't have its parent page as a layout"
22
- locomotive/membership:
23
- attributes:
24
- account:
25
- unique_account: "is already used"
26
- email:
27
- unique_account: "is already used"
28
- attributes:
29
- locomotive/content_entry:
30
- created_at: Created at
31
-
32
- errors:
33
- messages:
34
- domain_taken: "%{value} is already taken"
35
- invalid_domain: "%{value} is invalid"
36
- needs_admin_account: "One admin account is required at least"
37
- protected_page: "You can not remove index or 404 pages"
38
- extname_changed: "New file does not have the original extension"
39
- array_too_short: "is too small (minimum element number is %{count})"
40
- invalid_theme_file: "can't be blank or isn't a zip file"
41
- site:
42
- default_locale_removed: The previous default locale can not be removed right away.
43
- page:
44
- liquid_syntax: "Liquid Syntax error ('%{error}' on '%{fullpath}')"
45
- liquid_extend: "The page '%{fullpath}' extends a template which does not exist"
46
- liquid_translation: "The page '%{fullpath}' extends a template which is not translated"
47
- too_few_custom_fields: "At least, one custom field is required"
48
- security: "presents a security problem"
49
-
50
- attributes:
51
- defaults:
52
- pages:
53
- index:
54
- title: "Home page"
55
- body: "Content of the home page"
56
- "404":
57
- title: "Page not found"
58
- body: "Content of the 404 page"
59
- other:
60
- body: "{% extends 'parent' %}"
61
-
62
13
  pagination:
63
14
  previous: "&laquo; Previous"
64
15
  next: "Next &raquo;"
@@ -1,232 +1 @@
1
- fr:
2
- errors:
3
- # The default format use in full error messages.
4
- format: "%{attribute} %{message}"
5
-
6
- # The values :model, :attribute and :value are always available for interpolation
7
- # The value :count is available when applicable. Can be used for pluralization.
8
- messages:
9
- inclusion: "n'est pas inclus(e) dans la liste"
10
- exclusion: "n'est pas disponible"
11
- invalid: "n'est pas valide"
12
- confirmation: "ne concorde pas avec la confirmation"
13
- accepted: "doit être accepté(e)"
14
- empty: "doit être rempli(e)"
15
- blank: "doit être rempli(e)"
16
- too_long: "est trop long (pas plus de %{count} caractères)"
17
- too_short: "est trop court (au moins %{count} caractères)"
18
- wrong_length: "ne fait pas la bonne longueur (doit comporter %{count} caractères)"
19
- taken: "n'est pas disponible"
20
- not_a_number: "n'est pas un nombre"
21
- greater_than: "doit être supérieur à %{count}"
22
- greater_than_or_equal_to: "doit être supérieur ou égal à %{count}"
23
- equal_to: "doit être égal à %{count}"
24
- less_than: "doit être inférieur à %{count}"
25
- less_than_or_equal_to: "doit être inférieur ou égal à %{count}"
26
- odd: "doit être impair"
27
- even: "doit être pair"
28
-
29
- domain_taken: "%{value} a été déjà pris"
30
- invalid_domain: "%{value} n'est pas valide"
31
- needs_admin_account: "Un minimum d'un compte admin est requis"
32
- protected_page: "Vous ne pouvez pas supprimer les pages index et 404"
33
- extname_changed: "La nouvelle version du fichier n'a pas l'extension originale"
34
- array_too_short: "est trop petit (le nombre minimum d'éléments est %{count})"
35
- security: "présente un problème de sécurité"
36
- site:
37
- default_locale_removed: La langue par défaut ne peut pas être supprimée de cette façon.
38
- page:
39
- liquid_syntax: "Erreur de syntaxe dans les sections de page, veuillez vérifier la syntaxe ('%{error}'/'%{fullpath}')"
40
- liquid_extend: "La page '%{fullpath}' étend le contenu d'une page qui n'existe pas"
41
- liquid_translation: "La page '%{fullpath}' étend le contenu d'une page qui n'a pas été traduite"
42
-
43
- attributes:
44
- defaults:
45
- pages:
46
- index:
47
- title: "Page d'accueil"
48
- body: "Contenu de la page d'accueil"
49
- "404":
50
- title: "Page non trouvée"
51
- body: "Contenu de la page d'erreur 404"
52
- other:
53
- body: "{% extends 'parent' %}"
54
-
55
- mongoid:
56
- errors:
57
- messages:
58
- blank_in_locale: "doit être rempli(e)"
59
-
60
- attributes:
61
- locomotive/page:
62
- title: Titre
63
- parent: Dossier parent
64
- parent_id: Dossier parent
65
- slug: Raccourci
66
- listed: Menu
67
- templatized: Templatisée
68
- published: Publiée
69
- redirect: Redirection
70
- redirect_url: Url de redirection
71
- cache_strategy: Cache
72
- response_type: Type de réponse
73
- seo_title: Titre SEO
74
- locomotive/content_type:
75
- name: Nom
76
- description: Description
77
- slug: Raccourci
78
- order_by: Ordonner
79
- order_direction: Direction
80
- label_field_name: Champ mis en avant
81
- label_field_id: Champ mis en avant
82
- group_by_field_name: Champ pour grouper
83
- group_by_field_id: Champ pour grouper
84
- public_submission_enabled: Activation API
85
- public_submission_accounts: Comptes à notifier
86
- locomotive/content_entry:
87
- created_at: Date de création
88
- locomotive/asset:
89
- source: Fichier
90
- locomotive/account:
91
- email: E-mail
92
- name: Nom
93
- language: Langue
94
- password: Mot de passe
95
- password_confirmation: Confirmation mot de passe
96
- locomotive/snippet:
97
- body: Code
98
- slug: Raccourci
99
- name: Nom
100
- locomotive/translation:
101
- key: Clé de traduction
102
- locomotive/theme_asset:
103
- content_type: Type du fichier
104
- locomotive/site:
105
- name: Nom du site
106
- locales: Langues
107
- domain_name: Domaine
108
- subdomain: Sous-domaine
109
- restricted_access: Activer ?
110
- access_login: Identifiant
111
- access_password: "Mot de passe"
112
- custom_fields/field:
113
- name: Alias
114
- hint: Aide
115
- required: Requis ?
116
- text_formatting: Formattage
117
- localized: Localisé ?
118
- select_options: Options
119
-
120
- date_picker:
121
- close_text: Fermer
122
- prev_text: '&#x3c;Préc'
123
- next_text: 'Suiv&#x3e;'
124
- current_text: 'Courant'
125
-
126
- date:
127
- formats:
128
- default: "%d/%m/%Y"
129
- short: "%e %b"
130
- long: "%e %B %Y"
131
- long_ordinal: "%e %B %Y"
132
- only_day: "%e"
133
-
134
- day_names: [dimanche, lundi, mardi, mercredi, jeudi, vendredi, samedi]
135
- abbr_day_names: [dim, lun, mar, mer, jeu, ven, sam]
136
- month_names: [~, janvier, février, mars, avril, mai, juin, juillet, août, septembre, octobre, novembre, décembre]
137
- abbr_month_names: [~, jan., fév., mar., avr., mai, juin, juil., août, sept., oct., nov., déc.]
138
- order: [ day, month, year ]
139
-
140
- today_at: "aujourd'hui à"
141
- yesterday_at: "hier à"
142
-
143
- pagination:
144
- previous: "&laquo; Précédent"
145
- next: "Suivant &raquo;"
146
-
147
- time:
148
- formats:
149
- default: "%d/%m/%Y %H:%M"
150
- time: "%H:%M"
151
- short: "%d %b %H:%M"
152
- long: "%A %d %B %Y %H:%M:%S %Z"
153
- long_ordinal: "%A %d %B %Y %H:%M:%S %Z"
154
- only_second: "%S"
155
- am: 'am'
156
- pm: 'pm'
157
-
158
- datetime:
159
- distance_in_words:
160
- half_a_minute: "une demi-minute"
161
- less_than_x_seconds:
162
- zero: "moins d'une seconde"
163
- one: "moins de 1 seconde"
164
- other: "moins de %{count} secondes"
165
- x_seconds:
166
- one: "1 seconde"
167
- other: "%{count} secondes"
168
- less_than_x_minutes:
169
- zero: "moins d'une minute"
170
- one: "moins de 1 minute"
171
- other: "moins de %{count} minutes"
172
- x_minutes:
173
- one: "1 minute"
174
- other: "%{count} minutes"
175
- about_x_hours:
176
- one: "environ une heure"
177
- other: "environ %{count} heures"
178
- x_days:
179
- one: "1 jour"
180
- other: "%{count} jours"
181
- about_x_months:
182
- one: "environ un mois"
183
- other: "environ %{count} mois"
184
- x_months:
185
- one: "1 mois"
186
- other: "%{count} mois"
187
- about_x_years:
188
- one: "environ un an"
189
- other: "environ %{count} ans"
190
- over_x_years:
191
- one: "plus d'un an"
192
- other: "plus de %{count} ans"
193
- almost_x_years:
194
- one: "presque 1 an"
195
- other: "presque %{count} ans"
196
- prompts:
197
- year: "Année"
198
- month: "Mois"
199
- day: "Jour"
200
- hour: "Heure"
201
- minute: "Minute"
202
- second: "Seconde"
203
-
204
- number:
205
- format:
206
- precision: 3
207
- separator: ','
208
- delimiter: ' '
209
- currency:
210
- format:
211
- unit: '€'
212
- precision: 2
213
- format: '%n %u'
214
- human:
215
- format:
216
- precision: 2
217
- storage_units:
218
- format: '%n %u'
219
- units:
220
- byte: 'Octet'
221
- kb: 'ko'
222
- mb: 'Mo'
223
- gb: 'Go'
224
- tb: 'To'
225
-
226
- support:
227
- array:
228
- sentence_connector: 'et'
229
- skip_last_comma: true
230
- words_connector: ", "
231
- two_words_connector: " et "
232
- last_word_connector: " et "
1
+ fr: {}