Skip to content

Commit e4ec3f7

Browse files
feat: add languages menu as settings dropdown item
1 parent 02aaaa1 commit e4ec3f7

File tree

4 files changed

+143
-152
lines changed

4 files changed

+143
-152
lines changed

apps/cowswap-frontend/src/locales/en-US.po

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,14 @@ msgid "Order cannot be filled due to insufficient allowance on the current accou
6868
msgstr "Order cannot be filled due to insufficient allowance on the current account."
6969

7070
#: apps/cowswap-frontend/src/modules/orderProgressBar/helpers.ts
71-
msgid "Did you know? {benefit}\n\n"
71+
msgid ""
72+
"Did you know? {benefit}\n"
73+
"\n"
74+
"Start swapping on swap.cow.fi #CoWSwap @CoWSwap 🐮"
75+
msgstr ""
76+
"Did you know? {benefit}\n"
77+
"\n"
7278
"Start swapping on swap.cow.fi #CoWSwap @CoWSwap 🐮"
73-
msgstr "Did you know? {benefit}\n\nStart swapping on swap.cow.fi #CoWSwap @CoWSwap 🐮"
7479

7580
#: apps/cowswap-frontend/src/common/updaters/ConnectionStatusUpdater.tsx
7681
msgid "<0>Connection Lost</0><1/>You appear to be offline. Some features may not work properly."
@@ -319,9 +324,14 @@ msgid "30 Minutes"
319324
msgstr "30 Minutes"
320325

321326
#: apps/cowswap-frontend/src/modules/fortune/containers/FortuneWidget/index.tsx
322-
msgid "My CoW fortune cookie 🐮💬: \"{openFortuneText}\" \n\n"
327+
msgid ""
328+
"My CoW fortune cookie 🐮💬: \"{openFortuneText}\" \n"
329+
"\n"
330+
" Get yours at swap.cow.fi @CoWSwap"
331+
msgstr ""
332+
"My CoW fortune cookie 🐮💬: \"{openFortuneText}\" \n"
333+
"\n"
323334
" Get yours at swap.cow.fi @CoWSwap"
324-
msgstr "My CoW fortune cookie 🐮💬: \"{openFortuneText}\" \n\n Get yours at swap.cow.fi @CoWSwap"
325335

326336
#: apps/cowswap-frontend/src/modules/twap/containers/TwapConfirmModal/TwapConfirmDetails.tsx
327337
msgid "amount per"
@@ -1173,9 +1183,14 @@ msgstr "Great!"
11731183

11741184
#: apps/cowswap-frontend/src/modules/orderProgressBar/helpers.ts
11751185
#: apps/cowswap-frontend/src/modules/orderProgressBar/pure/TransactionSubmittedContent/SurplusModal.tsx
1176-
msgid "Hey, I just {actionWord} an extra {surplus} on @CoWSwap! 🐮💸\n\n"
1186+
msgid ""
1187+
"Hey, I just {actionWord} an extra {surplus} on @CoWSwap! 🐮💸\n"
1188+
"\n"
1189+
"Start swapping on swap.cow.fi"
1190+
msgstr ""
1191+
"Hey, I just {actionWord} an extra {surplus} on @CoWSwap! 🐮💸\n"
1192+
"\n"
11771193
"Start swapping on swap.cow.fi"
1178-
msgstr "Hey, I just {actionWord} an extra {surplus} on @CoWSwap! 🐮💸\n\nStart swapping on swap.cow.fi"
11791194

11801195
#: apps/cowswap-frontend/src/modules/tradeFormValidation/pure/TradeFormButtons/tradeButtonsMap.tsx
11811196
msgid "Connect Wallet"
@@ -1458,6 +1473,10 @@ msgstr "Run! ...and try not getting sandwiched"
14581473
msgid "Wrap your {nativeSymbol} and use the classic {wrappedSymbol} experience!"
14591474
msgstr "Wrap your {nativeSymbol} and use the classic {wrappedSymbol} experience!"
14601475

