Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stustanet-website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
016967
stustanet-website
Commits
a82f0a75
Commit
a82f0a75
authored
Apr 22, 2018
by
Julien Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
office hours translation
parent
5737d86c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
data/DE.toml
+24
-0
24 additions, 0 deletions
data/DE.toml
i18n/de.toml
+9
-0
9 additions, 0 deletions
i18n/de.toml
i18n/en.toml
+9
-0
9 additions, 0 deletions
i18n/en.toml
layouts/shortcodes/officehours.html
+29
-5
29 additions, 5 deletions
layouts/shortcodes/officehours.html
with
71 additions
and
5 deletions
data/DE.toml
0 → 100644
+
24
−
0
View file @
a82f0a75
Wochentage
=
[
"Montag"
,
"Dienstag"
,
"Mittwoch"
,
"Donnerstag"
,
"Freitag"
,
"Samstag"
,
"Sonntag"
]
Monate
=
[
"Januar"
,
"Februar"
,
"März"
,
"April"
,
"Mai"
,
"Juni"
,
"Juli"
,
"August"
,
"September"
,
"Oktober"
,
"November"
,
"Dezember"
]
This diff is collapsed.
Click to expand it.
i18n/de.toml
+
9
−
0
View file @
a82f0a75
[
activeUsers
]
other
=
"Aktive User"
[
date
]
other
=
"Datum"
[
editPage
]
other
=
"Diese Seite bearbeiten"
...
...
@@ -16,5 +19,11 @@ other = "Bezahlte Mitarbeiter"
[
servers
]
other
=
"Server"
[
time
]
other
=
"Uhrzeit"
[
toHomepage
]
other
=
"Zur Startseite"
[
weekday
]
other
=
"Wochentag"
This diff is collapsed.
Click to expand it.
i18n/en.toml
+
9
−
0
View file @
a82f0a75
[
activeUsers
]
other
=
"Active Users"
[
date
]
other
=
"Date"
[
editPage
]
other
=
"Edit this Page"
...
...
@@ -16,5 +19,11 @@ other = "Paid Employees"
[
servers
]
other
=
"Servers"
[
time
]
other
=
"Time"
[
toHomepage
]
other
=
"To Homepage"
[
weekday
]
other
=
"Weekday"
This diff is collapsed.
Click to expand it.
layouts/shortcodes/officehours.html
+
29
−
5
View file @
a82f0a75
<ul>
{{ range getJSON "https://sprechstunden.stusta.de/appointments.json"}}
<li>
{{ dateFormat "Monday, Jan 2, 2006 15:04" (int .start) }} – {{ dateFormat "15:04" (int .end) }}
</li>
<table>
<thead>
<tr>
<th>
{{ i18n "weekday" }}
</th>
<th>
{{ i18n "date" }}
</th>
<th>
{{ i18n "time" }}
</th>
</tr>
</thead>
<tbody>
{{ $appointments := getJSON "https://sprechstunden.stusta.de/manyappointments.json" }}
{{ range first 5 $appointments }}
<tr>
<td>
{{ if (eq $.Site.Language.Lang "de") }}
{{ index $.Site.Data.DE.Wochentage (sub (time (int .start)).Weekday 1) }}
{{ else }}
{{ dateFormat "Monday" (int .start) }}
{{ end }}
</td>
<td>
{{ if (eq $.Site.Language.Lang "de") }}
{{ (time (int .start)).Day }}. {{ index $.Site.Data.DE.Monate (sub (time (int .start)).Month 1) }} {{ (time (int .start)).Year }}
{{ else }}
{{ dateFormat "January 2, 2006" (int .start) }}
{{ end }}
</td>
<td>
{{ dateFormat "15:04" (int .start) }} – {{ dateFormat "15:04" (int .end) }}
</td>
</tr>
{{ end }}
</ul>
</tbody>
</table>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment