From a250237614297fde11d2d2d313f706f738ee2aa0 Mon Sep 17 00:00:00 2001 From: Marite Guerrieri Date: Thu, 2 May 2024 11:47:40 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20Translate=20complementary=20liq?= =?UTF-8?q?uidation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: javikalsan --- frontend/src/i18n/locale-ca.yaml | 1 + frontend/src/i18n/locale-es.yaml | 1 + frontend/src/i18n/locale-eu.yaml | 1 + frontend/src/i18n/locale-gl.yaml | 1 + frontend/src/pages/InvoicesPage/index.jsx | 8 ++++++++ scripts/representa_manage.py | 0 6 files changed, 12 insertions(+) mode change 100644 => 100755 scripts/representa_manage.py diff --git a/frontend/src/i18n/locale-ca.yaml b/frontend/src/i18n/locale-ca.yaml index a96b189c..f143fa97 100644 --- a/frontend/src/i18n/locale-ca.yaml +++ b/frontend/src/i18n/locale-ca.yaml @@ -275,6 +275,7 @@ INVOICES: PAID_STATUS_OPTION_UNPAID_VERBOSE: Impagada PAID_STATUS_OPTION_PAID_VERBOSE: Pagada PAID_STATUS_OPTION_OPEN_VERBOSE: En procés + COMPLEMENTARY_LIQUIDATION: Complementària HIJACK: HIJACK_DIALOG_TITLE: Suplantant una altra usuària USERNAME_LABEL: Usuària a suplantar diff --git a/frontend/src/i18n/locale-es.yaml b/frontend/src/i18n/locale-es.yaml index 01c9ec39..4489570c 100644 --- a/frontend/src/i18n/locale-es.yaml +++ b/frontend/src/i18n/locale-es.yaml @@ -207,6 +207,7 @@ INVOICES: PAID_STATUS_OPTION_PAID_VERBOSE: Pagada PAID_STATUS_OPTION_OPEN_VERBOSE: En proceso PAID_STATUS_OPTION_UNPAID_VERBOSE: Impagada + COMPLEMENTARY_LIQUIDATION: Complementaria PRODUCTION: PRODUCTION_TITLE: Producción LABEL_CONTRACT: Contrato diff --git a/frontend/src/i18n/locale-eu.yaml b/frontend/src/i18n/locale-eu.yaml index 50ce1a14..ee58fb80 100644 --- a/frontend/src/i18n/locale-eu.yaml +++ b/frontend/src/i18n/locale-eu.yaml @@ -104,6 +104,7 @@ INVOICES: PAID_STATUS_OPTION_PAID_VERBOSE: Ordainduta COLUMN_INVOICE_NUMBER: Faktura COLUMN_CONTRACT: Kontratua + COMPLEMENTARY_LIQUIDATION: Osagarria PRODUCTION: PRODUCTION_TITLE: Ekoizpena LEGEND_PRODUCTION: Ekoizpena (kWh) diff --git a/frontend/src/i18n/locale-gl.yaml b/frontend/src/i18n/locale-gl.yaml index decbfe65..e5555a3c 100644 --- a/frontend/src/i18n/locale-gl.yaml +++ b/frontend/src/i18n/locale-gl.yaml @@ -104,6 +104,7 @@ INVOICES: PAID_STATUS_OPTION_OPEN: En proceso PAID_STATUS_OPTION_UNPAID: Non PAID_STATUS_OPTION_UNPAID_VERBOSE: Impaga + COMPLEMENTARY_LIQUIDATION: Complementaria PRODUCTION: PRODUCTION_TITLE: Produción LEGEND_PRODUCTION: Produción (kWh) diff --git a/frontend/src/pages/InvoicesPage/index.jsx b/frontend/src/pages/InvoicesPage/index.jsx index d4f5a4a0..da452820 100644 --- a/frontend/src/pages/InvoicesPage/index.jsx +++ b/frontend/src/pages/InvoicesPage/index.jsx @@ -100,6 +100,13 @@ function PaymentStatusCell({ paymentStatus }) { ) } +function LiquidationCell({ liquidation }) { + const { t } = useTranslation() + if (liquidation === 'COMPLEMENTARY') + return t(INVOICES.COMPLEMENTARY_LIQUIDATION) + return liquidation +} + PaymentStatusCell.propTypes = { paymentStatus: PropTypes.oneOf(['paid', 'open', 'unpaid']).isRequired, } @@ -167,6 +174,7 @@ export default function InvoicesPage() { label: t('INVOICES.COLUMN_LIQUIDATION'), searchable: true, numeric: false, + view: (invoice) => }, { id: 'emission_date', diff --git a/scripts/representa_manage.py b/scripts/representa_manage.py old mode 100644 new mode 100755 From b50ab96c7adcd5ee2a43ec73948fd5a7d3808396 Mon Sep 17 00:00:00 2001 From: Marite Guerrieri Date: Thu, 2 May 2024 12:05:39 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20translation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: javikalsan --- frontend/src/pages/InvoicesPage/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/InvoicesPage/index.jsx b/frontend/src/pages/InvoicesPage/index.jsx index da452820..3bfafc92 100644 --- a/frontend/src/pages/InvoicesPage/index.jsx +++ b/frontend/src/pages/InvoicesPage/index.jsx @@ -103,7 +103,7 @@ function PaymentStatusCell({ paymentStatus }) { function LiquidationCell({ liquidation }) { const { t } = useTranslation() if (liquidation === 'COMPLEMENTARY') - return t(INVOICES.COMPLEMENTARY_LIQUIDATION) + return t('INVOICES.COMPLEMENTARY_LIQUIDATION') return liquidation }