Skip to content

Commit

Permalink
changed translation prefix with the right format
Browse files Browse the repository at this point in the history
  • Loading branch information
nischal-shetty2 committed Sep 7, 2024
1 parent 2fb8409 commit 1a372ba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 7 additions & 5 deletions src/components/RescanChain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const RescanChainForm = ({ disabled, submitButtonText, onSubmit }: RescanChainFo
validate={(values) => {
const errors = {} as FormikErrors<RescanChainFormValues>
if (typeof values.blockheight !== 'number' || values.blockheight < 0) {
errors.blockheight = t('rescan_chain.valid_blockheight_error', {
errors.blockheight = t('rescan_chain.feedback_invalid_blockheight', {
min: 0,
})
}
Expand All @@ -57,14 +57,16 @@ const RescanChainForm = ({ disabled, submitButtonText, onSubmit }: RescanChainFo
{({ handleSubmit, handleBlur, handleChange, values, touched, errors, isSubmitting }) => (
<rb.Form onSubmit={handleSubmit} noValidate lang={i18n.resolvedLanguage || i18n.language}>
<rb.Form.Group controlId="blockheight" className="mb-4">
<rb.Form.Label>{t('rescan_chain.blockheight_label')}</rb.Form.Label>
<rb.Form.Text className="d-block text-secondary mb-2">{t('rescan_chain.blockheight_info')}</rb.Form.Text>
<rb.Form.Label>{t('rescan_chain.label_blockheight')}</rb.Form.Label>
<rb.Form.Text className="d-block text-secondary mb-2">
{t('rescan_chain.description_blockheight')}
</rb.Form.Text>
<rb.InputGroup hasValidation>
<rb.InputGroup.Text id="blockheight-addon1">
<Sprite symbol="block" width="24" height="24" name="Block" />
</rb.InputGroup.Text>
<rb.Form.Control
aria-label={t('rescan_chain.blockheight_label')}
aria-label={t('rescan_chain.label_blockheight')}
className="slashed-zeroes"
name="blockheight"
type="number"
Expand Down Expand Up @@ -147,7 +149,7 @@ export default function RescanChain({ wallet }: RescanChainProps) {
<RescanChainForm
disabled={serviceInfo?.rescanning}
submitButtonText={(isSubmitting) =>
t(isSubmitting ? 'rescan_chain.submitting_button' : 'rescan_chain.submit_button')
t(isSubmitting ? 'rescan_chain.text_button_submitting' : 'rescan_chain.text_button_submit')
}
onSubmit={async (values) => {
const abortCtrl = new AbortController()
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export default function Settings({ wallet, stopWallet }: SettingsProps) {
{serviceInfo && isFeatureEnabled('rescanChain', serviceInfo) && (
<Link to={routes.rescanChain} className={`btn btn-outline-dark ${styles['settings-btn']}`}>
<Sprite symbol="block" width="24" height="24" />
{t('settings.rescan_chain_option')}
{t('settings.rescan_chain')}
</Link>
)}

Expand Down
12 changes: 6 additions & 6 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
"confirm_locking_modal_title": "Lock Wallet",
"confirm_locking_modal_body_earn": "Earn is active. Locking the wallet will stop the service. You can close the browser window to let it run in the background.",
"confirm_locking_modal_body_jam": "A collaborative transaction is being executed. Locking the wallet will stop the service. You can close the browser window to let it run in the background.",
"rescan_chain_option": "Rescan chain",
"rescan_chain": "Rescan chain",
"fees": {
"title": "Fee Limits",
"description": "Adjust mining fees and collaborator fees according to your needs. These settings will be reset to default values when the JoinMarket service restarts, e.g. on a system reboot. For more information, <1>see the documentation on fees</1>.",
Expand Down Expand Up @@ -274,12 +274,12 @@
"rescan_chain": {
"title": "Rescan timechain (Experimental)",
"subtitle": "Rescan the local timechain for wallet related transactions.",
"blockheight_label": "Blockheight",
"blockheight_info": "The height of the chain at which the rescan process is started.",
"label_blockheight": "Rescan height",
"description_blockheight": "The height of the chain at which the rescan process is started.",
"error_rescanning_failed": "Error while starting the rescan process. Reason: {{ reason }}",
"valid_blockheight_error": "Please provide a valid blockheight value greater than or equal to {{ min }}.",
"submit_button": "Rescan timechain",
"submitting_button": "Rescaning timechain"
"feedback_invalid_blockheight": "Please provide a valid value between {{ min }} and the current blockheight.",
"text_button_submit": "Rescan timechain",
"text_button_submitting": "Rescanning timechain..."
},
"logs": {
"title": "Logs",
Expand Down

0 comments on commit 1a372ba

Please sign in to comment.