feat(translation): fully translated to german
This commit is contained in:
parent
0965f9e115
commit
deee8e82b2
9 changed files with 123 additions and 59 deletions
|
@ -61,15 +61,46 @@ func GetAttendiesByEventPublicTable(c *fiber.Ctx) error {
|
||||||
MessageID: "Name",
|
MessageID: "Name",
|
||||||
PluralCount: 1,
|
PluralCount: 1,
|
||||||
}),
|
}),
|
||||||
|
"Guest": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "Guest",
|
||||||
|
PluralCount: 1,
|
||||||
|
}),
|
||||||
|
"Spotter": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "Spotter",
|
||||||
|
PluralCount: 1,
|
||||||
|
}),
|
||||||
|
"Suiter": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "Suiter",
|
||||||
|
PluralCount: 1,
|
||||||
|
}),
|
||||||
|
"Photographer": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "Photographer",
|
||||||
|
PluralCount: 1,
|
||||||
|
}),
|
||||||
|
"SpecialAnimal": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "SpecialAnimal",
|
||||||
|
PluralCount: 1,
|
||||||
|
}),
|
||||||
|
"Registered": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "Registered",
|
||||||
|
}),
|
||||||
|
"SuiterWaitinglist": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "SuiterWaitinglist",
|
||||||
|
}),
|
||||||
|
"WaitinglistDesc": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "WaitinglistDesc",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
sort.Sort(entities.ByRegistrationTime(attendies))
|
sort.Sort(entities.ByRegistrationTime(attendies))
|
||||||
roleSuiter, _ := service.GetRoleByName("Suiter")
|
roleSuiter, _ := service.GetRoleByName("Suiter")
|
||||||
roleSpotter, _ := service.GetRoleByName("Spotter")
|
roleSpotter, _ := service.GetRoleByName("Spotter")
|
||||||
|
roleSpecialAnimal, _ := service.GetRoleByName("SpecialAnimal")
|
||||||
suiterWaitingList := util.CreateSuiterWaitingList(
|
suiterWaitingList := util.CreateSuiterWaitingList(
|
||||||
&attendies,
|
&attendies,
|
||||||
event.SuiterPerSpotter,
|
event.SuiterPerSpotter,
|
||||||
&roleSuiter,
|
&roleSuiter,
|
||||||
&roleSpotter,
|
&roleSpotter,
|
||||||
|
&roleSpecialAnimal,
|
||||||
)
|
)
|
||||||
fmt.Printf("len(attendies): %v\n", len(attendies))
|
fmt.Printf("len(attendies): %v\n", len(attendies))
|
||||||
return c.Render("app/views/index", fiber.Map{
|
return c.Render("app/views/index", fiber.Map{
|
||||||
|
|
|
@ -7,9 +7,10 @@ body {
|
||||||
|
|
||||||
main {
|
main {
|
||||||
min-width: 60vw;
|
min-width: 60vw;
|
||||||
|
max-width: 65vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.textWhite {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,17 @@ import (
|
||||||
"ulmer-furs.de/pretix-proxy/v2/entities"
|
"ulmer-furs.de/pretix-proxy/v2/entities"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateSuiterWaitingList(attendiesList *entities.AttendiesList, suiterPerSpotter *int, suiter, spotter *entities.Role) entities.AttendiesList {
|
func CreateSuiterWaitingList(attendiesList *entities.AttendiesList, suiterPerSpotter *int, suiter, spotter, specialAnimal *entities.Role) entities.AttendiesList {
|
||||||
spotterCount := attendiesList.CountByRole(*spotter)
|
spotterCount := attendiesList.CountByRole(*spotter)
|
||||||
suiterCount := spotterCount * *suiterPerSpotter
|
suiterCount := spotterCount * *suiterPerSpotter
|
||||||
var suiterCounter int
|
var suiterCounter int
|
||||||
var suiterWatinglist entities.AttendiesList
|
var suiterWatinglist entities.AttendiesList
|
||||||
var i int
|
var i int
|
||||||
for i < len(*attendiesList) {
|
for i < len(*attendiesList) {
|
||||||
if (*attendiesList)[i].Role == *suiter {
|
if (*attendiesList)[i].Role == *suiter || (*attendiesList)[i].Role == *specialAnimal {
|
||||||
suiterCounter++
|
suiterCounter++
|
||||||
}
|
}
|
||||||
if suiterCounter > suiterCount && (*attendiesList)[i].Role == *suiter {
|
if suiterCounter > suiterCount && ((*attendiesList)[i].Role == *suiter || (*attendiesList)[i].Role == *specialAnimal) {
|
||||||
suiterWatinglist = append(suiterWatinglist, (*attendiesList)[i])
|
suiterWatinglist = append(suiterWatinglist, (*attendiesList)[i])
|
||||||
*attendiesList = append((*attendiesList)[:i], (*attendiesList)[i+1:]...)
|
*attendiesList = append((*attendiesList)[:i], (*attendiesList)[i+1:]...)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
<h1>{{.Title}}</h1>
|
<h1 class="textWhite">{{.Title}}</h1>
|
||||||
{{template "table" .}}
|
{{template "table" .}}
|
||||||
<p>Test:</p>
|
|
||||||
<p>{{.Locals.HelloWorld}}</p>
|
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,20 +1,56 @@
|
||||||
{{define "table"}}
|
{{define "table"}}
|
||||||
<h1>{{ index . "Event Name" }} {{ .Locals.Attendie }}</h1>
|
<h1 class="textWhite">{{ index . "Event Name" }} {{ .Locals.Attendie }}</h1>
|
||||||
<h2></h2>
|
<h2 class="textWhite">{{ .Locals.Registered }}</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="tableHeading">
|
<tr class="tableHeading">
|
||||||
<th>{{ .Locals.Name }}</th>
|
<th>{{ .Locals.Name }}</th>
|
||||||
<th>{{ .Locals.Role }}</th>
|
<th>{{ .Locals.Role }}</th>
|
||||||
<th>Time</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .Attendies}}
|
{{range $suiter := .Attendies }}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{.Nickname}}</td>
|
<td>{{ $suiter.Nickname }}</td>
|
||||||
<td>{{.Role.Name}}</td>
|
{{ if eq $suiter.Role.Name "Suiter" }}
|
||||||
<td>{{.RegistrationTime}}</td>
|
<td>{{ $.Locals.Suiter }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "SpecialAnimal" }}
|
||||||
|
<td>{{ $.Locals.SpecialAnimal }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "Spotter" }}
|
||||||
|
<td>{{ $.Locals.Spotter }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "Photograph" }}
|
||||||
|
<td>{{ $.Locals.Photographer }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "Guest" }}
|
||||||
|
<td>{{ $.Locals.Guest }}</td>
|
||||||
|
{{ end }}
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<h2 class="textWhite">{{ .Locals.SuiterWaitinglist }}</h2>
|
||||||
|
<p class="textWhite">{{ .Locals.WaitinglistDesc}}</p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr class="tableHeading">
|
||||||
|
<th>{{ .Locals.Name }}</th>
|
||||||
|
<th>{{ .Locals.Role }}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{range $suiter := .SuiterWaitingList }}
|
||||||
|
<tr>
|
||||||
|
<td>{{ $suiter.Nickname }}</td>
|
||||||
|
{{ if eq $suiter.Role.Name "Suiter" }}
|
||||||
|
<td>{{ $.Locals.Suiter }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "SpecialAnimal" }}
|
||||||
|
<td>{{ $.Locals.SpecialAnimal }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "Spotter" }}
|
||||||
|
<td>{{ $.Locals.Spotter }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "Photograph" }}
|
||||||
|
<td>{{ $.Locals.Photographer }}</td>
|
||||||
|
{{ else if eq $suiter.Role.Name "Guest" }}
|
||||||
|
<td>{{ $.Locals.Guest }}</td>
|
||||||
|
{{ end }}
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -44,11 +44,11 @@ var defaultMessages = []i18n.Message{
|
||||||
Other: "Registered",
|
Other: "Registered",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "SuiterWatinglist",
|
ID: "SuiterWaitinglist",
|
||||||
Other: "Suiter Watinglist",
|
Other: "Suiter Watinglist",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "WatinglistDesc",
|
ID: "WaitinglistDesc",
|
||||||
Other: "We set a ratio of Suiters per Spotter for each event in order to keep the count of suiters manageble for them. If you are listed here we sadly don't have enough spotters yet.",
|
Other: "We set a ratio of Suiters per Spotter for each event in order to keep the count of suiters manageble for them. If you are listed here we sadly don't have enough spotters yet.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
"one": "Teilnehmer*in",
|
"one": "Teilnehmer*in",
|
||||||
"other": "Teilnehmende"
|
"other": "Teilnehmende"
|
||||||
},
|
},
|
||||||
|
"Guest": {
|
||||||
|
"hash": "sha1-7b7f214bbd4af36f25668b0ddade965422d342fd",
|
||||||
|
"one": "Gast",
|
||||||
|
"other": "Gäste"
|
||||||
|
},
|
||||||
"HelloWorld": {
|
"HelloWorld": {
|
||||||
"hash": "sha1-6225ffc638ce81e53cdf7868fe0c7435594f11e4",
|
"hash": "sha1-6225ffc638ce81e53cdf7868fe0c7435594f11e4",
|
||||||
"other": "Hallo neuere Welt"
|
"other": "Hallo neuere Welt"
|
||||||
|
@ -13,9 +18,41 @@
|
||||||
"one": "Name",
|
"one": "Name",
|
||||||
"other": "Namen"
|
"other": "Namen"
|
||||||
},
|
},
|
||||||
|
"Photographer": {
|
||||||
|
"hash": "sha1-dc41992cfe878fe6744f94c3a3fc5843d9f1bc11",
|
||||||
|
"one": "Pfotograph*in",
|
||||||
|
"other": "Pfotographen"
|
||||||
|
},
|
||||||
|
"Registered": {
|
||||||
|
"hash": "sha1-a844fcf834e7d026e7936e042c0ce2777b7fb4d9",
|
||||||
|
"other": "Angemeldet"
|
||||||
|
},
|
||||||
"Role": {
|
"Role": {
|
||||||
"hash": "sha1-47dcc27d6e87ece8baebe7e3877a261a5467093d",
|
"hash": "sha1-47dcc27d6e87ece8baebe7e3877a261a5467093d",
|
||||||
"one": "Rolle",
|
"one": "Rolle",
|
||||||
"other": "Rollen"
|
"other": "Rollen"
|
||||||
|
},
|
||||||
|
"SpecialAnimal": {
|
||||||
|
"hash": "sha1-7f937e9e4906c8f52977132faa76b81f3a331e45",
|
||||||
|
"one": "#SpezialTier",
|
||||||
|
"other": "#SpezialTiere"
|
||||||
|
},
|
||||||
|
"Spotter": {
|
||||||
|
"hash": "sha1-6f53dff03ced62b694851ffe37aab682b4b2b227",
|
||||||
|
"one": "Spotter",
|
||||||
|
"other": "Spotter"
|
||||||
|
},
|
||||||
|
"Suiter": {
|
||||||
|
"hash": "sha1-eb6248e60da77b4df76de9b35efe44178ee34ead",
|
||||||
|
"one": "Suiter",
|
||||||
|
"other": "Suiter"
|
||||||
|
},
|
||||||
|
"SuiterWaitinglist": {
|
||||||
|
"hash": "sha1-a5d3dc94fc4f3f0604f0cc5e077c0c9eb43340d4",
|
||||||
|
"other": "Suiter Warteliste"
|
||||||
|
},
|
||||||
|
"WaitinglistDesc": {
|
||||||
|
"hash": "sha1-aadc433a212fca8d927e9134520f5a10aa7e4263",
|
||||||
|
"other": "Wir setzen für jedes Event ein Verhältnis von Suitern pro Spotter fest, damit die Spotter auch noch alle versorgen können. Falls du hier gelistet bist, haben sich leider noch nicht genügend Spotter angemeldet."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,6 @@
|
||||||
"one": "Suiter",
|
"one": "Suiter",
|
||||||
"other": "Suiters"
|
"other": "Suiters"
|
||||||
},
|
},
|
||||||
"SuiterWatinglist": "Suiter Watinglist",
|
"SuiterWaitinglist": "Suiter Watinglist",
|
||||||
"WatinglistDesc": "We set a ratio of Suiters per Spotter for each event in order to keep the count of suiters manageble for them. If you are listed here we sadly don't have enough spotters yet."
|
"WaitinglistDesc": "We set a ratio of Suiters per Spotter for each event in order to keep the count of suiters manageble for them. If you are listed here we sadly don't have enough spotters yet."
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
{
|
|
||||||
"Guest": {
|
|
||||||
"hash": "sha1-7b7f214bbd4af36f25668b0ddade965422d342fd",
|
|
||||||
"one": "Guest",
|
|
||||||
"other": "Guets"
|
|
||||||
},
|
|
||||||
"Photographer": {
|
|
||||||
"hash": "sha1-dc41992cfe878fe6744f94c3a3fc5843d9f1bc11",
|
|
||||||
"one": "Photographer",
|
|
||||||
"other": "Photographers"
|
|
||||||
},
|
|
||||||
"Registered": {
|
|
||||||
"hash": "sha1-a844fcf834e7d026e7936e042c0ce2777b7fb4d9",
|
|
||||||
"other": "Registered"
|
|
||||||
},
|
|
||||||
"SpecialAnimal": {
|
|
||||||
"hash": "sha1-7f937e9e4906c8f52977132faa76b81f3a331e45",
|
|
||||||
"one": "#SpecialAnimal",
|
|
||||||
"other": "#SpecialAnimals"
|
|
||||||
},
|
|
||||||
"Spotter": {
|
|
||||||
"hash": "sha1-6f53dff03ced62b694851ffe37aab682b4b2b227",
|
|
||||||
"one": "Spotter",
|
|
||||||
"other": "Spotters"
|
|
||||||
},
|
|
||||||
"Suiter": {
|
|
||||||
"hash": "sha1-eb6248e60da77b4df76de9b35efe44178ee34ead",
|
|
||||||
"one": "Suiter",
|
|
||||||
"other": "Suiters"
|
|
||||||
},
|
|
||||||
"SuiterWatinglist": {
|
|
||||||
"hash": "sha1-a5d3dc94fc4f3f0604f0cc5e077c0c9eb43340d4",
|
|
||||||
"other": "Suiter Watinglist"
|
|
||||||
},
|
|
||||||
"WatinglistDesc": {
|
|
||||||
"hash": "sha1-aadc433a212fca8d927e9134520f5a10aa7e4263",
|
|
||||||
"other": "We set a ratio of Suiters per Spotter for each event in order to keep the count of suiters manageble for them. If you are listed here we sadly don't have enough spotters yet."
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue