From 6f62e6602ff60a630bed72254fcf39f9821c973b Mon Sep 17 00:00:00 2001 From: koalasat Date: Mon, 25 Nov 2024 14:08:32 +0100 Subject: [PATCH 1/7] Refactor order type filter --- .../src/components/BookTable/BookControl.tsx | 295 ++++++++++-------- frontend/static/locales/ca.json | 3 +- frontend/static/locales/cs.json | 3 +- frontend/static/locales/de.json | 3 +- frontend/static/locales/en.json | 3 +- frontend/static/locales/es.json | 3 +- frontend/static/locales/eu.json | 3 +- frontend/static/locales/fr.json | 3 +- frontend/static/locales/it.json | 3 +- frontend/static/locales/ja.json | 3 +- frontend/static/locales/pl.json | 3 +- frontend/static/locales/pt.json | 3 +- frontend/static/locales/ru.json | 3 +- frontend/static/locales/sv.json | 3 +- frontend/static/locales/sw.json | 3 +- frontend/static/locales/th.json | 3 +- frontend/static/locales/zh-SI.json | 3 +- frontend/static/locales/zh-TR.json | 3 +- 18 files changed, 196 insertions(+), 150 deletions(-) diff --git a/frontend/src/components/BookTable/BookControl.tsx b/frontend/src/components/BookTable/BookControl.tsx index a182408b..58e1e3af 100644 --- a/frontend/src/components/BookTable/BookControl.tsx +++ b/frontend/src/components/BookTable/BookControl.tsx @@ -1,21 +1,11 @@ -import React, { useContext, useMemo } from 'react'; +import React, { useContext, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { - Typography, - Grid, - ToggleButton, - ToggleButtonGroup, - Select, - Divider, - MenuItem, - Box, - Tooltip, -} from '@mui/material'; +import { Typography, Grid, Select, Divider, MenuItem, Box } from '@mui/material'; import currencyDict from '../../../static/assets/currencies.json'; import { useTheme } from '@mui/system'; import { AutocompletePayments } from '../MakerForm'; import { fiatMethods, swapMethods, PaymentIcon } from '../PaymentMethods'; -import { FlagWithProps } from '../Icons'; +import { FlagWithProps, SendReceiveIcon } from '../Icons'; import { AppContext, type UseAppStoreType } from '../../contexts/AppContext'; import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; @@ -41,16 +31,24 @@ const BookControl = ({ const { t, i18n } = useTranslation(); const theme = useTheme(); - const [typeZeroText, typeOneText, small, medium, large] = useMemo(() => { - const typeZeroText = fav.mode === 'fiat' ? t('Buy') : t('Swap In'); - const typeOneText = fav.mode === 'fiat' ? t('Sell') : t('Swap Out'); - const small = - (typeZeroText.length + typeOneText.length) * 0.7 + (fav.mode === 'fiat' ? 16 : 7.5); + const [orderType, setOrderType] = useState('any'); + const [small, medium, large] = useMemo(() => { + const small = fav.mode === 'fiat' ? 16 : 7.5; const medium = small + 13; const large = medium + (t('and use').length + t('pay with').length) * 0.6 + 5; - return [typeZeroText, typeOneText, small, medium, large]; + return [small, medium, large]; }, [i18n.language, fav.mode]); + useEffect(() => { + if (fav.type === null) { + setOrderType('any'); + } else if (fav.mode === 'fiat') { + setOrderType(fav.type === 0 ? 'buy' : 'sell'); + } else { + setOrderType(fav.type === 0 ? 'swapout' : 'swapin'); + } + }, [fav.mode, fav.type]); + const handleCurrencyChange = function (e: React.ChangeEvent): void { const currency = Number(e.target.value); setFav({ ...fav, currency, mode: currency === 1000 ? 'swap' : 'fiat' }); @@ -61,14 +59,41 @@ const BookControl = ({ setFav({ ...fav, coordinator }); }; - const handleTypeChange = function (mouseEvent: React.MouseEvent, val: number): void { - setFav({ ...fav, type: val }); + const handleOrderTypeChange = (mouseEvent: React.MouseEvent, select: object): void => { + if (select.props.value === 'sell') { + const currency = fav.currency === 1000 ? 0 : fav.currency; + setFav({ ...fav, mode: 'fiat', type: 1, currency }); + } else if (select.props.value === 'buy') { + const currency = fav.currency === 1000 ? 0 : fav.currency; + setFav({ ...fav, mode: 'fiat', type: 0, currency }); + } else if (select.props.value === 'swapin') { + setFav({ ...fav, mode: 'swap', type: 1, currency: 1000 }); + } else if (select.props.value === 'swapout') { + setFav({ ...fav, mode: 'swap', type: 0, currency: 1000 }); + } else { + const currency = fav.currency === 1000 ? 0 : fav.currency; + setFav({ ...fav, mode: 'fiat', type: null, currency }); + } + setOrderType(select.props.value); }; - const handleModeChange = function (mouseEvent: React.MouseEvent, val: number): void { - const mode = fav.mode === 'fiat' ? 'swap' : 'fiat'; - const currency = fav.mode === 'fiat' ? 1000 : 0; - setFav({ ...fav, mode, currency }); + const orderTypeIcon = (value: string): React.ReactNode => { + let component = ; + if (value === 'sell') { + component = ; + } else if (value === 'buy') { + component = ; + } else if (value === 'swapin') { + component = ; + } else if (value === 'swapout') { + component = ; + } + + return ( +
+ {component} +
+ ); }; return ( @@ -89,63 +114,69 @@ const BookControl = ({ ) : null} - {width > small ? ( - - - - - - - - - - ) : null} - - - - {typeZeroText} - - - {typeOneText} - - + +
+ + + {' ' + t('Any')} + +
+
+ +
+ + + {' ' + t('Sell')} + +
+
+ +
+ + + {' ' + t('Buy')} + +
+
+ +
+ + + {' ' + t('Swap In')} + +
+
+ +
+ + + {' ' + t('Swap Out')} + +
+
+
{width > large && fav.mode === 'fiat' ? ( @@ -318,68 +349,66 @@ const BookControl = ({ ) : null} {width > large ? ( - <> - - - {fav.currency === 1000 ? t(fav.type === 0 ? 'to' : 'from') : t('hosted by')} - - - - - - + + + {fav.currency === 1000 ? t(fav.type === 0 ? 'to' : 'from') : t('hosted by')} + + ) : null} + + + diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json index fe3e4816..670b4805 100644 --- a/frontend/static/locales/ca.json +++ b/frontend/static/locales/ca.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "TOT", + "Any": "Any", "Buy": "Comprar", "DESTINATION": "DESTÍ", "I want to": "Vull", "METHOD": "MÈTODE", "Select Host": "Selecciona Amfitrió", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Selecciona moneda de pagament", "Select Payment Method": "Tria mètode de pagament", "Sell": "Vendre", - "Show Lightning swaps": "Mostra Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "i fer servir", diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json index 64ffa9db..17105da9 100644 --- a/frontend/static/locales/cs.json +++ b/frontend/static/locales/cs.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "VŠE", + "Any": "Any", "Buy": "Nákup", "DESTINATION": "DESTINATION", "I want to": "Já chci", "METHOD": "METHOD", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Vybrat měnu platby", "Select Payment Method": "Select Payment Method", "Sell": "Prodej", - "Show Lightning swaps": "Show Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "použít", diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json index d0e9885b..5d63d6d5 100644 --- a/frontend/static/locales/de.json +++ b/frontend/static/locales/de.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ALLE", + "Any": "Any", "Buy": "Kaufen", "DESTINATION": "DESTINATION", "I want to": "Ich möchte", "METHOD": "METHOD", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Währung auswählen", "Select Payment Method": "Select Payment Method", "Sell": "Verkaufen", - "Show Lightning swaps": "Show Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "und verwende", diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index 48f45e96..f2bc7d02 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ANY", + "Any": "Any", "Buy": "Buy", "DESTINATION": "DESTINATION", "I want to": "I want to", "METHOD": "METHOD", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Select Payment Currency", "Select Payment Method": "Select Payment Method", "Sell": "Sell", - "Show Lightning swaps": "Show Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "and use", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index 7e895281..c8c8477c 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "TODO", + "Any": "Any", "Buy": "Comprar", "DESTINATION": "DESTINO", "I want to": "Quiero", "METHOD": "MÉTODO", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Selecciona moneda de pago", "Select Payment Method": "Selecciona método de pago", "Sell": "Vender", - "Show Lightning swaps": "Mostrar swaps Lightning", "Swap In": "Swap a LN", "Swap Out": "Swap desde LN", "and use": "y usa", diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json index a62e4cc3..555d7338 100644 --- a/frontend/static/locales/eu.json +++ b/frontend/static/locales/eu.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ANY", + "Any": "Any", "Buy": "Erosi", "DESTINATION": "DESTINATION", "I want to": "Nahi dut", "METHOD": "METHOD", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Aukeratu Ordainketa Txanpona", "Select Payment Method": "Select Payment Method", "Sell": "Saldu", - "Show Lightning swaps": "Show Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "eta erabili", diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json index def2ac2e..b0b631e0 100644 --- a/frontend/static/locales/fr.json +++ b/frontend/static/locales/fr.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "Tous", + "Any": "Any", "Buy": "Acheter", "DESTINATION": "DESTINATION", "I want to": "Je veux", "METHOD": "MÉTHODE", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Sélectionner la devise de paiement", "Select Payment Method": "Sélectionner le mode de paiement", "Sell": "Vendre", - "Show Lightning swaps": "Afficher les échanges Lightning", "Swap In": "Échange LN->OC", "Swap Out": "Échange OC->LN", "and use": "et utiliser", diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json index 76d1017f..93ea69d9 100644 --- a/frontend/static/locales/it.json +++ b/frontend/static/locales/it.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "QUALUNQUE", + "Any": "Any", "Buy": "Compra", "DESTINATION": "DESTINAZIONE", "I want to": "Voglio", "METHOD": "METODO", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Seleziona valuta di pagamento", "Select Payment Method": "Seleziona il metodo di pagamento", "Sell": "Vendere", - "Show Lightning swaps": "Mostra gli swap Lightning", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "ed usa", diff --git a/frontend/static/locales/ja.json b/frontend/static/locales/ja.json index 6f2e0082..43e7a3b1 100644 --- a/frontend/static/locales/ja.json +++ b/frontend/static/locales/ja.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "すべて", + "Any": "Any", "Buy": "購入", "DESTINATION": "方向", "I want to": "私はしたいのは:", "METHOD": "方法", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "支払い通貨を選択してください。", "Select Payment Method": "支払い方法を選択してください。", "Sell": "売る", - "Show Lightning swaps": "ライトニングスワップを表示します。", "Swap In": "スワップイン", "Swap Out": "スワップアウト", "and use": "そして使用するのは", diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json index 27eda701..9fcb2b66 100644 --- a/frontend/static/locales/pl.json +++ b/frontend/static/locales/pl.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "KAŻDY", + "Any": "Any", "Buy": "Kupić", "DESTINATION": "DESTINATION", "I want to": "chcę", "METHOD": "METHOD", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Wybierz walutę płatności", "Select Payment Method": "Select Payment Method", "Sell": "Sprzedać", - "Show Lightning swaps": "Show Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "i użyć", diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json index 24288734..cee04adc 100644 --- a/frontend/static/locales/pt.json +++ b/frontend/static/locales/pt.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "QUALQUER", + "Any": "Any", "Buy": "Comprar", "DESTINATION": "DESTINATION", "I want to": "Eu quero", "METHOD": "MÉTODO", "Select Host": "Selecione Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Selecione a moeda de pagamento", "Select Payment Method": "Selecione método de pagamento", "Sell": "Vender", - "Show Lightning swaps": "Mostrar Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "e utilizar", diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json index 1c894a9f..68709c55 100644 --- a/frontend/static/locales/ru.json +++ b/frontend/static/locales/ru.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "Любой", + "Any": "Any", "Buy": "Купить", "DESTINATION": "МЕСТО НАЗНАЧЕНИЯ", "I want to": "Я хочу", "METHOD": "МЕТОД", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Выбрать Валюту", "Select Payment Method": "Выбрать способ оплаты", "Sell": "Продать", - "Show Lightning swaps": "Показать Лайтнинг свопы", "Swap In": "Своп в", "Swap Out": "Своп из", "and use": "и использовать", diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json index 9f06967f..58f2934f 100644 --- a/frontend/static/locales/sv.json +++ b/frontend/static/locales/sv.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ALLA", + "Any": "Any", "Buy": "Köpa", "DESTINATION": "DESTINATION", "I want to": "Jag vill", "METHOD": "METHOD", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Välj betalningsvaluta", "Select Payment Method": "Select Payment Method", "Sell": "Sälja", - "Show Lightning swaps": "Show Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "och använda", diff --git a/frontend/static/locales/sw.json b/frontend/static/locales/sw.json index 342ae84c..d866a857 100644 --- a/frontend/static/locales/sw.json +++ b/frontend/static/locales/sw.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "Yoyote", + "Any": "Any", "Buy": "Nunua", "DESTINATION": "MAELEKEZO", "I want to": "Nataka", "METHOD": "NJIA", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "Chagua Sarafu ya Malipo", "Select Payment Method": "Chagua Njia ya Malipo", "Sell": "Uza", - "Show Lightning swaps": "Onyesha Kubadilishana kwa Lightning", "Swap In": "Badilisha Ndani", "Swap Out": "Badilisha Nje", "and use": "na tumia", diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json index 04d403b2..ec74624f 100644 --- a/frontend/static/locales/th.json +++ b/frontend/static/locales/th.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ANY", + "Any": "Any", "Buy": "ซื้อ", "DESTINATION": "DESTINATION", "I want to": "ฉันต้องการ", "METHOD": "METHOD", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "เลือกสกุลเงิน", "Select Payment Method": "Select Payment Method", "Sell": "ขาย", - "Show Lightning swaps": "Show Lightning swaps", "Swap In": "Swap In", "Swap Out": "Swap Out", "and use": "และใช้", diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json index 8a22aec5..726dfa45 100644 --- a/frontend/static/locales/zh-SI.json +++ b/frontend/static/locales/zh-SI.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "任何", + "Any": "Any", "Buy": "购买", "DESTINATION": "目的地", "I want to": "我想要", "METHOD": "方式", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "选择支付货币", "Select Payment Method": "选择付款方式", "Sell": "出售", - "Show Lightning swaps": "显示闪电交换", "Swap In": "换入", "Swap Out": "换出", "and use": "并使用", diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json index 0ee1c4d7..de00cb01 100644 --- a/frontend/static/locales/zh-TR.json +++ b/frontend/static/locales/zh-TR.json @@ -76,15 +76,16 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "任何", + "Any": "Any", "Buy": "購買", "DESTINATION": "目的地", "I want to": "我想要", "METHOD": "方式", "Select Host": "Select Host", + "Select Order Type": "Select Order Type", "Select Payment Currency": "選擇支付貨幣", "Select Payment Method": "選擇付款方式", "Sell": "出售", - "Show Lightning swaps": "顯示閃電交換", "Swap In": "換入", "Swap Out": "換出", "and use": "並使用", From 0bd95814edcd19f31fe8d0f7fda74c6e67e9fbaf Mon Sep 17 00:00:00 2001 From: koalasat Date: Mon, 25 Nov 2024 14:16:19 +0100 Subject: [PATCH 2/7] Refactor order type filter --- frontend/src/components/BookTable/BookControl.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/BookTable/BookControl.tsx b/frontend/src/components/BookTable/BookControl.tsx index 58e1e3af..a92f5b3a 100644 --- a/frontend/src/components/BookTable/BookControl.tsx +++ b/frontend/src/components/BookTable/BookControl.tsx @@ -82,7 +82,7 @@ const BookControl = ({ if (value === 'sell') { component = ; } else if (value === 'buy') { - component = ; + component = ; } else if (value === 'swapin') { component = ; } else if (value === 'swapout') { @@ -154,7 +154,7 @@ const BookControl = ({
- + {' ' + t('Buy')} From 9324bf1841b422fc7b739792c590889607f5f616 Mon Sep 17 00:00:00 2001 From: koalasat Date: Mon, 25 Nov 2024 14:23:39 +0100 Subject: [PATCH 3/7] Better big screen display --- frontend/src/components/BookTable/BookControl.tsx | 12 ++++++++++++ frontend/static/locales/ca.json | 1 + frontend/static/locales/cs.json | 1 + frontend/static/locales/de.json | 1 + frontend/static/locales/en.json | 1 + frontend/static/locales/es.json | 1 + frontend/static/locales/eu.json | 1 + frontend/static/locales/fr.json | 1 + frontend/static/locales/it.json | 1 + frontend/static/locales/ja.json | 1 + frontend/static/locales/pl.json | 1 + frontend/static/locales/pt.json | 1 + frontend/static/locales/ru.json | 1 + frontend/static/locales/sv.json | 1 + frontend/static/locales/sw.json | 1 + frontend/static/locales/th.json | 1 + frontend/static/locales/zh-SI.json | 1 + frontend/static/locales/zh-TR.json | 1 + 18 files changed, 29 insertions(+) diff --git a/frontend/src/components/BookTable/BookControl.tsx b/frontend/src/components/BookTable/BookControl.tsx index a92f5b3a..c60893a2 100644 --- a/frontend/src/components/BookTable/BookControl.tsx +++ b/frontend/src/components/BookTable/BookControl.tsx @@ -79,19 +79,31 @@ const BookControl = ({ const orderTypeIcon = (value: string): React.ReactNode => { let component = ; + let text = t('ANY'); if (value === 'sell') { component = ; + text = t('Sell'); } else if (value === 'buy') { component = ; + text = t('Buy'); } else if (value === 'swapin') { component = ; + text = t('Swap In'); } else if (value === 'swapout') { component = ; + text = t('swap Out'); } return (
{component} + {width > medium ? ( + + {` ${text}`} + + ) : ( + <> + )}
); }; diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json index 670b4805..0b432c00 100644 --- a/frontend/static/locales/ca.json +++ b/frontend/static/locales/ca.json @@ -91,6 +91,7 @@ "and use": "i fer servir", "hosted by": "allotjat per", "pay with": "pagar amb", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Afegir filtre", "Amount": "Suma", diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json index 17105da9..bb02ced5 100644 --- a/frontend/static/locales/cs.json +++ b/frontend/static/locales/cs.json @@ -91,6 +91,7 @@ "and use": "použít", "hosted by": "hosted by", "pay with": "pay with", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Přidat filter", "Amount": "Částka", diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json index 5d63d6d5..00194ddc 100644 --- a/frontend/static/locales/de.json +++ b/frontend/static/locales/de.json @@ -91,6 +91,7 @@ "and use": "und verwende", "hosted by": "hosted by", "pay with": "pay with", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Menge", diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index f2bc7d02..523f7387 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -91,6 +91,7 @@ "and use": "and use", "hosted by": "hosted by", "pay with": "pay with", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Amount", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index c8c8477c..aa2a5555 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -91,6 +91,7 @@ "and use": "y usa", "hosted by": "hosted by", "pay with": "paga con", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Añadir filtro", "Amount": "Cantidad", diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json index 555d7338..4bbad8db 100644 --- a/frontend/static/locales/eu.json +++ b/frontend/static/locales/eu.json @@ -91,6 +91,7 @@ "and use": "eta erabili", "hosted by": "hosted by", "pay with": "pay with", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Gehitu iragazkia", "Amount": "Kopurua", diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json index b0b631e0..6bed29b8 100644 --- a/frontend/static/locales/fr.json +++ b/frontend/static/locales/fr.json @@ -91,6 +91,7 @@ "and use": "et utiliser", "hosted by": "hosted by", "pay with": "payer avec", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Ajouter filtre", "Amount": "Montant", diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json index 93ea69d9..0927c77a 100644 --- a/frontend/static/locales/it.json +++ b/frontend/static/locales/it.json @@ -91,6 +91,7 @@ "and use": "ed usa", "hosted by": "hosted by", "pay with": "paga con", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Aggiungi filtro", "Amount": "Quantità", diff --git a/frontend/static/locales/ja.json b/frontend/static/locales/ja.json index 43e7a3b1..728dbc19 100644 --- a/frontend/static/locales/ja.json +++ b/frontend/static/locales/ja.json @@ -91,6 +91,7 @@ "and use": "そして使用するのは", "hosted by": "hosted by", "pay with": "支払い方法は:", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "フィルタを追加", "Amount": "量", diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json index 9fcb2b66..1fc6a6f1 100644 --- a/frontend/static/locales/pl.json +++ b/frontend/static/locales/pl.json @@ -91,6 +91,7 @@ "and use": "i użyć", "hosted by": "hosted by", "pay with": "pay with", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Ilość", diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json index cee04adc..5b748881 100644 --- a/frontend/static/locales/pt.json +++ b/frontend/static/locales/pt.json @@ -91,6 +91,7 @@ "and use": "e utilizar", "hosted by": "hospedado por", "pay with": "pagar com", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Adicionar filtro", "Amount": "Quantidade", diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json index 68709c55..bd11f1be 100644 --- a/frontend/static/locales/ru.json +++ b/frontend/static/locales/ru.json @@ -91,6 +91,7 @@ "and use": "и использовать", "hosted by": "hosted by", "pay with": "оплатить", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Добавить фильтр", "Amount": "Сумма", diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json index 58f2934f..130d3065 100644 --- a/frontend/static/locales/sv.json +++ b/frontend/static/locales/sv.json @@ -91,6 +91,7 @@ "and use": "och använda", "hosted by": "hosted by", "pay with": "pay with", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Summa", diff --git a/frontend/static/locales/sw.json b/frontend/static/locales/sw.json index d866a857..496ee03f 100644 --- a/frontend/static/locales/sw.json +++ b/frontend/static/locales/sw.json @@ -91,6 +91,7 @@ "and use": "na tumia", "hosted by": "hosted by", "pay with": "lipa kwa", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Ongeza kichujio", "Amount": "Kiasi", diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json index ec74624f..362dcfc1 100644 --- a/frontend/static/locales/th.json +++ b/frontend/static/locales/th.json @@ -91,6 +91,7 @@ "and use": "และใช้", "hosted by": "hosted by", "pay with": "pay with", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "เพิ่มตัวกรอง", "Amount": "จำนวน", diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json index 726dfa45..fc9b5329 100644 --- a/frontend/static/locales/zh-SI.json +++ b/frontend/static/locales/zh-SI.json @@ -91,6 +91,7 @@ "and use": "并使用", "hosted by": "hosted by", "pay with": "支付", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "加筛选", "Amount": "金额", diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json index de00cb01..cd8168e3 100644 --- a/frontend/static/locales/zh-TR.json +++ b/frontend/static/locales/zh-TR.json @@ -91,6 +91,7 @@ "and use": "並使用", "hosted by": "hosted by", "pay with": "支付", + "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "加篩選", "Amount": "金額", From 1b7f964fe76a36bab8f51216bba60d88aa65b048 Mon Sep 17 00:00:00 2001 From: koalasat Date: Mon, 25 Nov 2024 14:24:57 +0100 Subject: [PATCH 4/7] Fix translation --- frontend/src/components/BookTable/BookControl.tsx | 2 +- frontend/static/locales/ca.json | 1 - frontend/static/locales/cs.json | 1 - frontend/static/locales/de.json | 1 - frontend/static/locales/en.json | 1 - frontend/static/locales/es.json | 1 - frontend/static/locales/eu.json | 1 - frontend/static/locales/fr.json | 1 - frontend/static/locales/it.json | 1 - frontend/static/locales/ja.json | 1 - frontend/static/locales/pl.json | 1 - frontend/static/locales/pt.json | 1 - frontend/static/locales/ru.json | 1 - frontend/static/locales/sv.json | 1 - frontend/static/locales/sw.json | 1 - frontend/static/locales/th.json | 1 - frontend/static/locales/zh-SI.json | 1 - frontend/static/locales/zh-TR.json | 1 - 18 files changed, 1 insertion(+), 18 deletions(-) diff --git a/frontend/src/components/BookTable/BookControl.tsx b/frontend/src/components/BookTable/BookControl.tsx index c60893a2..81a8bf4e 100644 --- a/frontend/src/components/BookTable/BookControl.tsx +++ b/frontend/src/components/BookTable/BookControl.tsx @@ -91,7 +91,7 @@ const BookControl = ({ text = t('Swap In'); } else if (value === 'swapout') { component = ; - text = t('swap Out'); + text = t('Swap Out'); } return ( diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json index 0b432c00..670b4805 100644 --- a/frontend/static/locales/ca.json +++ b/frontend/static/locales/ca.json @@ -91,7 +91,6 @@ "and use": "i fer servir", "hosted by": "allotjat per", "pay with": "pagar amb", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Afegir filtre", "Amount": "Suma", diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json index bb02ced5..17105da9 100644 --- a/frontend/static/locales/cs.json +++ b/frontend/static/locales/cs.json @@ -91,7 +91,6 @@ "and use": "použít", "hosted by": "hosted by", "pay with": "pay with", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Přidat filter", "Amount": "Částka", diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json index 00194ddc..5d63d6d5 100644 --- a/frontend/static/locales/de.json +++ b/frontend/static/locales/de.json @@ -91,7 +91,6 @@ "and use": "und verwende", "hosted by": "hosted by", "pay with": "pay with", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Menge", diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index 523f7387..f2bc7d02 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -91,7 +91,6 @@ "and use": "and use", "hosted by": "hosted by", "pay with": "pay with", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Amount", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index aa2a5555..c8c8477c 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -91,7 +91,6 @@ "and use": "y usa", "hosted by": "hosted by", "pay with": "paga con", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Añadir filtro", "Amount": "Cantidad", diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json index 4bbad8db..555d7338 100644 --- a/frontend/static/locales/eu.json +++ b/frontend/static/locales/eu.json @@ -91,7 +91,6 @@ "and use": "eta erabili", "hosted by": "hosted by", "pay with": "pay with", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Gehitu iragazkia", "Amount": "Kopurua", diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json index 6bed29b8..b0b631e0 100644 --- a/frontend/static/locales/fr.json +++ b/frontend/static/locales/fr.json @@ -91,7 +91,6 @@ "and use": "et utiliser", "hosted by": "hosted by", "pay with": "payer avec", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Ajouter filtre", "Amount": "Montant", diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json index 0927c77a..93ea69d9 100644 --- a/frontend/static/locales/it.json +++ b/frontend/static/locales/it.json @@ -91,7 +91,6 @@ "and use": "ed usa", "hosted by": "hosted by", "pay with": "paga con", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Aggiungi filtro", "Amount": "Quantità", diff --git a/frontend/static/locales/ja.json b/frontend/static/locales/ja.json index 728dbc19..43e7a3b1 100644 --- a/frontend/static/locales/ja.json +++ b/frontend/static/locales/ja.json @@ -91,7 +91,6 @@ "and use": "そして使用するのは", "hosted by": "hosted by", "pay with": "支払い方法は:", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "フィルタを追加", "Amount": "量", diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json index 1fc6a6f1..9fcb2b66 100644 --- a/frontend/static/locales/pl.json +++ b/frontend/static/locales/pl.json @@ -91,7 +91,6 @@ "and use": "i użyć", "hosted by": "hosted by", "pay with": "pay with", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Ilość", diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json index 5b748881..cee04adc 100644 --- a/frontend/static/locales/pt.json +++ b/frontend/static/locales/pt.json @@ -91,7 +91,6 @@ "and use": "e utilizar", "hosted by": "hospedado por", "pay with": "pagar com", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Adicionar filtro", "Amount": "Quantidade", diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json index bd11f1be..68709c55 100644 --- a/frontend/static/locales/ru.json +++ b/frontend/static/locales/ru.json @@ -91,7 +91,6 @@ "and use": "и использовать", "hosted by": "hosted by", "pay with": "оплатить", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Добавить фильтр", "Amount": "Сумма", diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json index 130d3065..58f2934f 100644 --- a/frontend/static/locales/sv.json +++ b/frontend/static/locales/sv.json @@ -91,7 +91,6 @@ "and use": "och använda", "hosted by": "hosted by", "pay with": "pay with", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Add filter", "Amount": "Summa", diff --git a/frontend/static/locales/sw.json b/frontend/static/locales/sw.json index 496ee03f..d866a857 100644 --- a/frontend/static/locales/sw.json +++ b/frontend/static/locales/sw.json @@ -91,7 +91,6 @@ "and use": "na tumia", "hosted by": "hosted by", "pay with": "lipa kwa", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "Ongeza kichujio", "Amount": "Kiasi", diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json index 362dcfc1..ec74624f 100644 --- a/frontend/static/locales/th.json +++ b/frontend/static/locales/th.json @@ -91,7 +91,6 @@ "and use": "และใช้", "hosted by": "hosted by", "pay with": "pay with", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "เพิ่มตัวกรอง", "Amount": "จำนวน", diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json index fc9b5329..726dfa45 100644 --- a/frontend/static/locales/zh-SI.json +++ b/frontend/static/locales/zh-SI.json @@ -91,7 +91,6 @@ "and use": "并使用", "hosted by": "hosted by", "pay with": "支付", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "加筛选", "Amount": "金额", diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json index cd8168e3..de00cb01 100644 --- a/frontend/static/locales/zh-TR.json +++ b/frontend/static/locales/zh-TR.json @@ -91,7 +91,6 @@ "and use": "並使用", "hosted by": "hosted by", "pay with": "支付", - "swap Out": "swap Out", "#14": "Phrases in components/BookTable/index.tsx", "Add filter": "加篩選", "Amount": "金額", From 6520c01ca8a0bd6642b52ee6b99113035fba2373 Mon Sep 17 00:00:00 2001 From: koalasat Date: Mon, 25 Nov 2024 14:26:14 +0100 Subject: [PATCH 5/7] Fix translation --- frontend/src/components/BookTable/BookControl.tsx | 2 +- frontend/static/locales/ca.json | 1 - frontend/static/locales/cs.json | 1 - frontend/static/locales/de.json | 1 - frontend/static/locales/en.json | 1 - frontend/static/locales/es.json | 1 - frontend/static/locales/eu.json | 1 - frontend/static/locales/fr.json | 1 - frontend/static/locales/it.json | 1 - frontend/static/locales/ja.json | 1 - frontend/static/locales/pl.json | 1 - frontend/static/locales/pt.json | 1 - frontend/static/locales/ru.json | 1 - frontend/static/locales/sv.json | 1 - frontend/static/locales/sw.json | 1 - frontend/static/locales/th.json | 1 - frontend/static/locales/zh-SI.json | 1 - frontend/static/locales/zh-TR.json | 1 - 18 files changed, 1 insertion(+), 18 deletions(-) diff --git a/frontend/src/components/BookTable/BookControl.tsx b/frontend/src/components/BookTable/BookControl.tsx index 81a8bf4e..5dbef29d 100644 --- a/frontend/src/components/BookTable/BookControl.tsx +++ b/frontend/src/components/BookTable/BookControl.tsx @@ -152,7 +152,7 @@ const BookControl = ({
- {' ' + t('Any')} + {' ' + t('ANY')}
diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json index 670b4805..964a0503 100644 --- a/frontend/static/locales/ca.json +++ b/frontend/static/locales/ca.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "TOT", - "Any": "Any", "Buy": "Comprar", "DESTINATION": "DESTÍ", "I want to": "Vull", diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json index 17105da9..c130de9e 100644 --- a/frontend/static/locales/cs.json +++ b/frontend/static/locales/cs.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "VŠE", - "Any": "Any", "Buy": "Nákup", "DESTINATION": "DESTINATION", "I want to": "Já chci", diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json index 5d63d6d5..dc3c7e87 100644 --- a/frontend/static/locales/de.json +++ b/frontend/static/locales/de.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ALLE", - "Any": "Any", "Buy": "Kaufen", "DESTINATION": "DESTINATION", "I want to": "Ich möchte", diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index f2bc7d02..d39fd7ca 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ANY", - "Any": "Any", "Buy": "Buy", "DESTINATION": "DESTINATION", "I want to": "I want to", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index c8c8477c..596ce720 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "TODO", - "Any": "Any", "Buy": "Comprar", "DESTINATION": "DESTINO", "I want to": "Quiero", diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json index 555d7338..a9ef4fb9 100644 --- a/frontend/static/locales/eu.json +++ b/frontend/static/locales/eu.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ANY", - "Any": "Any", "Buy": "Erosi", "DESTINATION": "DESTINATION", "I want to": "Nahi dut", diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json index b0b631e0..07a410d7 100644 --- a/frontend/static/locales/fr.json +++ b/frontend/static/locales/fr.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "Tous", - "Any": "Any", "Buy": "Acheter", "DESTINATION": "DESTINATION", "I want to": "Je veux", diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json index 93ea69d9..ae73c76b 100644 --- a/frontend/static/locales/it.json +++ b/frontend/static/locales/it.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "QUALUNQUE", - "Any": "Any", "Buy": "Compra", "DESTINATION": "DESTINAZIONE", "I want to": "Voglio", diff --git a/frontend/static/locales/ja.json b/frontend/static/locales/ja.json index 43e7a3b1..d58fbabd 100644 --- a/frontend/static/locales/ja.json +++ b/frontend/static/locales/ja.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "すべて", - "Any": "Any", "Buy": "購入", "DESTINATION": "方向", "I want to": "私はしたいのは:", diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json index 9fcb2b66..85f48323 100644 --- a/frontend/static/locales/pl.json +++ b/frontend/static/locales/pl.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "KAŻDY", - "Any": "Any", "Buy": "Kupić", "DESTINATION": "DESTINATION", "I want to": "chcę", diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json index cee04adc..a4ac675a 100644 --- a/frontend/static/locales/pt.json +++ b/frontend/static/locales/pt.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "QUALQUER", - "Any": "Any", "Buy": "Comprar", "DESTINATION": "DESTINATION", "I want to": "Eu quero", diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json index 68709c55..4dac8e4f 100644 --- a/frontend/static/locales/ru.json +++ b/frontend/static/locales/ru.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "Любой", - "Any": "Any", "Buy": "Купить", "DESTINATION": "МЕСТО НАЗНАЧЕНИЯ", "I want to": "Я хочу", diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json index 58f2934f..1879cb55 100644 --- a/frontend/static/locales/sv.json +++ b/frontend/static/locales/sv.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ALLA", - "Any": "Any", "Buy": "Köpa", "DESTINATION": "DESTINATION", "I want to": "Jag vill", diff --git a/frontend/static/locales/sw.json b/frontend/static/locales/sw.json index d866a857..d88983e7 100644 --- a/frontend/static/locales/sw.json +++ b/frontend/static/locales/sw.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "Yoyote", - "Any": "Any", "Buy": "Nunua", "DESTINATION": "MAELEKEZO", "I want to": "Nataka", diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json index ec74624f..3b566203 100644 --- a/frontend/static/locales/th.json +++ b/frontend/static/locales/th.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "ANY", - "Any": "Any", "Buy": "ซื้อ", "DESTINATION": "DESTINATION", "I want to": "ฉันต้องการ", diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json index 726dfa45..93b0c808 100644 --- a/frontend/static/locales/zh-SI.json +++ b/frontend/static/locales/zh-SI.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "任何", - "Any": "Any", "Buy": "购买", "DESTINATION": "目的地", "I want to": "我想要", diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json index de00cb01..7601a0bb 100644 --- a/frontend/static/locales/zh-TR.json +++ b/frontend/static/locales/zh-TR.json @@ -76,7 +76,6 @@ "URL": "URL", "#13": "Phrases in components/BookTable/BookControl.tsx", "ANY": "任何", - "Any": "Any", "Buy": "購買", "DESTINATION": "目的地", "I want to": "我想要", From 3278aab28ff3767242723c02a42654aa211dfc78 Mon Sep 17 00:00:00 2001 From: koalasat Date: Mon, 25 Nov 2024 14:30:24 +0100 Subject: [PATCH 6/7] It was the other way around --- frontend/src/components/BookTable/BookControl.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/BookTable/BookControl.tsx b/frontend/src/components/BookTable/BookControl.tsx index 5dbef29d..ca119b39 100644 --- a/frontend/src/components/BookTable/BookControl.tsx +++ b/frontend/src/components/BookTable/BookControl.tsx @@ -43,9 +43,9 @@ const BookControl = ({ if (fav.type === null) { setOrderType('any'); } else if (fav.mode === 'fiat') { - setOrderType(fav.type === 0 ? 'buy' : 'sell'); + setOrderType(fav.type === 1 ? 'buy' : 'sell'); } else { - setOrderType(fav.type === 0 ? 'swapout' : 'swapin'); + setOrderType(fav.type === 1 ? 'swapout' : 'swapin'); } }, [fav.mode, fav.type]); @@ -62,14 +62,14 @@ const BookControl = ({ const handleOrderTypeChange = (mouseEvent: React.MouseEvent, select: object): void => { if (select.props.value === 'sell') { const currency = fav.currency === 1000 ? 0 : fav.currency; - setFav({ ...fav, mode: 'fiat', type: 1, currency }); + setFav({ ...fav, mode: 'fiat', type: 0, currency }); } else if (select.props.value === 'buy') { const currency = fav.currency === 1000 ? 0 : fav.currency; - setFav({ ...fav, mode: 'fiat', type: 0, currency }); + setFav({ ...fav, mode: 'fiat', type: 1, currency }); } else if (select.props.value === 'swapin') { - setFav({ ...fav, mode: 'swap', type: 1, currency: 1000 }); - } else if (select.props.value === 'swapout') { setFav({ ...fav, mode: 'swap', type: 0, currency: 1000 }); + } else if (select.props.value === 'swapout') { + setFav({ ...fav, mode: 'swap', type: 1, currency: 1000 }); } else { const currency = fav.currency === 1000 ? 0 : fav.currency; setFav({ ...fav, mode: 'fiat', type: null, currency }); From 5041376377cc43c3ddfd3f0d89edc65e8234b96a Mon Sep 17 00:00:00 2001 From: koalasat Date: Tue, 26 Nov 2024 11:14:19 +0100 Subject: [PATCH 7/7] It was the other way around --- .../src/components/BookTable/BookControl.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/BookTable/BookControl.tsx b/frontend/src/components/BookTable/BookControl.tsx index ca119b39..a0b9c42e 100644 --- a/frontend/src/components/BookTable/BookControl.tsx +++ b/frontend/src/components/BookTable/BookControl.tsx @@ -81,16 +81,16 @@ const BookControl = ({ let component = ; let text = t('ANY'); if (value === 'sell') { - component = ; + component = ; text = t('Sell'); } else if (value === 'buy') { - component = ; + component = ; text = t('Buy'); } else if (value === 'swapin') { - component = ; + component = ; text = t('Swap In'); } else if (value === 'swapout') { - component = ; + component = ; text = t('Swap Out'); } @@ -158,7 +158,7 @@ const BookControl = ({
- + {' ' + t('Sell')} @@ -166,7 +166,7 @@ const BookControl = ({
- + {' ' + t('Buy')} @@ -174,7 +174,7 @@ const BookControl = ({
- + {' ' + t('Swap In')} @@ -182,7 +182,7 @@ const BookControl = ({
- + {' ' + t('Swap Out')}