diff --git a/src/components/GameTabs.vue b/src/components/GameTabs.vue index f3a979915..c1d3f74f9 100644 --- a/src/components/GameTabs.vue +++ b/src/components/GameTabs.vue @@ -52,7 +52,7 @@ {{ taskCompletedMessage }} @@ -93,6 +93,7 @@ const props = defineProps({ sequential: { type: Boolean, required: false, default: true }, userData: { type: Object, required: true }, }); +const isLevante = import.meta.env.MODE === 'LEVANTE'; const { t, locale } = useI18n(); @@ -108,6 +109,18 @@ const levanteTasks = [ 'survey', 'mefs', ]; + +const levantifiedRoarTasks = [ + 'vocab', + // Not yet implemented + // 'swr', + // 'swr-es', + // 'sre', + // 'sre-es', + // 'pa', + // 'pa-es', +]; + const getTaskName = (taskId, taskName) => { // Translate Levante task names. The task name is not the same as the taskId. const taskIdLowercased = taskId.toLowerCase(); @@ -127,6 +140,21 @@ const getTaskDescription = (taskId, taskDescription) => { return taskDescription; }; +const getRoutePath = (taskId) => { + const lowerCasedAndCamelizedTaskId = camelize(taskId.toLowerCase()); + + if (lowerCasedAndCamelizedTaskId === 'survey') { + return '/survey'; + } else if ( + levanteTasks.includes(lowerCasedAndCamelizedTaskId) || + (isLevante && levantifiedRoarTasks.includes(lowerCasedAndCamelizedTaskId)) + ) { + return '/game/core-tasks/' + taskId; + } else { + return '/game/' + taskId; + } +}; + const taskCompletedMessage = computed(() => { return t('gameTabs.taskCompleted'); }); diff --git a/src/router/index.js b/src/router/index.js index f5dfffd30..ce0fa24cc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -164,7 +164,7 @@ const routes = [ meta: { pageTitle: 'Fluency-Alpaca ES' }, }, { - path: '/game/:taskId', + path: '/game/core-tasks/:taskId', name: 'Core Tasks', component: () => import('../components/tasks/TaskLevante.vue'), props: true, diff --git a/src/translations/en/en-componentTranslations.json b/src/translations/en/en-componentTranslations.json index 0d22fd56e..ef994c2f8 100644 --- a/src/translations/en/en-componentTranslations.json +++ b/src/translations/en/en-componentTranslations.json @@ -49,7 +49,7 @@ "heartsAndFlowersName": "Hearts and Flowers", "egmaMathDescription": "Solve the math problems.", "egmaMathName": "Math Game", - "matrixReasoningDescription": "¡Find the missing piece to complete the puzzle.", + "matrixReasoningDescription": "Find the missing piece to complete the puzzle.", "matrixReasoningName": "Puzzle Game", "memoryGameDescription": "Watch the squares light up. Remember the order and make the same pattern.", "memoryGameName": "Memory Game", @@ -64,7 +64,9 @@ "surveyName": "Thoughts and Feelings", "surveyDescription": "Answer questions about your time at school.", "mefsName": "Lion and Monkey Game", - "mefsDescription": "Match the shapes and colors." + "mefsDescription": "Match the shapes and colors.", + "vocabName": "Vocabulary Game", + "vocabDescription": "Listen to the word and choose the matching image." }, "navBar": { "signOut": "Sign Out" diff --git a/src/translations/en/us/en-us-componentTranslations.json b/src/translations/en/us/en-us-componentTranslations.json index 0d22fd56e..ef994c2f8 100644 --- a/src/translations/en/us/en-us-componentTranslations.json +++ b/src/translations/en/us/en-us-componentTranslations.json @@ -49,7 +49,7 @@ "heartsAndFlowersName": "Hearts and Flowers", "egmaMathDescription": "Solve the math problems.", "egmaMathName": "Math Game", - "matrixReasoningDescription": "¡Find the missing piece to complete the puzzle.", + "matrixReasoningDescription": "Find the missing piece to complete the puzzle.", "matrixReasoningName": "Puzzle Game", "memoryGameDescription": "Watch the squares light up. Remember the order and make the same pattern.", "memoryGameName": "Memory Game", @@ -64,7 +64,9 @@ "surveyName": "Thoughts and Feelings", "surveyDescription": "Answer questions about your time at school.", "mefsName": "Lion and Monkey Game", - "mefsDescription": "Match the shapes and colors." + "mefsDescription": "Match the shapes and colors.", + "vocabName": "Vocabulary Game", + "vocabDescription": "Listen to the word and choose the matching image." }, "navBar": { "signOut": "Sign Out" diff --git a/src/translations/es/es-componentTranslations.json b/src/translations/es/es-componentTranslations.json index fefa8f914..225aa6acb 100644 --- a/src/translations/es/es-componentTranslations.json +++ b/src/translations/es/es-componentTranslations.json @@ -65,7 +65,9 @@ "surveyName": "Pensamientos y Sentimientos", "surveyDescription": "Responde a las preguntas sobre tu estancia en el colegio.", "mefsName": "Juego del León y el Mono", - "mefsDescription": "Empareja las formas y los colores." + "mefsDescription": "Empareja las formas y los colores.", + "vocabName": "Juego de Vocabulario", + "vocabDescription": "Escucha la palabra y elige la imagen correspondiente." }, "navBar": { "signOut": "Salir"