Skip to content

Commit

Permalink
Merge pull request #4706 from galaxyproject/chicken-hammerhead
Browse files Browse the repository at this point in the history
use hreflang attribute to indicate a link will be in another language
  • Loading branch information
hexylena authored Feb 7, 2024
2 parents bfb0601 + d4c4ff1 commit d7c221b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _includes/resource-handson.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<li class="dropdown-item"><strong>Curated translations</strong></li>
{% for lang in material.translations.tutorial %}
<li class="dropdown-item">
<a class="dropdown-item" href="{{ site.baseurl }}/topics/{{ include.material.topic_name }}/tutorials/{{ include.material.tutorial_name }}/tutorial_{{lang | upcase }}.html" title="{{ lang }}">
<a class="dropdown-item" hreflang="{{ lang }}" href="{{ site.baseurl }}/topics/{{ include.material.topic_name }}/tutorials/{{ include.material.tutorial_name }}/tutorial_{{lang | upcase }}.html" title="{{ lang }}">
{{language[lang]}}
</a>
</li>
Expand All @@ -35,7 +35,7 @@
<li class="dropdown-item"><strong>Automatic translations</strong></li>
{% for lang in language %}{% unless lang[0] == 'en' %}
<li class="dropdown-item">
<a class="dropdown-item" href="https://translate.google.com/translate?hl=jp&sl=en&tl={{ lang[0] }}&u=https%3A%2F%2Ftraining.galaxyproject.org%2Ftopics%2F{{ include.material.topic_name }}%2Ftutorials%2F{{ include.material.tutorial_name }}%2Ftutorial.html&edit-text=&act=url" title="{{ inst[0] }}">
<a class="dropdown-item" hreflang="{{ lang[0] }}" href="https://translate.google.com/translate?hl=jp&sl=en&tl={{ lang[0] }}&u=https%3A%2F%2Ftraining.galaxyproject.org%2Ftopics%2F{{ include.material.topic_name }}%2Ftutorials%2F{{ include.material.tutorial_name }}%2Ftutorial.html&edit-text=&act=url" title="{{ inst[0] }}">
{{ lang[1] }}
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions _includes/resource-slides.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<li class="dropdown-item"><strong>Curated translations</strong></li>
{% for lang in include.material.translations.slides %}
<li class="dropdown-item">
<a class="dropdown-item" href="{{ site.baseurl }}/topics/{{ include.material.topic_name }}/{{subfolder}}/{{ include.material.tutorial_name }}/slides_{{lang | upcase }}.html" title="{{ lang }}">
<a class="dropdown-item" hreflang="{{ lang }}" href="{{ site.baseurl }}/topics/{{ include.material.topic_name }}/{{subfolder}}/{{ include.material.tutorial_name }}/slides_{{lang | upcase }}.html" title="{{ lang }}">
{{language[lang]}}
</a>
</li>
Expand All @@ -27,7 +27,7 @@
<li class="dropdown-item"><strong>Automatic translations</strong></li>
{% for lang in language %}{% unless lang[0] == 'en' %}
<li class="dropdown-item">
<a class="dropdown-item" href="https://translate.google.com/translate?hl=jp&sl=en&tl={{ lang[0] }}&u=https%3A%2F%2Ftraining.galaxyproject.org%2Ftopics%2F{{ include.material.topic_name }}%2F{{subfolder}}%2F{{ include.material.tutorial_name }}%2Fslides.html&edit-text=&act=url" title="{{ inst[0] }}">
<a class="dropdown-item" hreflang="{{ lang[0] }}" href="https://translate.google.com/translate?hl=jp&sl=en&tl={{ lang[0] }}&u=https%3A%2F%2Ftraining.galaxyproject.org%2Ftopics%2F{{ include.material.topic_name }}%2F{{subfolder}}%2F{{ include.material.tutorial_name }}%2Fslides.html&edit-text=&act=url" title="{{ inst[0] }}">
{{ lang[1] }}
</a>
</li>
Expand Down

0 comments on commit d7c221b

Please sign in to comment.