Better way of i18n dates

This commit is contained in:
Raoul 2018-04-24 02:06:01 +02:00
parent b56a351f99
commit 1b7c5a2573
No known key found for this signature in database
GPG key ID: C7493D73B67C1842
13 changed files with 67 additions and 61 deletions

View file

@ -1,12 +1,14 @@
title = "Chaos Singularity"
cos_value = 0.45580812693525397
# Set to false if date for next year is not known yet:
date_known = true
date_day_start = 15
date_day_end = 17
date_month = 6
date_month = "Juni"
date_year = 2018
date_day_name_start = "Freitag"
@ -16,10 +18,7 @@ date_day_name_end = "Sonntag"
place_known = true
location = "Villa Ritter"
city_de = "Biel"
city_fr = "Bienne"
city_it = "Bienna"
city_en = "Biel"
city = "Biel"
registration_open = true
@ -44,3 +43,6 @@ schedule_urls = [
irc_server = "irc://irc.chaostreff.ch/"
irc_channel = "#cosin"
orga_email = "cosin2018@cosin.ch"

View file

@ -1,12 +0,0 @@
1 = "gennaio"
2 = "febbraio"
3 = "marzo"
4 = "aprile"
5 = "maggio"
6 = "giugno"
7 = "luglio"
8 = "agosto"
9 = "settembre"
10 = "ottobre"
11 = "novembre"
12 = "dicembre"

View file

@ -1,12 +0,0 @@
1 = "janvier"
2 = "février"
3 = "mars"
4 = "avril"
5 = "mai"
6 = "juin"
7 = "juillet"
8 = "août"
9 = "septembre"
10 = "octobre"
11 = "novembre"
12 = "décembre"

View file

@ -1,12 +0,0 @@
1 = "Januar"
2 = "Februar"
3 = "März"
4 = "April"
5 = "Mai"
6 = "Juni"
7 = "Juli"
8 = "August"
9 = "September"
10 = "Oktober"
11 = "November"
12 = "Dezember"

View file

@ -1,12 +0,0 @@
1 = "January"
2 = "February"
3 = "March"
4 = "April"
5 = "May"
6 = "June"
7 = "July"
8 = "August"
9 = "September"
10 = "October"
11 = "November"
12 = "December"

13
i18n/de.toml Normal file
View file

@ -0,0 +1,13 @@
[Juni]
other = "Juni"
[Freitag]
other = "Freitag"
[Sonntag]
other = "Sonntag"
[Biel]
other = "Biel"

13
i18n/en.toml Normal file
View file

@ -0,0 +1,13 @@
[Juni]
other = "june"
[Freitag]
other = "Friday"
[Sonntag]
other = "Sunday"
[Biel]
other = "Biel"

13
i18n/fr.toml Normal file
View file

@ -0,0 +1,13 @@
[Juni]
other = "june"
[Freitag]
other = "vendredi"
[Sonntag]
other = "dimanche"
[Biel]
other = "Bienne"

13
i18n/it.toml Normal file
View file

@ -0,0 +1,13 @@
[Juni]
other = "june"
[Freitag]
other = "venerdì"
[Sonntag]
other = "domenica"
[Biel]
other = "Bienna"

View file

@ -10,11 +10,11 @@
<p>
{{ if .date_known }}
<strong>Datum:</strong> {{ .date_day_start }}.-{{ .date_day_end }}. {{ index $.Site.Data.monate (string .date_month) }} {{ .date_year }}<br/>
<strong>Datum:</strong> {{ .date_day_start }}.-{{ .date_day_end }}. {{ i18n .date_month }} {{ .date_year }}<br/>
{{ end }}
{{ if .place_known }}
<strong>Ort:</strong> {{ .location }} in <strong>{{ .city_de }}</strong><br/>
<strong>Ort:</strong> {{ .location }} in <strong>{{ i18n .city }}</strong><br/>
{{ end }}
{{ if .registration_open }}

View file

@ -10,11 +10,11 @@
<p>
{{ if .date_known }}
<strong>Date:</strong> {{ index $.Site.Data.months (string .date_month) }} {{ .date_day_start }}th - {{ .date_day_end }}th {{ .date_year }}<br/>
<strong>Date:</strong> {{ i18n .date_month }} {{ .date_day_start }}th - {{ .date_day_end }}th {{ .date_year }}<br/>
{{ end }}
{{ if .place_known }}
<strong>Location:</strong> {{ .location }} in <strong>{{ .city_en }}</strong><br/>
<strong>Location:</strong> {{ .location }} in <strong>{{ i18n .city }}</strong><br/>
{{ end }}
{{ if .registration_open }}

View file

@ -10,11 +10,11 @@
<p>
{{ if .date_known }}
<strong>Date:</strong> {{ .date_day_start }}.-{{ .date_day_end }}. {{ index $.Site.Data.mois (string .date_month) }} {{ .date_year }}<br/>
<strong>Date:</strong> {{ .date_day_start }}.-{{ .date_day_end }}. {{ i18n .date_month }} {{ .date_year }}<br/>
{{ end }}
{{ if .place_known }}
<strong>Lieu:</strong> {{ .location }} à <strong>{{ .city_fr }}</strong><br/>
<strong>Lieu:</strong> {{ .location }} à <strong>{{ i18n .city }}</strong><br/>
{{ end }}
{{ if .registration_open }}

View file

@ -10,11 +10,11 @@
<p>
{{ if .date_known }}
<strong>Data:</strong> {{ .date_day_start }}.-{{ .date_day_end }}. {{ index $.Site.Data.mese (string .date_month) }} {{ .date_year }}<br/>
<strong>Data:</strong> {{ .date_day_start }}.-{{ .date_day_end }}. {{ i18n .date_month }} {{ .date_year }}<br/>
{{ end }}
{{ if .place_known }}
<strong>Luogo:</strong> {{ .location }} a <strong>{{ .city_it }}</strong><br/>
<strong>Luogo:</strong> {{ .location }} a <strong>{{ i18n .city }}</strong><br/>
{{ end }}
{{ if .registration_open }}