Skip to content

Commit

Permalink
added i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivia206 committed Sep 12, 2024
1 parent 4d6014d commit 89d7fd2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
9 changes: 9 additions & 0 deletions i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ blocks:
title: Image
key_figures:
title: Key figures
licenses:
labels:
cc-zero: Creative Commons license Zero - No Rights Reserved
by: Creative Commons license - Attribution to the creator
by-sa: Creative Commons license - Attribution to the creator - Share alike
by-nd: Creative Commons license - Attribution to the creator - No derivative works
by-nc: Creative Commons license - Attribution to the creator - Non-commercial
by-nc-sa: Creative Commons license - Attribution to the creator - Non-commercial - Share alike
by-nc-nd: Creative Commons license - Attribution to the creator - Non-commercial - No derivative works
organizations:
title: Organizations
pages:
Expand Down
9 changes: 9 additions & 0 deletions i18n/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ blocks:
title: Image
key_figures:
title: Chiffres-clés
licenses:
labels:
cc-zero: Licence libre Zéro - Aucune limite de diffusion
by: Licence libre - Attribution à l’entité créatrice
by-sa: Licence libre - Attribution à l’entité créatrice - Partage dans les mêmes conditions
by-nd: Licence libre - Attribution à l’entité créatrice - Pas de modification
by-nc: Licence libre - Attribution à l’entité créatrice - Pas d’utilisation commerciale
by-nc-sa: Licence libre - Attribution à l’entité créatrice - Pas d’utilisation commerciale - Partage dans les mêmes conditions
by-nc-nd: Licence libre - Attribution à l’entité créatrice - Pas d’utilisation commerciale - Pas de modification
organizations:
title: Organisations
pages:
Expand Down
5 changes: 3 additions & 2 deletions layouts/partials/blocks/templates/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
{{ with .creative_commons }}
<div class="license">
{{ $file := (printf "/assets/images/blocks/license/%s.svg" .identifier ) }}
<a rel="license" href="{{ .url }}" title="{{ i18n "commons.link.blank_aria" (dict "Title" .label) }}" target="_blank" rel="noopener">
<img src="{{ $file }}" alt="{{ .label }}">
{{ $label := i18n (printf "blocks.licenses.labels.%s" .identifier) }}
<a rel="license" href="{{ .url }}" title="{{ i18n "commons.link.blank_aria" (dict "Title" $label) }}" target="_blank" rel="noopener">
<img src="{{ $file }}" alt="{{ $label }}">
</a>
</div>
{{ end }}
Expand Down

0 comments on commit 89d7fd2

Please sign in to comment.