locomotivecms_mounter 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 873ec299623a72321f56112830c2ccb8a682d41d
4
- data.tar.gz: 9b425fcd0ffd321e495c3d19023e9be4a1623c9d
3
+ metadata.gz: ed7a36b0bfe0218fb12928ff8ea035b96d986562
4
+ data.tar.gz: d5a7882dacf040bc121fa20b0be5d1f7b2357973
5
5
  SHA512:
6
- metadata.gz: 28513dfc8b36d13a7d6757c96ac6a0ad038a32f6db7dc8c38e3d7c41c9187e358c4a0b5b2a63f521d5297b564b0c66afb28a1fa004b469ebd49c492b3c95993c
7
- data.tar.gz: 6406797ad1da5407d7a81dd86b2a1a8aa4f3ad675a7bbddaaf65953d013fa52b73eef9a0df871387da6d27069c242d526bc006ca485f2e79128525fc4441ce80
6
+ metadata.gz: ab0588d4b36bd438b6c28161fe96ef3091171335bd31819cd8b3b9ca22bb4d113ccb241ed717b38cea9f6bb88a9da527341ee1513a445270cf1bbd7f0b1c37ba
7
+ data.tar.gz: b9bf2f3ff894b385cb9156fe2280705a2b5301045cc536f393cf621294428cb99b5ff433ba8bfcb35674d4970e11799f708c06e3ee78038bbb7154a29bd0e83b
@@ -60,15 +60,17 @@ module Locomotive
60
60
  # @return [ String ] The safe full path or nil if the page is not translated in the current locale
61
61
  #
62
62
  def safe_fullpath
63
- return nil unless self.translated_in?(Locomotive::Mounter.locale)
64
-
65
- # puts "[safe_fullpath] page = #{self.slug.inspect} / #{self.fullpath.inspect} / #{self.parent.inspect}"
66
-
67
63
  if self.index_or_404?
68
64
  self.slug
69
65
  else
70
66
  base = self.parent.safe_fullpath
71
- _slug = self.templatized? ? '*' : self.slug
67
+ _slug = if self.templatized?
68
+ '*'
69
+ elsif !self.translated_in?(Locomotive::Mounter.locale)
70
+ self.slug_translations[self.mounting_point.default_locale]
71
+ else
72
+ self.slug
73
+ end
72
74
  (base == 'index' ? _slug : File.join(base, _slug)).dasherize
73
75
  end
74
76
  end
@@ -245,7 +247,7 @@ module Locomotive
245
247
  def localize_fullpath(locales = nil)
246
248
  locales ||= self.translated_in
247
249
  _parent_fullpath = self.parent.try(:fullpath)
248
- _fullpath, _slug = self.fullpath.try(:clone), self.slug.clone
250
+ _fullpath, _slug = self.fullpath.try(:clone), self.slug.to_s.clone
249
251
 
250
252
  locales.each do |locale|
251
253
  Locomotive::Mounter.with_locale(locale) do
@@ -2,7 +2,7 @@
2
2
  module Locomotive
3
3
  module Mounter #:nodoc
4
4
 
5
- VERSION = '1.2.4'
5
+ VERSION = '1.2.5'
6
6
 
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_mounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-20 00:00:00.000000000 Z
11
+ date: 2013-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt