Skip to content

Commit a3b8687

Browse files
authored
Merge branch 'develop' into fix/handle-usupported-chain-id-bff
2 parents aad27de + b4f5319 commit a3b8687

File tree

7 files changed

+42
-11
lines changed

7 files changed

+42
-11
lines changed

apps/cowswap-frontend/src/locales/es-ES.po

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6274,6 +6274,12 @@ msgid "Swap and bridge costs are at least {formattedFeePercentage}% of the swap
62746274
msgstr "Los costos de intercambio y puente son por lo menos {formattedFeePercentage}% del monto de intercambio"
62756275

62766276
# Receive amount labels
6277+
msgid "Receive (incl. fees)"
6278+
msgstr "Recibir (incl. comisiones)"
6279+
6280+
msgid "From (incl. fees)"
6281+
msgstr "De (incl. comisiones)"
6282+
62776283
# Notifications / jobs aria labels
62786284
msgid "Trade alert settings"
62796285
msgstr "Configuración de alertas de trading"

apps/cowswap-frontend/src/locales/ru-RU.po

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6274,6 +6274,12 @@ msgid "Swap and bridge costs are at least {formattedFeePercentage}% of the swap
62746274
msgstr "Затраты на замену и мост составляют не менее {formattedFeePercentage}% от суммы замены"
62756275

62766276
# Receive amount labels
6277+
msgid "Receive (incl. fees)"
6278+
msgstr "К получению (с комиссиями)"
6279+
6280+
msgid "From (incl. fees)"
6281+
msgstr "Отправить (с комиссиями)"
6282+
62776283
# Notifications / jobs aria labels
62786284
msgid "Trade alert settings"
62796285
msgstr "Настройки уведомлений о сделках"

apps/cowswap-frontend/src/modules/application/containers/App/RoutesApp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ function LazyRoute({ route, element, key }: LazyRouteProps): ReactNode {
5959
}
6060

