Skip to content
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

Condense multiple translation links for a lesson into one banner #1738

Closed
mdlincoln opened this issue Apr 13, 2020 · 6 comments
Closed

Condense multiple translation links for a lesson into one banner #1738

mdlincoln opened this issue Apr 13, 2020 · 6 comments
Assignees

Comments

@mdlincoln
Copy link
Contributor

This is a visual change: we would like to put all of the various translation links into a single banner. This will mean editing _layouts/lesson.html to put every "related translation" link into the same div

@mdlincoln
Copy link
Contributor Author

This is the relevant code:

jekyll/_layouts/lesson.html

Lines 186 to 203 in eeb6e18

{% unless page == translation_source %}
<!-- If this lesson is translated, banner pointing to the original language source of this lesson -->
<div class="alert alert-warning">
{{ site.data.snippets.translation-source[page.lang] }} {{ site.data.snippets.language-name.en[page.lang]}}: <a
href="{{ translation_source.url }}">{{ translation_source.title }}</a>
</div>
{% endunless %}
{% for candidate in translation_candidates %}
{% unless page.lang == candidate.lang %}
<!-- Banner pointing to translations of this lesson when they exist -->
<div class="alert alert-warning">
{{ site.data.snippets.translation-target[page.lang]}}
{{ site.data.snippets.language-name[candidate.lang][page.lang]}}: <a
href="{{ candidate.url }}">{{ candidate.title }}</a>
</div>
{% endunless %}
{% endfor %}

@mdlincoln
Copy link
Contributor Author

mdlincoln commented Apr 13, 2020

@amsichani I'm going to put you on this since its closely related to #1525 - as you can see, you will just need to edit a tiny bit of HTML for this. Go ahead and make a PR for this now, doesn't need to wait for everything else to be finished.

@jenniferisasi
Copy link
Contributor

@mdlincoln I am not on a race with myself on making you hate me, BUT I am going to suggest something that I believe is easy (on the snippets) and I guess I'll have to change it myself.

As the banners are right now, in general, they are fine "this lesson is also: title in x lang". Now, from a language accessibility perspective, you would have "message in x language; title in x lang."
Ex. a Fr-only speaker lands in an EN lesson and can only guess something about French because they read the title of the lesson. Or, easier for all, when you get to a website in Chinese, you look for a button that says "language"; if that word is in Chinese characters you wouldn't be able to find it. Makes sense?

I propose:

In the language of the original lesson: original lesson title | In the language of the translation X: translated X lesson title | In the language of the translation Y: translated Y lesson title

@amsichani what do you think? does it make sense to you as also a multilingual speaker?

@mdlincoln
Copy link
Contributor Author

If you and @amsichani like it then make a PR and let's see what it looks like.

@amsichani
Copy link
Contributor

@mdlincoln I am not on a race with myself on making you hate me, BUT I am going to suggest something that I believe is easy (on the snippets) and I guess I'll have to change it myself.

As the banners are right now, in general, they are fine "this lesson is also: title in x lang". Now, from a language accessibility perspective, you would have "message in x language; title in x lang."
Ex. a Fr-only speaker lands in an EN lesson and can only guess something about French because they read the title of the lesson. Or, easier for all, when you get to a website in Chinese, you look for a button that says "language"; if that word is in Chinese characters you wouldn't be able to find it. Makes sense?

I propose:

In the language of the original lesson: original lesson title | In the language of the translation X: translated X lesson title | In the language of the translation Y: translated Y lesson title

@amsichani what do you think? does it make sense to you as also a multilingual speaker?

Hi @jenniferisasi , what you are suggesting makes perfect sense to me and thanks for pointing it out.

I am happy to collaborate on this. Just to make it clear , there are two tasks here:

  1. alert messages on lessons' translations: amend the language of the message in the landing page --> change on the snippets
  2. include various available translation links into a single banner --> change on the HTML

Let's start with 1 and continue with 2.

@amsichani
Copy link
Contributor

I will now close this as the information and discussion is now on #1767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants