ui: promote EPUB, TF-IDF emphasis and smooth scrolling to General set… · PDFMathTranslate/PDFMathReader@6c538e8 · GitHub
Skip to content

Commit 6c538e8

Browse files
committed
ui: promote EPUB, TF-IDF emphasis and smooth scrolling to General settings
- Move translation mode to the top of Translation > Behavior. - Rename "Open EPUB books" to "Support EPUB files" and move it to General > Document handling. - Rename TF-IDF font weighting to "Emphasize document-specific terms", move it to General > Emphasis, and mention TF-IDF in its hint. - Move force smooth scrolling to General > Reading behavior.
1 parent 6f3c8bb commit 6c538e8

8 files changed

Lines changed: 39 additions & 35 deletions

‎src/features/settings/DocumentDefaultsSettings.vue‎

Lines changed: 2 additions & 0 deletions

‎src/features/settings/EpubSettings.vue‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,67 +5,67 @@ import { uiLanguage } from '../../i18n/index.mjs';
55
const preferences = inject('documentLanguagePreferences');
66
const labels = {
77
en: [
8-
'Open EPUB books',
8+
'Support EPUB files',
99
'Converts EPUB files into paged documents so they can be read, translated and annotated like PDFs. The original file is never modified. The first opening may take a few seconds.',
1010
],
1111
'zh-CN': [
12-
'打开 EPUB 电子书',
12+
'支持 EPUB 文件',
1313
'将 EPUB 文件转换为分页文档,可像 PDF 一样阅读、翻译和批注。不会修改原文件。首次打开可能需要几秒。',
1414
],
1515
'zh-TW': [
16-
'開啟 EPUB 電子書',
16+
'支援 EPUB 檔案',
1717
'將 EPUB 檔案轉換為分頁文件,可像 PDF 一樣閱讀、翻譯和註解。不會修改原始檔案。首次開啟可能需要幾秒。',
1818
],
1919
ja: [
20-
'EPUB ブックを開く',
20+
'EPUB ファイルをサポート',
2121
'EPUB ファイルをページ形式の文書に変換し、PDF と同様に閲覧・翻訳・注釈できるようにします。元のファイルは変更されません。初回は数秒かかる場合があります。',
2222
],
2323
ko: [
24-
'EPUB 책 열기',
24+
'EPUB 파일 지원',
2525
'EPUB 파일을 페이지 문서로 변환해 PDF처럼 읽고, 번역하고, 주석을 달 수 있습니다. 원본 파일은 수정되지 않습니다. 처음 열 때 몇 초가 걸릴 수 있습니다.',
2626
],
2727
fr: [
28-
'Ouvrir les livres EPUB',
28+
'Prendre en charge les fichiers EPUB',
2929
'Convertit les fichiers EPUB en documents paginés pour les lire, traduire et annoter comme des PDF. Le fichier original n’est jamais modifié. La première ouverture peut prendre quelques secondes.',
3030
],
3131
es: [
32-
'Abrir libros EPUB',
32+
'Admitir archivos EPUB',
3333
'Convierte los archivos EPUB en documentos paginados para leerlos, traducirlos y anotarlos como PDF. El archivo original nunca se modifica. La primera apertura puede tardar unos segundos.',
3434
],
3535
de: [
36-
'EPUB-Bücher öffnen',
36+
'EPUB-Dateien unterstützen',
3737
'Wandelt EPUB-Dateien in seitenbasierte Dokumente um, die wie PDFs gelesen, übersetzt und kommentiert werden können. Die Originaldatei wird nie verändert. Das erste Öffnen kann einige Sekunden dauern.',
3838
],
3939
pt: [
40-
'Abrir livros EPUB',
40+
'Suportar arquivos EPUB',
4141
'Converte arquivos EPUB em documentos paginados para ler, traduzir e anotar como PDFs. O arquivo original nunca é modificado. A primeira abertura pode levar alguns segundos.',
4242
],
4343
ru: [
44-
'Открывать книги EPUB',
44+
'Поддержка файлов EPUB',
4545
'Преобразует файлы EPUB в постраничные документы, которые можно читать, переводить и аннотировать как PDF. Исходный файл не изменяется. Первое открытие может занять несколько секунд.',
4646
],
4747
ar: [
48-
'فتح كتب EPUB',
48+
'دعم ملفات EPUB',
4949
'يحوّل ملفات EPUB إلى مستندات مقسّمة إلى صفحات لقراءتها وترجمتها والتعليق عليها مثل ملفات PDF. لا يُعدَّل الملف الأصلي أبدًا. قد يستغرق الفتح الأول بضع ثوانٍ.',
5050
],
5151
arz: [
52-
'فتح كتب EPUB',
52+
'دعم ملفات EPUB',
5353
'بيحوّل ملفات EPUB لمستندات بصفحات عشان تقراها وتترجمها وتعلّق عليها زي ملفات PDF. الملف الأصلي مش بيتغيّر خالص. أول فتح ممكن ياخد كام ثانية.',
5454
],
5555
hi: [
56-
'EPUB पुस्तकें खोलें',
56+
'EPUB फ़ाइलों का समर्थन',
5757
'EPUB फ़ाइलों को पृष्ठों वाले दस्तावेज़ों में बदलता है, ताकि उन्हें PDF की तरह पढ़ा, अनुवादित और एनोटेट किया जा सके। मूल फ़ाइल कभी नहीं बदली जाती। पहली बार खोलने में कुछ सेकंड लग सकते हैं।',
5858
],
5959
bn: [
60-
'EPUB বই খুলুন',
60+
'EPUB ফাইল সমর্থন',
6161
'EPUB ফাইলকে পৃষ্ঠাভিত্তিক নথিতে রূপান্তর করে, যাতে PDF-এর মতো পড়া, অনুবাদ ও টীকা যোগ করা যায়। মূল ফাইল কখনো পরিবর্তন করা হয় না। প্রথমবার খুলতে কয়েক সেকেন্ড লাগতে পারে।',
6262
],
6363
ur: [
64-
'EPUB کتابیں کھولیں',
64+
'EPUB فائلوں کی معاونت',
6565
'EPUB فائلوں کو صفحات والی دستاویزات میں تبدیل کرتا ہے تاکہ انہیں PDF کی طرح پڑھا، ترجمہ اور حاشیہ لگایا جا سکے۔ اصل فائل کبھی تبدیل نہیں ہوتی۔ پہلی بار کھولنے میں چند سیکنڈ لگ سکتے ہیں۔',
6666
],
6767
pcm: [
68-
'Open EPUB books',
68+
'Support EPUB files',
6969
'E go change EPUB files to documents wey get pages, so you fit read, translate and annotate dem like PDF. E no dey touch the original file. The first time wey you open am fit take small seconds.',
7070
],
7171
};

