Skip to content

Commit

Permalink
Add multi-language to topics name
Browse files Browse the repository at this point in the history
  • Loading branch information
makowildcat committed Jul 15, 2024
1 parent ad21167 commit 19662e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion _data/en/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ description: "Veluqac is a multidisciplinary project, designed by and
for the university community, aimed at developing and studying the use
of an electricity-generating bike-desk platform."
about: About
all: All topics
all: All topics
topics:
update: Update
5 changes: 4 additions & 1 deletion _data/fr/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ pour la communauté universitaire, visant à développer et étudier
l'utilisation d'une plateforme de vélo-bureau générant de l'électricité."
about: À propos
blog: Blog
all: Tous les sujets
all: Tous les sujets
topics:
update: Actualités
jekyll: Jekyll
7 changes: 4 additions & 3 deletions _includes/topic-switcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
{% endif %}
|
{% for category in site.categories %}
{% if category[0] == page.title %}
{{ category[0] | capitalize }}
{% assign topic_name = category[0] %}
{% if topic_name == page.title %}
{{ site.data.strings.topics[topic_name] }}
{% else %}
<a href="/topic/{{ category[0] }}">{{ category[0] | capitalize }}</a>
<a href="/topic/{{ topic_name }}">{{ site.data.strings.topics[topic_name] }}</a>
{% endif %}
{% if forloop.last == false %}
|
Expand Down

0 comments on commit 19662e7

Please sign in to comment.