Skip to content

Commit

Permalink
Merge pull request #16 from GeekCornerGH/feat/translate-to-french
Browse files Browse the repository at this point in the history
feat: add French translation
  • Loading branch information
VojtaStruhar authored Jan 21, 2025
2 parents e5da0f3 + 946149b commit 5240371
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 2 deletions.
2 changes: 1 addition & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
integrations: [tailwind(), sitemap()],
i18n: {
defaultLocale: "en",
locales: ["en", "es"],
locales: ["en", "es", "fr"],

}
});
1 change: 1 addition & 0 deletions src/components/FlagSelect.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ let lang = Astro.currentLocale;
let descriptions = [
{ code: "en", flag: "🇬🇧" },
{ code: "es", flag: "🇪🇸" },
{ code: "fr": flag: "🇫🇷" }
];
---

Expand Down
67 changes: 67 additions & 0 deletions src/pages/fr/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
import config_json from "../../review_templates/template_en.json";
import PageLayout from "../../layouts/PageLayout.astro";
import OptionForm from "../../components/OptionForm.astro";
import FlagSelect from "../../components/FlagSelect.astro";
---

<PageLayout title="Modèle de review Steam">
<header class="bg-slate-700 text-white py-2 flex flex-col items-center">
<h1>{"---{ Modèle de review }---"}</h1>
<FlagSelect />
<p class="mt-0">☑ Magnifique</p>
</header>

<div class="max-w-screen-sm mx-auto px-4">
<p>
Cet outil simplifie la création de reviews copy-pasta pour Steam (et si vous
êtes sur ce site, c'est <em>parce que</em> c'est ce que vous voulez). Je les
trouves assez drôles, donc j'ai crée ce site pour me simplifier la vie.&nbsp;😆
</p>
<p>
Le code source est disponible sur &rarr; <a
href="https://github.com/VojtaStruhar/steam-review-template"
>
GitHub</a
>!
</p>
<p>
Le résultat final inclus un lien vers ce site, le garder est optionel, mais apprecié.
Merci beaucoup!
</p>
{
config_json.categories.map((category) => (
<OptionForm category={category} />
))
}
<div class="flex justify-center">
<button
id="output-button"
class="py-4 px-8 text-lg font-bold rounded-lg border-none shadow bg-amber-400 hover:cursor-pointer hover:shadow-lg transition-all"
>
Générer le review!</button
>
</div>

<div class="flex justify-center mt-4">
<button
id="copy-output"
class="py-2 px-4 text-lg rounded-lg border-none shadow bg-sky-100 hover:cursor-pointer hover:shadow-lg transition-all"
>
Copier</button
>
</div>
</div>
</PageLayout>

<style>
input[type="radio"],
input[type="checkbox"] {
transform: scale(1.25);
}

fieldset,
legend {
border: 1px solid #ccc;
}
</style>
4 changes: 3 additions & 1 deletion src/review_templates/general.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import english_template from "./template_en.json"
import french_template from "./template_fr.json"
import spanish_template from "./template_es.json"

export default {
en: english_template,
es: spanish_template
es: spanish_template,
fr: french_template
}
164 changes: 164 additions & 0 deletions src/review_templates/template_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"name": "Template",
"author": "Author",
"categories": [
{
"title": "Graphismes",
"type": "radio",
"options": [
"Beaux à en chialer (Quand tout est en Ultra)",
"Très bons",
"Bons",
"Corrects",
"Mauvais",
"Très mauvais",
"À vomir par terre"
]
},
{
"title": "Gameplay",
"type": "radio",
"options": [
"Très bon",
"Bon",
"Moyen",
"Bof",
"Mauvais",
"Passez votre chemain"
]
},
{
"title": "Audio",
"type": "radio",
"options": [
"Incroyable",
"Très bon",
"Très plaisant",
"C'est potable",
"Bof",
"Inécoutable"
]
},
{
"title": "Audience",
"type": "check",
"options": [
"Je ne conseillerais pas ce jeu à mon pire ennemi",
"Les enfants",
"Les ados",
"Les adultes",
"Ma grand-mère"
]
},
{
"title": "Configuration recommandée",
"type": "radio",
"options": [
"L'ordinateur de ma grand-mère",
"Entrée de gamme",
"Milieu de gamme",
"Haut de gamme",
"Très haut de gamme",
"Le PC de la NASA"
]
},
{
"title": "Taille du jeu",
"type": "radio",
"options": [
"Disquette",
"Old school",
"Correct",
"Gros",
"Prend 10% de mon disque de 1TO",
"Il faut acheter un disque dur entier pour ce jeu",
"Il faut investir dans un trou noir entier"
]
},
{
"title": "Prise en main",
"type": "radio",
"options": [
"Inné",
"Facile",
"Nécéssite quelques heures",
"Difficile",
"Nécéssite un nouveau cerveau"
]
},
{
"title": "Farming",
"type": "radio",
"options": [
"Rien à farmer",
"Seulement si vous voulez avancer dans les rangs",
"Pas nécéssaire pour progresser",
"Comme d'habitude",
"Nécéssite beaucoup de temps",
"Il faudrait une vie entière"
]
},
{
"title": "Histoire",
"type": "radio",
"options": [
"Pas d'histoire",
"Lore léger",
"Moyen",
"Bon",
"Très bon",
"Très bon à en remplacer votre vie"
]
},
{
"title": "Durée de vie",
"type": "radio",
"options": [
"Moins longue qu'une tasse de cafée",
"Brève",
"Moyenne",
"Longue",
"Infinie (et au-delà)"
]
},
{
"title": "Prix",
"type": "radio",
"options": [
"Gratuit!",
"Il faudrait me payer pour y jouer",
"Attendez une promo",
"Abordable",
"Pas cher",
"À ce prix là, c'est cadeau"
]
},
{
"title": "Bugs",
"type": "radio",
"options": [
"Bu- quoi?",
"Quelques bugs",
"Les bugs ne gènent pas le gameplay mais sont présents",
"Les bugs gènent le gameplay",
"Le jeu est une sorte de gros bug en phase terminal"
]
},
{
"title": "? / 10",
"type": "radio",
"options": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"
]
}
]
}

0 comments on commit 5240371

Please sign in to comment.