Skip to content

Commit

Permalink
Styles and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed Nov 6, 2024
1 parent 91fe090 commit 6599651
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
42 changes: 25 additions & 17 deletions src/components/Process/Aside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,36 @@ const ProcessAside = () => {
<Flex className='brand-theme' direction='column' justifyContent='center' alignItems='center' gap={2}>
<Flex direction={'row'} justifyContent='center' alignItems='center' gap={2}>
<Trans
i18nKey='aside.votes_weight'
i18nKey='aside.votes'
components={{
span: <Text as='span' fontWeight='bold' fontSize='xl3' textAlign='center' lineHeight={1} />,
span: <Text as='span' fontWeight='bold' fontSize='xl3' textAlign='center' lineHeight={1} mr={2} />,
text: <Text fontSize='xl' textAlign='center' lineHeight={1.3} />,
}}
count={totalWeight}
count={election?.voteCount}
/>
{/*<Trans*/}
{/* i18nKey='aside.votes_weight'*/}
{/* components={{*/}
{/* span: <Text as='span' fontWeight='bold' fontSize='xl3' textAlign='center' lineHeight={1} />,*/}
{/* text: <Text fontSize='xl' textAlign='center' lineHeight={1.3} />,*/}
{/* }}*/}
{/* count={totalWeight}*/}
{/*/>*/}
</Flex>
{showVoters && votersCount !== totalWeight && (
<Flex direction={'row'} justifyContent='center' alignItems='center'>
{'('}
<Trans
i18nKey='aside.votes'
components={{
span: <Text as='span' fontWeight='bold' fontSize='md' textAlign='center' lineHeight={1} mr={2} />,
text: <Text fontSize='md' textAlign='center' lineHeight={1.3} />,
}}
count={election?.voteCount}
/>
{')'}
</Flex>
)}
{/*{showVoters && votersCount !== totalWeight && (*/}
{/* <Flex direction={'row'} justifyContent='center' alignItems='center'>*/}
{/* {'('}*/}
{/* <Trans*/}
{/* i18nKey='aside.votes'*/}
{/* components={{*/}
{/* span: <Text as='span' fontWeight='bold' fontSize='md' textAlign='center' lineHeight={1} mr={2} />,*/}
{/* text: <Text fontSize='md' textAlign='center' lineHeight={1.3} />,*/}
{/* }}*/}
{/* count={election?.voteCount}*/}
{/* />*/}
{/* {')'}*/}
{/* </Flex>*/}
{/*)}*/}
</Flex>
)}
</Flex>
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export const translations = (t: TFunction<string, string>) => ({
wrong_data_title: t('cc.errors.wrong_data_title').toString(),
wrong_data_description: t('cc.errors.wrong_data_description').toString(),
},
question_types: {
multichoice_desc: t('cc.question_types.multichoice_desc').toString(),
},
// results component
results: {
date_format: t('cc.results.date_format').toString(),
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"wrong_data_description": "Les dades especificades no són correctes",
"wrong_data_title": "Dades incorrectes"
},
"question_types" :{
"multichoice_desc": "Selecciona fins a {{maxcount}} opcions"
},
"results": {
"date_format": "PPpp",
"secret_until_the_end": "Els resultats provisionals seran accessibles quan el procés finalitzi.",
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"wrong_data_description": "Los datos especificados no son correctos",
"wrong_data_title": "Datos incorrectos"
},
"question_types" :{
"multichoice_desc": "Selecciona hasta {{maxcount}} opciones"
},
"results": {
"date_format": "d 'de' MMMM 'de' y 'a' 'las' H:mm",
"secret_until_the_end": "Los resultados se harán públicos cuando el proceso finalice el {{ endDate }}.",
Expand Down

2 comments on commit 6599651

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.