locomotivecms 3.2.1 → 3.3.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -6
  3. data/LICENSE +1 -1
  4. data/README.md +2 -2
  5. data/app/api/locomotive/api.rb +1 -0
  6. data/app/api/locomotive/api/entities/content_entry_entity.rb +4 -0
  7. data/app/api/locomotive/api/forms/page_form.rb +10 -0
  8. data/app/api/locomotive/api/resources/page_resource.rb +2 -0
  9. data/app/api/locomotive/api/resources/url_redirection_resource.rb +69 -0
  10. data/app/assets/images/locomotive/icons/flags/da.png +0 -0
  11. data/app/assets/images/locomotive/icons/flags/el.png +0 -0
  12. data/app/assets/images/locomotive/icons/flags/fa-IR.png +0 -0
  13. data/app/assets/images/locomotive/icons/flags/fi-FI.png +0 -0
  14. data/app/assets/images/locomotive/icons/flags/{ja.png → ja-JP.png} +0 -0
  15. data/app/assets/images/locomotive/icons/flags/{pl.png → pl-PL.png} +0 -0
  16. data/app/assets/images/locomotive/icons/flags/uk.png +0 -0
  17. data/app/assets/javascripts/locomotive/views/inputs/markdown_view.js.coffee +6 -2
  18. data/app/assets/javascripts/locomotive/views/inputs/rte/link_view.js.coffee +1 -1
  19. data/app/assets/javascripts/locomotive/views/inputs/rte/table_view.js.coffee +1 -1
  20. data/app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb +1 -1
  21. data/app/assets/stylesheets/locomotive/new/_flags.scss.erb +2 -1
  22. data/app/assets/stylesheets/locomotive/old/form/_popover.scss +0 -4
  23. data/app/controllers/locomotive/concerns/redirect_to_main_host_controller.rb +1 -1
  24. data/app/controllers/locomotive/current_site_controller.rb +4 -1
  25. data/app/controllers/locomotive/errors_controller.rb +2 -0
  26. data/app/controllers/locomotive/passwords_controller.rb +5 -1
  27. data/app/controllers/locomotive/registrations_controller.rb +6 -0
  28. data/app/controllers/locomotive/sessions_controller.rb +5 -1
  29. data/app/helpers/locomotive/base_helper.rb +18 -0
  30. data/app/helpers/locomotive/custom_fields_helper.rb +14 -0
  31. data/app/helpers/locomotive/shared/pages_helper.rb +4 -0
  32. data/app/helpers/locomotive/sites_helper.rb +4 -4
  33. data/app/models/locomotive/concerns/page/redirect.rb +1 -1
  34. data/app/models/locomotive/concerns/site/locales.rb +3 -4
  35. data/app/models/locomotive/concerns/site/url_redirections.rb +47 -1
  36. data/app/models/locomotive/page.rb +10 -5
  37. data/app/policies/locomotive/page_policy.rb +4 -0
  38. data/app/uploaders/locomotive/theme_asset_uploader.rb +1 -1
  39. data/app/views/locomotive/current_site/_url_redirection.html.slim +9 -5
  40. data/app/views/locomotive/current_site/form/_url_redirections.html.slim +1 -1
  41. data/app/views/locomotive/layouts/account.html.slim +1 -1
  42. data/app/views/locomotive/layouts/error.html.slim +2 -2
  43. data/app/views/locomotive/passwords/edit.html.slim +1 -1
  44. data/app/views/locomotive/passwords/new.html.slim +1 -1
  45. data/app/views/locomotive/registrations/new.html.slim +1 -1
  46. data/app/views/locomotive/sessions/new.html.slim +2 -2
  47. data/app/views/locomotive/shared/_account_navigation.slim +1 -1
  48. data/app/views/locomotive/shared/_sidebar.html.slim +1 -1
  49. data/app/views/locomotive/shared/sidebar/_page.html.slim +25 -24
  50. data/config/locales/ca.yml +332 -0
  51. data/config/locales/carrierwave.ar.yml +4 -0
  52. data/config/locales/carrierwave.ca.yml +4 -0
  53. data/config/locales/carrierwave.da.yml +4 -0
  54. data/config/locales/carrierwave.fi-FI.yml +4 -0
  55. data/config/locales/carrierwave.it.yml +4 -0
  56. data/config/locales/carrierwave.ja-JP.yml +4 -0
  57. data/config/locales/carrierwave.pl-PL.yml +4 -0
  58. data/config/locales/carrierwave.ru.yml +1 -1
  59. data/config/locales/carrierwave.sv-FI.yml +4 -0
  60. data/config/locales/cs.yml +14 -0
  61. data/config/locales/de.yml +64 -60
  62. data/config/locales/default.ca.yml +13 -0
  63. data/config/locales/default.da.yml +13 -0
  64. data/config/locales/default.de.yml +1 -1
  65. data/config/locales/default.fa_IR.yml +13 -0
  66. data/config/locales/default.fi-FI.yml +13 -0
  67. data/config/locales/default.ja-JP.yml +13 -0
  68. data/config/locales/default.pl-PL.yml +13 -0
  69. data/config/locales/default.sv-FI.yml +13 -0
  70. data/config/locales/devise.ca.yml +61 -0
  71. data/config/locales/devise.da.yml +60 -0
  72. data/config/locales/devise.de.yml +23 -23
  73. data/config/locales/devise.en.yml +6 -5
  74. data/config/locales/devise.fi-FI.yml +61 -0
  75. data/config/locales/devise.fr.yml +6 -4
  76. data/config/locales/devise.it.yml +61 -0
  77. data/config/locales/devise.ja-JP.yml +61 -0
  78. data/config/locales/devise.pl-PL.yml +61 -0
  79. data/config/locales/devise.ru.yml +35 -35
  80. data/config/locales/devise.sv-FI.yml +61 -0
  81. data/config/locales/el.yml +14 -0
  82. data/config/locales/en.yml +7 -0
  83. data/config/locales/flash.ca.yml +82 -0
  84. data/config/locales/flash.cs.yml +3 -0
  85. data/config/locales/flash.da.yml +79 -0
  86. data/config/locales/flash.de.yml +19 -16
  87. data/config/locales/flash.el.yml +3 -0
  88. data/config/locales/flash.ja-JP.yml +82 -0
  89. data/config/locales/flash.pl-PL.yml +82 -0
  90. data/config/locales/flash.sv-FI.yml +82 -0
  91. data/config/locales/fr.yml +5 -1
  92. data/config/locales/inputs.ca.yml +19 -0
  93. data/config/locales/inputs.da.yml +18 -0
  94. data/config/locales/inputs.fa_IR.yml +18 -0
  95. data/config/locales/inputs.fi-FI.yml +19 -0
  96. data/config/locales/inputs.ja-JP.yml +19 -0
  97. data/config/locales/inputs.pl-PL.yml +19 -0
  98. data/config/locales/inputs.sv-FI.yml +19 -0
  99. data/config/locales/ja-JP.yml +332 -0
  100. data/config/locales/mongoid.ca.yml +47 -0
  101. data/config/locales/mongoid.da.yml +47 -0
  102. data/config/locales/mongoid.de.yml +15 -6
  103. data/config/locales/mongoid.fa_IR.yml +41 -0
  104. data/config/locales/mongoid.ja-JP.yml +47 -0
  105. data/config/locales/mongoid.pl-PL.yml +47 -0
  106. data/config/locales/mongoid.sv-FI.yml +47 -0
  107. data/config/locales/nl.yml +4 -0
  108. data/config/locales/pl-PL.yml +332 -0
  109. data/config/locales/ru.yml +74 -74
  110. data/config/locales/simple_form.ca.yml +153 -0
  111. data/config/locales/simple_form.cs.yml +1 -0
  112. data/config/locales/simple_form.de.yml +45 -33
  113. data/config/locales/simple_form.el.yml +1 -0
  114. data/config/locales/simple_form.fi-FI.yml +153 -0
  115. data/config/locales/simple_form.ja-JP.yml +153 -0
  116. data/config/locales/simple_form.pl-PL.yml +153 -0
  117. data/config/locales/simple_form.ru.yml +8 -8
  118. data/config/locales/simple_form.sv-FI.yml +153 -0
  119. data/config/locales/sv-FI.yml +332 -0
  120. data/lib/locomotive/configuration.rb +1 -1
  121. data/lib/locomotive/dragonfly.rb +6 -4
  122. data/lib/locomotive/engine.rb +6 -0
  123. data/lib/locomotive/middlewares/site.rb +3 -1
  124. data/lib/locomotive/mongoid/patches.rb +9 -28
  125. data/lib/locomotive/steam/middlewares/wysihtml_css.rb +1 -1
  126. data/lib/locomotive/version.rb +1 -1
  127. data/spec/models/locomotive/concerns/site/metafields_spec.rb +1 -1
  128. data/spec/models/locomotive/concerns/site/url_redirections_spec.rb +62 -2
  129. data/spec/models/locomotive/content_entry_spec.rb +4 -4
  130. data/spec/models/locomotive/page_spec.rb +25 -10
  131. data/spec/models/locomotive/site_spec.rb +2 -0
  132. data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
  133. data/spec/support/factories.rb +1 -0
  134. data/vendor/assets/javascripts/locomotive/datepicker_i18n.js.erb +12 -6
  135. data/vendor/assets/javascripts/locomotive/wysihtml5x-toolbar.js +24 -27
  136. metadata +102 -89
@@ -9,14 +9,14 @@ module Locomotive
9
9
 
10
10
  def options_for_site_locales
11
11
  Rails.cache.fetch(base_cache_key_without_site + ['locales']) do
12
- Locomotive.config.site_locales.map do |locale|
13
- text = I18n.t("locomotive.locales.#{locale}")
14
- nice_display = h("#{flag_tag(locale)} #{text}")
12
+ (Locomotive.config.site_locales - [:ca, :"sv-FI"]).map do |locale|
13
+ text = I18n.t("locomotive.locales.#{locale}", default: locale)
14
+ nice_display = h("#{flag_tag(locale)} #{text} – #{locale}")
15
15
 
16
16
  [
17
17
  text,
18
18
  locale,
19
- { :"data-display" => nice_display }
19
+ { :"data-display" => nice_display.html_safe }
20
20
  ]
21
21
  end
22
22
  end
@@ -15,7 +15,7 @@ module Locomotive
15
15
  ## validations ##
16
16
  validates_presence_of :redirect_type, if: :redirect?
17
17
  validates_presence_of :redirect_url, if: :redirect?
18
- validates_format_of :redirect_url, with: Locomotive::Regexps::URL_AND_MAILTO, allow_blank: true
18
+ validates_format_of :redirect_url, with: Locomotive::Regexps::URL_AND_MAILTO, if: ->(page) { page.redirect? && !page.redirect_url.blank? }
19
19
 
