From f3b6f4a5a1c525ed416618b8d2532dfa686d79b8 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Wed, 15 Apr 2026 14:35:00 +0100 Subject: [PATCH 1/2] qc changes --- app/CsrCampaignPage.php | 6 ++++++ app/DancePage.php | 6 ++++++ app/GetInvolvedPage.php | 16 ++++++++++++++++ app/OnlineCoursesPage.php | 7 +++++++ app/TreasureHuntPage.php | 13 +++++++++++++ 5 files changed, 48 insertions(+) diff --git a/app/CsrCampaignPage.php b/app/CsrCampaignPage.php index e08ac8615..d85e4e4ba 100644 --- a/app/CsrCampaignPage.php +++ b/app/CsrCampaignPage.php @@ -38,8 +38,14 @@ public static function config(): self return self::create([ 'use_dynamic_content' => false, + 'hero_text' => __('csr-campaign.landing_header'), + 'primary_cta_text' => __('csr-campaign.get_involved'), 'primary_cta_link' => 'https://codeweek.eu/blog/futurereadycsr-campaign-launch', + 'secondary_cta_text' => __('csr-campaign.explore_resources'), 'secondary_cta_link' => 'https://codeweek.eu/blog/futurereadycsr-resources', + 'about_title' => __('csr-campaign.about_title'), + 'about_description' => __('csr-campaign.about_description'), + 'resources_title' => __('csr-campaign.resources'), ]); } } diff --git a/app/DancePage.php b/app/DancePage.php index 9eba9e785..c8e6e53cf 100644 --- a/app/DancePage.php +++ b/app/DancePage.php @@ -31,6 +31,12 @@ public static function config(): self return self::create([ 'use_dynamic_content' => false, + 'hero_title' => __('cw2020.title.0'), + 'hero_subtitle' => __('cw2020.dance.title'), + 'content_intro_title' => __('cw2020.dance.title'), + 'content_intro_subtitle' => __('snippets.dance.subtitle'), + 'get_involved_title' => __('cw2020.get-involved.title'), + 'get_involved_subtitle' => __('cw2020.get-involved.subtitle'), ]); } } diff --git a/app/GetInvolvedPage.php b/app/GetInvolvedPage.php index cb36d9b28..90fb1cdfe 100644 --- a/app/GetInvolvedPage.php +++ b/app/GetInvolvedPage.php @@ -54,7 +54,23 @@ public static function config(): self return self::create([ 'use_dynamic_content' => false, + 'intro_heading' => 'How to get involved', + 'intro_text' => 'It’s easy to take part in Code Week. If you’re an educator, student, parent or community leader you can make a big impact. You can host your own activity, join one nearby, explore learning resources, or connect with others across Europe.', + 'intro_button_text' => 'Get involved', 'intro_button_link' => '/guide', + 'movement_heading' => 'Join the movement for digital creativity', + 'movement_text_1' => 'The beauty of Code Week is that there’s no single way to take part. Whether you run an event or join one, you\'re helping grow a movement built on creativity, inclusion and digital skills.', + 'movement_text_2' => 'Spread the joy of coding, connect with like-minded people, and empower others to shape their digital future. Every action makes a difference.', + 'start_heading' => 'How to get started with Code Week', + 'start_text' => "Whether you’re curious about coding, passionate about teaching, or just want to try something new, there’s a place for you in EU Code Week.\n\nYou don’t need to be an expert. From hosting events to sharing resources, there are plenty of ways to contribute to this fun, open and collaborative movement.", + 'card_community_title' => 'Connect with your local Code Week community', + 'card_community_text' => 'Find educators, mentors and organisers near you through the Code Week map or national hubs. There’s a whole network ready to support and collaborate.', + 'card_activity_title' => 'Register your Code Week activity', + 'card_activity_text' => 'Planning something? Add it to the Code Week map so others can see it.', + 'card_ambassadors_title' => 'Connect with EU Code Week Ambassadors', + 'card_ambassadors_text' => 'Ambassadors help coordinate Code Week in their countries. Reach out for support, advice or to join local projects and challenges.', + 'card_stories_title' => 'Share your coding experience and stories', + 'card_stories_text' => 'Post photos, videos and stories using #EUCodeWeek. Highlight what you’ve learned, celebrate your community, and inspire others to join', ]); } } diff --git a/app/OnlineCoursesPage.php b/app/OnlineCoursesPage.php index 97fd88e7e..28b52cf7f 100644 --- a/app/OnlineCoursesPage.php +++ b/app/OnlineCoursesPage.php @@ -33,7 +33,14 @@ public static function config(): self return self::create([ 'use_dynamic_content' => false, + 'hero_title' => 'Online Courses', + 'hero_text' => __('online-courses.online-courses-text'), + 'hero_cta_text' => 'Optional secondary CTA introduction to online courses', 'hero_cta_link' => '/', + 'intro_title' => 'EU Code Week Online Courses', + 'intro_text_1' => __('online-courses.online-courses-sub-text1'), + 'intro_text_2' => __('online-courses.online-courses-sub-text2'), + 'intro_text_3' => __('online-courses.online-courses-sub-text3'), ]); } } diff --git a/app/TreasureHuntPage.php b/app/TreasureHuntPage.php index be31c009d..6e5750fd0 100644 --- a/app/TreasureHuntPage.php +++ b/app/TreasureHuntPage.php @@ -43,6 +43,19 @@ public static function config(): self return self::create([ 'use_dynamic_content' => false, + 'hero_title' => 'Treasure Hunt', + 'hero_subtitle' => 'Simple yet challenging Telegram game – easy for beginners, engaging for experienced players.', + 'intro_title' => 'Code Week Treasure Hunt', + 'intro_paragraph_1' => 'This is a game on Telegram that is simple enough for beginners, but also challenging to keep experienced participants on their toes.', + 'intro_paragraph_2' => 'The Code Week Treasure Hunt is a game best played on your PC with a mobile phone in hand. The game will ask you to solve coding challenges and guide you through the history of coding, computer science and technology in Europe.', + 'how_to_play_title' => 'How to play', + 'step_1_text' => 'Download the Telegram app. It is available for Desktop (Windows, macOS and Linux), iOS and Android You can play the game either on your PC or laptop, or on your smartphone. We recommend you play it on your computer so that you can get the instructions and solve the coding challenges on the Telegram app on your phone.', + 'step_2_text' => 'To play the game, open the game and scan the QR code that will take you to the Telegram app and give you the first set of instructions.', + 'step_3_text' => 'To win, you need to solve 10 coding challenges and find 10 locations on the map of Europe that are linked to the rise of coding and technology.', + 'step_4_text' => 'After you complete the game, share your score with your friends using #EUCodeWeek and challenge them to play and learn about the history of coding too. Let\'s see who scores the top results!', + 'info_text' => 'The Code Week Treasure Hunt is the virtual version of the original EU Code Week Treasure Hunt which was first developed by Alessandro Bogliolo, Professor of Computer Systems at the University of Urbino. To learn more about his original game, visit our blog.', + 'get_involved_title' => 'How to get involved', + 'get_involved_text' => 'Can’t wait to start coding? If you would like to join the EU Code Week community but don\'t know where to start, take a look at these resources that will help get you started, just in time for our annual celebration in October.', 'get_involved_link_1' => 'https://blog.codeweek.eu/getting-started-with-eu-code-week/', 'get_involved_link_2' => '/guide', 'get_involved_link_3' => '/training', From 81e6ec33d159479dce73ee0a2bb3e8a8faaae448 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Wed, 15 Apr 2026 14:48:24 +0100 Subject: [PATCH 2/2] qc changes --- app/CsrCampaignPage.php | 26 +++++++++++++++++++------- app/DancePage.php | 26 +++++++++++++++++++------- app/GetInvolvedPage.php | 26 +++++++++++++++++++------- app/OnlineCoursesPage.php | 26 +++++++++++++++++++------- app/TreasureHuntPage.php | 26 +++++++++++++++++++------- 5 files changed, 95 insertions(+), 35 deletions(-) diff --git a/app/CsrCampaignPage.php b/app/CsrCampaignPage.php index d85e4e4ba..9ab2c3d0e 100644 --- a/app/CsrCampaignPage.php +++ b/app/CsrCampaignPage.php @@ -31,12 +31,7 @@ public function resources() public static function config(): self { - $page = self::first(); - if ($page) { - return $page; - } - - return self::create([ + $defaults = [ 'use_dynamic_content' => false, 'hero_text' => __('csr-campaign.landing_header'), 'primary_cta_text' => __('csr-campaign.get_involved'), @@ -46,6 +41,23 @@ public static function config(): self 'about_title' => __('csr-campaign.about_title'), 'about_description' => __('csr-campaign.about_description'), 'resources_title' => __('csr-campaign.resources'), - ]); + ]; + + $page = self::first(); + if ($page) { + $dirty = false; + foreach ($defaults as $key => $value) { + if ($page->{$key} === null || $page->{$key} === '') { + $page->{$key} = $value; + $dirty = true; + } + } + if ($dirty) { + $page->save(); + } + return $page; + } + + return self::create($defaults); } } diff --git a/app/DancePage.php b/app/DancePage.php index c8e6e53cf..84bac4f4d 100644 --- a/app/DancePage.php +++ b/app/DancePage.php @@ -24,12 +24,7 @@ class DancePage extends Model public static function config(): self { - $page = self::first(); - if ($page) { - return $page; - } - - return self::create([ + $defaults = [ 'use_dynamic_content' => false, 'hero_title' => __('cw2020.title.0'), 'hero_subtitle' => __('cw2020.dance.title'), @@ -37,6 +32,23 @@ public static function config(): self 'content_intro_subtitle' => __('snippets.dance.subtitle'), 'get_involved_title' => __('cw2020.get-involved.title'), 'get_involved_subtitle' => __('cw2020.get-involved.subtitle'), - ]); + ]; + + $page = self::first(); + if ($page) { + $dirty = false; + foreach ($defaults as $key => $value) { + if ($page->{$key} === null || $page->{$key} === '') { + $page->{$key} = $value; + $dirty = true; + } + } + if ($dirty) { + $page->save(); + } + return $page; + } + + return self::create($defaults); } } diff --git a/app/GetInvolvedPage.php b/app/GetInvolvedPage.php index 90fb1cdfe..3a91bb43b 100644 --- a/app/GetInvolvedPage.php +++ b/app/GetInvolvedPage.php @@ -47,12 +47,7 @@ class GetInvolvedPage extends Model public static function config(): self { - $page = self::first(); - if ($page) { - return $page; - } - - return self::create([ + $defaults = [ 'use_dynamic_content' => false, 'intro_heading' => 'How to get involved', 'intro_text' => 'It’s easy to take part in Code Week. If you’re an educator, student, parent or community leader you can make a big impact. You can host your own activity, join one nearby, explore learning resources, or connect with others across Europe.', @@ -71,6 +66,23 @@ public static function config(): self 'card_ambassadors_text' => 'Ambassadors help coordinate Code Week in their countries. Reach out for support, advice or to join local projects and challenges.', 'card_stories_title' => 'Share your coding experience and stories', 'card_stories_text' => 'Post photos, videos and stories using #EUCodeWeek. Highlight what you’ve learned, celebrate your community, and inspire others to join', - ]); + ]; + + $page = self::first(); + if ($page) { + $dirty = false; + foreach ($defaults as $key => $value) { + if ($page->{$key} === null || $page->{$key} === '') { + $page->{$key} = $value; + $dirty = true; + } + } + if ($dirty) { + $page->save(); + } + return $page; + } + + return self::create($defaults); } } diff --git a/app/OnlineCoursesPage.php b/app/OnlineCoursesPage.php index 28b52cf7f..e21f87f2a 100644 --- a/app/OnlineCoursesPage.php +++ b/app/OnlineCoursesPage.php @@ -26,12 +26,7 @@ class OnlineCoursesPage extends Model public static function config(): self { - $page = self::first(); - if ($page) { - return $page; - } - - return self::create([ + $defaults = [ 'use_dynamic_content' => false, 'hero_title' => 'Online Courses', 'hero_text' => __('online-courses.online-courses-text'), @@ -41,6 +36,23 @@ public static function config(): self 'intro_text_1' => __('online-courses.online-courses-sub-text1'), 'intro_text_2' => __('online-courses.online-courses-sub-text2'), 'intro_text_3' => __('online-courses.online-courses-sub-text3'), - ]); + ]; + + $page = self::first(); + if ($page) { + $dirty = false; + foreach ($defaults as $key => $value) { + if ($page->{$key} === null || $page->{$key} === '') { + $page->{$key} = $value; + $dirty = true; + } + } + if ($dirty) { + $page->save(); + } + return $page; + } + + return self::create($defaults); } } diff --git a/app/TreasureHuntPage.php b/app/TreasureHuntPage.php index 6e5750fd0..bec21e988 100644 --- a/app/TreasureHuntPage.php +++ b/app/TreasureHuntPage.php @@ -36,12 +36,7 @@ class TreasureHuntPage extends Model public static function config(): self { - $page = self::first(); - if ($page) { - return $page; - } - - return self::create([ + $defaults = [ 'use_dynamic_content' => false, 'hero_title' => 'Treasure Hunt', 'hero_subtitle' => 'Simple yet challenging Telegram game – easy for beginners, engaging for experienced players.', @@ -61,6 +56,23 @@ public static function config(): self 'get_involved_link_3' => '/training', 'get_involved_link_4' => 'https://bit.ly/DEEPDIVE2020', 'get_involved_link_5' => '/resources/CodingAtHome', - ]); + ]; + + $page = self::first(); + if ($page) { + $dirty = false; + foreach ($defaults as $key => $value) { + if ($page->{$key} === null || $page->{$key} === '') { + $page->{$key} = $value; + $dirty = true; + } + } + if ($dirty) { + $page->save(); + } + return $page; + } + + return self::create($defaults); } }