Skip to content

Commit

Permalink
Add French localization (#41)
Browse files Browse the repository at this point in the history
* Factorize locale.ts + initiate French localization

* Add french localization

* Fix Typo

* Forgot messages

* Corrections
  • Loading branch information
pixup1 authored Dec 22, 2024
1 parent f5499b9 commit 9fda266
Show file tree
Hide file tree
Showing 9 changed files with 223 additions and 39 deletions.
12 changes: 6 additions & 6 deletions frontend/src/components/CreateUpdateMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const Presets: Component<{
{t('Everybody')}
</option>
<option value="false" selected={!presetIsPublic()}>
{t('Onl logged in users')}
{t('Only logged in users')}
</option>
</SelectInput>
<button
Expand Down Expand Up @@ -362,7 +362,7 @@ export const CreateUpdateMatch: Component<
/>
</Show>
<TextInput
label={t('Game Server IP Address')}
label={t('Game Server IP')}
value={dto.gameServer?.ip ?? ''}
disabled={dto.gameServer === null}
class={getChangedClasses(
Expand All @@ -385,7 +385,7 @@ export const CreateUpdateMatch: Component<
onInput={(e) => setDto('gameServer', 'port', parseInt(e.currentTarget.value))}
/>
<TextInput
label={t('Game Server Rcon Password')}
label={t('Game Server RCON Password')}
value={dto.gameServer?.rconPassword ?? ''}
disabled={dto.gameServer === null}
class={getChangedClasses(
Expand Down Expand Up @@ -515,7 +515,7 @@ export const CreateUpdateMatch: Component<
>
<SvgKeyboardArrowDown />
</button>
<div class="tooltip" data-tip={t('Add new Step')}>
<div class="tooltip" data-tip={t('Add new step')}>
<button
class="btn btn-square btn-xs join-item"
onClick={() => {
Expand Down Expand Up @@ -557,7 +557,7 @@ export const CreateUpdateMatch: Component<
/>
</Modal>
<div class="prose pt-4">
<h2>{t('Rcon Commands')}</h2>
<h2>{t('RCON Commands')}</h2>
</div>
<TextArea
label={t('Init')}
Expand Down Expand Up @@ -697,7 +697,7 @@ export const CreateUpdateMatch: Component<
value="QUIT_SERVER"
selected={dto.matchEndAction === 'QUIT_SERVER'}
>
{t('Quit server via Rcon after match end')}
{t('Quit server via RCON after match end')}
</option>
</SelectInput>
<TextInput
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ManagedGameServerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ManagedGameServerList: Component<{
<th>{t('#')}</th>
<th>{t('IP')}</th>
<th>{t('Port')}</th>
<th>{t('Rcon Password')}</th>
<th>{t('RCON Password')}</th>
<th>{t('Can Be Used?')}</th>
<th>{t('Used By')}</th>
<th>{t('Actions')}</th>
Expand Down Expand Up @@ -66,7 +66,7 @@ export const ManagedGameServerList: Component<{
)}
</td>
<td class="space-x-2">
<div class="tooltip" data-tip={t('Rcon')}>
<div class="tooltip" data-tip={t('RCON')}>
<A
href={`/gameservers/${managedGameServer.ip}:${managedGameServer.port}`}
class="btn btn-circle btn-outline"
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/MatchCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,26 @@ export const MatchCard: Component<{
[t('Stop Match'), mustConfirm(stop)],
[t('Restart Match'), mustConfirm(restartElection)],
[
t('Execute Rcon Init Commands'),
t('Execute RCON Init Commands'),
() => patchMatch({ _execRconCommandsInit: true }),
],
[
t('Execute Rcon Knife Commands'),
t('Execute RCON Knife Commands'),
() => patchMatch({ _execRconCommandsKnife: true }),
],
[
t('Execute Rcon Match Commands'),
t('Execute RCON Match Commands'),
() => patchMatch({ _execRconCommandsMatch: true }),
],
[
t('Execute Rcon End Commands'),
t('Execute RCON End Commands'),
() => patchMatch({ _execRconCommandsEnd: true }),
],
[t('Share Match with Token'), () => modalRef?.showModal()],
[t('Share Match With Token'), () => modalRef?.showModal()],
[t('Edit Match'), goToEditPage],
]
: [
[t('Share Match with Token'), () => modalRef?.showModal()],
[t('Share Match With Token'), () => modalRef?.showModal()],
[t('Edit Match'), goToEditPage],
]
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Rcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const RconCard: Component<{

return (
<Card class="text-center">
<h2 class="text-lg font-bold">{t('Rcon')}</h2>
<h2 class="text-lg font-bold">{t('RCON')}</h2>
<ScrollArea scroll>{output()}</ScrollArea>
<div class="h-4"></div>
<TextInput
Expand All @@ -77,7 +77,7 @@ const RconCard: Component<{
}
}
)}
placeholder={t('Execute rcon command...')}
placeholder={t('Execute RCON command...')}
/>
<ErrorComponent errorMessage={errorMessage()} />
</Card>
Expand Down
183 changes: 183 additions & 0 deletions frontend/src/locales/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"Create": "Créer",
"Matches": "Matchs",
"Game Servers": "Serveurs de jeu",
"Login": "Connexion",
"Logout": "Déconnexion",
"Chat": "Tchat",
"Send chat message...": "Envoyer un message dans le tchat...",
"Select Preset": "Sélectionner Préréglage",
"Delete preset": "Supprimer préréglage",
"Preset Name": "Nom Préréglage",
"Can be used by": "Utilisable par",
"Everybody": "Tout le monde",
"Only logged in users": "Utilisateurs connectés seulement",
"Add new preset": "Ajouter nouveau préréglage",
"Update preset": "Enregistrer préréglage",
"The map pool has too few maps.": "La liste de cartes est trop courte.",
"Teams": "Équipes",
"Team A Name": "Nom Équipe A",
"Team B Name": "Nom Équipe B",
"Game Server": "Serveur de jeu",
"Use Own Game Server": "Utiliser son propre serveur de jeu",
"Game Server IP": "IP Serveur",
"Game Server Port": "Port Serveur",
"Game Server RCON Password": "Mot de passe RCON Serveur",
"Map Pool": "Liste Cartes",
"Election Steps": "Étapes Sélection",
"Quick Load:": "Chargement Rapide :",
"Best of 1": "Best of 1",
"Best of 3": "Best of 3",
"Empty": "Vide",
"Add new step": "Ajouter une étape",
"RCON Commands": "Commandes RCON",
"Init": "Initialisation",
"Executed only once: when the match is created": "Exécuté une seule fois : lors de la création du match",
"Knife": "Knife",
"Executed at the start of a knife round": "Exécuté au début d'un knife round",
"Match": "Match",
"Executed at the start of each match map": "Exécuté au début de chaque carte du match",
"End": "Fin",
"Executed only once: after the end of the last map": "Exécuté une seule fois : à la fin de la dernière carte",
"Advanced Settings": "Paramètres Avancés",
"Hide": "Cacher",
"Show": "Montrer",
"Mode": "Mode",
"Single match (stops when match is finished)": "Match unique (s'arrête quand le match est fini)",
"Loop mode (starts again after match is finished)": "Mode boucle (recommence après la fin du match)",
"Match End Action": "Action Fin Match",
"None": "Aucune",
"Kick all players after match end": "Kick tous les joueurs à la fin du match",
"Quit server via RCON after match end": "Quitter le serveur via RCON à la fin du match",
"TMT Log Address": "Adresse Logs TMT",
"HTTP log receiver from the perspective of the game server": "Destinataire de logs HTTP de la perspective du serveur de jeu",
"Webhook URL": "URL Webhook",
"HTTP address to receive TMT's webhooks": "Adresse HTTP pour recevoir les webhooks de TMT",
"Webhook Headers": "En-têtes du webhook",
"Additional headers that will be added to each webhook request": "En-têtes supplémentaires ajoutés à chaque requête de webhook",
"Match Passthrough": "Passerelle Match",
"Custom value to identify the match in 3rd party tools": "Valeur personnalisée pour identifier le match dans des outils tiers",
"Team A Advantage": "Avantage Équipe A",
"Team A Passthrough": "Passerelle Équipe A",
"Custom value to identify this team in 3rd party tools": "Valeur personnalisée pour identifier cette équipe dans des outils tiers",
"Team A Player Steam IDs 64": "Steam IDs 64 Joueurs Équipe A",
"Force players by their steam id 64 into team A": "Forcer les joueurs par leur Steam ID 64 dans l'équipe A",
"Team B Advantage": "Avantage Équipe B",
"Team B Passthrough": "Passerelle Équipe B",
"Team B Player Steam IDs 64": "Steam IDs 64 Joueurs Équipe B",
"Force players by their steam id 64 into team B": "Forcer les joueurs par leur Steam ID 64 dans l'équipe B",
"Can Clinch": "Clinch Possible",
"Ends match series after a map if a winner is determined": "Termine la série de matchs après une carte si un gagnant est déterminé",
"Match State": "État du Match",
"Overrides the match state (does not execute anything)": "Remplace l'état du match (n'exécute rien)",
"Election": "Sélection",
"Match Map": "Carte Match",
"Finished": "Terminé",
"JSON Payload": "Instructions JSON",
"This will be used to create the match": "Ceci sera utilisé pour créer le match",
"This will be used to update the match": "Ceci sera utilisé pour modifier le match",
"JSON parse error: Invalid JSON": "Erreur de traitement JSON : JSON invalide",
"Create Match": "Créer Match",
"Update Match": "Modifier Match",
"Map Mode": "Mode Carte",
"Map Who": "Équipe Carte",
"Map Fixed": "Carte Déterminée",
"Side Mode": "Mode Camp",
"Side Who": "Équipe Camp",
"Side Fixed": "Camp Déterminé",
"Add": "Ajouter",
"Map ban by": "Bannissement de carte par",
"Map pick by": "Choix de carte par",
"Fixed map": "Carte déterminée",
"Map must be agreed on": "La carte doit être un accord mutuel",
"Random map ban": "Bannissement de carte aléatoire",
"Random map pick": "Choix de carte aléatoire",
"Team A starts as CT": "L'équipe A commence comme CT",
"Team A starts as T": "L'équipe A commence comme T",
"Team B starts as CT": "L'équipe B commence comme CT",
"Team B starts as T": "L'équipe B commence comme T",
"Team X starts as CT": "L'équipe X commence comme CT",
"Team X starts as T": "L'équipe X commence comme T",
"Team Y starts as CT": "L'équipe Y commence comme CT",
"Team Y starts as T": "L'équipe Y commence comme T",
"Team A": "Équipe A",
"Team B": "Équipe B",
"Team X": "Équipe X",
"Team Y": "Équipe Y",
"Side pick by": "Choix de camp par",
"Knife for side": "Knife pour camp",
"Random sides": "Camps aléatoires",
"Logs": "Logs",
"#": "#",
"IP": "IP",
"Port": "Port",
"RCON Password": "Mot de passe RCON",
"Can Be Used?": "Utilisable ?",
"Used By": "Utilisé Par",
"Actions": "Actions",
"RCON": "RCON",
"Stop Match": "Arrêter Match",
"Restart Match": "Recommencer Match",
"Execute RCON Init Commands": "Exécuter Commandes RCON Initialisation",
"Execute RCON Knife Commands": "Exécuter Commandes RCON Knife",
"Execute RCON Match Commands": "Exécuter Commandes RCON Match",
"Execute RCON End Commands": "Exécuter Commandes RCON Fin",
"Share Match With Token": "Partager Match Avec Token",
"Edit Match": "Modifier Match",
"Map Wins": "Victoires Carte",
"draws": "égalités",
"ELECTION": "SÉLECTION",
"MATCH_MAP": "CARTE_MATCH",
"FINISHED": "TERMINÉ",
"Copy & share the link below.": "Copiez & partagez le lien ci-dessous.",
"Warning: The link gives full admin access to (only) this match.": "Attention : Le lien donne un accès administrateur complet à (seulement) ce match.",
"Online Players": "Joueurs En Ligne",
"Age": "Âge",
"Best of": "Best of",
"Current Map": "Carte Actuelle",
"Map State": "État Carte",
"Map Score": "Score Carte",
"Details": "Détails",
"enter map name": "entrer nom de carte",
"enter map state": "entrer état de carte",
"change map name": "changer nom de carte",
"change map state": "changer état de carte",
"load round backup": "charger sauvegarde de round",
"switch to this map": "passer à cette carte",
"switch team internals": "échanger propriétés d'équipes",
"Load Round Backup": "Charger Sauvegarde de Round",
"close": "fermer",
"Match is not live": "Le match n'est pas en cours",
"This match is not being supervised.": "Ce match n'est pas supervisé.",
"Start Supervising": "Commencer Supervision",
"This match was not stopped properly.": "Ce match n'a pas été arrêté correctement.",
"The next time TMT starts, it will try to supervise it again." : "La prochaine fois que TMT démarrera, il réessaiera de le superviser.",
"Stop it to prevent supervising retries.": "Arrêtez le pour empêcher d'essayer la supervision.",
"Stop Supervising": "Arrêter Supervision",
"Players": "Joueurs",
"Not Assigned": "Non Assigné",
"Online": "En Ligne",
"Offline": "Hors-Ligne",
"Execute RCON command...": "Lancer une commande RCON...",
"Select Round Backup File": "Choisir Fichier de Sauvegarde de Round",
"ip: port invalid": "ip: port invalide",
"Game servers managed by TMT can be used to automatically assign them to new matches.": "Les serveurs de jeu gérés par TMT peuvent automatiquement être assignés aux nouveaux matchs.",
"Anonymous (not logged in) users can then also use them for their games.": "Les utilisateurs anonymes (non connectés) peuvent alors aussi les utiliser pour leurs parties.",
"Add Game Server": "Ajouter Serveur de Jeu",
"Can be used for new matches?": "Utilisable par des nouveaux matchs ?",
"Login Failed": "Échec Connexion",
"Password/Token": "Mot de Passe / Token",
"Log Out": "Déconnnexion",
"Back to the Match": "Retour au Match",
"Live Matches": "Matchs en Cours",
"Only show matches that are currently being supervised": "Afficher seulement les matchs actuellement supervisés",
"Not Live": "Pas en Cours",
"Only show offline matches (not supervised)": "Afficher seulement les matchs hors-ligne (non supervisés)",
"Dangling Matches": "Matchs Suspendus",
"Only show offline matches which have not been properly stopped": "Afficher seulement les matchs hors-ligne qui n'ont pas été arrêtés correctement",
"A custom filter from the URL is used": "Un filtre personnalisé dans l'URL est utilisé",
"Custom Filter": "Filtre Personnalisé",
"Column Settings": "Paramètres de Colonnes",
"Error": "Erreur",
"caution, please confirm": "attention, veuillez confirmer"
}
2 changes: 1 addition & 1 deletion frontend/src/pages/gameServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const GameServerPage: Component = () => {
});

return Number.isNaN(port) ? (
<ErrorComponent errorMessage={t('ip:port invalid')} />
<ErrorComponent errorMessage={t('ip: port invalid')} />
) : (
<div class="space-y-5">
<GameServerCard ipPort={ip + ':' + port} serverPassword={serverPassword()} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/gameServers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const GameServersPage: Component = () => {
/>

<TextInput
label={t('Game Server Rcon Password')}
label={t('Game Server RCON Password')}
value={rconPassword()}
onInput={(e) => setRconPassword(e.currentTarget.value)}
/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/matches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const filterOptions: FilterOption[] = [
{
title: t('Dangling Matches'),
search: '?isLive=false&isStopped=false&state=ELECTION&state=MATCH_MAP',
label: t('Only show offline matches, which have not been properly stopped'),
label: t('Only show offline matches which have not been properly stopped'),
includeNewMatches: false,
},
];
Expand Down
Loading

0 comments on commit 9fda266

Please sign in to comment.