i18n of expand shortcode

This commit is contained in:
matcornic 2017-08-20 22:29:22 +02:00
parent 9007ec858d
commit 3465ef756f
3 changed files with 12 additions and 5 deletions

View file

@ -21,3 +21,6 @@ other = "Edit this page"
[Shortcuts-Title]
other = "More"
[Expand-title]
other = "Expand me..."

View file

@ -5,7 +5,7 @@ other = "Rechercher..."
other = "Supprimer l'historique"
[Attachments-label]
other = "Documents joints"
other = "Pièces jointes"
[title-404]
other = "Erreur"
@ -21,3 +21,6 @@ other = "Modifier la page"
[Shortcuts-Title]
other = "Aller plus loin"
[Expand-title]
other = "Déroulez-moi..."

View file

@ -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>