20
20
  end
21
21
 
@@ -59,8 +59,7 @@ module Locomotive
59
59
  end
60
60
 
61
61
  def locales=(array)
62
- array.reject!(&:blank?)
63
- array = [] if array.blank?; super(array)
62
+ super((array || []).reject(&:blank?).map(&:to_s))
64
63
  end
65
64
 
66
65
  def default_locale
@@ -105,11 +104,11 @@ module Locomotive
105
104
  protected
106
105
 
107
106
  def add_default_locale
108
- self.locales = [Locomotive.config.site_locales.first] if self.locales.blank?
107
+ self.locales = [Locomotive.config.site_locales.first.to_s] if self.locales.blank?
109
108
  end
110
109
 
111
110
  def can_not_remove_default_locale
112
- if self.persisted? && !self.locales.include?(self.default_locale_was)
111
+ if self.persisted? && !self.locales.map(&:to_s).include?(self.default_locale_was.to_s)
113
112
  self.errors.add :locales, I18n.t(:default_locale_removed, scope: [:errors, :messages, :site])
114
113
  end
115
114
  end
@@ -8,10 +8,56 @@ module Locomotive
8
8
  included do
9
9
 
10
10
  ## fields ##
11
- field :url_redirections, type: Array
11
+ field :url_redirections, type: Array, default: []
12
+ field :url_redirections_information, type: Hash, default: {}
12
13
 
13
14
  end
14
15
 
16
+ module ClassMethods
17
+
18
+ def inc_url_redirection_counter(site_id, url)
19
+ url_id = Digest::MD5.hexdigest(url)
20
+ self.where(_id: site_id).inc("url_redirections_information.#{url_id}.counter" => 1)
21
+ end
22
+
23
+ end
24
+
25
+ def url_redirections_with_information(with_hidden = true)
26
+ url_redirections.map do |(source, target)|
27
+ url_id = Digest::MD5.hexdigest(source)
28
+ information = url_redirections_information[url_id] || {}
29
+
30
+ if !with_hidden && information['hidden']
31
+ nil
32
+ else
33
+ { 'source' => source, 'target' => target }.merge(information)
34
+ end
35
+ end
36
+ end
37
+
38
+ def add_or_update_url_redirection(source, target, information = nil)
39
+ return false if source.blank? || target.blank?
40
+
41
+ source, target = add_leading_slash_to(source), add_leading_slash_to(target)
42
+ url_id = Digest::MD5.hexdigest(source)
43
+
44
+ if redirection = url_redirections.detect { |(_source, _)| _source == source }
45
+ redirection[1] = target
46
+ else
47
+ url_redirections << [source, target]
48
+ end
49
+
50
+ url_redirections_information[url_id] = information
51
+ end
52
+
53
+ def remove_url_redirection(source)
54
+ source = add_leading_slash_to(source)
55
+ url_id = Digest::MD5.hexdigest(source)
56
+
57
+ url_redirections.delete_if { |(_source, _)| _source == source }
58
+ url_redirections_information.delete(url_id)
59
+ end
60
+
15
61
  def url_redirections=(array)
