Skip to content

Commit

Permalink
i18n of expand shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
matcornic committed Aug 20, 2017
1 parent 9007ec8 commit 3465ef7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ other = "Go to homepage"
other = "Edit this page"

[Shortcuts-Title]
other = "More"
other = "More"

[Expand-title]
other = "Expand me..."
7 changes: 5 additions & 2 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ other = "Rechercher..."
other = "Supprimer l'historique"

[Attachments-label]
other = "Documents joints"
other = "Pièces jointes"

[title-404]
other = "Erreur"
Expand All @@ -20,4 +20,7 @@ other = "Vers la page d'accueil"
other = "Modifier la page"

[Shortcuts-Title]
other = "Aller plus loin"
other = "Aller plus loin"

[Expand-title]
other = "Déroulez-moi..."
5 changes: 3 additions & 2 deletions layouts/shortcodes/expand.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fa fa-chevron-down' : 'fa fa-chevron-right';});});">
<i style="font-size:x-small;" class="fa fa-chevron-right"></i>
<span>
{{$expandMessage := T "Expand-title"}}
{{ if .IsNamedParams }}
{{.Get "default" | default "Expand me..."}}
{{.Get "default" | default $expandMessage}}
{{else}}
{{.Get 0 | default "Expand me..."}}
{{.Get 0 | default $expandMessage}}
{{end}}
</span>
</div>
Expand Down

0 comments on commit 3465ef7

Please sign in to comment.