From fd4e629d4b0dbb432acd2cf48df3a7d5eac07fd6 Mon Sep 17 00:00:00 2001
From: Evan Goode
- {{ if or (and (not .User.IsAdmin) (not .App.Config.AllowAddingDeletingPlayers)) (eq .MaxPlayerCount 0) }}
- {{ if .AdminView }}{{ .TargetUser.Username }} is{{ else }}You are{{ end }} not allowed to create new players.
- {{ if .AdminView }}You can override this limit since you're an admin.{{ end }}
+ {{ if or (and (not .User.IsAdmin) (not .App.Config.AllowAddingDeletingPlayers)) (eq .MaxPlayerCount 0) }}
+ {{ if .AdminView }}
+ {{ call .T
+ "%s is not allowed to add new players. You can override this limit since you're an admin."
+ .TargetUser.Username
+ }}
+ {{ else }}
+ {{ call .T "You are not allowed to add new players." }}
+ {{ end }}
{{ else if (gt .MaxPlayerCount 0) }}
- {{ if .AdminView }}{{ .TargetUser.Username }}'s{{ else }}Your{{ end }} account can have up to {{ .MaxPlayerCount }} player(s).
- {{ if .AdminView }}You can override this limit since you're an admin.{{ end }}
+ {{ if .AdminView }}
+ {{ call .TN
+ "%s is only allowed to have %d player. You can override this limit since you're an admin."
+ "%s is allowed to have up to %d players. You can override this limit since you're an admin."
+ .MaxPlayerCount
+ .TargetUser.Username
+ .MaxPlayerCount
+ }}
+ {{ else }}
+ {{ call .TN
+ "You are only allowed to have %d player."
+ "You are allowed to have up to %d players."
+ .MaxPlayerCount
+ .TargetUser.Username
+ .MaxPlayerCount
+ }}
+ {{ end }}
{{ else }}
- {{ if .AdminView }}{{ .TargetUser.Username }}'s{{ else }}Your{{ end }} account can have an unlimited number of players.
- {{ end }}
- Create a new player with a random UUID: {{ call .T "Create a new player with a random UUID:" }}
- Create a new player with the UUID of an existing
- {{ .App.Config.ImportExistingPlayer.Nickname }} player.
- Requires verification that you own the account.
- {{ call .T
+ "Create a new player with the UUID of an existing %s player. Requires verification that you own the account."
+ .App.Config.ImportExistingPlayer.Nickname
+ }}
- Create a new player with the UUID of an existing
- {{ .App.Config.ImportExistingPlayer.Nickname }} player.
- {{ call .T
+ "Create a new player with the UUID of an existing %s player."
+ .App.Config.ImportExistingPlayer.Nickname
+ }}
- These external accounts are linked to {{ if .AdminView }}{{ .TargetUser.Username }}'s{{ else }}your{{ end }} {{ .App.Config.ApplicationName }} account:
- {{ if .AdminView }} {{ call .T
+ "These external accounts are linked to %s's %s account:"
+ .TargetUser.Username
+ .App.Config.ApplicationName
+ }}{{ else }}{{ call .T
+ "These external accounts are linked to your %s account:"
+ .App.Config.ApplicationName
+ }}{{ end }}
- No external accounts are linked to {{ if .AdminView }}{{ .TargetUser.Username }}'s{{ else }}your{{ end }} {{ .App.Config.ApplicationName }} account. {{ if .AdminView }}{{ call .T
+ "No external accounts are linked to %s's account."
+ .TargetUser.Username
+ }}{{ else }}{{ call .T
+ "No external accounts are linked to your account."
+ }}
- {{ $invite.CreatedAt.Format "Jan _2 15:04:05 MST 2006" }}
+ {{ $invite.CreatedAt.Format (call $.T "Jan _2 15:04:05 MST 2006") }}
@@ -28,7 +28,12 @@
id="unlink-{{ $providerName }}"
action="{{ $.App.FrontEndURL }}/web/oidc-unlink"
method="post"
- onsubmit="return confirm('Are you sure you want to unlink your {{ $providerName }} account? You will no longer be able to log in to your {{ $.App.Config.ApplicationName }} account using {{ $providerName }}.');"
+ onsubmit="return confirm('{{
+ call $.T "Are you sure you want to unlink your %s account? You will no longer be able to log in to your %s account using %s."
+ $providerName
+ $.App.Config.ApplicationName
+ $providerName
+ }}');"
>
@@ -37,15 +42,19 @@
{{ end }}
-
+ {{ call $.T "Link with %s" $provider.Name }}
{{ if .AdminView }}{{ .TargetUser.Username }}'s{{ else }}Your{{ end }} players
+ {{ if .AdminView }}{{ call .T
+ "%s's players" .TargetUser.Username
+ }}{{ else }}{{ call .T
+ "Your players"
+ }}{{ end }}
{{ if .TargetUser.Players }}
{{ else }}
- No players yet.
+ {{ call .T "No players yet." }}
{{ end }}
-
-
@@ -63,15 +72,12 @@
>
Player
- UUID
+ {{ call .T "Player" }}
+ {{ call .T "UUID" }}
{{ if or .App.Config.AllowAddingDeletingPlayers .User.IsAdmin }}
- Delete Player
+ {{ call .T "Delete Player" }}
{{ end }}
- {{ $player.Name }}
+ {{ $player.Name }}
{{ $player.UUID }}
{{ if or $.App.Config.AllowAddingDeletingPlayers $.User.IsAdmin }}
-
+
{{ end }}
@@ -79,32 +85,55 @@
Create a new player
+ {{ call .T "Create a new player" }}
{{ else }}
- Import a(n) {{ .App.Config.ImportExistingPlayer.Nickname }} player
+ {{ call .T "Import a player from %s" .App.Config.ImportExistingPlayer.Nickname }}
{{ if .App.Config.ImportExistingPlayer.RequireSkinVerification }}
- Linked accounts
+ {{ call .T "Linked accounts" }}
{{ if gt (len $.LinkedOIDCProviderNames) 0 }}
-
{{ range $providerName := $.LinkedOIDCProviderNames }}
@@ -178,8 +211,8 @@
@@ -187,20 +220,26 @@
{{ else }}
-
Delete Account
+ {{ call .T "Delete Account" }}