Skip to content

Commit

Permalink
fix: swap history status translations
Browse files Browse the repository at this point in the history
  • Loading branch information
sarneijim committed Apr 11, 2024
1 parent 21f9d07 commit fc96009
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-cherries-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Fix swap history status translations
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { MappedSwapOperation } from "@ledgerhq/live-common/exchange/swap/types";
import { getProviderName } from "@ledgerhq/live-common/exchange/swap/utils/index";
import React from "react";
import { useTranslation } from "react-i18next";
import styled, { DefaultTheme } from "styled-components";
import Box from "~/renderer/components/Box";
import CryptoCurrencyIcon from "~/renderer/components/CryptoCurrencyIcon";
Expand Down Expand Up @@ -102,6 +103,7 @@ const OperationRow = ({
const fromCurrency = getAccountCurrency(fromAccount);
const toCurrency = getAccountCurrency(toAccount);
const dateFormatted = useDateFormatted(operation.date, hourFormat);
const { t } = useTranslation();

return (
<Row
Expand All @@ -112,17 +114,7 @@ const OperationRow = ({
alignItems={"center"}
onClick={() => openSwapOperationDetailsModal(mappedSwapOperation)}
>
<Tooltip
content={
<span
style={{
textTransform: "capitalize",
}}
>
{status}
</span>
}
>
<Tooltip content={<span>{t(`swap2.history.status.${status}`)}</span>}>
<Status status={status}>
<IconSwap size={12} />
{isSwapOperationPending(status) ? (
Expand Down
9 changes: 8 additions & 1 deletion apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,14 @@
"description": "Either you have not made any swaps yet, or Ledger Live has been reset in the meantime."
},
"export": "Export operations",
"exporting": "Exporting..."
"exporting": "Exporting...",
"status": {
"pending": "Pending",
"onhold": "Onhold",
"expired": "Expired",
"finished": "Finished",
"refunded": "Refunded"
}
},
"exchangeDrawer": {
"title": "Confirm your Exchange",
Expand Down

0 comments on commit fc96009

Please sign in to comment.