From cf3060b7fe19a6f9fd05a0895bc19048f14929be Mon Sep 17 00:00:00 2001 From: cocos02 Date: Sat, 13 Jun 2026 20:16:20 +0800 Subject: [PATCH] refactor: use full i18n keys for quality speed text instead of concatenation --- src/components/PlaybackBar.vue | 6 +++--- src/locales/en.json | 4 +++- src/locales/zh.json | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/PlaybackBar.vue b/src/components/PlaybackBar.vue index eaf21fe..f496957 100644 --- a/src/components/PlaybackBar.vue +++ b/src/components/PlaybackBar.vue @@ -25,9 +25,9 @@ const speedOptions = [1, 2, 4] const showQualityMenu = ref(false) const qualityOptions = computed(() => [ { value: '', label: t('ui.qualityAuto'), speed: '' }, - { value: '超清 (1080P)', label: t('ui.quality1080p'), speed: t('ui.qualitySpeed') + ' 320KB/s' }, - { value: '高清 (720P)', label: t('ui.quality720p'), speed: t('ui.qualitySpeed') + ' 256KB/s' }, - { value: '标清 (480P)', label: t('ui.quality480p'), speed: t('ui.qualitySpeed') + ' 100KB/s' }, + { value: '超清 (1080P)', label: t('ui.quality1080p'), speed: t('ui.qualitySpeed1080p') }, + { value: '高清 (720P)', label: t('ui.quality720p'), speed: t('ui.qualitySpeed720p') }, + { value: '标清 (480P)', label: t('ui.quality480p'), speed: t('ui.qualitySpeed480p') }, ]) function currentQualityLabel() { diff --git a/src/locales/en.json b/src/locales/en.json index 419e8f7..895ac3d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -42,6 +42,8 @@ "quality1080p": "1080p", "quality720p": "720p", "quality480p": "480p", - "qualitySpeed": "Requires" + "qualitySpeed1080p": "Requires 320KB/s", + "qualitySpeed720p": "Requires 256KB/s", + "qualitySpeed480p": "Requires 100KB/s" } } \ No newline at end of file diff --git a/src/locales/zh.json b/src/locales/zh.json index 1c57d6a..3289c98 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -42,6 +42,8 @@ "quality1080p": "超清", "quality720p": "高清", "quality480p": "标清", - "qualitySpeed": "需要" + "qualitySpeed1080p": "需要 320KB/s", + "qualitySpeed720p": "需要 256KB/s", + "qualitySpeed480p": "需要 100KB/s" } } \ No newline at end of file