pull/21/head
Pierre-Louis Guhur 4 years ago
parent 187aac4f62
commit 9f4747b182

@ -1,4 +0,0 @@
{
"Voting platform": "__STRING_NOT_TRANSLATED__",
"Majority Judgment": "__STRING_NOT_TRANSLATED__"
}

@ -1,53 +0,0 @@
{
"Homepage": "__STRING_NOT_TRANSLATED__",
"Source code": "__STRING_NOT_TRANSLATED__",
"Who are we": "__STRING_NOT_TRANSLATED__",
"BetterVote": "__STRING_NOT_TRANSLATED__",
"Voting platform": "__STRING_NOT_TRANSLATED__",
"Majority Judgment": "__STRING_NOT_TRANSLATED__",
"Start an election": "__STRING_NOT_TRANSLATED__",
"Candidate/proposal name...": "__STRING_NOT_TRANSLATED__",
"Delete?": "__STRING_NOT_TRANSLATED__",
"Are you sure to delete": "__STRING_NOT_TRANSLATED__",
"the row": "__STRING_NOT_TRANSLATED__",
"Write here your question or introduce simple your election (250 characters max.)": "__STRING_NOT_TRANSLATED__",
"Please add at least 2 candidates.": "__STRING_NOT_TRANSLATED__",
"Question of the election": "__STRING_NOT_TRANSLATED__",
"Write here the question of your election": "__STRING_NOT_TRANSLATED__",
"For example:": "__STRING_NOT_TRANSLATED__",
"For the role of my representative, I judge this candidate...": "__STRING_NOT_TRANSLATED__",
"Candidates/Proposals": "__STRING_NOT_TRANSLATED__",
"Add a proposal": "__STRING_NOT_TRANSLATED__",
"Advanced options": "__STRING_NOT_TRANSLATED__",
"Starting date:": "__STRING_NOT_TRANSLATED__",
"Ending date: ": "__STRING_NOT_TRANSLATED__",
"Grades:": "__STRING_NOT_TRANSLATED__",
"You can select here the number of grades for your election": "__STRING_NOT_TRANSLATED__",
"5 = Excellent, Very good, Good, Fair, Passable": "__STRING_NOT_TRANSLATED__",
"Participants:": "__STRING_NOT_TRANSLATED__",
"Add here participants' emails": "__STRING_NOT_TRANSLATED__",
"List voters' emails in case the election is not opened": "__STRING_NOT_TRANSLATED__",
"Validate": "__STRING_NOT_TRANSLATED__",
"Confirm your vote": "__STRING_NOT_TRANSLATED__",
"The form contains no address.": "__STRING_NOT_TRANSLATED__",
"The election will be opened to anyone with the link": "__STRING_NOT_TRANSLATED__",
"Start the election": "__STRING_NOT_TRANSLATED__",
"Cancel": "__STRING_NOT_TRANSLATED__",
"Confirm": "__STRING_NOT_TRANSLATED__",
"Successful election creation!": "__STRING_NOT_TRANSLATED__",
"You can now share the election link to participants:": "__STRING_NOT_TRANSLATED__",
"Copy": "__STRING_NOT_TRANSLATED__",
"Here is the link for the results in real time:": "__STRING_NOT_TRANSLATED__",
"Keep these links carefully": "__STRING_NOT_TRANSLATED__",
"Participate now!": "__STRING_NOT_TRANSLATED__",
"t": "<0>Warning</0>: you will have no other choices to recover the links, and we will not be able to share them with you. For example, you can bookmark them in your browser.",
"Simple and free: organize an election with Majority Judgment.": "__STRING_NOT_TRANSLATED__",
"Start": "__STRING_NOT_TRANSLATED__",
"No advertising or ad cookies": "__STRING_NOT_TRANSLATED__",
"Oops! This election does not exist or it is not available anymore.": "__STRING_NOT_TRANSLATED__",
"You can start another election.": "__STRING_NOT_TRANSLATED__",
"Go back to homepage": "__STRING_NOT_TRANSLATED__",
"You have to judge every candidate/proposal!": "__STRING_NOT_TRANSLATED__",
"Your participation was recorded with success!": "__STRING_NOT_TRANSLATED__",
"Thanks for your participation.": "__STRING_NOT_TRANSLATED__"
}

@ -61,6 +61,7 @@
"react-app-polyfill": "^1.0.1",
"react-dev-utils": "^9.0.1",
"react-dom": "^16.8.6",
"react-flag-icon-css": "^1.0.25",
"react-i18next": "^11.3.4",
"react-loader-spinner": "^3.1.14",
"react-multi-email": "^0.5.3",

@ -0,0 +1,53 @@
{
"Homepage": "Homepage",
"Source code": "Source code",
"Who are we": "Who are we",
"BetterVote": "BetterVote",
"Voting platform": "Voting platform",
"Majority Judgment": "Majority Judgment",
"Start an election": "Start an election",
"Candidate/proposal name...": "Candidate/proposal name...",
"Delete?": "Delete?",
"Are you sure to delete": "Are you sure to delete",
"the row": "the row",
"Write here your question or introduce simple your election (250 characters max.)": "Write here your question or introduce simple your election (250 characters max.)",
"Please add at least 2 candidates.": "Please add at least 2 candidates.",
"Question of the election": "Question of the election",
"Write here the question of your election": "Write here the question of your election",
"For example:": "For example:",
"For the role of my representative, I judge this candidate...": "For the role of my representative, I judge this candidate...",
"Candidates/Proposals": "Candidates/Proposals",
"Add a proposal": "Add a proposal",
"Advanced options": "Advanced options",
"Starting date:": "Starting date:",
"Ending date: ": "Ending date: ",
"Grades:": "Grades:",
"You can select here the number of grades for your election": "You can select here the number of grades for your election",
"5 = Excellent, Very good, Good, Fair, Passable": "5 = Excellent, Very good, Good, Fair, Passable",
"Participants:": "Participants:",
"Add here participants' emails": "Add here participants' emails",
"List voters' emails in case the election is not opened": "List voters' emails in case the election is not opened",
"Validate": "Validate",
"Confirm your vote": "Confirm your vote",
"The form contains no address.": "The form contains no address.",
"The election will be opened to anyone with the link": "The election will be opened to anyone with the link",
"Start the election": "Start the election",
"Cancel": "Cancel",
"Confirm": "Confirm",
"Successful election creation!": "Successful election creation!",
"You can now share the election link to participants:": "You can now share the election link to participants:",
"Copy": "Copy",
"Here is the link for the results in real time:": "Here is the link for the results in real time:",
"Keep these links carefully": "Keep these links carefully",
"Participate now!": "Participate now!",
"t": "<0>Warning</0>: you will have no other choices to recover the links, and we will not be able to share them with you. For example, you can bookmark them in your browser.",
"Simple and free: organize an election with Majority Judgment.": "Simple and free: organize an election with Majority Judgment.",
"Start": "Start",
"No advertising or ad cookies": "No advertising or ad cookies",
"Oops! This election does not exist or it is not available anymore.": "Oops! This election does not exist or it is not available anymore.",
"You can start another election.": "You can start another election.",
"Go back to homepage": "Go back to homepage",
"You have to judge every candidate/proposal!": "You have to judge every candidate/proposal!",
"Your participation was recorded with success!": "Your participation was recorded with success!",
"Thanks for your participation.": "__STRING_NOT_TRANSLATED__"
}