16
62
  super((array || []).flatten.map do |path|
17
63
  add_leading_slash_to(path)
@@ -28,6 +28,7 @@ module Locomotive
28
28
  field :published, type: Boolean, default: false
29
29
  field :cache_enabled, type: Boolean, default: true
30
30
  field :response_type, default: 'text/html'
31
+ field :display_settings, type: Hash
31
32
 
32
33
  ## indexes ##
33
34
  index parent_id: 1
@@ -39,7 +40,7 @@ module Locomotive
39
40
  slugify_from :title
40
41
 
41
42
  ## callbacks ##
42
- before_create :localize_slug
43
+ before_create :localize_default_attributes
43
44
  before_create :build_fullpath
44
45
  before_update :build_fullpath, unless: :skip_callbacks_on_update
45
46
  before_save :record_current_locale, unless: :skip_callbacks_on_update
@@ -97,6 +98,10 @@ module Locomotive
97
98
  self.title_translations.try(:keys)
98
99
  end
99
100
 
101
+ def hidden?
102
+ (self.display_settings || {})['hidden'] || false
103
+ end
104
+
100
105
  def update_without_validation_and_callback!
101
106
  self.updating_descendants = true
102
107
  self.save(validate: false)
@@ -119,13 +124,13 @@ module Locomotive
119
124
  self.errors.empty?
120
125
  end
121
126
 
122
- # The slug of a new page should be the same in all
127
+ # The title and slug of a new page should be the same in all
123
128
  # the locales of a site.
124
- def localize_slug
125
- _slug = self.slug
129
+ def localize_default_attributes
130
+ _title, _slug = self.title, self.slug
126
131
 
127
132
  self.site.each_locale(false) do |locale, _|
128
- self.slug = _slug
133
+ self.title, self.slug = _title, _slug
129
134
  end
130
135
  end
131
136
 
@@ -17,6 +17,10 @@ module Locomotive
17
17
  site_staff? && !@resource.index_or_not_found?
18
18
  end
19
19
 
20
+ def show?
21
+ site_admin_or_designer? || !@resource.hidden?
22
+ end
23
+
20
24
  def permitted_attributes
21
25
  attributes = [:title, :layout_id, :slug, :parent_id, :listed, :published, :redirect, :redirect_url, :redirect_type, :seo_title, :meta_description, :meta_keywords, :cache_enabled]
22
26
  attributes += [:handle] if site_admin_or_designer?
@@ -10,7 +10,7 @@ module Locomotive
10
10
  end
11
11
 
12
12
  def extension_white_list
13
- %w(jpg jpeg gif png css js swf flv eot svg svgz ttf woff woff2 otf ico htc map html cur)
13
+ %w(jpg jpeg gif png css js swf flv mp4 eot svg svgz ttf ttc woff woff2 otf ico htc map html cur)
14
14
  end
15
15
 
16
16
  def apply_content_type_exception(value)
@@ -1,16 +1,20 @@
1
- .item.row data-id=url_redirection.first
1
+ .item.row data-id=url_redirection['source']
2
2
 
3
- = hidden_field_tag "site[url_redirections][]", url_redirection.first
4
- = hidden_field_tag "site[url_redirections][]", url_redirection.last
3
+ = hidden_field_tag "site[url_redirections][]", url_redirection['source']
4
+ = hidden_field_tag "site[url_redirections][]", url_redirection['target']
5
5
 
6
6
  .inner-row.col-md-12
7
7
 
8
8
  .text
9
- = url_redirection.first
9
+ = url_redirection['source']
10
10
  | &nbsp;&nbsp;&nbsp;
11
11
  i class="fa fa-arrow-right"
12
12
  | &nbsp;&nbsp;&nbsp;
13
- = url_redirection.last
13
+ = url_redirection['target']
14
+ - if url_redirection['counter']
15
+ | &nbsp;&nbsp;
16
+ small
17
+ = "(#{url_redirection['counter']})"
14
18
 
15
19
  .buttons
16
20
  = link_to '#', class: 'delete' do
@@ -1,5 +1,5 @@
1
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)
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_with_information(false).to_a, template: :url_redirection, template_url: new_url_redirection_current_site_path(current_site)
3
3
 
4
4
  = f.actions do
5
5
  = f.action
@@ -4,7 +4,7 @@ html xmlns='http://www.w3.org/1999/xhtml' lang=I18n.locale
4
4
  meta charset="utf-8"
5
5
  meta http-equiv="x-ua-compatible" content="ie=edge"
6
6
 
7
- title= escape_once(strip_tags(title) + " | #{Locomotive.config.name}")
7
+ title= escape_once(strip_tags(title) + " | #{application_name}")
8
8
 
9
9
  meta name="viewport" content="width=device-width, initial-scale=1"
10
10
 
@@ -4,7 +4,7 @@ html xmlns='http://www.w3.org/1999/xhtml' lang=I18n.locale
4
4
  meta charset="utf-8"
5
5
  meta http-equiv="x-ua-compatible" content="ie=edge"
6
6
 
7
- title= escape_once(strip_tags(error_title) + " | Locomotive")
7
+ title= escape_once(strip_tags(error_title) + " | #{application_name}")
8
8
 
9
9
  meta name="viewport" content="width=device-width, initial-scale=1"
10
10
 
@@ -19,6 +19,6 @@ html xmlns='http://www.w3.org/1999/xhtml' lang=I18n.locale
19
19
  .public-container
