Skip to content

Commit

Permalink
Merge pull request #84 from nickydotnet/master
Browse files Browse the repository at this point in the history
french translation file (with select option in language component)
  • Loading branch information
joshzcold authored Jul 10, 2024
2 parents ec8c88b + 05eb778 commit 289b560
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 35 deletions.
71 changes: 36 additions & 35 deletions components/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,40 @@ import React from "react";
import { useTranslation } from "react-i18next";

export default function LanguageSwitcher(props) {
const { i18n, t } = useTranslation();
return (
<div className="flex flex-row space-x-5">
<svg
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
role="img"
width="2em"
height="2em"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
>
<path
d="M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10s10-4.486 10-10S17.514 2 12 2zM4 12c0-.899.156-1.762.431-2.569L6 11l2 2v2l2 2l1 1v1.931C7.061 19.436 4 16.072 4 12zm14.33 4.873C17.677 16.347 16.687 16 16 16v-1a2 2 0 0 0-2-2h-4v-3a2 2 0 0 0 2-2V7h1a2 2 0 0 0 2-2v-.411C17.928 5.778 20 8.65 20 12a7.947 7.947 0 0 1-1.67 4.873z"
fill="gray"
/>
</svg>
<select
className="bg-secondary-300 text-foreground"
value={i18n.language}
onChange={
props.onChange
? props.onChange
: (e) => {
i18n.changeLanguage(e.target.value);
}
}
>
<option value="en">English ({t("english")})</option>
<option value="es">Español ({t("spanish")})</option>
<option value="id">Indonesian ({t("indonesian")})</option>
<option value="et">Estonian ({t("estonian")})</option>
</select>
</div>
);
const { i18n, t } = useTranslation();
return (
<div className="flex flex-row space-x-5">
<svg
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
role="img"
width="2em"
height="2em"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
>
<path
d="M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10s10-4.486 10-10S17.514 2 12 2zM4 12c0-.899.156-1.762.431-2.569L6 11l2 2v2l2 2l1 1v1.931C7.061 19.436 4 16.072 4 12zm14.33 4.873C17.677 16.347 16.687 16 16 16v-1a2 2 0 0 0-2-2h-4v-3a2 2 0 0 0 2-2V7h1a2 2 0 0 0 2-2v-.411C17.928 5.778 20 8.65 20 12a7.947 7.947 0 0 1-1.67 4.873z"
fill="gray"
/>
</svg>
<select
className="bg-secondary-300 text-foreground"
value={i18n.language}
onChange={
props.onChange
? props.onChange
: (e) => {
i18n.changeLanguage(e.target.value);
}
}
>
<option value="en">English ({t("english")})</option>
<option value="es">Español ({t("spanish")})</option>
<option value="id">Indonesian ({t("indonesian")})</option>
<option value="et">Estonian ({t("estonian")})</option>
<option value="fr">Français ({t("french")})</option>
</select>
</div>
);
}
115 changes: 115 additions & 0 deletions public/locales/fr/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"indonesian": "Indon\u00e9sien",
"english": "Anglais",
"error": "Erreur",
"family": "Famille",
"feud": "En or",
"Final Round": "Tour final",
"language": "Langue",
"Load Game": "Charger une partie",
"loading": "Chargement ...",
"mistake": "Maladresse",
"multiplier": "Multiplicateur",
"My Family": "Ma famille",
"name": "Nom",
"Create New Game": "Cr\u00e9er une nouvelle partie",
"Next Round": "prochain tour",
"number": "{{count, number}}",
"part two": "PT2",
"Please load a game": "Veuillez charger une partie",
"points": "Points",
"question": "Question",
"randomName": "Famille Dupont",
"register": "Enregistrement",
"Reveal Answer": "Montrer la r\u00e9ponse",
"Reveal First Round Answers": "Montrer les r\u00e9ponse du premier tour",
"round number {{count, number}} has an empty question": "le tour numr\u00e9ro {{count, number}} a une question vide",
"round item {{count, number}} has empty answer at answer number {{answernum, number}}": "le tour numr\u00e9ro {{count, number}} a une r\u00e9ponse vide au num\u00e9ro{{answernum, number}}",
"round item {{count, number}} has {{zero, number}} points answer number {{answernum, number}}": "le tour numr\u00e9ro {{count, number}} a {{zero, number}} points dans la r\u00e9ponse {{answernum, number}}",
"round number {{count, number}} has no answers": "le tour numr\u00e9ro {{count, number}} est sans r\u00e9ponse",
"round number {{count, number}} has no point multipler": "le tour numr\u00e9ro {{count, number}} est sans multiplicateur",
"round": "Tour",
"rounds": "Tours",
"save": "Sauvegarder",
"second": "sec",
"seconds": "Secondes",
"spanish": "Espagnol",
"Start Round 1": "Commencer le tour 1",
"start": "D\u00e9marrer",
"Start Timer": "D\u00e9marrer minuteur",
"Stop Timer": "Stopper le minuteur",
"submit": "Envoyer",
"Team Name": "Nom de l\u0027\u00e9quipe",
"team": "\u00e9quipe",
"timer": "minuteur",
"time": "temps",
"Title Card": "Titre de la Carte",
"Title Music": "Titre de la musique",
"Title Text": "Titre du texte",
"title": "Titre",
"total": "Total",
"win": "VICTOIRE!",
"No Answer": "Pas de r\u00e9ponse",
"Award points": "Award points",
"Partner's Answer": "r\u00e9ponse du partenaire",
"Already Answered": "d\u00e9j\u00E0 r\u00e9pondu",
"Open Game Window": "ouvrir la partie",
"Quit": "Quitter",
"room code": "code de la salle",
"quit": "quitter",
"play": "jouer",
"input your name": "entrez votre nom",
"room code is not correct length, should be 4 characters": "le code salle est incorrect, il doit comporter 4 lettres",
"4 letter room code": "Code de votre salle en 4 lettres",
"enter your name": "mettez votre nom ou pseudo",
"host": "R\u00e9gie",
"No game session. retry from the admin window": "Pas de partie en cours, veuillez essayer depuis la page admin",
"Gets Points": "a les points",
"Team 1": "\u00e9quipe 1",
"Team 2": "\u00e9quipe 2",
"Current Screen": "\u00e9cran actuel",
"Points": "Points",
"Buzzer Order": "Ordre des Buzzers",
"players": "joueurs",
"Clear Buzzers": "r\u00e9initialiser les Buzzers",
"Changing rounds also clears buzzers": "Changer les tours, r\u00e9initialise les buzzers",
"Back To": "Revenir \u00E0",
"Hide First Round Answers": "Cachez les premi\u00E8res r\u00E9ponses",
"Answer": "R\u00e9ponse",
"Change Me": "Changez moi",
"Waiting for host to start": "Attendez le pr\u00e9sentateur pour d\u00e9marrer",
"pick your team": "choississez votre \u00e9quipe",
"and": "et",
"Fast Money": "Argent facile",
"Family Feud": "Famille en or",
"You need to create some rounds to save the game": "Vous devez cr\u00e9er des tours pour enregistrer la partie",
"new-cold-feud": "new-cold-feud",
"Logo image is too large. 2MB is the limit": "La taille du fichier de logo est trop importante. 2mb est la limite",
"Unknown file type": "type de fichier inconnu",
"logo upload": "charger un logo",
"(must be smaller than 2MB)": "(doit etre plus petit que 2mb)",
"error reading file": "erreur de lecture du fichier",
"This csv file is too large": "Le fichier csv est trop gros",
"Unknown file type in game load": "Le type de fichier n\u0027est pas reconnu",
".json, .csv": ".json, .csv",
"Error: round and final round is greater than document has available.": "Le tour et le tour finale sont sup\u00E9rieurs \u00E0 la capacit\u00E9 du document.",
"Error: csv file needs expected format: Question, Answer, Points (number), Answer, Points (number) ...": "le fichier csv doit avoir le format attendu : Question, r\u00E9ponse, Points (nombre), r\u00E9ponse, Points (nombre)",
"CSV file upload": "charger le fichier CSV",
"No Header": "Pas d\u0027ent\u00EAte",
"Rounds": "Tours",
"Final Rounds": "Tour final",
"Final Round Timer": "tour de la finale minut\u00e9e",
"2nd Final Round Timer": "2\u00E8me tour de la finale minut\u00e9e",
"Cancel": "Annuler",
"Submit": "Envoyer",
"Final Round Title": "Titre du tour final",
"fast money": "argent rapide",
"Hide questions": "questions cah\u00e9es",
"hide questions on the game window and player buzzer screens": "questions cah\u00e9e dans la partie ainsi que les buzzers",
"buzzer is reset between rounds": "les buzzers sont r\u00e9initialis\u00e9s",
"estonian": "estonien",
"donate": "don",
"email": "email",
"source code": "code source",
"Question": "Question"
}

0 comments on commit 289b560

Please sign in to comment.