From fca0fc75d5c9c8044518587d7a2f351584c7ca23 Mon Sep 17 00:00:00 2001 From: dcts Date: Fri, 2 Aug 2024 22:54:06 +0200 Subject: [PATCH 1/5] add translations to navbar items --- src/app/components/NavBar.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/components/NavBar.tsx b/src/app/components/NavBar.tsx index e107ef2b..f48bdc8b 100644 --- a/src/app/components/NavBar.tsx +++ b/src/app/components/NavBar.tsx @@ -1,9 +1,9 @@ -import React, { useEffect, useState, useRef } from "react"; +import React, { useEffect, useState, useRef, useTransition } from "react"; import Image from "next/image"; import Link from "next/link"; import { useSelector } from "react-redux"; -import { useAppDispatch, useAppSelector } from "hooks"; +import { useAppDispatch, useAppSelector, useTranslations } from "hooks"; import { getSupportedLanguagesAsString } from "../state/i18nSlice"; import { i18nSlice } from "../state/i18nSlice"; @@ -32,11 +32,11 @@ interface NavbarItemMobileProps extends NavbarItemProps { const NavItems: { path: string; title: string }[] = [ { path: "/trade", - title: "Trade", + title: "trade", }, { path: "/rewards", - title: "Rewards", + title: "rewards", }, ]; @@ -217,13 +217,14 @@ function Logo() { } function NavbarItemsDesktop() { + const t = useTranslations(); return ( <>
{NavItems.map((navItem, indx) => { return ( From f0d6bd7bbcd81997b6ab9b70daf17cc446955161 Mon Sep 17 00:00:00 2001 From: dcts Date: Fri, 2 Aug 2024 23:02:02 +0200 Subject: [PATCH 2/5] fix translations from the translation issue google doc --- src/app/state/locales/pt/rewards.json | 4 ++-- src/app/state/locales/pt/trade.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/state/locales/pt/rewards.json b/src/app/state/locales/pt/rewards.json index ca0c3bc2..0ab40b38 100644 --- a/src/app/state/locales/pt/rewards.json +++ b/src/app/state/locales/pt/rewards.json @@ -5,7 +5,7 @@ "next_distribution": "Próxima distribuição", "total_rewards": "Total de recompensas", "claim_all_rewards": "Reivindicar todas", - "learn_more_about_rewards": "Saiba mais sobre a recompensas", + "learn_more_about_rewards": "Siba mais sobre a recompensas", "claiming_rewards_loading": "Reivindicando recompensas...", "claiming_rewards_success": "Recompensas reivindicadas", "claiming_rewards_fail": "Erro ao reivindicar recompensas", @@ -13,5 +13,5 @@ "rewards_claimed": "Recompensas resgatadas", "continue_trading_to_earn_more": "Continue negociando ou fazendo staking para ganhar mais e volte mais tarde.", "go_back": "Voltar", - "no_rewards_to_claim": "Sem recompensas para reivindica" + "no_rewards_to_claim": "Sem recompensas para reivindicar" } diff --git a/src/app/state/locales/pt/trade.json b/src/app/state/locales/pt/trade.json index bb703716..2714981f 100644 --- a/src/app/state/locales/pt/trade.json +++ b/src/app/state/locales/pt/trade.json @@ -49,7 +49,7 @@ "order_price": "Preço", "filled_qty": "Qtd preenchida", "completed_perc": "Concluído (%)", - "action": "Açâo", + "action": "Ação", "status": "Status", "pending": "Pendente", "completed": "Completo", @@ -62,8 +62,8 @@ "transaction_in_progress": "Transação em andamento...", "best_buy": "Melhor compra", "best_sell": "Melhor venda", - "no_order_history": "Sem histórico de pedidos", - "no_active_orders": "Sem pedidos ativos", + "no_order_history": "Sem histórico de ordens", + "no_active_orders": "Sem ordens ativas", "no_trade_history": "Sem histórico de negociações", "no_trades_have_occured_yet": "Nenhuma transação foi realizada ainda", "market_action_token": "<$SIDE> <$TOKEN_SYMBOL> a <$ORDER_TYPE>", From ecb6d190c87412209ebf733f11b19639e6a197be Mon Sep 17 00:00:00 2001 From: dcts Date: Fri, 2 Aug 2024 23:04:04 +0200 Subject: [PATCH 3/5] fix linter errors --- src/app/components/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/NavBar.tsx b/src/app/components/NavBar.tsx index f48bdc8b..82b222ab 100644 --- a/src/app/components/NavBar.tsx +++ b/src/app/components/NavBar.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useRef, useTransition } from "react"; +import React, { useEffect, useState, useRef } from "react"; import Image from "next/image"; import Link from "next/link"; From 42e6620e8c4a862d651002cd4223fd76b612496d Mon Sep 17 00:00:00 2001 From: dcts Date: Mon, 5 Aug 2024 10:20:51 +0200 Subject: [PATCH 4/5] fix linter issues --- src/app/components/NavBar.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/components/NavBar.tsx b/src/app/components/NavBar.tsx index 71c19d1d..2b11ced8 100644 --- a/src/app/components/NavBar.tsx +++ b/src/app/components/NavBar.tsx @@ -3,7 +3,12 @@ import Image from "next/image"; import Link from "next/link"; import { useSelector } from "react-redux"; -import { useAppDispatch, useAppSelector, useHydrationErrorFix, useTranslations } from "hooks"; +import { + useAppDispatch, + useAppSelector, + useHydrationErrorFix, + useTranslations, +} from "hooks"; import { getSupportedLanguagesAsString } from "../state/i18nSlice"; import { i18nSlice } from "../state/i18nSlice"; From f2a738720164e76bdc7d185fb0422f512d575c70 Mon Sep 17 00:00:00 2001 From: dcts Date: Wed, 7 Aug 2024 13:54:21 +0200 Subject: [PATCH 5/5] fix another reported translation issue --- src/app/state/locales/pt/rewards.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/state/locales/pt/rewards.json b/src/app/state/locales/pt/rewards.json index f59ddde8..0eb0ee95 100644 --- a/src/app/state/locales/pt/rewards.json +++ b/src/app/state/locales/pt/rewards.json @@ -5,7 +5,7 @@ "next_distribution": "Próxima distribuição", "total_rewards": "Total de recompensas", "claim_all_rewards": "Reivindicar todas", - "learn_more_about_rewards": "Siba mais sobre a recompensas", + "learn_more_about_rewards": "Saiba mais sobre recompensas", "claiming_rewards_loading": "Reivindicando recompensas...", "claiming_rewards_success": "Recompensas reivindicadas", "claiming_rewards_fail": "Erro ao reivindicar recompensas",