6161
const lazyRoutes: LazyRouteProps[] = [
62-
{ route: RoutesEnum.LIMIT_ORDER, element: <LimitOrderPage /> },
6362
{ route: RoutesEnum.YIELD, element: <YieldPage /> },
6463
{ route: RoutesEnum.LONG_LIMIT_ORDER, element: <RedirectToPath path={'/limit'} /> },
65-
{ route: RoutesEnum.ADVANCED_ORDERS, element: <AdvancedOrdersPage /> },
6664
{ route: RoutesEnum.LONG_ADVANCED_ORDERS, element: <RedirectToPath path={'/advanced'} /> },
6765
{ route: RoutesEnum.ABOUT, element: <ExternalRedirect url={COWDAO_COWSWAP_ABOUT_LINK} /> },
6866
{ route: RoutesEnum.FAQ, element: <ExternalRedirect url={COWDAO_KNOWLEDGE_BASE_LINK} /> },
@@ -99,6 +97,8 @@ export function RoutesApp(): ReactNode {
9997

10098
{/*Swap*/}
10199
<Route path={RoutesEnum.SWAP} element={<SwapPage />} />
100+
<Route path={RoutesEnum.LIMIT_ORDER} element={<LimitOrderPage />} />
101+
<Route path={RoutesEnum.ADVANCED_ORDERS} element={<AdvancedOrdersPage />} />
102102
<Route path={RoutesEnum.HOOKS} element={<HooksPage />} />
103103
<Route path={RoutesEnum.SEND} element={<RedirectPathToSwapOnly />} />
104104

apps/cowswap-frontend/src/pages/AdvancedOrders/index.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { useAtomValue } from 'jotai'
2-
import { ReactNode } from 'react'
2+
import { ReactNode, Suspense } from 'react'
33

44
import { PAGE_TITLES } from '@cowprotocol/common-const'
55

66
import { useLingui } from '@lingui/react/macro'
77

8+
import { Loading } from 'legacy/components/FlashingLoading'
89
import { OrderStatus } from 'legacy/state/orders/actions'
910

1011
import {
@@ -80,12 +81,14 @@ export default function AdvancedOrdersPage(): ReactNode {
8081

8182
{!hideOrdersTable && (
8283
<styledEl.SecondaryWrapper>
83-
<OrdersTableWidget
84-
isTwapTable
85-
displayOrdersOnlyForSafeApp
86-
orderType={TabOrderTypes.ADVANCED}
87-
orders={allEmulatedOrders}
88-
/>
84+
<Suspense fallback={<Loading />}>
85+
<OrdersTableWidget
86+
isTwapTable
87+
displayOrdersOnlyForSafeApp
88+
orderType={TabOrderTypes.ADVANCED}
89+
orders={allEmulatedOrders}
90+
/>
91+
</Suspense>
8992
</styledEl.SecondaryWrapper>
9093
)}
9194
</styledEl.PageWrapper>

apps/cowswap-frontend/src/pages/LimitOrders/RegularLimitOrders.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { useAtomValue } from 'jotai'
2-
import { ReactNode, useMemo } from 'react'
2+
import { ReactNode, Suspense, useMemo } from 'react'
33

44
import { UiOrderType } from '@cowprotocol/types'
55
import { useWalletInfo } from '@cowprotocol/wallet'
66

7+
import { Loading } from 'legacy/components/FlashingLoading'
78
import { OrderStatus } from 'legacy/state/orders/actions'
89
import { useOrders } from 'legacy/state/orders/hooks'
910

@@ -39,7 +40,9 @@ export function RegularLimitOrders(): ReactNode {
3940
{!hideOrdersTable && (
4041
<styledEl.SecondaryWrapper>
4142
{pendingLimitOrders.length > 0 && <LimitOrdersPermitUpdater orders={pendingLimitOrders} />}
42-
<OrdersTableWidget orderType={TabOrderTypes.LIMIT} orders={allLimitOrders} />
43+
<Suspense fallback={<Loading />}>
44+
<OrdersTableWidget orderType={TabOrderTypes.LIMIT} orders={allLimitOrders} />
45+
</Suspense>
4346
</styledEl.SecondaryWrapper>
4447
)}
4548
</styledEl.PageWrapper>

libs/common-const/src/locales.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ export const SUPPORTED_LOCALES = [
88
export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number] | 'pseudo'
99

1010
export const DEFAULT_LOCALE: SupportedLocale = 'en-US'
11+
12+
// Override display names shown in language selectors to ensure consistent wording
13+
export const LOCALE_DISPLAY_NAMES: Partial<Record<SupportedLocale, string>> = {
14+
'en-US': 'English (US)',
15+
'es-ES': 'Español (España)',
16+
'ru-RU': 'Русский (Россия)',
17+
}

libs/ui/src/pure/MenuBar/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import IMG_ICON_MENU_DOTS from '@cowprotocol/assets/images/menu-grid-dots.svg'
1616
import IMG_ICON_MENU_HAMBURGER from '@cowprotocol/assets/images/menu-hamburger.svg'
1717
import IMG_ICON_SETTINGS_GLOBAL from '@cowprotocol/assets/images/settings-global.svg'
1818
import IMG_ICON_X from '@cowprotocol/assets/images/x.svg'
19+
import { LOCALE_DISPLAY_NAMES } from '@cowprotocol/common-const'
1920
import { useMediaQuery, useOnClickOutside } from '@cowprotocol/common-hooks'
2021
import { addBodyClass, removeBodyClass } from '@cowprotocol/common-utils'
2122

@@ -102,6 +103,11 @@ const DAO_NAV_ITEMS: MenuItem[] = [
102103
]
103104

104105
const getLanguageName = (locale: string): string => {
106+
const override = LOCALE_DISPLAY_NAMES[locale as keyof typeof LOCALE_DISPLAY_NAMES]
107+
if (override) {
108+
return override
109+
}
110+
105111
const display = new Intl.DisplayNames([locale], { type: 'language' })
106112
const languageName = display.of(locale)
107113

0 commit comments

Comments
 (0)