refactor: add separate shortcode for i18n
This commit is contained in:
parent
a7715682a2
commit
c71cd58117
14 changed files with 33 additions and 31 deletions
|
@ -21,11 +21,11 @@ voneinander zu lernen und Spass zu haben — nicht nur am Gerät.
|
||||||
## Wann und wo findet die CoSin statt?
|
## Wann und wo findet die CoSin statt?
|
||||||
|
|
||||||
Die CoSin findet dieses Jahr vom
|
Die CoSin findet dieses Jahr vom
|
||||||
{{< cosin "date_day_name_start" >}}, den {{< cosin "date_day_start" >}}. bis
|
{{< cosin_i18n "date_day_name_start" >}}, den {{< cosin "date_day_start" >}}. bis
|
||||||
{{< cosin "date_day_name_end" >}}, den {{< cosin "date_day_end" >}}.
|
{{< cosin_i18n "date_day_name_end" >}}, den {{< cosin "date_day_end" >}}.
|
||||||
{{< cosin "date_month" >}} {{< cosin "date_year" >}}
|
{{< cosin_i18n "date_month" >}} {{< cosin "date_year" >}}
|
||||||
{{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}})
|
{{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}})
|
||||||
in {{< cosin "location_city" >}} statt.
|
in {{< cosin_i18n "location_city" >}} statt.
|
||||||
|
|
||||||
## Wie kann ich mich beteiligen?
|
## Wie kann ich mich beteiligen?
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@ voneinander zu lernen und Spass zu haben — nicht nur am Gerät.
|
||||||
## Wann und wo findet die CoSin statt?
|
## Wann und wo findet die CoSin statt?
|
||||||
|
|
||||||
Die CoSin findet dieses Jahr vom
|
Die CoSin findet dieses Jahr vom
|
||||||
{{< cosin "date_day_name_start" >}}, den {{< cosin "date_day_start" >}}. bis
|
{{< cosin_i18n "date_day_name_start" >}}, den {{< cosin "date_day_start" >}}. bis
|
||||||
{{< cosin "date_day_name_end" >}}, den {{< cosin "date_day_end" >}}
|
{{< cosin_i18n "date_day_name_end" >}}, den {{< cosin "date_day_end" >}}
|
||||||
{{< cosin "date_month" >}} {{< cosin "date_year" >}}
|
{{< cosin_i18n "date_month" >}} {{< cosin "date_year" >}}
|
||||||
{{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) in {{< cosin "location_city" >}} statt.
|
{{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) in {{< cosin_i18n "location_city" >}} statt.
|
||||||
|
|
||||||
## Wie kann ich mich beteiligen?
|
## Wie kann ich mich beteiligen?
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,10 @@ seulement sur leur machines !
|
||||||
## Quand et où le CoSin aura lieu ?
|
## Quand et où le CoSin aura lieu ?
|
||||||
|
|
||||||
Cette année le CoSin aura lieu du
|
Cette année le CoSin aura lieu du
|
||||||
{{< cosin "date_day_name_start" >}} {{< cosin "date_day_start" >}} au
|
{{< cosin_i18n "date_day_name_start" >}} {{< cosin "date_day_start" >}} au
|
||||||
{{< cosin "date_day_name_end" >}} {{< cosin "date_day_end" >}}
|
{{< cosin_i18n "date_day_name_end" >}} {{< cosin "date_day_end" >}}
|
||||||
{{< cosin "date_month" >}}
|
{{< cosin_i18n "date_month" >}}
|
||||||
{{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) à {{< cosin "location_city" >}}.
|
{{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) à {{< cosin_i18n "location_city" >}}.
|
||||||
|
|
||||||
## Comment est-ce que je participe ?
|
## Comment est-ce que je participe ?
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,10 @@ solo al computer.
|
||||||
## Quando e dove si svolge la CoSin?
|
## Quando e dove si svolge la CoSin?
|
||||||
|
|
||||||
Quest'anno la CoSin si svolge da
|
Quest'anno la CoSin si svolge da
|
||||||
{{< cosin "date_day_name_start" >}} {{< cosin "date_day_start" >}}. fino a
|
{{< cosin_i18n "date_day_name_start" >}} {{< cosin "date_day_start" >}}. fino a
|
||||||
{{< cosin "date_day_name_end" >}} {{< cosin "date_day_end" >}}.
|
{{< cosin_i18n "date_day_name_end" >}} {{< cosin "date_day_end" >}}.
|
||||||
{{< cosin "date_month" >}} {{< cosin "date_year" >}},
|
{{< cosin_i18n "date_month" >}} {{< cosin "date_year" >}},
|
||||||
{{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) a {{< cosin "location_city" >}}.
|
{{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) a {{< cosin_i18n "location_city" >}}.
|
||||||
|
|
||||||
## Come posso contribuire?
|
## Come posso contribuire?
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ menu:
|
||||||
## Datum
|
## Datum
|
||||||
|
|
||||||
Das CoSin {{< cosin "date_year" >}} findet vom
|
Das CoSin {{< cosin "date_year" >}} findet vom
|
||||||
Freitag, {{< cosin "date_day_start" >}}. {{< cosin "date_month" >}} bis zum
|
Freitag, {{< cosin "date_day_start" >}}. {{< cosin_i18n "date_month" >}} bis zum
|
||||||
Sonntag, {{< cosin "date_day_end" >}}. {{< cosin "date_month" >}}
|
Sonntag, {{< cosin "date_day_end" >}}. {{< cosin_i18n "date_month" >}}
|
||||||
{{< cosin "date_year" >}} statt.
|
{{< cosin "date_year" >}} statt.
|
||||||
|
|
||||||
## Kosten
|
## Kosten
|
||||||
|
|
|
@ -10,8 +10,8 @@ menu:
|
||||||
## Date
|
## Date
|
||||||
|
|
||||||
CoSin {{< cosin "date_year" >}} takes place from
|
CoSin {{< cosin "date_year" >}} takes place from
|
||||||
{{< cosin "date_day_name_start" >}}, {{< cosin "date_month" >}} {{< cosin "date_day_start" >}}th until
|
{{< cosin_i18n "date_day_name_start" >}}, {{< cosin_i18n "date_month" >}} {{< cosin "date_day_start" >}}th until
|
||||||
{{< cosin "date_day_name_end" >}}, {{< cosin "date_month" >}} {{< cosin "date_day_end" >}}th
|
{{< cosin_i18n "date_day_name_end" >}}, {{< cosin_i18n "date_month" >}} {{< cosin "date_day_end" >}}th
|
||||||
{{< cosin "date_year" >}}.
|
{{< cosin "date_year" >}}.
|
||||||
|
|
||||||
## Cost
|
## Cost
|
||||||
|
|
|
@ -10,8 +10,8 @@ menu:
|
||||||
## Date
|
## Date
|
||||||
|
|
||||||
Le CoSin {{< cosin "date_year" >}} se déroule du
|
Le CoSin {{< cosin "date_year" >}} se déroule du
|
||||||
{{< cosin "date_day_name_start" >}} {{< cosin "date_day_start" >}} au
|
{{< cosin_i18n "date_day_name_start" >}} {{< cosin "date_day_start" >}} au
|
||||||
{{< cosin "date_day_name_end" >}} {{< cosin "date_day_end" >}} {{< cosin "date_month" >}}
|
{{< cosin_i18n "date_day_name_end" >}} {{< cosin "date_day_end" >}} {{< cosin_i18n "date_month" >}}
|
||||||
{{< cosin "date_year" >}}.
|
{{< cosin "date_year" >}}.
|
||||||
|
|
||||||
## Coûts
|
## Coûts
|
||||||
|
|
|
@ -10,10 +10,10 @@ menu:
|
||||||
## Data
|
## Data
|
||||||
|
|
||||||
Quest'anno la CoSin si svolge da
|
Quest'anno la CoSin si svolge da
|
||||||
{{< cosin "date_day_name_start" >}} {{< cosin "date_day_start" >}}. fino a
|
{{< cosin_i18n "date_day_name_start" >}} {{< cosin "date_day_start" >}}. fino a
|
||||||
{{< cosin "date_day_name_end" >}} {{< cosin "date_day_end" >}}. {{< cosin "date_month" >}}
|
{{< cosin_i18n "date_day_name_end" >}} {{< cosin "date_day_end" >}}. {{< cosin_i18n "date_month" >}}
|
||||||
{{< cosin "date_year" >}},
|
{{< cosin "date_year" >}},
|
||||||
{{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) a {{< cosin "location_city" >}}.
|
{{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}]({{< cosin "location_url" >}}) a {{< cosin_i18n "location_city" >}}.
|
||||||
|
|
||||||
## Costi
|
## Costi
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ menu:
|
||||||
|
|
||||||
## Ort
|
## Ort
|
||||||
|
|
||||||
Das CoSin findet {{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] in {{< cosin "location_city" >}} statt.
|
Das CoSin findet {{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] in {{< cosin_i18n "location_city" >}} statt.
|
||||||
|
|
||||||
## Photos
|
## Photos
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ menu:
|
||||||
|
|
||||||
## Location
|
## Location
|
||||||
|
|
||||||
This year's CoSin takes place {{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] in {{< cosin "location_city" >}}.
|
This year's CoSin takes place {{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] in {{< cosin_i18n "location_city" >}}.
|
||||||
|
|
||||||
## Photos
|
## Photos
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ menu:
|
||||||
|
|
||||||
## Lieu
|
## Lieu
|
||||||
|
|
||||||
Le CoSin se déroule {{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] à {{< cosin "location_city" >}}.
|
Le CoSin se déroule {{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] à {{< cosin_i18n "location_city" >}}.
|
||||||
|
|
||||||
## Photos
|
## Photos
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ menu:
|
||||||
|
|
||||||
## Luogo
|
## Luogo
|
||||||
|
|
||||||
La CoSin si svolge {{< cosin "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] a {{< cosin "location_city" >}}.
|
La CoSin si svolge {{< cosin_i18n "location_name_preposition" >}} [{{< cosin "location_name" >}}][1] a {{< cosin_i18n "location_city" >}}.
|
||||||
|
|
||||||
## Foto
|
## Foto
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
{{ $value := index .Site.Data.cosin (.Get 0) }}
|
{{ $value := index .Site.Data.cosin (.Get 0) }}
|
||||||
{{- i18n $value | default $value -}}
|
{{- $value -}}
|
||||||
|
|
2
layouts/shortcodes/cosin_i18n.html
Normal file
2
layouts/shortcodes/cosin_i18n.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
{{ $value := index .Site.Data.cosin (.Get 0) }}
|
||||||
|
{{- i18n $value -}}
|
Loading…
Reference in a new issue