Skip to content

Commit

Permalink
Resolved Issue ripple#844
Browse files Browse the repository at this point in the history
  • Loading branch information
sohammk08 committed Apr 6, 2024
1 parent 7839eb0 commit 5470806
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion public/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@
"invalid_transaction_hash": "The transaction hash is invalid",
"ledger_not_found": "Ledger not Found",
"check_ledger_id": "Please check your ledger id",
"server_ledgers_hint": "This node ({{connection.server.publicKey, truncate(length: 10)}}) only contains ledgers {{connection.ledger.validated}}",
"server_ledgers_hint": "This node only contains ledgers {{connection.ledger.validated}}",
"server_ledgers_hint_with_key": "This node ({{connection.server.publicKey, truncate(length: 10)}}) only contains ledgers {{connection.ledger.validated}}",
"use_search": "Please use our search",
"ledger_has_no_trans": "This ledger does not have any transactions",
"less_than": "Less than",
Expand Down
1 change: 1 addition & 0 deletions public/locales/es-ES/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
"ledger_not_found": "Libro Contable no Encontrado",
"check_ledger_id": "Por favor, comprueba el id de tu libro contable",
"server_ledgers_hint": "Este nodo solo contiene libros contables {{connection.ledger.validated}}",
"server_ledgers_hint_with_key": null,
"use_search": "Por favor, utiliza nuestra búsqueda",
"ledger_has_no_trans": "Este libro contable no tiene ninguna transacción",
"less_than": "Menos que",
Expand Down
1 change: 1 addition & 0 deletions public/locales/fr-FR/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
"ledger_not_found": "Registre introuvable",
"check_ledger_id": "Veuillez vérifier votre id de registre",
"server_ledgers_hint": "Ce nœud ne contient que les registres {{connection.ledger.validated}}.",
"server_ledgers_hint_with_key": null,
"use_search": "Merci d'utiliser notre outil de recherche",
"ledger_has_no_trans": "Ce registre n'a aucune transaction.",
"less_than": "Moins de",
Expand Down
1 change: 1 addition & 0 deletions public/locales/ja-JP/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
"ledger_not_found": "Ledgerが見つかりません",
"check_ledger_id": "Ledger IDを確認してください",
"server_ledgers_hint": null,
"server_ledgers_hint_with_key": null,
"use_search": "検索機能をご利用ください",
"ledger_has_no_trans": "Ledgerにはトランザクションがありません",
"less_than": "未満",
Expand Down
1 change: 1 addition & 0 deletions public/locales/ko-KR/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
"ledger_not_found": "원장을 찾을 수 없습니다",
"check_ledger_id": "원장 ID를 확인해주세요",
"server_ledgers_hint": "이 노드 는 {{connection.ledger.validated}} 원장만 포함하고 있습니다",
"server_ledgers_hint_with_key": null,
"use_search": "검색을 이용해 주세요",
"ledger_has_no_trans": "이 원장에는 어떠한 트랜잭션도 없습니다",
"less_than": "미만",
Expand Down
13 changes: 7 additions & 6 deletions src/containers/NoMatch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@ const NoMatch = ({
}, [...hints, title, track])

const notFound = title.includes('not_found')
const hintMsg = hints.map((hint) => (
<div className="hint" key={hint}>
{t(hint as any, values)}
</div>
))

// Determine which hint message to display based on the presence of publicKey
const hintMsg = values.connection?.server?.publicKey
? t('server_ledgers_hint_with_key', values)
: t('server_ledgers_hint', values)

const derivedWarning = warning ?? (notFound && t('not_found'))

return (
<div className="no-match">
<Helmet title={t(title as any)} />
{isError && <div className="uh-oh">{t('uh_oh')}</div>}
<div className="title">{t(title as any, values)}</div>
{hintMsg}
{hintMsg && <div className="hint">{hintMsg}</div>}
{(derivedWarning || isError) && (
<div className="warning">
<InfoIcon title={derivedWarning} />
Expand Down

0 comments on commit 5470806

Please sign in to comment.