Skip to content

Commit da5de30

Browse files
committed
Assign seed nav item titles and slugs to en locale
1 parent 9baed56 commit da5de30

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

app/builders/better_together/navigation_builder.rb

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ def build_better_together # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
2424
better_together_pages = ::BetterTogether::Page.create!(
2525
[
2626
{
27-
title: 'What is Better Together?',
28-
slug: 'better-together',
27+
title_en: 'What is Better Together?',
28+
slug_en: 'better-together',
2929
published_at: Time.zone.now,
3030
privacy: 'public',
3131
protected: true,
3232
template: 'better_together/static_pages/better_together'
3333
},
3434
{
35-
title: 'About the Community Engine',
36-
slug: 'better-together/community-engine',
35+
title_en: 'About the Community Engine',
36+
slug_en: 'better-together/community-engine',
3737
published_at: Time.zone.now,
3838
privacy: 'public',
3939
protected: true,
@@ -52,8 +52,8 @@ def build_better_together # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
5252

5353
# Create Host Navigation Item
5454
better_together_nav_item = area.navigation_items.create!(
55-
title: 'Powered with <3 by Better Together',
56-
slug: 'better-together-nav',
55+
title_en: 'Powered with <3 by Better Together',
56+
slug_en: 'better-together-nav',
5757
position: 0,
5858
visible: true,
5959
protected: true,
@@ -75,48 +75,48 @@ def build_footer # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
7575
footer_pages = ::BetterTogether::Page.create!(
7676
[
7777
{
78-
title: 'FAQ',
79-
slug: 'faq',
78+
title_en: 'FAQ',
79+
slug_en: 'faq',
8080
published_at: Time.zone.now,
8181
privacy: 'public',
8282
protected: true,
8383
template: 'better_together/static_pages/faq'
8484
},
8585
{
86-
title: 'Privacy Policy',
87-
slug: 'privacy-policy',
86+
title_en: 'Privacy Policy',
87+
slug_en: 'privacy-policy',
8888
published_at: Time.zone.now,
8989
privacy: 'public',
9090
protected: true,
9191
template: 'better_together/static_pages/privacy'
9292
},
9393
{
94-
title: 'Terms of Service',
95-
slug: 'terms-of-service',
94+
title_en: 'Terms of Service',
95+
slug_en: 'terms-of-service',
9696
published_at: Time.zone.now,
9797
privacy: 'public',
9898
protected: true,
9999
template: 'better_together/static_pages/terms_of_service'
100100
},
101101
{
102-
title: 'Code of Conduct',
103-
slug: 'code-of-conduct',
102+
title_en: 'Code of Conduct',
103+
slug_en: 'code-of-conduct',
104104
published_at: Time.zone.now,
105105
privacy: 'public',
106106
protected: true,
107107
template: 'better_together/static_pages/code_of_conduct'
108108
},
109109
{
110-
title: 'Accessibility',
111-
slug: 'accessibility',
110+
title_en: 'Accessibility',
111+
slug_en: 'accessibility',
112112
published_at: Time.zone.now,
113113
privacy: 'public',
114114
protected: true,
115115
template: 'better_together/static_pages/accessibility'
116116
},
117117
{
118-
title: 'Contact',
119-
slug: 'contact',
118+
title_en: 'Contact',
119+
slug_en: 'contact',
120120
published_at: Time.zone.now,
121121
privacy: 'public',
122122
protected: true,
@@ -155,8 +155,8 @@ def build_header # rubocop:todo Metrics/MethodLength
155155
header_pages = ::BetterTogether::Page.create(
156156
[
157157
{
158-
title: 'About',
159-
slug: 'about',
158+
title_en: 'About',
159+
slug_en: 'about',
160160
published_at: Time.zone.now,
161161
privacy: 'public',
162162
protected: true,
@@ -203,8 +203,8 @@ def build_host # rubocop:todo Metrics/MethodLength
203203
# byebug
204204
# Create Host Navigation Item
205205
host_nav = area.navigation_items.create!(
206-
title: 'Host',
207-
slug: 'host-nav',
206+
title_en: 'Host',
207+
slug_en: 'host-nav',
208208
position: 0,
209209
visible: true,
210210
protected: true,
@@ -215,57 +215,57 @@ def build_host # rubocop:todo Metrics/MethodLength
215215
# Add children to Host Navigation Item
216216
host_nav_children = [
217217
{
218-
title: 'Dashboard',
219-
slug: 'host-dashboard',
218+
title_en: 'Dashboard',
219+
slug_en: 'host-dashboard',
220220
position: 0,
221221
item_type: 'link',
222222
route_name: 'host_dashboard_path'
223223
},
224224
{
225-
title: 'Communities',
226-
slug: 'communities',
225+
title_en: 'Communities',
226+
slug_en: 'communities',
227227
position: 1,
228228
item_type: 'link',
229229
route_name: 'communities_path'
230230
},
231231
{
232-
title: 'Navigation Areas',
233-
slug: 'navigation-areas',
232+
title_en: 'Navigation Areas',
233+
slug_en: 'navigation-areas',
234234
position: 2,
235235
item_type: 'link',
236236
route_name: 'navigation_areas_path'
237237
},
238238
{
239-
title: 'Pages',
240-
slug: 'pages',
239+
title_en: 'Pages',
240+
slug_en: 'pages',
241241
position: 3,
242242
item_type: 'link',
243243
route_name: 'pages_path'
244244
},
245245
{
246-
title: 'People',
247-
slug: 'people',
246+
title_en: 'People',
247+
slug_en: 'people',
248248
position: 4,
249249
item_type: 'link',
250250
route_name: 'people_path'
251251
},
252252
{
253-
title: 'Platforms',
254-
slug: 'platforms',
253+
title_en: 'Platforms',
254+
slug_en: 'platforms',
255255
position: 5,
256256
item_type: 'link',
257257
route_name: 'platforms_path'
258258
},
259259
{
260-
title: 'Roles',
261-
slug: 'roles',
260+
title_en: 'Roles',
261+
slug_en: 'roles',
262262
position: 6,
263263
item_type: 'link',
264264
route_name: 'roles_path'
265265
},
266266
{
267-
title: 'Resource Permissions',
268-
slug: 'resource_permissions',
267+
title_en: 'Resource Permissions',
268+
slug_en: 'resource_permissions',
269269
position: 7,
270270
item_type: 'link',
271271
route_name: 'resource_permissions_path'
@@ -294,17 +294,17 @@ def create_unassociated_pages # rubocop:todo Metrics/MethodLength
294294
::BetterTogether::Page.create!(
295295
[
296296
{
297-
title: 'Home',
298-
slug: 'home',
297+
title_en: 'Home',
298+
slug_en: 'home',
299299
published_at: Time.zone.now,
300300
privacy: 'public',
301301
protected: true,
302302
template: 'better_together/static_pages/community_engine',
303303
layout: 'layouts/better_together/full_width_page'
304304
},
305305
{
306-
title: 'Subprocessors',
307-
slug: 'subprocessors',
306+
title_en: 'Subprocessors',
307+
slug_en: 'subprocessors',
308308
published_at: Time.zone.now,
309309
privacy: 'public',
310310
protected: true,

0 commit comments

Comments
 (0)