20
20
  .public-wrapper
21
21
  = link_to root_path, class: 'brand-logo' do
22
- = image_tag 'locomotive/logo-white.png'
22
+ = account_logo_tag
23
23
 
24
24
  = yield
@@ -1,7 +1,7 @@
1
1
  - title t('locomotive.passwords.edit.title')
2
2
 
3
3
  = link_to root_path, class: 'brand-logo' do
4
- = image_tag 'locomotive/logo-white.png'
4
+ = account_logo_tag
5
5
 
6
6
  .public-box
7
7
  .public-intro
@@ -1,7 +1,7 @@
1
1
  - title t('locomotive.passwords.new.title')
2
2
 
3
3
  = link_to root_path, class: 'brand-logo' do
4
- = image_tag 'locomotive/logo-white.png'
4
+ = account_logo_tag
5
5
 
6
6
  .public-box
7
7
  .public-intro
@@ -1,7 +1,7 @@
1
1
  - title t('locomotive.registrations.new.title')
2
2
 
3
3
  = link_to root_path, class: 'brand-logo' do
4
- = image_tag 'locomotive/logo-white.png'
4
+ = account_logo_tag
5
5
 
6
6
  .public-box
7
7
  .public-intro
@@ -1,7 +1,7 @@
1
1
  - title t('locomotive.sessions.new.title')
2
2
 
3
3
  = link_to root_path, class: 'brand-logo' do
4
- = image_tag 'locomotive/logo-white.png'
4
+ = account_logo_tag
5
5
 
6
6
  .public-box
7
7
  .public-intro
@@ -20,5 +20,5 @@
20
20
  = f.actions do
21
21
  = f.button :submit, t('.submit'), class: 'btn btn-primary'
22
22
 
23
- - if current_site.nil? && Locomotive.config.enable_registration
23
+ - if enable_registration?
24
24
  = link_to t('.sign_up').html_safe, sign_up_path, class: 'public-link'
@@ -1,5 +1,5 @@
1
1
  nav.navigation class="#{class_name rescue ''}"
2
2
  = link_to root_path, class: 'brand-logo' do
3
- = image_tag 'locomotive/logo-white.png'
3
+ = account_logo_tag
4
4
 
5
5
  = render 'locomotive/shared/account/navigation'
@@ -1,6 +1,6 @@
1
1
  .sidebar role="tablist" aria-multiselectable="false" data-current-section=sidebar_current_section_class
2
2
  = link_to root_path, class: 'sidebar-logo' do
3
- = image_tag 'locomotive/logo.png'
3
+ = sidebar_logo_tag
4
4
 
5
5
  - cache(cache_key_for_sidebar) do
6
6
  = link_to dashboard_path(current_site), class: sidebar_link_class(:dashboard) do
@@ -1,30 +1,31 @@
1
- li id="node-#{page._id}" class=page.class_names
2
- - url = page.redirect? ? edit_page_path(current_site, page) : editable_elements_path(current_site, page)
1
+ - if page.show?
2
+ li id="node-#{page._id}" class=page.class_names
3
+ - url = page.redirect? ? edit_page_path(current_site, page) : editable_elements_path(current_site, page)
3
4
 
4
- = link_to url do
5
- - if page.draggable?
6
- i class="fa fa-bars icon #{page.draggable}"
7
- - else
8
- i class="fa fa-file-text-o"
9
- span.text style="#{page.text_inline_style}"
10
- = page.title
5
+ = link_to url do
6
+ - if page.draggable?
7
+ i class="fa fa-bars icon #{page.draggable}"
8
+ - else
9
+ i class="fa fa-file-text-o"
10
+ span.text style="#{page.text_inline_style}"
11
+ = page.title
11
12
 
12
- - unless page.translated?
13
- i.fa.fa-globe.untranslated
13
+ - unless page.translated?
14
+ i.fa.fa-globe.untranslated
14
15
 
15
- - if page.children?
16
- ul.sidebar-sublist.leaves data-url=sort_page_path(current_site, page)
16
+ - if page.children?
17
+ ul.sidebar-sublist.leaves data-url=sort_page_path(current_site, page)
17
18
 
18
- = render partial: 'locomotive/shared/sidebar/page', collection: page.nodes
19
+ = render partial: 'locomotive/shared/sidebar/page', collection: page.nodes
19
20
 
20
- - if page.templatized_children? && !page.templatized?
21
- - if content_type = page.templatized_page.content_type
22
- li.list-entries
23
- = link_to content_entries_path(current_site, content_type.slug) do
24
- i.fa.fa-list-ul.icon
25
- span.text style="#{page.deeper_text_inline_style}"= t(:list_content_entries, name: content_type.name.pluralize, scope: 'locomotive.pages.index')
21
+ - if page.templatized_children? && !page.templatized?
22
+ - if content_type = page.templatized_page.content_type
23
+ li.list-entries
24
+ = link_to content_entries_path(current_site, content_type.slug) do
25
+ i.fa.fa-list-ul.icon
26
+ span.text style="#{page.deeper_text_inline_style}"= t(:list_content_entries, name: content_type.name.pluralize, scope: 'locomotive.pages.index')
26
27
 
