diff --git a/app/src/components/AuthForm.vue b/app/src/components/AuthForm.vue index 36a7eba..563f744 100644 --- a/app/src/components/AuthForm.vue +++ b/app/src/components/AuthForm.vue @@ -113,7 +113,7 @@ const registerGuest = async () => { :icon="['fas', 'circle-exclamation']" class="px-1 text-sm" /> - 建議使用電腦全螢幕執行 + {{ t('authform.recommand_pc_fullscreen') }}
diff --git a/app/src/components/QuestIntro.vue b/app/src/components/QuestIntro.vue index c76923c..be3e597 100644 --- a/app/src/components/QuestIntro.vue +++ b/app/src/components/QuestIntro.vue @@ -59,7 +59,7 @@ onMounted(async () => { }) questInstruction.value = quest.instruction } catch (error) { - toast.error('Failed to load quest detail:', error) + toast.error(t('quest.load_quest_instruction_failed'), error) } handleColour() }) diff --git a/app/src/components/QuestMap.vue b/app/src/components/QuestMap.vue index 93d203d..935a107 100644 --- a/app/src/components/QuestMap.vue +++ b/app/src/components/QuestMap.vue @@ -99,8 +99,8 @@ async function computeGraphData() { graphData.value = { nodes, edges } } catch (error) { - console.error('Error computing graph data:', error) - toast.error('Failed to load quest data') + console.error(t('quest_map.compute_graph_failed'), error) + toast.error(t('quest_map.load_quest_data_failed')) } } function handleNodeClick(node: Node) { diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index 715ff82..aca160e 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -52,7 +52,8 @@ "already_registered": "Already have an account?", "not_registered": "Don't have an account?", "continue_as_guest": "Continue as Guest", - "password_rules": "At least 8 characters, including uppercase and lowercase letters and numbers" + "password_rules": "At least 8 characters, including uppercase and lowercase letters and numbers", + "recommand_pc_fullscreen": "Recommended to use desktop version in full-screen mode" }, "authform_error": { "too_many_requests": "Too many requests, please try again in 2 minutes", @@ -76,11 +77,14 @@ "quest_map": { "title": "Quest Map", "intro": "Embark on your Linux adventure!", - "load_quest_map_failed": "Failed to Load Quest Map" + "load_quest_map_failed": "Failed to Load Quest Map", + "compute_graph_failed": "Error computing graph data: ", + "load_quest_data_failed": "Failed to Load Quest Data" }, "quest": { "start": "Start Adventure", - "locked": "Quest not unlocked" + "locked": "Quest not unlocked", + "load_quest_instruction_failed": "Failed to Load Quest Instruction: " }, "leaderboard": { "title": "Leaderboard", diff --git a/app/src/i18n/locales/zh-TW.json b/app/src/i18n/locales/zh-TW.json index 8fa9dbf..027dab7 100644 --- a/app/src/i18n/locales/zh-TW.json +++ b/app/src/i18n/locales/zh-TW.json @@ -52,7 +52,8 @@ "already_registered": "已經有帳號了嗎?", "not_registered": "還沒有帳號嗎?", "continue_as_guest": "以訪客身分繼續", - "password_rules": "至少 8 個字元,包含數字及大小寫字母" + "password_rules": "至少 8 個字元,包含數字及大小寫字母", + "recommand_pc_fullscreen": "建議使用電腦版全螢幕操作" }, "authform_error": { "too_many_requests": "太多請求,兩分鐘後再試一次", @@ -76,11 +77,14 @@ "quest_map": { "title": "關卡地圖", "intro": "踏上你的Linux冒險之旅吧!", - "load_quest_map_failed": "無法讀取關卡地圖" + "load_quest_map_failed": "無法讀取關卡地圖", + "compute_graph_failed": "計算關卡地圖時出錯:", + "load_quest_data_failed": "無法讀取關卡" }, "quest": { "start": "開始冒險", - "locked": "關卡尚未解鎖" + "locked": "關卡尚未解鎖", + "load_quest_instruction_failed": "無法讀取關卡說明:" }, "leaderboard": { "title": "排行榜", diff --git a/app/src/views/RegisterPage.vue b/app/src/views/RegisterPage.vue index db5ae9f..fbe28ef 100644 --- a/app/src/views/RegisterPage.vue +++ b/app/src/views/RegisterPage.vue @@ -85,7 +85,7 @@ async function check({ return } console.error(err) - error(t('authform_error.registration_failed')) + error(t('authform_error.auth_failed')) } }