Skip to content

Commit

Permalink
VKT(Frontend): Extract button label to a translation string
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoivisto committed Aug 4, 2024
1 parent 7aff64a commit 8df4ca6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frontend/packages/vkt/public/i18n/fi-FI/clerk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"vkt": {
"component": {
"clerkEnrollmentDetails": {
"attachment": {
"download": "Lataa tiedosto"
},
"cancelEnrollment": "Peruuta ilmoittautuminen",
"cancelEnrollmentDialog": {
"description": "Tätä toimintoa ei voi peruuttaa!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ const CheckboxField = ({
};

const DownloadAttachment = ({ attachment }: { attachment: Attachment }) => {
const { t } = useClerkTranslation({
keyPrefix: 'vkt.component.clerkEnrollmentDetails.attachment',
});

return (
<div className="columns gapped">
<Text>{attachment.name}</Text>
Expand All @@ -102,7 +106,7 @@ const DownloadAttachment = ({ attachment }: { attachment: Attachment }) => {
color={Color.Secondary}
startIcon={<DownloadIcon />}
>
Lataa tiedosto
{t('download')}
</CustomButton>
</Link>
</div>
Expand Down

0 comments on commit 8df4ca6

Please sign in to comment.