diff --git a/cryptide_project/src/Pages/Home.js b/cryptide_project/src/Pages/Home.js
index 1c9925a..4f77db6 100644
--- a/cryptide_project/src/Pages/Home.js
+++ b/cryptide_project/src/Pages/Home.js
@@ -2,7 +2,7 @@ import React from 'react';
import './Home.css'; // Créez un fichier CSS pour styliser votre composant
import '../App.css';
import { Link } from 'react-router-dom';
-
+import { FormattedMessage } from 'react-intl';
function Home() {
@@ -15,21 +15,21 @@ function Home() {
L'HISTOIRE
- "La cryptozoologie étudie les traces des monstres de légende : les cryptides. Yétis, Chupacabra, bête du gévaudan, Dahut, ect., sont des sujets très sérieux pour vous… Croisez les indices et soyez le premier à les découvrir!"
+
LE JEU
- "Chaque joueur possède un indice sur le terrain où se trouve la créature. En recoupant vos informations, il ne peut y avoir qu'une case qui y corresponde. Mais le but est d'être le premier à la trouver. Interrogez vos collègues, et néanmoins concurrents. Ils ne peuvent vous répondre que par «non» ou «peut-être», avec beaucoup de logique et un brin d'audace, vous pourrez rentrer dans la légende!"
+
LES +
-
Une mécanique de déduction époustouflante.
-
Une rejouabilité immense.
-
Un thème surprenant et fort.
+
+
+
diff --git a/cryptide_project/src/Translations/en.json b/cryptide_project/src/Translations/en.json
new file mode 100644
index 0000000..83bd120
--- /dev/null
+++ b/cryptide_project/src/Translations/en.json
@@ -0,0 +1,12 @@
+{
+ "languageSelector": {
+ "french": "French",
+ "english": "English"
+ },
+
+ "home.histoire": "Cryptozoology studies the traces of legendary monsters: cryptids. Yetis, Chupacabra, beast of the gevaudan, Dahut, etc. , are very serious topics for you… Cross the clues and be the first to discover them!",
+ "home.jeu": "Each player has a clue on the field where the creature is located. By cross-referencing your information, there can only be one box. But the goal is to be the first to find it. Ask your colleagues, and nevertheless competitors. They can only answer you by «no» or «maybe», with a lot of logic and a bit of audacity, you can enter the legend!",
+ "home.plus.1": "A mind-blowing deduction mechanism.",
+ "home.plus.2": "An immense replayability.",
+ "home.plus.3": "A surprising and strong theme."
+}
\ No newline at end of file
diff --git a/cryptide_project/src/Translations/fr.json b/cryptide_project/src/Translations/fr.json
new file mode 100644
index 0000000..3f4fc3e
--- /dev/null
+++ b/cryptide_project/src/Translations/fr.json
@@ -0,0 +1,10 @@
+{
+ "languageSelector.french": "Français",
+ "languageSelector.english": "Anglais",
+
+ "home.histoire": "La cryptozoologie étudie les traces des monstres de légende : les cryptides. Yétis, Chupacabra, bête du gévaudan, Dahut, etc., sont des sujets très sérieux pour vous… Croisez les indices et soyez le premier à les découvrir!",
+ "home.jeu": "Chaque joueur possède un indice sur le terrain où se trouve la créature. En recoupant vos informations, il ne peut y avoir qu'une case qui y corresponde. Mais le but est d'être le premier à la trouver. Interrogez vos collègues, et néanmoins concurrents. Ils ne peuvent vous répondre que par «non» ou «peut-être», avec beaucoup de logique et un brin d'audace, vous pourrez rentrer dans la légende!",
+ "home.plus.1": "Une mécanique de déduction époustouflante.",
+ "home.plus.2": "Une rejouabilité immense.",
+ "home.plus.3": "Un thème surprenant et fort."
+}
\ No newline at end of file
From 0dd3e64b13273bfd98329ec4722441562c8d21af Mon Sep 17 00:00:00 2001
From: Pierre Ferreira
Date: Tue, 7 Nov 2023 11:55:29 +0100
Subject: [PATCH 2/3] =?UTF-8?q?impl=C3=A9mentation=20de=20toute=20la=20log?=
=?UTF-8?q?ique=20de=20traduction=20dans=20la=20page=20Home=20(avec=20le?=
=?UTF-8?q?=20texte=20actuel=20:art:?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
cryptide_project/src/Components/NavBar.js | 41 +++++++++++++++++------
cryptide_project/src/Pages/Home.js | 20 +++++------
cryptide_project/src/Translations/en.json | 30 +++++++++++++----
cryptide_project/src/Translations/fr.json | 24 +++++++++++--
4 files changed, 87 insertions(+), 28 deletions(-)
diff --git a/cryptide_project/src/Components/NavBar.js b/cryptide_project/src/Components/NavBar.js
index adf6e36..e3e499e 100644
--- a/cryptide_project/src/Components/NavBar.js
+++ b/cryptide_project/src/Components/NavBar.js
@@ -1,8 +1,17 @@
import React from 'react';
+
+/* Naviagtion */
import { Navbar, Container, Nav, NavDropdown } from 'react-bootstrap';
+
+/* Lang */
+import { FormattedMessage } from 'react-intl';
+
+/* Icon */
import { BiLogInCircle } from 'react-icons/bi';
-import { BsFillPersonPlusFill } from 'react-icons/bs'
+import { BsFillPersonPlusFill } from 'react-icons/bs';
+import { HiLanguage } from 'react-icons/hi2';
+/* Components */
import './NavBar.css';
function AppNavbar({ changeLocale }) {
@@ -18,22 +27,34 @@ function AppNavbar({ changeLocale }) {
diff --git a/cryptide_project/src/Pages/Home.js b/cryptide_project/src/Pages/Home.js
index 4f77db6..05ccbe4 100644
--- a/cryptide_project/src/Pages/Home.js
+++ b/cryptide_project/src/Pages/Home.js
@@ -13,21 +13,21 @@ function Home() {
-
L'HISTOIRE
+
-
LE JEU
+
-
LES +
+
-
+
@@ -37,15 +37,15 @@ function Home() {
-
Temps : 45 minutes
-
Joueurs : 3 à 5 joueurs
-
Age : 10 ans et +
+
+
+
-------------------------------
-
Créé par : Hal Duncan & Ruth Veevers
-
Illustré par : Kwanchai Moriya
+
Hal Duncan & Ruth Veevers
+
Kwanchai Moriya
{/* */}
- Aller à la page Page2
+
);
diff --git a/cryptide_project/src/Translations/en.json b/cryptide_project/src/Translations/en.json
index 83bd120..acc8709 100644
--- a/cryptide_project/src/Translations/en.json
+++ b/cryptide_project/src/Translations/en.json
@@ -1,12 +1,30 @@
{
- "languageSelector": {
- "french": "French",
- "english": "English"
- },
-
+ "languageSelector.french": "French",
+ "languageSelector.english": "English",
+
+ "home.histoire.title": "HISTORY",
"home.histoire": "Cryptozoology studies the traces of legendary monsters: cryptids. Yetis, Chupacabra, beast of the gevaudan, Dahut, etc. , are very serious topics for you… Cross the clues and be the first to discover them!",
+
+ "home.jeu.title": "THE GAME",
"home.jeu": "Each player has a clue on the field where the creature is located. By cross-referencing your information, there can only be one box. But the goal is to be the first to find it. Ask your colleagues, and nevertheless competitors. They can only answer you by «no» or «maybe», with a lot of logic and a bit of audacity, you can enter the legend!",
+
+ "home.plus.title": "STRENGTH",
"home.plus.1": "A mind-blowing deduction mechanism.",
"home.plus.2": "An immense replayability.",
- "home.plus.3": "A surprising and strong theme."
+ "home.plus.3": "A surprising and strong theme.",
+
+ "game.time": "Time : 45 minutes",
+ "game.players": "Players : 3 to 5 players",
+ "game.age": "Age: 10 years and over",
+ "game.createdBy": "Created By :",
+ "game.illustratedBy": "Illustrated By :",
+
+ "log_in":" Log in ",
+ "sign_up":" Sign up ",
+
+ "join" : "Join",
+ "create_room" : "Create room",
+ "play_solo" : "Single player",
+
+ "play" : "PLAY"
}
\ No newline at end of file
diff --git a/cryptide_project/src/Translations/fr.json b/cryptide_project/src/Translations/fr.json
index 3f4fc3e..6f6ec71 100644
--- a/cryptide_project/src/Translations/fr.json
+++ b/cryptide_project/src/Translations/fr.json
@@ -2,9 +2,29 @@
"languageSelector.french": "Français",
"languageSelector.english": "Anglais",
+ "home.histoire.title": "L'HISTOIRE",
"home.histoire": "La cryptozoologie étudie les traces des monstres de légende : les cryptides. Yétis, Chupacabra, bête du gévaudan, Dahut, etc., sont des sujets très sérieux pour vous… Croisez les indices et soyez le premier à les découvrir!",
+
+ "home.jeu.title": "LE JEU",
"home.jeu": "Chaque joueur possède un indice sur le terrain où se trouve la créature. En recoupant vos informations, il ne peut y avoir qu'une case qui y corresponde. Mais le but est d'être le premier à la trouver. Interrogez vos collègues, et néanmoins concurrents. Ils ne peuvent vous répondre que par «non» ou «peut-être», avec beaucoup de logique et un brin d'audace, vous pourrez rentrer dans la légende!",
+
+ "home.plus.title": "LES +",
"home.plus.1": "Une mécanique de déduction époustouflante.",
"home.plus.2": "Une rejouabilité immense.",
- "home.plus.3": "Un thème surprenant et fort."
-}
\ No newline at end of file
+ "home.plus.3": "Un thème surprenant et fort.",
+
+ "game.time": "Temps : 45 minutes",
+ "game.players": "Joueurs : 3 à 5 joueurs",
+ "game.age": "Âge : 10 ans et +",
+ "game.createdBy": "Créé par :",
+ "game.illustratedBy": "Illustré par :",
+
+ "log_in":" Se connecter ",
+ "sign_up":" S'inscrire ",
+
+
+ "join" : "Rejoindre",
+ "create_room" : "Créer une partie",
+ "play_solo" : "Jouer seul",
+ "play" : "JOUER"
+}
From b2425be81532e62a353eeb3491b63fa933cf4d57 Mon Sep 17 00:00:00 2001
From: Pierre Ferreira
Date: Tue, 7 Nov 2023 13:55:00 +0100
Subject: [PATCH 3/3] mise a jour des fichiers de js a tsx :technologist:
---
cryptide_project/package-lock.json | 13 +++++++++++++
cryptide_project/package.json | 1 +
cryptide_project/src/{App.js => App.tsx} | 13 +++++++++----
.../src/Components/{NavBar.js => NavBar.tsx} | 3 ++-
cryptide_project/src/Pages/{Home.js => Home.tsx} | 0
cryptide_project/src/Pages/{Jouer.js => Jouer.tsx} | 0
.../src/Pages/{LoginForm.js => LoginForm.tsx} | 0
.../src/Pages/{SignUpForm.js => SignUpForm.tsx} | 0
cryptide_project/tsconfig.json | 14 ++++++++++++++
9 files changed, 39 insertions(+), 5 deletions(-)
rename cryptide_project/src/{App.js => App.tsx} (86%)
rename cryptide_project/src/Components/{NavBar.js => NavBar.tsx} (98%)
rename cryptide_project/src/Pages/{Home.js => Home.tsx} (100%)
rename cryptide_project/src/Pages/{Jouer.js => Jouer.tsx} (100%)
rename cryptide_project/src/Pages/{LoginForm.js => LoginForm.tsx} (100%)
rename cryptide_project/src/Pages/{SignUpForm.js => SignUpForm.tsx} (100%)
create mode 100644 cryptide_project/tsconfig.json
diff --git a/cryptide_project/package-lock.json b/cryptide_project/package-lock.json
index 87b4528..1a71877 100644
--- a/cryptide_project/package-lock.json
+++ b/cryptide_project/package-lock.json
@@ -19,6 +19,7 @@
"react-intl": "^6.5.2",
"react-router-dom": "^6.18.0",
"react-scripts": "5.0.1",
+ "typescript": "^5.2.2",
"web-vitals": "^2.1.4"
}
},
@@ -16587,6 +16588,18 @@
"is-typedarray": "^1.0.0"
}
},
+ "node_modules/typescript": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
+ "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/unbox-primitive": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
diff --git a/cryptide_project/package.json b/cryptide_project/package.json
index 4b7c859..b5867f3 100644
--- a/cryptide_project/package.json
+++ b/cryptide_project/package.json
@@ -13,6 +13,7 @@
"react-intl": "^6.5.2",
"react-router-dom": "^6.18.0",
"react-scripts": "5.0.1",
+ "typescript": "^5.2.2",
"web-vitals": "^2.1.4"
},
"scripts": {
diff --git a/cryptide_project/src/App.js b/cryptide_project/src/App.tsx
similarity index 86%
rename from cryptide_project/src/App.js
rename to cryptide_project/src/App.tsx
index ee23deb..c66f9df 100644
--- a/cryptide_project/src/App.js
+++ b/cryptide_project/src/App.tsx
@@ -6,11 +6,11 @@ import { IntlProvider } from 'react-intl';
/* Page */
import Home from './Pages/Home';
import Jouer from './Pages/Jouer';
-import Login from './Pages/LoginForm.js';
-import SignUp from './Pages/SignUpForm.js';
+import Login from './Pages/LoginForm';
+import SignUp from './Pages/SignUpForm';
/* Component */
-import AppNavbar from './Components/NavBar.js';
+import AppNavbar from './Components/NavBar';
/* nav */
import { BrowserRouter, Route, Routes } from "react-router-dom";
@@ -36,6 +36,8 @@ function App() {
//const locale = 'fr';
const [locale, setLocale] = useState('fr');
+
+ // @ts-ignore
const changeLocale = (newLocale) => {
setLocale(newLocale);
};
@@ -47,11 +49,14 @@ function App() {
//
//
//
+
+
+ // @ts-ignore
- } />
+ } />
} />
} />
} />
diff --git a/cryptide_project/src/Components/NavBar.js b/cryptide_project/src/Components/NavBar.tsx
similarity index 98%
rename from cryptide_project/src/Components/NavBar.js
rename to cryptide_project/src/Components/NavBar.tsx
index e3e499e..b728eb8 100644
--- a/cryptide_project/src/Components/NavBar.js
+++ b/cryptide_project/src/Components/NavBar.tsx
@@ -14,7 +14,8 @@ import { HiLanguage } from 'react-icons/hi2';
/* Components */
import './NavBar.css';
-function AppNavbar({ changeLocale }) {
+// @ts-ignore
+function AppNavbar({ changeLocale}) {
return (
diff --git a/cryptide_project/src/Pages/Home.js b/cryptide_project/src/Pages/Home.tsx
similarity index 100%
rename from cryptide_project/src/Pages/Home.js
rename to cryptide_project/src/Pages/Home.tsx
diff --git a/cryptide_project/src/Pages/Jouer.js b/cryptide_project/src/Pages/Jouer.tsx
similarity index 100%
rename from cryptide_project/src/Pages/Jouer.js
rename to cryptide_project/src/Pages/Jouer.tsx
diff --git a/cryptide_project/src/Pages/LoginForm.js b/cryptide_project/src/Pages/LoginForm.tsx
similarity index 100%
rename from cryptide_project/src/Pages/LoginForm.js
rename to cryptide_project/src/Pages/LoginForm.tsx
diff --git a/cryptide_project/src/Pages/SignUpForm.js b/cryptide_project/src/Pages/SignUpForm.tsx
similarity index 100%
rename from cryptide_project/src/Pages/SignUpForm.js
rename to cryptide_project/src/Pages/SignUpForm.tsx
diff --git a/cryptide_project/tsconfig.json b/cryptide_project/tsconfig.json
new file mode 100644
index 0000000..9d04a87
--- /dev/null
+++ b/cryptide_project/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "moduleResolution": "node",
+ "target": "es5",
+ "lib": ["dom", "es2015"],
+ "jsx": "react",
+ "strict": true,
+
+ },
+}
+// "noImplicitAny": false,
\ No newline at end of file