[i18n] quick fix

pull/73/head
Pierre-Louis Guhur 4 years ago
parent e5ce8fcb15
commit 4a984838f5

@ -53,25 +53,25 @@
"Support us !": "Unterstützen Sie uns!",
"PayPal - The safer, easier way to pay online!": "PayPal - Die sicherere und einfachere Art, online zu bezahlen!",
"Number of votes:": "Anzahl der Stimmen:",
"Unknown error. Try again please.": "__STRING_NOT_TRANSLATED__",
"Ending date:": "__STRING_NOT_TRANSLATED__",
"If you list voters' emails, only them will be able to access the election": "__STRING_NOT_TRANSLATED__",
"Dates": "__STRING_NOT_TRANSLATED__",
"The election will take place from": "__STRING_NOT_TRANSLATED__",
"at": "__STRING_NOT_TRANSLATED__",
"to": "__STRING_NOT_TRANSLATED__",
"Grades": "__STRING_NOT_TRANSLATED__",
"Voters' list": "__STRING_NOT_TRANSLATED__",
"Voters received a link to vote by email. Each link can be used only once!": "__STRING_NOT_TRANSLATED__",
"Results of the election:": "__STRING_NOT_TRANSLATED__",
"Graph": "__STRING_NOT_TRANSLATED__",
"Preference profile": "__STRING_NOT_TRANSLATED__",
"Oops... The election is unknown.": "__STRING_NOT_TRANSLATED__",
"The election is still going on. You can't access now to the results.": "__STRING_NOT_TRANSLATED__",
"No votes have been recorded yet. Come back later.": "__STRING_NOT_TRANSLATED__",
"The election has not started yet.": "__STRING_NOT_TRANSLATED__",
"The election is over. You can't vote anymore": "__STRING_NOT_TRANSLATED__",
"You need a token to vote in this election": "__STRING_NOT_TRANSLATED__",
"You seem to have already voted.": "__STRING_NOT_TRANSLATED__",
"The parameters of the election are incorrect.": "__STRING_NOT_TRANSLATED__"
"Unknown error. Try again please.": "Unbekannter Fehler. Bitte versuchen Sie es erneut.",
"Ending date:": "Enddatum:",
"If you list voters' emails, only them will be able to access the election": "Wenn Sie die E-Mails der Wähler auflisten, haben nur diese Zugriff auf die Wahl",
"Dates": "Datum",
"The election will take place from": "Die Wahl findet von",
"at": "um",
"to": "bis",
"Grades": "Note",
"Voters' list": "Wählerliste",
"Voters received a link to vote by email. Each link can be used only once!": "Die Wähler erhielten per E-Mail einen Link zur Stimmabgabe. Jeder Link kann nur einmal verwendet werden!",
"Results of the election:": "Ergebnisse der Wahl",
"Graph": "Grafik",
"Preference profile": "Präferenz-Profil",
"Oops... The election is unknown.": "Hoppla... Die Wahl ist unbekannt.",
"The election is still going on. You can't access now to the results.": "Die Wahl dauert noch an. Sie können jetzt nicht auf die Ergebnisse zugreifen.",
"No votes have been recorded yet. Come back later.": "Es wurden noch keine Abstimmungen registriert. Kommen Sie später wieder.",
"The election has not started yet.": "Die Wahlen haben noch nicht begonnen.",
"The election is over. You can't vote anymore": "Die Wahl ist vorbei. Sie können nicht mehr wählen",
"You need a token to vote in this election": "Sie brauchen eine Wertmarke, um an dieser Wahl teilzunehmen",
"You seem to have already voted.": "Sie scheinen bereits abgestimmt zu haben.",
"The parameters of the election are incorrect.": "Die Parameter der Wahl sind falsch."
}