27
- li.new-entry.sidebar-list-add
28
- = link_to new_content_entry_path(current_site, content_type.slug) do
29
- i.fa.fa-plus.icon
30
- span.text style="#{page.deeper_text_inline_style}"= t(:new_content_entry, name: content_type.name.singularize, scope: 'locomotive.pages.index')
28
+ li.new-entry.sidebar-list-add
29
+ = link_to new_content_entry_path(current_site, content_type.slug) do
30
+ i.fa.fa-plus.icon
31
+ span.text style="#{page.deeper_text_inline_style}"= t(:new_content_entry, name: content_type.name.singularize, scope: 'locomotive.pages.index')
@@ -0,0 +1,332 @@
1
+ ca:
2
+ locomotive:
3
+ locales:
4
+ en: Anglès
5
+ de: Alemany
6
+ fr: Francés
7
+ pl: Polonés
8
+ pt: Portugués
9
+ pt-BR: "Portugués de Brasil"
10
+ it: Italià
11
+ nl: Holandés
12
+ nb: Norueg
13
+ es: Espanyol
14
+ ru: Rus
15
+ et: Estonià
16
+ lt: Lituà
17
+ ja-JP: Japonés
18
+ zh-CN: Chinés
19
+ cs: Txec
20
+ bg: Búlgar
21
+ sk: Slovac
22
+ sr: Serbi
23
+ sv: Suec
24
+ el: Grec
25
+ messages:
26
+ confirm: Esta segur?
27
+ unsaved_content_warning: "Aquesta pàgina us demana que confirmeu que voleu deixar - posiblement les dades que ha introduït no es poden desar."
28
+ shared:
29
+ header:
30
+ welcome: Benvingut/da, %{name}
31
+ sites: Meus llocs web
32
+ account: Configuració de compte
33
+ see: Veure lloc web
34
+ help: Ajuda
35
+ logout: Tancar sessió
36
+ sidebar:
37
+ dashboard: Panell
38
+ assets: Recursos
39
+ pages: Pàgines
40
+ settings: Configuració general
41
+ metafields: Propietats
42
+ developers: Desenvolupadors
43
+ content_types:
44
+ title: Models
45
+ translations: Traduccions
46
+ list:
47
+ untranslated: sense traducció
48
+ created_at: "Creat fa %{distance}"
49
+ created_by: "Creat fa %{distance} per %{who}"
50
+ updated_at: "Modificat fa %{distance}"
51
+ updated_by: "Modificat fa %{distance} per %{who}"
52
+ rte:
53
+ toolbar:
54
+ table:
55
+ merge: Fusionar
56
+ insert_row_before: Inserir una fila abans
57
+ insert_row_after: Inserir una fila després
58
+ insert_col_before: Inserir una columna abans
59
+ insert_col_after: Inserir una columna després
60
+ delete_row: Esborrar fila
61
+ delete_col: Esborrar columna
62
+ errors:
63
+ '500':
64
+ title: Error d'aplicació
65
+ message: "Perdoneu, alguna cosa ha anat malament. Siusplau contacteu el vostre administrador."
66
+ '404':
67
+ title: Pàgina no trobada
68
+ message: "La pàgina demanada no existeix"
69
+ no_site:
70
+ title: Lloc no trobat
71
+ next: "Pròxim &rarr;"
72
+ message:
73
+ create_account: "Si us plau, creu un compte primer i després un lloc web."
74
+ add_domain: "Afegir el <strong>%{host}</strong> domini a la llista de dominis d'un dels seus llocs web."
75
+ sign_in: "Si us plau entreu primer. A continuació, afegiu el <strong>%{host}</strong> de domini a la llista de dominis d'un dels seus llocs."
76
+ notifications:
77
+ new_content_entry:
78
+ subject: "[%{domain}][%{type}] entrada nova"
79
+ title: "Hola %{name}, una nova instància s'ha creat a %{date} pel lloc <b>%{domain}</b>"
80
+ type: "Model: %{type}"
81
+ activity:
82
+ site:
83
+ created: 'creat el lloc'
84
+ page:
85
+ created: 'creat la %{page} pàgina'
86
+ updated: 'actualitzat la pàgina %{page}'
87
+ destroyed: 'esborrat la pàgina %{page}'
88
+ sorted: 'pàgines ordenades'
89
+ editable_element:
90
+ updated_bulk: 'modificat el contingut de %{page}'
91
+ content_entry:
92
+ created: 'afegit %{entry} a %{content_type}'
93
+ created_public: 'afegit/da %{entry} a %{content_type} desde un formulari públic'
94
+ updated: 'actualitzada %{entry} desde %{content_type}'
95
+ destroyed: 'esborrat/da %{entry} desde %{content_type}'
96
+ sorted: '%{content_type} ordenat'
97
+ content_asset:
98
+ created_bulk: 'pujat %{count} recurs(os)'
99
+ destroyed: 'esborrat el recurs %{name}'
100
+ membership:
101
+ created: 'afegit %{name} al lloc'
102
+ site_metafields:
103
+ updated: '%{label} actualitzat'
104
+ pagination:
105
+ first: "&laquo;"
106
+ last: "&raquo;"
107
+ previous: "&lsaquo;"
108
+ next: "&rsaquo;"
109
+ truncate: "&hellip;"
110
+ custom_fields:
111
+ select_options:
112
+ edit:
113
+ title: "%{type} &mdash; opcions d'edició"
114
+ back: "Tornar a la entrada"
115
+ option:
116
+ edit: Editar
117
+ apply: Aplicar
118
+ cancel: Cancel · lar
119
+ types:
120
+ belongs_to:
121
+ edit: Editar
122
+ placeholder: "Escogir %{name}"
123
+ searching: Buscant...
124
+ no_matches: No s'han trobat coincidències
125
+ too_short: Si us plau, introdueixi 1 o més caràcters
126
+ many_to_many:
127
+ placeholder: "Trieu una de %{name}"
128
+ searching: Buscant...
129
+ no_matches: No s'han trobat coincidències
130
+ too_short: Si us plau, introdueixi 1 o més caràcters
131
+ select:
132
+ edit: Editar opcions
133
+ file:
134
+ delete_file: Esborrar arxiu
135
+ has_many:
136
+ new_label: Afegir un nou
137
+ form:
138
+ required: Necessari
139
+ default_label: Nom del camp
140
+ select_options:
141
+ ask_name: "Escriu l'etiqueta de l'opció"
142
+ dashboard:
143
+ show:
144
+ title: 'Panell'
145
+ url:
146
+ title: "URL del seu lloc web"
147
+ visit: 'Visitar'
148
+ change_domain: 'Feu servir el vostre nom de domini'
149
+ activity:
150
+ title: Activitats
151
+ unknown_account: Algu
152
+ load_more: Carregant mes
153
+ loading_activity_feed: Carregant...
154
+ sessions:
155
+ new:
156
+ email: "Email"
157
+ link: "Ha oblidat la seva contrasenya?"
158
+ password: "Contrasenya"
159
+ sign_up: No te un compte?
160
+ submit: Entrar
161
+ title: Entrar
162
+ registrations:
163
+ new:
164
+ confirm_password: Confirmar contrasenya
165
+ description: "Crear un compte per començar a utilitzar Locomotive."
166
+ sign_in: Ja te vosté un compte?
167
+ submit: Registrar
168
+ title: Registrar
169
+ passwords:
170
+ new:
171
+ description: "Completi el seu correu electrònic i rebrà un correu electrònic amb instruccions sobre com restablir la contrasenya."
172
+ link: "Tornar a la pàgina d'accés"
173
+ email: "El seu email"
174
+ submit: "Continuar"
175
+ title: "Contrasenya oblidada"
176
+ edit:
177
+ description: "Escriu la nova contrasenya a sota"
178
+ link: "Tornar a la pàgina d'accés"
179
+ password: "La seva nova contrasenya"
180
+ password_confirmation: "Confirmar contrasenya"
181
+ submit: "Actualitzar la meva contrasenya"
182
+ title: "Restableir la contrasenya"
183
+ pages:
184
+ index:
185
+ title: 'Pàgines'
186
+ new: 'Nova pàgina'
187
+ list_content_entries: "Listar %{name}"
188
+ new_content_entry: "Nou/va %{name}"
189
+ new:
190
+ title: Nova pàgina
191
+ help: "Si us plau, ompli el següent formulari per crear la seva pàgina. Aneu amb compte, per defecte, la pàgina no es publica."
192
+ edit:
193
+ title: "%{title} &mdash; <small>%{fullpath}</small>"
194
+ form:
195
+ no_layout: Utilitzeu el disseny de la pàgina principal
196
+ redirect_type:
197
+ permanent: "Permanent (301)"
198
+ temporary: "Temporal (302)"
199
+ editable_elements:
200
+ index:
201
+ redirection_error: "No es permet l'edició d'una pàgina que no és de Locomotive."
202
+ iframe:
203
+ buttons:
204
+ edit: editar
205
+ index_without_preview:
206
+ title: "%{title} &mdash; <small>%{fullpath}</small>"
207
+ edit:
208
+ settings_link: 'Configuració'
209
+ no_editable_elements: 'No s''han trobat elements editables'
210
+ parsing_error: "<b>Ho sentim però no hem pogut analitzar la plantilla de la seva pàgina.</b><br/>Si us plau assegureu-vos que la seva plantilla funciona primer amb Wagon."
211
+ blocks:
212
+ all: Tot
213
+ unknown: Desconegut
214
+ form:
215
+ model:
216
+ buttons:
217
+ list: Administrar
218
+ edit: Editar
219
+ sites:
220
+ index:
221
+ description: "Tots els llocs dels que té accés es poden trobar a continuació. Feu clic a un per a ser redirigit a la secció de gestió de continguts de dit lloc."
222
+ new: Afegir un lloc nou
223
+ title: Meus llocs
224
+ new:
225
+ description: "Ompli el següent formulari i faci clic a enviar. Un cop aconseguit això es crearà un nou lloc."
226
+ go_back: Tornar
227
+ submit: Crear lloc
228
+ title: Crear nou lloc
229
+ site:
230
+ no_domain: Sense domini encara
231
+ current_site:
232
+ edit:
233
+ title: Editant el lloc actual
234
+ form:
235
+ main:
236
+ new_membership: "Afegir compte"
237
+ advanced:
238
+ destroy: "Destruir aquest lloc"
239
+ confirm_destroy: "Si us plau confirmar escrivint el nom del lloc en la següent entrada"
240
+ current_site_metafields:
241
+ index:
242
+ title: Propietats d'edició
243
+ no_metafields: No hi ha camps de metadades definides per al seu lloc web.
244
+ memberships:
245
+ roles:
246
+ admin: Administrador
247
+ designer: Dissenyador
248
+ author: Autor
249
+ new:
250
+ title: Nou membre
251
+ help: "Si us plau, doni el compte de correu electrònic per afegir. Si no existeix, se li redirigeix al formulari de creació del compte."
252
+ back: "Tornar a la configuració del lloc"
253
+ edit:
254
+ title: "Editar afiliació a <b>%{name}</b>"
255
+ back: "Tornar a la configuració del lloc"
256
+ accounts:
257
+ new:
258
+ title: Nou compte
259
+ help: "Ompli el següent formulari per afegir un nou compte."
260
+ my_account:
261
+ edit:
262
+ title: Editant el meu compte
263
+ form:
264
+ api:
265
+ api_key: "Utilitzat per Wagon per desplegar el seu lloc (revisi el seu arxiu config/deploy.yml del seu lloc Wagon)."
266
+ translations:
267
+ untranslated: "Localitzacions sense traducció: %{list}"
268
+ index:
269
+ title: Traduccions
270
+ no_items: "No hem trobat cap traducció"
271
+ search_placeholder: "Introduir una clau o una traducció"
272
+ help: "Traduir totes les entrades amb un punt taronja (traducció parcial) o vermell (no localitzat)."
273
+ filter_by:
274
+ all: Tot
275
+ done: Traduït
276
+ partially: Parcialment traduït
277
+ none: Sense traduir
278
+ edit:
279
+ title: "Traduccions &mdash; editant %{key}"
280
+ form:
281
+ not_translated: "Sense traducció"
282
+ content_assets:
283
+ index:
284
+ title: "Recursos"
285
+ upload: Pujar arxius
286
+ edit_in_drawer:
287
+ buttons:
288
+ resize: "Canviar la mida"
289
+ crop: "Retallar"
290
+ apply: "Aplicar"
291
+ dropzone:
292
+ instructions: "<strong>Excloure arxius des de l'ordinador aquí.</strong><br/>També pot"
293
+ browse: "buscar un arxiu"
294
+ list:
295
+ no_items: "No hi han imatges per ara."
296
+ buttons:
297
+ select: "Seleccionar"
298
+ edit: "Editar"
299
+ nav:
300
+ types:
301
+ all: Tot
302
+ pdf: PDFs
303
+ image: imatges
304
+ media: rich media
305
+ others: altres
306
+ search_form:
307
+ placeholder: Buscar per nom d'arxiu
308
+ public_submission_accounts:
309
+ edit:
310
+ title: "%{name} &mdash; Configuració de notificacions"
311
+ content_entries:
312
+ index:
313
+ title: '%{type}'
314
+ download: descarregar entrades
315
+ new: nova entrada
316
+ edit_notification_settings: Editar configuració de notificacions
317
+ search_placeholder: "Introdueixi les paraules clau de cerca aquí"
318
+ group_by:
319
+ all: Tot
320
+ list:
321
+ no_items: "No hi han entrades per ara. Només cal que faci click <a href=\"%{url}\">aquí</a> per crear la primera"
322
+ new:
323
+ title: '%{type} &mdash; nova entrada'
324
+ edit:
325
+ title: '%{type} &mdash; editant entrada'
326
+ shared:
327
+ back: '&larr; Tornar a la lista'
328
+ developers_documentation:
329
+ show:
330
+ title: Desenvolupadors
331
+ wagon: Wagon
332
+ api: API