diff --git a/Note.md b/Note.md index a7127dc8..5ecc6a7d 100644 --- a/Note.md +++ b/Note.md @@ -1,3 +1,5 @@ +多语言地址:https://www.yuque.com/zhangyurang/ghwvmn/idhcg59wc2204o5n#Ah4t + 例句:On Jan. 20, former Sen. Barack Obama became the 44th President of the U.S. Millions attended the Inauguration. sentence-tokenizer 可以正常断句,但无法识别例句 diff --git a/src/components/Practice/Options.vue b/src/components/Practice/Options.vue index 05c0d9e5..d9b96201 100644 --- a/src/components/Practice/Options.vue +++ b/src/components/Practice/Options.vue @@ -61,7 +61,7 @@ const settingStore = useSettingStore() icon="ph:star-fill"/> { emitter.on(EventKey.repeat, repeat) emitter.on(ShortcutKey.NextChapter, next) + emitter.on(ShortcutKey.PreviousChapter, prev) emitter.on(ShortcutKey.RepeatChapter, repeat) emitter.on(ShortcutKey.DictationChapter, write) emitter.on(ShortcutKey.ToggleShowTranslate, toggleShowTranslate) @@ -121,6 +132,7 @@ onUnmounted(() => { emitter.off(EventKey.repeat, repeat) emitter.off(ShortcutKey.NextChapter, next) + emitter.off(ShortcutKey.PreviousChapter, prev) emitter.off(ShortcutKey.RepeatChapter, repeat) emitter.off(ShortcutKey.DictationChapter, write) emitter.off(ShortcutKey.ToggleShowTranslate, toggleShowTranslate) diff --git a/src/components/Practice/PracticeWord/TypingWord.vue b/src/components/Practice/PracticeWord/TypingWord.vue index 6ea487cf..9aa268d8 100644 --- a/src/components/Practice/PracticeWord/TypingWord.vue +++ b/src/components/Practice/PracticeWord/TypingWord.vue @@ -145,10 +145,6 @@ function next(isTyping: boolean = true) { } } -function prev() { - data.index-- -} - function onKeyUp(e: KeyboardEvent) { typingRef.hideWord() } @@ -174,6 +170,11 @@ async function onKeyDown(e: KeyboardEvent) { useOnKeyboardEventListener(onKeyDown, onKeyUp) +//TODO 略过忽略的单词上 +function prev() { + data.index-- +} + function skip(e: KeyboardEvent) { next(false) // e.preventDefault() @@ -203,7 +204,8 @@ function play() { onMounted(() => { emitter.on(ShortcutKey.ShowWord, show) - emitter.on(ShortcutKey.Skip, skip) + emitter.on(ShortcutKey.Previous, prev) + emitter.on(ShortcutKey.Next, skip) emitter.on(ShortcutKey.ToggleCollect, collect) emitter.on(ShortcutKey.ToggleSimple, toggleWordSimpleWrapper) emitter.on(ShortcutKey.PlayWordPronunciation, play) @@ -211,7 +213,8 @@ onMounted(() => { onUnmounted(() => { emitter.off(ShortcutKey.ShowWord, show) - emitter.off(ShortcutKey.Skip, skip) + emitter.off(ShortcutKey.Previous, prev) + emitter.off(ShortcutKey.Next, skip) emitter.off(ShortcutKey.ToggleCollect, collect) emitter.off(ShortcutKey.ToggleSimple, toggleWordSimpleWrapper) emitter.off(ShortcutKey.PlayWordPronunciation, play) @@ -232,7 +235,7 @@ onUnmounted(() => { @click="next(false)" v-if="nextWord">
{{ nextWord.name }}
diff --git a/src/locales/i18n.json b/src/locales/i18n.json index 4e2fe257..7381712c 100644 --- a/src/locales/i18n.json +++ b/src/locales/i18n.json @@ -31,9 +31,25 @@ "de": "", "fr": "" }, - "Skip": { + "Next": { "en": "", - "zh": "跳过", + "zh": "下一个", + "id": "", + "tw": "", + "th": "", + "ru": "", + "vi": "", + "es": "", + "pt": "", + "ja": "", + "uk": "", + "ko": "", + "de": "", + "fr": "" + }, + "Previous": { + "en": "", + "zh": "上一个", "id": "", "tw": "", "th": "", @@ -95,6 +111,22 @@ "de": "", "fr": "" }, + "PreviousChapter": { + "en": "", + "zh": "上一章", + "id": "", + "tw": "", + "th": "", + "ru": "", + "vi": "", + "es": "", + "pt": "", + "ja": "", + "uk": "", + "ko": "", + "de": "", + "fr": "" + }, "RepeatChapter": { "en": "", "zh": "重复本章", @@ -127,7 +159,7 @@ "de": "", "fr": "" }, - "PlaySound": { + "PlayWordPronunciation": { "en": "", "zh": "播放发音", "id": "", diff --git a/src/locales/i18n.xlsx b/src/locales/i18n.xlsx index f19c420a..8178d24a 100644 Binary files a/src/locales/i18n.xlsx and b/src/locales/i18n.xlsx differ diff --git a/src/types.ts b/src/types.ts index bfbc81e8..a2cf57d0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -171,16 +171,18 @@ export const SaveDict = { } export const SaveConfig = { key: 'typing-word-config', - version: 6 + version: 7 } export enum ShortcutKey { ShowWord = 'ShowWord', EditArticle = 'EditArticle', - Skip = 'Skip', + Next = 'Next', + Previous = 'Previous', ToggleSimple = 'ToggleSimple', ToggleCollect = 'ToggleCollect', NextChapter = 'NextChapter', + PreviousChapter = 'PreviousChapter', RepeatChapter = 'RepeatChapter', DictationChapter = 'DictationChapter', PlayWordPronunciation = 'PlayWordPronunciation', @@ -196,9 +198,11 @@ export enum ShortcutKey { export const DefaultShortcutKeyMap = { [ShortcutKey.EditArticle]: 'Ctrl+E', [ShortcutKey.ShowWord]: 'Escape', - [ShortcutKey.Skip]: 'Tab', + [ShortcutKey.Previous]: 'Alt+⬅', + [ShortcutKey.Next]: 'Tab', [ShortcutKey.ToggleSimple]: '`', [ShortcutKey.ToggleCollect]: 'Enter', + [ShortcutKey.PreviousChapter]: 'Ctrl+⬅', [ShortcutKey.NextChapter]: 'Ctrl+➡', [ShortcutKey.RepeatChapter]: 'Ctrl+Enter', [ShortcutKey.DictationChapter]: 'Alt+Enter',