comfortable_mexican_sofa 1.6.20 → 1.6.21
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/models/cms/file.rb +2 -1
- data/app/models/cms/page.rb +5 -2
- data/app/models/cms/snippet.rb +2 -1
- data/comfortable_mexican_sofa.gemspec +3 -2
- data/config/locales/sv.yml +234 -0
- data/lib/comfortable_mexican_sofa/configuration.rb +2 -1
- data/test/functional/cms_admin/pages_controller_test.rb +1 -1
- data/test/unit/models/page_test.rb +9 -1
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.21
|
data/app/models/cms/file.rb
CHANGED
@@ -14,7 +14,8 @@ class Cms::File < ActiveRecord::Base
|
|
14
14
|
:file,
|
15
15
|
:dimentions,
|
16
16
|
:label,
|
17
|
-
:description
|
17
|
+
:description,
|
18
|
+
:category_ids
|
18
19
|
|
19
20
|
# -- AR Extensions --------------------------------------------------------
|
20
21
|
has_attached_file :file, ComfortableMexicanSofa.config.upload_file_options.merge(
|
data/app/models/cms/page.rb
CHANGED
@@ -9,7 +9,10 @@ class Cms::Page < ActiveRecord::Base
|
|
9
9
|
:label,
|
10
10
|
:slug,
|
11
11
|
:parent, :parent_id,
|
12
|
-
:blocks_attributes
|
12
|
+
:blocks_attributes,
|
13
|
+
:is_published,
|
14
|
+
:target_page_id,
|
15
|
+
:category_ids
|
13
16
|
|
14
17
|
cms_acts_as_tree :counter_cache => :children_count
|
15
18
|
cms_is_categorized
|
@@ -45,7 +48,7 @@ class Cms::Page < ActiveRecord::Base
|
|
45
48
|
:presence => true
|
46
49
|
validates :slug,
|
47
50
|
:presence => true,
|
48
|
-
:format => /^\p{Alnum}[\.\p{Alnum}_-]*$/i,
|
51
|
+
:format => /^\p{Alnum}[\.\p{Alnum}\p{Mark}_-]*$/i,
|
49
52
|
:uniqueness => { :scope => :parent_id },
|
50
53
|
:unless => lambda{ |p| p.site && (p.site.pages.count == 0 || p.site.pages.root == self) }
|
51
54
|
validates :layout,
|
data/app/models/cms/snippet.rb
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "comfortable_mexican_sofa"
|
8
|
-
s.version = "1.6.
|
8
|
+
s.version = "1.6.21"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov", "The Working Group Inc"]
|
12
|
-
s.date = "2012-05
|
12
|
+
s.date = "2012-07-05"
|
13
13
|
s.description = ""
|
14
14
|
s.email = "oleg@theworkinggroup.ca"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -178,6 +178,7 @@ Gem::Specification.new do |s|
|
|
178
178
|
"config/locales/es.yml",
|
179
179
|
"config/locales/ja.yml",
|
180
180
|
"config/locales/pt-BR.yml",
|
181
|
+
"config/locales/sv.yml",
|
181
182
|
"config/locales/zh-CN.yml",
|
182
183
|
"config/routes.rb",
|
183
184
|
"db/cms_fixtures/example.com/layouts/default/_default.yml",
|
@@ -0,0 +1,234 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
sv:
|
3
|
+
# -- Models ---------------------------------------------------------------
|
4
|
+
attributes:
|
5
|
+
label: Label
|
6
|
+
slug: Slug
|
7
|
+
parent_id: Förälder
|
8
|
+
content: Innehåll
|
9
|
+
identifier: Identifierare
|
10
|
+
activerecord:
|
11
|
+
models:
|
12
|
+
cms/site: Site
|
13
|
+
cms/layout: Layout
|
14
|
+
cms/page: Sida
|
15
|
+
cms/snippet: Snippet
|
16
|
+
cms/file: Fil
|
17
|
+
attributes:
|
18
|
+
cms/site:
|
19
|
+
identifier: Identifierare
|
20
|
+
hostname: Hostnamn
|
21
|
+
path: Sökväg
|
22
|
+
locale: Språk
|
23
|
+
is_mirrored: Speglad
|
24
|
+
cms/layout:
|
25
|
+
identifier: Identifierare
|
26
|
+
label: Layout Namn
|
27
|
+
app_layout: App Layout
|
28
|
+
parent_id: Förälderlayout
|
29
|
+
css: Stylesheet
|
30
|
+
js: Javascript
|
31
|
+
cms/page:
|
32
|
+
label: Label
|
33
|
+
layout_id: Layout
|
34
|
+
slug: Slug
|
35
|
+
target_page_id: Vidarebefodra till sida
|
36
|
+
is_published: Publicerad
|
37
|
+
cms/file:
|
38
|
+
file: Fil
|
39
|
+
description: Beskrivninig
|
40
|
+
cms/snippet:
|
41
|
+
identifier: Identifierare
|
42
|
+
|
43
|
+
# -- Controllers ----------------------------------------------------------
|
44
|
+
cms:
|
45
|
+
base:
|
46
|
+
site_not_found: Site kan inte hittas
|
47
|
+
fixtures_enabled: CMS Fixtures är aktiverade. Inga ändringar kommer att sparas.
|
48
|
+
|
49
|
+
sites:
|
50
|
+
created: Site skapad
|
51
|
+
creation_failure: Kunde inte skapa site
|
52
|
+
updated: Site uppdaterad
|
53
|
+
update_failure: Uppdatering av site misslyckades
|
54
|
+
deleted: Site borttagen
|
55
|
+
not_found: Kunde inte hitta site
|
56
|
+
|
57
|
+
layouts:
|
58
|
+
created: Layout skapad
|
59
|
+
creation_failure: Misslyckades att skapa site
|
60
|
+
updated: Layout uppdaterad
|
61
|
+
update_failure: Uppdatering av layout misslyckades
|
62
|
+
deleted: Layout borttagen
|
63
|
+
not_found: Layout kunde inte hittas
|
64
|
+
|
65
|
+
pages:
|
66
|
+
created: Sida skapad
|
67
|
+
creation_failure: Misslyckades att skapa sida
|
68
|
+
updated: Sida uppdaterad
|
69
|
+
update_failure: Uppdateringen av sidan misslyckades
|
70
|
+
deleted: Sidan borttagen
|
71
|
+
not_found: Sida kunde inte hittas
|
72
|
+
layout_not_found: Kunde inte hitta layout. Vänligen skapa en.
|
73
|
+
|
74
|
+
snippets:
|
75
|
+
created: Snippet skapad
|
76
|
+
creation_failure: Misslyckades att skapa snippet
|
77
|
+
updated: Snippet uppdaterad
|
78
|
+
update_failure: Uppdateringen av snippet misslyckades
|
79
|
+
deleted: Snippet borttagen
|
80
|
+
not_found: Snippet kunde inte hittas
|
81
|
+
|
82
|
+
revisions:
|
83
|
+
reverted: Innehåll återställt
|
84
|
+
record_not_found: Kunde inte hitta data för återställning
|
85
|
+
not_found: Återställningspunkt inte hittad
|
86
|
+
|
87
|
+
files:
|
88
|
+
created: Filer uppladdade
|
89
|
+
creation_failure: Kunde inte skapa fil
|
90
|
+
updated: Fil uppdaterad
|
91
|
+
update_failure: Kunde inte uppdatera fil
|
92
|
+
deleted: Fil borttagen
|
93
|
+
not_found: Kunde inte hitta fil
|
94
|
+
|
95
|
+
content:
|
96
|
+
site_not_found: Kunde inte hitta site
|
97
|
+
layout_not_found: Kunde inte hitta layout
|
98
|
+
page_not_found: Kunde inte hitta sida
|
99
|
+
|
100
|
+
# -- Views ----------------------------------------------------------------
|
101
|
+
cms_admin:
|
102
|
+
base:
|
103
|
+
sites: Sites
|
104
|
+
layouts: Layouter
|
105
|
+
pages: Sidor
|
106
|
+
snippets: Snippets
|
107
|
+
files: Filer
|
108
|
+
|
109
|
+
sites:
|
110
|
+
index:
|
111
|
+
title: Siter
|
112
|
+
new_link: Skapa ny site
|
113
|
+
select: Välj site
|
114
|
+
edit: Ändra
|
115
|
+
delete: Ta bort
|
116
|
+
are_you_sure: Är du säker på att du vill ta bort den här siten?
|
117
|
+
new:
|
118
|
+
title: Ny site
|
119
|
+
edit:
|
120
|
+
title: Ändrar Site
|
121
|
+
form:
|
122
|
+
create: Skapa Site
|
123
|
+
update: Uppdatera Site
|
124
|
+
|
125
|
+
layouts:
|
126
|
+
index:
|
127
|
+
title: Layouter
|
128
|
+
new_link: Skapa ny layout
|
129
|
+
index_branch:
|
130
|
+
add_child_layout: Lägg till underlayout
|
131
|
+
edit: Ändra
|
132
|
+
delete: Ta bort
|
133
|
+
are_you_sure: Är du säker?
|
134
|
+
new:
|
135
|
+
title: Ny layout
|
136
|
+
edit:
|
137
|
+
title: Ändra layout
|
138
|
+
revision: Revision
|
139
|
+
form:
|
140
|
+
select_parent_layout: Välj överordnad layout
|
141
|
+
select_app_layout: Väl Applikationslayout
|
142
|
+
create: Skapa Layout
|
143
|
+
update: Uppdatera Layout
|
144
|
+
|
145
|
+
pages:
|
146
|
+
index:
|
147
|
+
title: Sidor
|
148
|
+
new_link: Skapa ny sida
|
149
|
+
index_branch:
|
150
|
+
toggle: Välj
|
151
|
+
add_child_page: Lägg till undersida
|
152
|
+
edit: Ändra
|
153
|
+
delete: Ta bort
|
154
|
+
are_you_sure: Är du säker?
|
155
|
+
new:
|
156
|
+
title: Ny sida
|
157
|
+
edit:
|
158
|
+
title: Ändra sida
|
159
|
+
revision: Revision
|
160
|
+
form:
|
161
|
+
select_target_page: Ingen vidarebefodring
|
162
|
+
preview: Förhandsgranska
|
163
|
+
create: Skapa sida
|
164
|
+
update: Uppdatera sida
|
165
|
+
form_blocks:
|
166
|
+
no_tags: |-
|
167
|
+
Layout har inga innehållstaggar definierade.<br/>
|
168
|
+
Ändra innehållet så att det innehåller en sid eller fält tagg. Exempelvis: <code>{{cms:page:content}}</code>
|
169
|
+
|
170
|
+
snippets:
|
171
|
+
index:
|
172
|
+
title: Snippets
|
173
|
+
new_link: Skapa Ny Snippet
|
174
|
+
edit: Ändra
|
175
|
+
delete: Ta bort
|
176
|
+
are_you_sure: Är du säker?
|
177
|
+
new:
|
178
|
+
title: Ny Snippet
|
179
|
+
edit:
|
180
|
+
title: Ändra Snippet
|
181
|
+
revision: Revision
|
182
|
+
form:
|
183
|
+
create: Skapa Snippet
|
184
|
+
update: Uppdatera Snippet
|
185
|
+
|
186
|
+
revisions:
|
187
|
+
show:
|
188
|
+
title: Revisioner för
|
189
|
+
revision: Revision
|
190
|
+
full_path: Fullständig sökväg
|
191
|
+
slug: Slug
|
192
|
+
update: Ändra till denna revisionen
|
193
|
+
current: Nuvarande
|
194
|
+
|
195
|
+
files:
|
196
|
+
index:
|
197
|
+
title: Filer
|
198
|
+
new_link: Ladda upp en ny fil
|
199
|
+
edit: Ända
|
200
|
+
delete: Delete
|
201
|
+
are_you_sure: Är du säker?
|
202
|
+
button: Ladda upp filer
|
203
|
+
new:
|
204
|
+
title: Ny Fil
|
205
|
+
edit:
|
206
|
+
title: Ändrar Fil
|
207
|
+
form:
|
208
|
+
current_file: Nuvarande Fil
|
209
|
+
create: Ladda upp fil
|
210
|
+
update: Uppdatera fil
|
211
|
+
page_form:
|
212
|
+
are_you_sure: Är du säker?
|
213
|
+
file:
|
214
|
+
are_you_sure: Är du säker?
|
215
|
+
|
216
|
+
categories:
|
217
|
+
index:
|
218
|
+
label: Kategorier
|
219
|
+
edit: Ändra
|
220
|
+
done: Klar
|
221
|
+
all: Alla
|
222
|
+
add: Lägg till
|
223
|
+
show:
|
224
|
+
are_you_sure: Är du säker?
|
225
|
+
edit:
|
226
|
+
save: Spara
|
227
|
+
form:
|
228
|
+
label: Kategorier
|
229
|
+
|
230
|
+
dialogs:
|
231
|
+
image:
|
232
|
+
insert: Infoga bild
|
233
|
+
link:
|
234
|
+
create: Skapa Länk
|
@@ -56,7 +56,15 @@ class CmsPageTest < ActiveSupport::TestCase
|
|
56
56
|
page.slug = 'acción'
|
57
57
|
assert page.valid?
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
|
+
def test_validation_of_slug_allows_unicode_accent_characters
|
61
|
+
page = cms_pages(:child)
|
62
|
+
thai_character_ko_kai = "\u0e01"
|
63
|
+
thai_character_mai_tho = "\u0E49"
|
64
|
+
page.slug = thai_character_ko_kai + thai_character_mai_tho
|
65
|
+
assert page.valid?
|
66
|
+
end
|
67
|
+
|
60
68
|
def test_label_assignment
|
61
69
|
page = cms_sites(:default).pages.new(
|
62
70
|
:slug => 'test',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comfortable_mexican_sofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.21
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-05
|
13
|
+
date: 2012-07-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- config/locales/es.yml
|
230
230
|
- config/locales/ja.yml
|
231
231
|
- config/locales/pt-BR.yml
|
232
|
+
- config/locales/sv.yml
|
232
233
|
- config/locales/zh-CN.yml
|
233
234
|
- config/routes.rb
|
234
235
|
- db/cms_fixtures/example.com/layouts/default/_default.yml
|
@@ -384,7 +385,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
384
385
|
version: '0'
|
385
386
|
segments:
|
386
387
|
- 0
|
387
|
-
hash:
|
388
|
+
hash: 2373830069738329131
|
388
389
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
389
390
|
none: false
|
390
391
|
requirements:
|