@ -67,19 +67,19 @@
"Graph": "Gráfico",
"Preference profile": "Perfil de preferencia",
"Results of the election:": "Resultados de la elección",
"PayPal - The safer, easier way to pay online!": "__STRING_NOT_TRANSLATED__",
"Support us !": "__STRING_NOT_TRANSLATED__",
"Who are we?": "__STRING_NOT_TRANSLATED__",
"Unknown error. Try again please.": "__STRING_NOT_TRANSLATED__",
"If you list voters' emails, only them will be able to access the election": "__STRING_NOT_TRANSLATED__",
"Voters received a link to vote by email. Each link can be used only once!": "__STRING_NOT_TRANSLATED__",
"Number of votes:": "__STRING_NOT_TRANSLATED__",
"Oops... The election is unknown.": "__STRING_NOT_TRANSLATED__",
"The election is still going on. You can't access now to the results.": "__STRING_NOT_TRANSLATED__",
"No votes have been recorded yet. Come back later.": "__STRING_NOT_TRANSLATED__",
"The election has not started yet.": "__STRING_NOT_TRANSLATED__",
"The election is over. You can't vote anymore": "__STRING_NOT_TRANSLATED__",
"You need a token to vote in this election": "__STRING_NOT_TRANSLATED__",
"You seem to have already voted.": "__STRING_NOT_TRANSLATED__",
"The parameters of the election are incorrect.": "__STRING_NOT_TRANSLATED__"
"PayPal - The safer, easier way to pay online!": "PayPal la forma más segura y fácil de pagar en linea!",
"Support us !": "¡apórtanos!",
"Who are we?": "¿Quiénes somos?",
"Unknown error. Try again please.": "Error desconocido. Inténtelo de nuevo, por favor.",
"If you list voters' emails, only them will be able to access the election": "Si enumera los correos electrónicos de los votantes, sólo ellos podrán acceder a la elección",
"Voters received a link to vote by email. Each link can be used only once!": "Los votantes recibieron un enlace para votar por correo electrónico. ¡Cada enlace puede ser usado sólo una vez!",
"Number of votes:": "Número de votos:",
"Oops... The election is unknown.": "Oops... La elección es desconocida",
"The election is still going on. You can't access now to the results.": "La elección sigue en marcha. No puedes acceder ahora a los resultados.",
"No votes have been recorded yet. Come back later.": "Aún no se han registrado votos. Vuelva más tarde.",
"The election has not started yet.": "Las elecciones aún no han comenzado.",
"The election is over. You can't vote anymore": "La elección ha terminado. Ya no puedes votar.",
"You need a token to vote in this election": "Necesitas una ficha para votar en esta elección",
"You seem to have already voted.": "Parece que ya has votado.",
"The parameters of the election are incorrect.": "Los parámetros de la elección son incorrectos."
}

@ -84,7 +84,6 @@ class Vote extends Component {
12 - colSizeGradeXs * numGrades > 0
? 12 - colSizeGradeXs * numGrades
: 12,
electionGrades: i18nGrades().slice(0, numGrades),
}));
return response;
};
@ -168,8 +167,10 @@ class Vote extends Component {
render() {
const {t} = this.props;
const {redirectTo, candidates, electionGrades} = this.state;
const offsetGrade = i18nGrades().length-this.state.numGrades;
const {redirectTo, candidates} = this.state;
const grades = i18nGrades();
const offsetGrade = grades.length-this.state.numGrades;
const electionGrades = grades.slice(0, this.state.numGrades);
if (redirectTo) {
return <Redirect to={redirectTo} />;
@ -220,7 +221,7 @@ class Vote extends Component {
<h5 className="m-0">{candidate.label}</h5>
<hr className="d-lg-none" />
</Col>
{this.state.electionGrades.map((grade, gradeId) => {
{electionGrades.map((grade, gradeId) => {
console.assert(gradeId < this.state.numGrades)
const gradeValue = grade.value-offsetGrade;
return (

@ -12,6 +12,7 @@ i18n
fallbackLng: 'en',
debug: true,
saveMissing: true, // send not translated keys to endpoint
defaultValue: "__STRING_NOT_TRANSLATED__",
keySeparator: '>',
nsSeparator: '|',

Loading…
Cancel
Save