Skip to content

Commit

Permalink
Last bulk of l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn committed Jun 26, 2024
1 parent 74b3b3f commit f264da5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
13 changes: 12 additions & 1 deletion frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,17 @@
"finishScreenText": "Before you close this screen, copy your shareable schedule link to start receiving appointments.",
"finishAltText": "A user icon in front of two calendars.",
"finish": "Finish",
"setupScheduleInfo": "You can edit this schedule later"
"setupScheduleInfo": "You can edit this schedule later",
"errorHeading": "Huh, how did this happen?",
"errorBody": "Looks like there was an error. Click the button below to go back!",
"steps": {
"setupProfile": "Create your profile",
"googlePermissions": "Allow Google Calendar permissions",
"connectCalendars": "Connect calendars",
"setupSchedule": "Set up your appointment availability",
"connectVideo": "Connect your video meeting link",
"finish": "You are ready to start booking",
"error": "Uh-oh!"
}
}
}
14 changes: 7 additions & 7 deletions frontend/src/stores/ftue-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,32 @@ export const useFTUEStore = defineStore('FTUE', () => {
[ftueStep.setupProfile]: {
previous: null,
next: ftueStep.googlePermissions,
title: 'Create your profile',
title: 'ftue.steps.setupProfile',
},
[ftueStep.googlePermissions]: {
previous: ftueStep.setupProfile,
next: ftueStep.connectCalendars,
title: 'Allow Google Calendar permissions',
title: 'ftue.steps.googlePermissions',
},
[ftueStep.connectCalendars]: {
previous: ftueStep.googlePermissions,
next: ftueStep.setupSchedule,
title: 'Connect calendars',
title: 'ftue.steps.connectCalendars',
},
[ftueStep.setupSchedule]: {
previous: ftueStep.connectCalendars,
next: ftueStep.connectVideoConferencing,
title: 'Set up your appointment availability',
title: 'ftue.steps.setupSchedule',
},
[ftueStep.connectVideoConferencing]: {
previous: ftueStep.setupSchedule,
next: ftueStep.finish,
title: 'Connect your video meeting link',
title: 'ftue.steps.connectVideo',
},
[ftueStep.finish]: {
previous: ftueStep.connectVideoConferencing,
next: ftueStep.finish,
title: 'You are ready to start booking',
title: 'ftue.steps.finish',
},
};

Expand All @@ -69,7 +69,7 @@ export const useFTUEStore = defineStore('FTUE', () => {

const hasNextStep = computed(() => !!(stepList[data.value.step] && stepList[data.value.step].next));
const hasPreviousStep = computed(() => !!(stepList[data.value.step] && stepList[data.value.step].previous));
const stepTitle = computed(() => stepList[data.value.step]?.title ?? 'Unknown Step!');
const stepTitle = computed(() => stepList[data.value.step]?.title ?? 'ftue.steps.error');

const clearMessages = () => {
infoMessage.value = null;
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/views/FirstTimeUserExperienceView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="modal-header">
<word-mark v-if="currentStep === ftueStep.setupProfile || currentStep === ftueStep.finish"/>
<h2 id="ftue-title">
{{ stepTitle }}
{{ t(stepTitle) }}
</h2>
<notice-bar type="error" v-if="errorMessage">
{{ errorMessage }}
Expand All @@ -23,9 +23,9 @@
<finish v-else-if="currentStep === ftueStep.finish"/>
<div class="error-page" v-else>
<span>🤔</span>
<h2>Huh, how did this happen?</h2>
<p>Looks like there was an error. Click the button below to go back!</p>
<primary-button @click="ftueStore.$reset()">Go back</primary-button>
<h2>{{ t('ftue.errorHeading') }}</h2>
<p>{{ t('ftue.errorBody') }}</p>
<primary-button @click="ftueStore.$reset()">{{ t('label.goBack') }}</primary-button>
</div>
</div>
<div class="divider"></div>
Expand All @@ -52,12 +52,15 @@ import ConnectVideo from '@/components/FTUE/ConnectVideo.vue';
import Finish from '@/components/FTUE/Finish.vue';
import PrimaryButton from '@/tbpro/elements/PrimaryButton.vue';
import NoticeBar from '@/tbpro/elements/NoticeBar.vue';
import { useI18n } from 'vue-i18n';
const ftueStore = useFTUEStore();
const {
stepTitle, currentStep, infoMessage, errorMessage,
} = storeToRefs(ftueStore);
const { t } = useI18n();
onMounted(() => {
// Force light-mode
localStorage?.setItem('theme', 'light');
Expand Down

0 comments on commit f264da5

Please sign in to comment.