‎src/features/settings/ExperimentalSettings.vue‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ import TopicSentenceSettings from './TopicSentenceSettings.vue';
88
import ParagraphContinuationSettings from './ParagraphContinuationSettings.vue';
99
import RemoteKernelSettings from './RemoteKernelSettings.vue';
1010
import FormulaOcrSettings from './FormulaOcrSettings.vue';
11-
import EpubSettings from './EpubSettings.vue';
1211
import TocGenerationSettings from './TocGenerationSettings.vue';
1312
import TranslationCompareSettings from './TranslationCompareSettings.vue';
1413
import WatermarkRemovalSettings from './WatermarkRemovalSettings.vue';
1514
import RecentMagicZoomSettings from './RecentMagicZoomSettings.vue';
16-
import TfidfWeightingSettings from './TfidfWeightingSettings.vue';
17-
import SmoothScrollingSettings from './SmoothScrollingSettings.vue';
1815
import ChatGPTSubscriptionSettings from './ChatGPTSubscriptionSettings.vue';
1916
defineProps({ titled: { type: Boolean, default: false } });
2017
const languagePreferences = inject('documentLanguagePreferences');
@@ -27,13 +24,10 @@ const categoryLabels = computed(() => settingsCategoryLabels(currentUILanguage.v
2724
<section class="settings-section" aria-labelledby="settings-experimental-general">
2825
<h3 id="settings-experimental-general">{{ categoryLabels[0] }}</h3>
2926
<div class="settings-section-body">
30-
<EpubSettings />
3127
<FormulaOcrSettings />
3228
<TocGenerationSettings v-if="languagePreferences" />
3329
<WatermarkRemovalSettings v-if="languagePreferences" />
3430
<RecentMagicZoomSettings v-if="languagePreferences" />
35-
<TfidfWeightingSettings v-if="languagePreferences" />
36-
<SmoothScrollingSettings v-if="languagePreferences" />
3731
<TopicSentenceSettings v-if="languagePreferences" />
3832
</div>
3933
</section>

‎src/features/settings/LegacySettingsPanel.vue‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<script setup>
22
import BionicReadingSettings from './BionicReadingSettings.vue';
3+
import TfidfWeightingSettings from './TfidfWeightingSettings.vue';
4+
import EpubSettings from './EpubSettings.vue';
35
import { informationExamples } from './information-examples.mjs';
46
import { uiLanguage, uiLanguageChoice, t } from '../../i18n/index.mjs';
57
import {
@@ -405,6 +407,7 @@ const reducePadding = defineModel('reducePadding');
405407
v-model:fixed-length="bionicFixedLength"
406408
v-model:original-only="bionicOriginalOnly"
407409
/>
410+
<TfidfWeightingSettings />
408411
<div class="setting-row" data-setting="restore-documents">
409412
<span id="restore-documents-label">{{ t('settings.restoreDocuments') }}</span
410413
><AppSwitch v-model="restoreDocuments" aria-labelledby="restore-documents-label" />
@@ -417,6 +420,7 @@ const reducePadding = defineModel('reducePadding');
417420
:aria-label="t('settings.autoHideHeader')"
418421
/>
419422
</div>
423+
<EpubSettings />
420424
</section>
421425
<ReadingBehaviorSettings
422426
v-model:window-mode="windowMode"

‎src/features/settings/NativeSettingsPanel.vue‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup>
22
import BionicReadingSettings from './BionicReadingSettings.vue';
3+
import TfidfWeightingSettings from './TfidfWeightingSettings.vue';
34
import { informationExamples } from './information-examples.mjs';
45
import { uiLanguage, uiLanguageChoice, t } from '../../i18n/index.mjs';
56
import { dependencyProjects } from '../../../shared/dependency-projects.mjs';
@@ -275,6 +276,7 @@ const keyEntry = defineModel('keyEntry');
275276
v-model:fixed-length="bionicFixedLength"
276277
v-model:original-only="bionicOriginalOnly"
277278
/>
279+
<TfidfWeightingSettings />
278280
</div>
279281
</section>
280282
<DocumentDefaultsSettings
@@ -348,11 +350,6 @@ const keyEntry = defineModel('keyEntry');
348350
<section class="settings-section" aria-labelledby="settings-translation-behavior">
349351
<h3 id="settings-translation-behavior">{{ t('settings.behaviorSection') }}</h3>
350352
<div class="settings-section-body">
351-
<div class="setting-row" data-setting="reuse-translations">
352-
<span id="reuse-translations-label">{{ t('settings.reuseTranslations') }}</span>
353-
<AppSwitch v-model="reuseTranslations" aria-labelledby="reuse-translations-label" />
354-
</div>
355-
<p class="muted">{{ t('settings.reuseTranslationsDescription') }}</p>
356353
<div class="kernel-setting">
357354
<div class="setting-row">
358355
<span id="translation-mode-choice">{{ t('settings.translationMode') }}</span
@@ -380,6 +377,11 @@ const keyEntry = defineModel('keyEntry');
380377
}}
381378
</p>
382379
</div>
380+
<div class="setting-row" data-setting="reuse-translations">
381+
<span id="reuse-translations-label">{{ t('settings.reuseTranslations') }}</span>
382+
<AppSwitch v-model="reuseTranslations" aria-labelledby="reuse-translations-label" />
383+
</div>
384+
<p class="muted">{{ t('settings.reuseTranslationsDescription') }}</p>
383385
</div>
384386
</section>
385387
<section class="settings-section" aria-labelledby="settings-translation-parallel">

‎src/features/settings/ReadingBehaviorSettings.vue‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { computed } from 'vue';
33
import { AppSegment, AppSegmentedControl, AppSwitch } from '../../ui/controls.mjs';
44
import { t, uiLanguage } from '../../i18n/index.mjs';
5+
import SmoothScrollingSettings from './SmoothScrollingSettings.vue';
56
const optimizeParagraphGaps = defineModel('optimizeParagraphGaps');
67
const reducePadding = defineModel('reducePadding');
78
const windowMode = defineModel('windowMode');
@@ -121,6 +122,7 @@ const title = computed(
121122
<span id="reduce-padding-label">{{ t('appearance.reducePadding') }}</span>
122123
<AppSwitch v-model="reducePadding" aria-labelledby="reduce-padding-label" />
123124
</div>
125+
<SmoothScrollingSettings />
124126
</div>
125127
</section>
126128
</template>

‎src/features/settings/smooth-scrolling-labels.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { uiLanguage } from '../../i18n/index.mjs';
22

3-
// Experimental feature: English is the fallback for every other language.
3+
// English is the fallback for every other language.
44
const labels = {
55
en: {
66
setting: 'Force smooth scrolling',

‎src/features/settings/tfidf-weighting-labels.mjs‎

Lines changed: 7 additions & 7 deletions

0 commit comments

Comments
 (0)