Skip to content

Commit b711b06

Browse files
许君山许君山
authored andcommitted
fix: translate error message to chinese and clear error state on user input
1 parent 260a237 commit b711b06

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

backend/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ app.get('/api/conjugate', (req, res) => {
9595
type = detectVerbType(processedVerb);
9696
if (!type) {
9797
return res.status(400).json({
98-
error: `Could not automatically detect verb type for '${verb}' (parsed as '${processedVerb}'). Please ensure it is a valid dictionary form Japanese verb or provide the type manually.`
98+
error: `无法自动识别 "${verb}" (解析为 "${processedVerb}") 的动词类型。请确保输入的是正确的日语动词原形(如:食べる、飲む、勉強する)。`
9999
});
100100
}
101101
}

frontend/src/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
type="text"
2020
placeholder="例如:飲む、食べる、nomu、taberu"
2121
@keyup.enter="conjugate"
22+
@input="error = ''"
2223
@focus="showSuggestions = true"
2324
@blur="hideSuggestionsWithDelay"
2425
autocomplete="off"

0 commit comments

Comments
 (0)