@ -0,0 +1,53 @@
{
"Homepage": "Accueil",
"Source code": "Code source",
"Who are we": "Qui sommes-nous",
"BetterVote": "MieuxVoter",
"Voting platform": "Plateforme de vote",
"Majority Judgment": "Jugement Majoritaire",
"Start an election": "Lancer une élection",
"Candidate/proposal name...": "Name du candidat/proposition",
"Delete?": "Supprimer ?",
"Are you sure to delete": "Êtes-vous sûr(e) de supprimer",
"the row": "la ligne",
"Write here your question or introduce simple your election (250 characters max.)": "Décrire ici votre question ou introduire simplement votre élection (250 caractères max.)",
"Please add at least 2 candidates.": "Merci d'ajouter au moins 2 candidats.",
"Question of the election": "Question de votre élection",
"Write here the question of your election": "Ecrire ici la question de votre élection",
"For example:": "Par exemple",
"For the role of my representative, I judge this candidate...": "Pour être mon représentant, je juge ce candidat...",
"Candidates/Proposals": "Candidats/Propositions",
"Add a proposal": "Ajouter une proposition",
"Advanced options": "Options avancées",
"Starting date:": "Date de début :",
"Ending date: ": "Date de fin : ",
"Grades:": "Mentions",
"You can select here the number of grades for your election": "You pouvez choisir ici le nombre de mentions de votre élection",
"5 = Excellent, Very good, Good, Fair, Passable": "5 = Excellent, Très bien, Bien, Assez bien, Passable",
"Participants:": "Participants :",
"Add here participants' emails": "Ajouter ici les emails des participants",
"List voters' emails in case the election is not opened": "Lister ici les emails des électeurs dans le cas où l'élection n'est pas ouverte.",
"Validate": "Valider",
"Confirm your vote": "Confirmer votre vote",
"The form contains no address.": "Aucune adresse email n'a été ajoutée.",
"The election will be opened to anyone with the link": "L'élection sera accessible à tous ceux qui disposent de ce lien",
"Start the election": "Démarrer l'élection",
"Cancel": "Annuler",
"Confirm": "Valider",
"Successful election creation!": "L'élection a été créée avec succès !",
"You can now share the election link to participants:": "Vous pouvez maintenant partager ce lien à tous les participants",
"Copy": "Copier",
"Here is the link for the results in real time:": "Voici le lien pour afficher les résultats en temps réel :",
"Keep these links carefully": "Gardez ces liens précieusement",
"Participate now!": "Participez maintenant !",
"t": "<0>Attention</0> : vous n'aurez pas d'autres moyens pour récupérer ces liens par la suite, et nous ne serons pas capables de les partager avec vous. Vous pouvez, par exemple, ajouter ces liens à vos favoris dans votre navigateur.",
"Simple and free: organize an election with Majority Judgment.": "Simple et grauit: organiser une élection avec le Jugement Majoritaire.",
"Start": "Démarrer",
"No advertising or ad cookies": "Pas de publictés, ni de cookies publicitaires",
"Oops! This election does not exist or it is not available anymore.": "Oups ! L'élection n'existe pas ou n'est plus disponible.",
"You can start another election.": "Vous pouvez démarrer une autre élection.",
"Go back to homepage": "Revenir à la page d'accueil",
"You have to judge every candidate/proposal!": "Vous devez évaluer tous les candidats/propositions !",
"Your participation was recorded with success!": "Votre participation a été enregistrée avec succès !",
"Thanks for your participation.": "Merci de votre participation."
}

@ -19,8 +19,8 @@
"Candidates/Proposals": "Candidats/Propositions",
"Add a proposal": "Ajouter une proposition",
"Advanced options": "Options avancées",
"Starting date:": "Date de début",
"Ending date: ": "Date de fin",
"Starting date:": "Date de début :",
"Ending date: ": "Date de fin : ",
"Grades:": "Mentions",
"You can select here the number of grades for your election": "You pouvez choisir ici le nombre de mentions de votre élection",
"5 = Excellent, Very good, Good, Fair, Passable": "5 = Excellent, Très bien, Bien, Assez bien, Passable",

@ -0,0 +1,5 @@
import * as React from 'react'
import FlagIconFactory from 'react-flag-icon-css'
export const FlagIcon = FlagIconFactory(React, { useCssModules: false })