1476+
#: apps/cowswap-frontend/src/modules/application/containers/AppMenu/index.tsx
1477+
msgid "Languages"
1478+
msgstr "Languages"
1479+
14611480
#: apps/cowswap-frontend/src/modules/limitOrders/pure/DeadlineSelector/index.tsx
14621481
msgid "Set custom deadline"
14631482
msgstr "Set custom deadline"
@@ -2629,9 +2648,12 @@ msgid "It is required to do a one-time approval of {wrappedSymbol} via an on-cha
26292648
msgstr "It is required to do a one-time approval of {wrappedSymbol} via an on-chain ERC20 Approve transaction."
26302649

26312650
#: apps/cowswap-frontend/src/modules/trade/hooks/setupTradeState/useResetStateWithSymbolDuplication.ts
2632-
msgid "There is more than one token in the list of tokens with the symbol: {doubledSymbol}.\n"
2651+
msgid ""
2652+
"There is more than one token in the list of tokens with the symbol: {doubledSymbol}.\n"
2653+
"Please select the token you need from the UI or use the address of the token instead of the symbol"
2654+
msgstr ""
2655+
"There is more than one token in the list of tokens with the symbol: {doubledSymbol}.\n"
26332656
"Please select the token you need from the UI or use the address of the token instead of the symbol"
2634-
msgstr "There is more than one token in the list of tokens with the symbol: {doubledSymbol}.\nPlease select the token you need from the UI or use the address of the token instead of the symbol"
26352657

26362658
#: apps/cowswap-frontend/src/modules/ordersTable/pure/OrdersTableContainer/NoOrdersContent.tsx
26372659
msgid "unfillable"
@@ -2690,8 +2712,8 @@ msgid "No open orders"
26902712
msgstr "No open orders"
26912713

26922714
#: apps/cowswap-frontend/src/modules/tradeFormValidation/pure/TradeFormButtons/tradeButtonsMap.tsx
2693-
msgid "ENS recipient not supported for Swap and Bridge — use address instead."
2694-
msgstr "ENS recipient not supported for Swap and Bridge — use address instead."
2715+
#~ msgid "ENS recipient not supported for Swap and Bridge — use address instead."
2716+
#~ msgstr "ENS recipient not supported for Swap and Bridge — use address instead."
26952717

26962718
#: apps/cowswap-frontend/src/modules/swap/containers/SwapWidget/index.tsx
26972719
msgid "Expected sell amount"
@@ -4765,6 +4787,10 @@ msgstr "1 Week"
47654787
msgid "There are no orders"
47664788
msgstr "There are no orders"
47674789

4790+
#: apps/cowswap-frontend/src/modules/tradeFormValidation/pure/TradeFormButtons/tradeButtonsMap.tsx
4791+
msgid "ENS recipient not supported for Swap and Bridge. Use address instead."
4792+
msgstr "ENS recipient not supported for Swap and Bridge. Use address instead."
4793+
47684794
#: apps/cowswap-frontend/src/modules/account/containers/Transaction/ActivityDetails.tsx
47694795
#: apps/cowswap-frontend/src/modules/account/containers/Transaction/ActivityDetails.tsx
47704796
msgid "Enough signatures"
@@ -5171,4 +5197,3 @@ msgstr "Learn more"
51715197
#: apps/cowswap-frontend/src/modules/tradeWidgetAddons/containers/HighFeeWarning/highFeeWarningHelpers.ts
51725198
msgid "Swap and bridge costs are at least {formattedFeePercentage}% of the swap amount"
51735199
msgstr "Swap and bridge costs are at least {formattedFeePercentage}% of the swap amount"
5174-

apps/cowswap-frontend/src/modules/application/containers/AppMenu/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@ export function AppMenu({ children }: AppMenuProps): ReactNode {
5555
[darkMode, toggleDarkMode, t],
5656
)
5757

58-
const languageNavItems = SUPPORTED_LOCALES.map((item) => ({
59-
label: item,
60-
onClick: () => setLocale(item),
61-
}))
58+
const languageNavItems = {
59+
label: t`Languages`,
60+
children: SUPPORTED_LOCALES.map((item) => ({
61+
label: item,
62+
onClick: () => setLocale(item),
63+
})),
64+
}
6265

6366
const navItems = useMemo(() => {
6467
return [

0 commit comments

Comments
 (0)