Skip to content

Commit

Permalink
chore: internationalization for editable breakdown content
Browse files Browse the repository at this point in the history
  • Loading branch information
1emu committed May 20, 2024
1 parent 82d788c commit 40e0311
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/GrantRequest/EditableBreakdownContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button } from 'decentraland-ui/dist/components/Button/Button'

import useFormatMessage from '../../hooks/useFormatMessage.ts'
import Link from '../Common/Typography/Link.tsx'
import Open from '../Icon/Open.tsx'

Expand All @@ -11,22 +12,23 @@ interface Props {
onClick: () => void
}

//TODO: internationalization
function EditableBreakdownContent({ about, relevantLink, onClick }: Props) {
const t = useFormatMessage()

return (
<div>
<div className="EditableBreakdownContent__Text">{about}</div>
<div className="EditableBreakdownContent__Footer">
{relevantLink ? (
<Link className="RelevantLink" href={relevantLink}>
<div className="RelevantLink__Text">Relevant Link</div>
<Link className="RelevantLink" href={relevantLink} target="_blank">
<div className="RelevantLink__Text">{t('component.expandable_breakdown_item.relevant_link_label')}</div>
<Open size={10} />
</Link>
) : (
<div></div>
)}
<Button basic onClick={onClick}>
Edit
{t('component.expandable_breakdown_item.edit_action_label')}
</Button>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/intl/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,10 @@
"markdown_field": {
"preview_button": "Preview",
"edit_button": "Edit"
},
"expandable_breakdown_item": {
"relevant_link_label": "Relevant Link",
"edit_action_label": "Edit"
}
},
"page": {
Expand Down

0 comments on commit 40e0311

Please sign in to comment.