Skip to content

Commit

Permalink
use translations and change publish button's label to create
Browse files Browse the repository at this point in the history
  • Loading branch information
brrkrmn authored and Ndibe Raymond Olisaemeka committed Feb 26, 2024
1 parent 5f8fa7f commit 728bf99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 4 additions & 2 deletions zubhub_frontend/zubhub/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@
"createActivity": {
"welcomeMsg": {
"primary": "Create Activity",
"secondary": "Tell us about your informative activity!",
"edit": "Update Activity"
},
"inputs": {
Expand Down Expand Up @@ -1068,9 +1069,10 @@
},
"buttons": {
"Next": "Next",
"Prev": "Prev",
"Prev": "Previous",
"Submit": "Submit For Review",
"Edit": "Save Changes"
"Edit": "Save Changes",
"create": "Create"
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export default function CreateActivity(props) {

const isActive = index => index + 1 === activeStep;
const isCompleted = index => completedSteps.includes(index + 1);

const { t } = props;

const handleSetState = obj => {
if (obj) {
Promise.resolve(obj).then(obj => {
Expand Down Expand Up @@ -185,8 +186,8 @@ export default function CreateActivity(props) {
<Box className={classes.formContainer}>
<Grid item md={12} lg={12}>
<Box sx={{ textAlign: isSmallScreen ? 'left' : 'center' }}>
<Typography className={clsx(commonClasses.title1)}>Create Activity</Typography>
<Typography>Tell us about your informative activity !</Typography>
<Typography className={clsx(commonClasses.title1)}>{t('createActivity.welcomeMsg.primary')}</Typography>
<Typography>{t('createActivity.welcomeMsg.secondary')}</Typography>
</Box>

{/* Step Navigation UI */}
Expand All @@ -208,7 +209,7 @@ export default function CreateActivity(props) {
primaryButtonOutlinedStyle
startIcon={<ArrowBackIosRounded className={classes.nextButton} />}
>
Previous
{t('createActivity.buttons.Prev')}
</CustomButton>
)}

Expand All @@ -219,7 +220,7 @@ export default function CreateActivity(props) {
primaryButtonStyle
endIcon={<ArrowForwardIosRounded className={classes.nextButton} />}
>
{activeStep == 2 ? 'Publish' : 'Next'}
{activeStep == 2 ? t('createActivity.buttons.create') : t('createActivity.buttons.Next')}
</CustomButton>
</Box>
</Box>
Expand Down

0 comments on commit 728bf99

Please sign in to comment.