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
Conversation
unplugged_link = translated_languages.include?(locale) ? | ||
"https://curriculum.code.org/#{locale}/hoc/unplugged/4" : | ||
"https://curriculum.code.org/hoc/unplugged/4" | ||
|
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
and unplugged_link
should align with locale
; they're currently indented too far.
@@ -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 comment
The 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 comment
The 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!
Yay! Looks like a good plan so far. I'm concerned that only "es-mx" works right now; all of the other language codes take you to a broken page. I don't think the problem is in how you generated the urls; I think those lessons may not be available in the other languages yet? Maybe @mrjoshida or @boatmarina know more? In the meantime, you could get this in with just "es-mx" in your |
Yes, those other languages don’t exist yet (getting them on Monday.) for a
temporary fix, we could make English copies to fill in for those languages
in the meantime?
…On Wed, Nov 21, 2018 at 8:43 AM Erin Bond ***@***.***> wrote:
Yay! Looks like a good plan so far.
I'm concerned that only "es-mx" works right now; all of the other language
codes take you to a broken page.
es-mx on curriculum:
[image: screen shot 2018-11-21 at 8 36 19 am]
<https://user-images.githubusercontent.com/12300669/48855347-bdb5f380-ed68-11e8-8e5c-8c6b147216f8.png>
all others, ko-ko shown here:
[image: screen shot 2018-11-21 at 8 35 19 am]
<https://user-images.githubusercontent.com/12300669/48855389-cb6b7900-ed68-11e8-9f3a-78ecb4c8eda0.png>
I don't think the problem is in how you generated the urls; I think those
lessons may not be available in the other languages yet? Maybe @mrjoshida
<https://github.com/mrjoshida> or @boatmarina
<https://github.com/boatmarina> know more? In the meantime, you could get
this in with just "es-mx" in your translated_languages array and add in
the other languages when you have confirmation that the lessons have been
translated and the links work for those languages.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26193 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgSF28gd2HohmG2_uutA3vzy8-OYohKlks5uxYKmgaJpZM4YsfIw>
.
|
When we get translations on Monday, does that mean that the links will work on Monday or that we'll have the translated content on Monday but there are still a few more steps/some more time needed to get the links working correctly? (Sorry, I'm not super familiar with the translation wizardry we do behind the scenes!) The crux of my question is: if this PR goes in with the last deploy on Monday and we have translated curriculum pages on Monday for these languages, the links should work by Monday evening, right? I want to avoid a scenario where we link to a broken page, but if we get the timing right sounds like it could be a non-issue. |
@Erin007 All good questions! I had noted this in the github bug tracking open issue yesterday awaiting response from Marina. It will be better for this PR to go out on Monday. |
@@ -1,20 +1,29 @@ | |||
%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"] |
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.
Does this mean we'll have to remember to update this page whenever the docs are translated in a new locale? Is this a workaround plan, because this doesn't seem sustainable. The way I'd expect this to work is that the links on /dance always include the locale. Curriculum builder should have the logic to show you the translated version if it exists, otherwise it falls back to English.
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.
@tanyaparker Yep, this is a temporary solution. Elijah has a ToDo to determine a solution for this. (deployment.rb)
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.
Curriculum builder should have the logic to show you the translated version if it exists, otherwise it falls back to English.
Note that the fallback cannot be as simple as this, since curriculumbuilder is literally just an S3 bucket, with no ability to be aware of its own content like this
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.
Agreed that this isn't the most sustainable long-term solution. To mitigate some of the issue of having to remember when a new locale is added, is there a good place in curriculum builder or the i18n pipeline for a reminder comment that this needs to be updated?
I *think* if this goes out on Monday all should work but we should confirm
with Elijah. We are getting the translations from Bureau tomorrow (where we
can make sure we got all the languages that we expect.)
Note, the unplugged lesson links should work - it’s the teacher lesson
plans that we don’t have yet. Is that what you’re seeing?
…On Wed, Nov 21, 2018 at 10:52 AM nkiruka ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pegasus/sites.v3/code.org/views/dance_teacher_resources.haml
<#26193 (comment)>
:
> @@ -30,5 +41,5 @@
.resource-description
= resource[:description]
%a{href: resource[:link]}
- %button.gray-button
+ %button.gray-button{:id => "#{resource[:id]}"}
The ids are not necessary. There were added as part of an initial solution
to the problem. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26193 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgSF2_25medMWuJFVDwDBRiqzKEB6GIfks5uxaELgaJpZM4YsfIw>
.
|
@boatmarina The translated version of the unplugged activity is only visible for es-mx |
Hmm, this doesn’t seem right. I thought we sync’ed translations for
unplugged lesson plan yesterday. I’m on my phone so can’t tag Elijah or
Jake here. They are both oof, but can you please tag them on this so they
can look on Monday? Thanks!
…On Wed, Nov 21, 2018 at 11:20 AM nkiruka ***@***.***> wrote:
@boatmarina <https://github.com/boatmarina> The translated version of the
unplugged activity is only visible for es-mx
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26193 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgSF2303k9Px65AQYV75E6JTyZTUz-Ztks5uxadzgaJpZM4YsfIw>
.
|
@jakebrbell We are only seeing the translated version of the unplugged lesson for es-mx. I will follow up with you on Monday, |
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.
I don't think we actually have translation for Spanish (Spain), just es-MX
@@ -1,20 +1,29 @@ | |||
%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"] |
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.
Curriculum builder should have the logic to show you the translated version if it exists, otherwise it falls back to English.
Note that the fallback cannot be as simple as this, since curriculumbuilder is literally just an S3 bucket, with no ability to be aware of its own content like this
…code-dot-org into teacher-resources-CB-links
@Erin007 @tanyaparker @Hamms Updated PR description and Korean locale code. |
Circle failure looks unrelated - might need to pull and merge latest staging? |
@Erin007 Planned lesson will be visible today. Elijah ran a one off sync that included the lesson plan translations. |
@@ -2,7 +2,7 @@ | |||
|
|||
:ruby | |||
locale = I18n.locale.to_s.downcase | |||
translated_languages = ["es-mx", "es-es", "fr-fr", "ko-ko", "tr-tr", "zh-tw"] | |||
translated_languages = ["es-mx", "es-es", "ko-kr", "fr-fr", "tr-tr", "zh-tw"] |
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.
Why isn't this alphabetical?
There are no non-English languages that are currently enabled in curriculum builder because curriculum builder will redirect all the links to point to translated versions of content for a selected language which may not exist resulting in broken links.
Implementation
Added logic to check the locale of the page (four character code). Based on the locale, the link is modified to point directly to the translated version of the lesson plan or unplugged activity.
Translated versions of the content are included in this PR are for the following 6 languages: Spanish (Mexico), Spanish (Spain), French, Korean, Turkish, Chinese (Traditional).
Before:
After: Spanish (es & mx)
Chinese (traditional)
Korean
French
Turkish