Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Simple Enable Amendment Translations #1084

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion public/locales/ca-CA/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,5 +557,8 @@
"can_trade": null,
"can_transfer": null,
"can_clawback": null,
"search_results_banner": null
"search_results_banner": null,
"enable_amendment_name": null,
"amendment_status": null,
"expected_date": null
}
6 changes: 5 additions & 1 deletion public/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,5 +557,9 @@
"can_trade": "Can Trade",
"can_transfer": "Can Transfer",
"can_clawback": "Can Clawback",
"search_results_banner": "Token search by name and account is now available! Try searching for USD"
"search_results_banner": "Token search by name and account is now available! Try searching for USD",
"enable_amendment_name": "Amendment Name",
"amendment_status": "Amendment Status",
"expected_date": "Expected Date"

}
5 changes: 4 additions & 1 deletion public/locales/es-ES/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,5 +553,8 @@
"can_trade": null,
"can_transfer": null,
"can_clawback": null,
"search_results_banner": null
"search_results_banner": null,
"enable_amendment_name": null,
"amendment_status": null,
"expected_date": null
}
5 changes: 4 additions & 1 deletion public/locales/fr-FR/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,5 +554,8 @@
"can_trade": null,
"can_transfer": null,
"can_clawback": null,
"search_results_banner": null
"search_results_banner": null,
"enable_amendment_name": null,
"amendment_status": null,
"expected_date": null
}
5 changes: 4 additions & 1 deletion public/locales/ja-JP/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,5 +553,8 @@
"can_trade": null,
"can_transfer": null,
"can_clawback": null,
"search_results_banner": null
"search_results_banner": null,
"enable_amendment_name": null,
"amendment_status": null,
"expected_date": null
}
5 changes: 4 additions & 1 deletion public/locales/ko-KR/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,5 +551,8 @@
"can_trade": null,
"can_transfer": null,
"can_clawback": null,
"search_results_banner": null
"search_results_banner": null,
"enable_amendment_name": null,
"amendment_status": null,
"expected_date": null
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useContext, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useLanguage } from '../../../hooks'
import { SimpleRow } from '../SimpleRow'
import { TransactionSimpleProps } from '../types'
Expand All @@ -16,6 +17,7 @@ const states = {

export const Simple = ({ data }: TransactionSimpleProps<EnableAmendment>) => {
const language = useLanguage()
const { t } = useTranslation()
const [amendmentDetails, setAmendmentDetails] = useState({
name: states.loading,
minRippledVersion: states.loading,
Expand Down Expand Up @@ -56,24 +58,24 @@ export const Simple = ({ data }: TransactionSimpleProps<EnableAmendment>) => {

return (
<>
<SimpleRow label="Amendment Name" data-test="name">
<SimpleRow label={t('enable_amendment_name')} data-test="name">
<RouteLink
to={AMENDMENT_ROUTE}
params={{ identifier: data.instructions.Amendment }}
>
{amendmentDetails.name}
</RouteLink>
</SimpleRow>
<SimpleRow label="Amendment Status" data-test="status">
<SimpleRow label={t('amendment_status')} data-test="status">
<a href="https://xrpl.org/enableamendment.html#enableamendment-flags">
{amendmentStatus}
</a>
</SimpleRow>
<SimpleRow label="Introduced In" data-test="version">
<SimpleRow label={t('introduced_in')} data-test="version">
{amendmentDetails.minRippledVersion}
</SimpleRow>
{amendmentStatus === 'Got Majority' && (
<SimpleRow label="Expected Date" data-test="date">
<SimpleRow label={t('expected_date')} data-test="date">
{expectedDate}
</SimpleRow>
)}
Expand Down
Loading