-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dance page: Add links for translated versions of lesson plan and unplugged activity #26193
Changes from 1 commit
6df7c9d
1a8b479
01c55cb
e723236
6838d8e
6aeb9a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
%link{:rel=>'stylesheet', :type=>'text/css', :href=>'/css/dance-landing/dance-teacher-resources.css'} | ||
|
||
:ruby | ||
locale = I18n.locale.to_s.downcase | ||
translated_languages = ["es-mx", "es-es", "fr-fr", "ko-ko", "tr-tr", "zh-tw"] | ||
lesson_link = translated_languages.include?(locale) ? | ||
"https://curriculum.code.org/#{locale}/hoc/plugged/8" : | ||
"https://curriculum.code.org/hoc/plugged/8" | ||
unplugged_link = translated_languages.include?(locale) ? | ||
"https://curriculum.code.org/#{locale}/hoc/unplugged/4" : | ||
"https://curriculum.code.org/hoc/unplugged/4" | ||
|
||
resources = [ | ||
{ | ||
title: I18n.t(:hoc2018_dance_teacher_resources_title), | ||
description: I18n.t(:hoc2018_dance_teacher_resources_tile1_description), | ||
image: "/images/dance-hoc/dance_party_dance.gif", | ||
button_text: I18n.t(:hoc2018_dance_teacher_resources_tile1_button), | ||
link: "https://curriculum.code.org/hoc/plugged/8" | ||
id: "lesson_plan", | ||
link: lesson_link | ||
}, | ||
{ | ||
title: I18n.t(:hoc2018_dance_teacher_resources_tile2_title), | ||
description: I18n.t(:hoc2018_dance_teacher_resources_tile2_description), | ||
image: "/images/dance-hoc/dance_party_unplugged_portrait.png", | ||
button_text: I18n.t(:hoc2018_dance_teacher_resources_tile2_button), | ||
link: "https://curriculum.code.org/hoc/unplugged/4" | ||
id: "unplugged_activity", | ||
link: unplugged_link | ||
}, | ||
] | ||
|
||
|
@@ -30,5 +41,5 @@ | |
.resource-description | ||
= resource[:description] | ||
%a{href: resource[:link]} | ||
%button.gray-button | ||
%button.gray-button{:id => "#{resource[:id]}"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ids are unnecessary here and in the resources hash, but I guess there's no harm in having them. Do you have an anticipated reason you'll use them later? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ids are not necessary. There were added as part of an initial solution to the problem. Thanks! |
||
= resource[:button_text] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny style nits:
translated_languages
,lessson_link
andunplugged_link
should align withlocale
; they're currently indented too far.