@ -2,6 +2,9 @@ import React, { Component } from "react";
import {withTranslation} from 'react-i18next';
import { Link } from "react-router-dom";
import { FlagIcon } from '../flag'
import i18n from '../../i18n'
class Footer extends Component {
constructor(props) {
super(props);
@ -9,6 +12,7 @@ class Footer extends Component {
}
render() {
const buttonStyle = {backgroundColor: "black", padding: "0px", border: "0px"};
const {t} = this.props;
return (
<footer className="text-center">
@ -17,6 +21,18 @@ class Footer extends Component {
<a href="https://github.com/MieuxVoter">{t("Source code")}</a>
<span className="m-2">-</span>
<a href="https://mieuxvoter.fr/">{t("Who are we")}</a>
<span className="m-2">-</span>
<button style={buttonStyle} onClick={() => i18n.changeLanguage('en')}>
<FlagIcon code={"gb"} />
</button>
{" "}
<button style={buttonStyle} onClick={() => i18n.changeLanguage('fr')}>
<FlagIcon code={"fr"} />
</button>
{" "}
<button style={buttonStyle} onClick={() => i18n.changeLanguage('es')}>
<FlagIcon code={"es"} />
</button>
<div className="mt-2">{t("BetterVote")} &copy;</div>
</footer>
);

@ -398,7 +398,7 @@ class CreateElection extends Component {
<hr className="mt-2 mb-2" />
<Row>
<Col xs="12" md="3" lg="2">
<Label for="title">{t("Ending date: ")}</Label>
<Label for="title">{t("Ending date:")}</Label>
</Col>
<Col xs="6" md="4" lg="3">
<input

@ -1,4 +1,5 @@
import React, { Component } from "react";
import { withTranslation } from 'react-i18next';
import { Container, Row, Col, Button, Input } from "reactstrap";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faRocket } from "@fortawesome/free-solid-svg-icons";
@ -90,4 +91,4 @@ class Home extends Component {
);
}
}
export default Home;
export default withTranslation()(Home);

@ -1,5 +1,6 @@
import React, { Component } from "react";
import { Redirect } from "react-router-dom";
import { withTranslation } from 'react-i18next';
import { Button, Col, Container, Row } from "reactstrap";
import { toast, ToastContainer } from "react-toastify";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

@ -13,6 +13,12 @@ i18n
debug: true,
saveMissing: true, // send not translated keys to endpoint
keySeparator: '>',
nsSeparator: '|',
backend: {
loadPath: '/locale/i18n/{{lng}}/resource.json',
// path to post missing resources
},
interpolation: {
escapeValue: false, // not needed for react!!

@ -4475,6 +4475,11 @@ find-up@^2.0.0, find-up@^2.1.0:
dependencies:
locate-path "^2.0.0"
flag-icon-css@^3.2.1:
version "3.4.6"
resolved "https://registry.yarnpkg.com/flag-icon-css/-/flag-icon-css-3.4.6.tgz#7e51099c85648c65f86d9ebb9c0ec6f5d8826714"
integrity sha512-rF69rt19Hr63SRQTiPBzQABaYB20LAgZhDkr/AxqSdgmCIN+tC5PRMz56Y0gxehFXJmdRwv55+GMi7R1fCRTwg==
flat-cache@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
@ -8907,6 +8912,15 @@ react-error-overlay@^6.0.3:
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108"
integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA==
react-flag-icon-css@^1.0.25:
version "1.0.25"
resolved "https://registry.yarnpkg.com/react-flag-icon-css/-/react-flag-icon-css-1.0.25.tgz#ac2e99f635ce333c210f593576f12908db8bf3ba"
integrity sha512-UJll3zpmbZvkwZvu4HI00iGF8ya4OdFzMR5k3cAluIwdHn8l5cB3CPYt+hw0tt7fLKaYIfncxNEO/qTtvBw2qw==
dependencies:
classnames "^2.2.6"
flag-icon-css "^3.2.1"
prop-types "^15.6.2"
react-i18next@^11.3.4:
version "11.3.4"
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.3.4.tgz#355df5fe5133e5e30302d166f529678100ffc968"

Loading…
Cancel
Save