From 9fd95733b914936a8ec584b2f4faa56b5ecbc7a0 Mon Sep 17 00:00:00 2001 From: Davide Bizzi Date: Mon, 16 Oct 2023 09:19:39 +0200 Subject: [PATCH 1/3] fix: Fix wrong copy --- src/locales/en/translation.json | 1 + src/locales/es/translation.json | 1 + src/locales/it/translation.json | 1 + src/pages/Dashboard/PerformanceData.tsx | 33 +++++++++++++++++++------ 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 4a2b14563..82a9792bc 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -322,6 +322,7 @@ "Name": "First name", "Net receivable": "Net receivable", "Net received": "Net received", + "Net to be received": "", "New password": "New password", "Next": "Next", "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!": "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!", diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index 5c195168c..c71d7c2fa 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -322,6 +322,7 @@ "Name": "Nombre", "Net receivable": "Neto a recibir", "Net received": "Neto recibido", + "Net to be received": "", "New password": "Nueva password", "Next": "Siguiente", "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!": "Ninguna campaña ha sido completado todavía. Es hora de trabajar: termina las campañas activas o aplica en las que están disponibles", diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 77c125d95..a4673ef55 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -322,6 +322,7 @@ "Name": "Nome", "Net receivable": "Netto", "Net received": "Netto ricevuto", + "Net to be received": "", "New password": "Nuova password", "Next": "Continua", "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!": "Nessuna campagna è stata ancora conclusa. È arrivato il momento di mettersi al lavoro: termina quelle attive o candidati nelle Campagne disponibili!", diff --git a/src/pages/Dashboard/PerformanceData.tsx b/src/pages/Dashboard/PerformanceData.tsx index ed80e5a58..7d3416f42 100644 --- a/src/pages/Dashboard/PerformanceData.tsx +++ b/src/pages/Dashboard/PerformanceData.tsx @@ -7,11 +7,11 @@ import i18n from "i18next"; import { useTranslation } from "react-i18next"; import { shallowEqual, useSelector } from "react-redux"; import { useLocalizeRoute } from "src/hooks/useLocalizedRoute"; +import getCurrencySymbol from "src/utils/getCurrencySymbol"; import styled from "styled-components"; import { Level } from "../Ranking/Level"; import usePerformance from "./effects/usePerformance"; import { GoToBlock, Statistic } from "./performanceRow"; -import getCurrencySymbol from "src/utils/getCurrencySymbol"; const StyledIcon = styled.div` .dark-disabled-font { @@ -43,27 +43,34 @@ const PerformanceData = () => { (state: GeneralState) => state.ranking, shallowEqual ); - const BootyComponent = ({ booty, ...props }: { booty: typeof allBooty }) => { + const BootyComponent = ({ + booty, + i18n, + ...props + }: { + booty: typeof allBooty; + i18n: { net: string; gross: string }; + }) => { if (!booty) return -; return (
{booty.net ? ( <> - {t("Net received")} + {i18n.net} {`${getCurrencySymbol(booty.net.currency)}${booty.net.value}`} - ({t("Gross")}{" "} + ({i18n.gross}{" "} {`${getCurrencySymbol(booty.gross.currency)}${booty.gross.value}`} ) ) : (
- {t("Gross")} + {i18n.gross} {`${getCurrencySymbol(booty.gross.currency)}${booty.gross.value}`} @@ -138,7 +145,13 @@ const PerformanceData = () => { { icon: , text: t("Received booty"), - booty: , + booty: ( + + ), }, { icon: ( @@ -147,7 +160,13 @@ const PerformanceData = () => { ), text: t("Available booty"), - booty: , + booty: ( + + ), }, { icon: , From 348eca331b02743bd4062d5797ec2ebdf3ceaf9d Mon Sep 17 00:00:00 2001 From: Davide Bizzi Date: Mon, 16 Oct 2023 09:27:35 +0200 Subject: [PATCH 2/3] i18n: Use same key for wallet/dash --- src/locales/en/translation.json | 2 +- src/locales/es/translation.json | 2 +- src/locales/it/translation.json | 2 +- src/pages/Dashboard/PerformanceData.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 82a9792bc..0d9ec8c20 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -322,7 +322,6 @@ "Name": "First name", "Net receivable": "Net receivable", "Net received": "Net received", - "Net to be received": "", "New password": "New password", "Next": "Next", "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!": "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!", @@ -706,6 +705,7 @@ "BUGFORM_UPLOAD_PROGRESS": "{{num}} uploaded", "BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} uploaded" }, + "Net to be received": "", "level {{level}}": { "__CARD_RECAP_DASHBOARD_LABEL_LIVELLO_MAX: 20": "{{level}} level" }, diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index c71d7c2fa..cf3a31a25 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -322,7 +322,6 @@ "Name": "Nombre", "Net receivable": "Neto a recibir", "Net received": "Neto recibido", - "Net to be received": "", "New password": "Nueva password", "Next": "Siguiente", "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!": "Ninguna campaña ha sido completado todavía. Es hora de trabajar: termina las campañas activas o aplica en las que están disponibles", @@ -706,6 +705,7 @@ "BUGFORM_UPLOAD_PROGRESS": "{{num}} subido", "BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} subidos" }, + "Net to be received": "", "level {{level}}": { "__CARD_RECAP_DASHBOARD_LABEL_LIVELLO_MAX: 20": "Nivel {{level}}" }, diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index a4673ef55..4aab228f2 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -322,7 +322,6 @@ "Name": "Nome", "Net receivable": "Netto", "Net received": "Netto ricevuto", - "Net to be received": "", "New password": "Nuova password", "Next": "Continua", "No campaign has been completed yet. It's time to get to work: finish the active ones or apply in the available campaigns!": "Nessuna campagna è stata ancora conclusa. È arrivato il momento di mettersi al lavoro: termina quelle attive o candidati nelle Campagne disponibili!", @@ -706,6 +705,7 @@ "BUGFORM_UPLOAD_PROGRESS": "{{num}} caricato", "BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} caricati" }, + "Net to be received": "", "level {{level}}": { "__CARD_RECAP_DASHBOARD_LABEL_LIVELLO_MAX: 20": "Livello {{level}}" }, diff --git a/src/pages/Dashboard/PerformanceData.tsx b/src/pages/Dashboard/PerformanceData.tsx index 7d3416f42..501e1d391 100644 --- a/src/pages/Dashboard/PerformanceData.tsx +++ b/src/pages/Dashboard/PerformanceData.tsx @@ -162,7 +162,7 @@ const PerformanceData = () => { text: t("Available booty"), booty: ( From 463b40205a7547fd98c55aed14f0d47c948601c3 Mon Sep 17 00:00:00 2001 From: Luca Cannarozzo Date: Mon, 16 Oct 2023 10:51:43 +0200 Subject: [PATCH 3/3] fix(i18n): remove empty strings --- src/locales/en/translation.json | 1 - src/locales/es/translation.json | 1 - src/locales/it/translation.json | 1 - 3 files changed, 3 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 0d9ec8c20..4a2b14563 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -705,7 +705,6 @@ "BUGFORM_UPLOAD_PROGRESS": "{{num}} uploaded", "BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} uploaded" }, - "Net to be received": "", "level {{level}}": { "__CARD_RECAP_DASHBOARD_LABEL_LIVELLO_MAX: 20": "{{level}} level" }, diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index cf3a31a25..5c195168c 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -705,7 +705,6 @@ "BUGFORM_UPLOAD_PROGRESS": "{{num}} subido", "BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} subidos" }, - "Net to be received": "", "level {{level}}": { "__CARD_RECAP_DASHBOARD_LABEL_LIVELLO_MAX: 20": "Nivel {{level}}" }, diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 4aab228f2..77c125d95 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -705,7 +705,6 @@ "BUGFORM_UPLOAD_PROGRESS": "{{num}} caricato", "BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} caricati" }, - "Net to be received": "", "level {{level}}": { "__CARD_RECAP_DASHBOARD_LABEL_LIVELLO_MAX: 20": "Livello {{level}}" },