Merge origin/main into feat/reading-speed-stats-8023

Resolved the 34 locale files: main's keys, then this branch's 12
reading-speed keys per locale (JSON merge, byte-identical format).
Lint, the related suites (55 files, 651 tests) and format pass on the
merged tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Huang Xin 2026-11-29 01:35:27 +08:00
commit 8d95bfebf3
No known key found for this signature in database
GPG key ID: FEB86D637D085E7D
223 changed files with 2265 additions and 131 deletions

View file

@ -3163,7 +3163,6 @@
"Oldest Added": "الأقدم إضافة",
"Alphabetical A-Z": "أبجديًا A-Z",
"Alphabetical Z-A": "أبجديًا Z-A",
"All Languages": "كل اللغات",
"Pin to Notebook": "تثبيت في المفكرة",
"Look up a word to see its definitions here.": "ابحث عن كلمة لترى تعريفاتها هنا.",
"Add Audio to Anki Cards": "إضافة صوت إلى بطاقات Anki",
@ -3392,6 +3391,7 @@
"Highlight Button": "زر التمييز",
"Export to Anki puts this dictionary's entry on the back of each card": "يضع التصدير إلى Anki مدخل هذا القاموس على ظهر كل بطاقة",
"Looking up dictionary entries ({{done}}/{{total}})…": "جارٍ البحث عن مداخل القاموس ({{done}}/{{total}})…",
"The AI provider stopped responding.": "توقف مزود الذكاء الاصطناعي عن الاستجابة.",
"characters/min": "حرف/دقيقة",
"words/min": "كلمة/دقيقة",
"Average Speed": "متوسط السرعة",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "সবচেয়ে পুরনো যোগ",
"Alphabetical A-Z": "বর্ণানুক্রমে A-Z",
"Alphabetical Z-A": "বর্ণানুক্রমে Z-A",
"All Languages": "সব ভাষা",
"Pin to Notebook": "নোটবুকে পিন করুন",
"Look up a word to see its definitions here.": "এখানে সংজ্ঞা দেখতে একটি শব্দ খুঁজুন।",
"Add Audio to Anki Cards": "Anki কার্ডে অডিও যোগ করুন",
@ -3076,6 +3075,7 @@
"Highlight Button": "হাইলাইট বোতাম",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki-তে রপ্তানি প্রতিটি কার্ডের পেছনে এই অভিধানের ভুক্তি যোগ করে",
"Looking up dictionary entries ({{done}}/{{total}})…": "অভিধানের ভুক্তি খোঁজা হচ্ছে ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI প্রদানকারী সাড়া দেওয়া বন্ধ করেছে।",
"characters/min": "অক্ষর/মিনিট",
"words/min": "শব্দ/মিনিট",
"Average Speed": "গড় গতি",

View file

@ -2798,7 +2798,6 @@
"Oldest Added": "རྙིང་བ་སྣོན་པ།",
"Alphabetical A-Z": "ཀ་ཁའི་གོ་རིམ་ A-Z",
"Alphabetical Z-A": "ཀ་ཁའི་གོ་རིམ་ Z-A",
"All Languages": "སྐད་ཡིག་ཡོངས་རྫོགས།",
"Pin to Notebook": "ཟིན་དེབ་ཏུ་བཀར་བ།",
"Look up a word to see its definitions here.": "ཚིག་ཅིག་འཚོལ་ནས་འདིར་དེའི་འགྲེལ་བཤད་ལྟོས།",
"Add Audio to Anki Cards": "Anki ཤོག་བྱང་ལ་སྒྲ་ཁ་སྣོན།",
@ -2997,6 +2996,7 @@
"Highlight Button": "འོག་ཐིག་གི་མཐེབ་གནོན།",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki ལ་ཕྱིར་འདྲེན་གྱིས་ཤོག་བྱང་རེ་རེའི་རྒྱབ་ངོས་སུ་ཚིག་མཛོད་འདིའི་འགྲེལ་བཤད་འཇོག",
"Looking up dictionary entries ({{done}}/{{total}})…": "ཚིག་མཛོད་ཀྱི་འགྲེལ་བཤད་འཚོལ་བཞིན་པ། ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI མཁོ་སྤྲོད་པས་ལན་འདེབས་མཚམས་བཞག་སོང་།",
"characters/min": "ཡིག་འབྲུ་/སྐར་མ",
"words/min": "ཚིག་/སྐར་མ",
"Average Speed": "ཆ་སྙོམས་མྱུར་ཚད།",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "Älteste zuerst",
"Alphabetical A-Z": "Alphabetisch A–Z",
"Alphabetical Z-A": "Alphabetisch Z–A",
"All Languages": "Alle Sprachen",
"Pin to Notebook": "Ans Notizbuch anheften",
"Look up a word to see its definitions here.": "Schlage ein Wort nach, um hier seine Definitionen zu sehen.",
"Add Audio to Anki Cards": "Audio zu Anki-Karten hinzufügen",
@ -3076,6 +3075,7 @@
"Highlight Button": "Hervorheben-Taste",
"Export to Anki puts this dictionary's entry on the back of each card": "Der Export nach Anki setzt den Eintrag dieses Wörterbuchs auf die Rückseite jeder Karte",
"Looking up dictionary entries ({{done}}/{{total}})…": "Wörterbucheinträge werden nachgeschlagen ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Der KI-Anbieter antwortet nicht mehr.",
"characters/min": "Zeichen/Min.",
"words/min": "Wörter/Min.",
"Average Speed": "Durchschnittstempo",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "Παλαιότερες προσθήκες",
"Alphabetical A-Z": "Αλφαβητικά Α-Ω",
"Alphabetical Z-A": "Αλφαβητικά Ω-Α",
"All Languages": "Όλες οι γλώσσες",
"Pin to Notebook": "Καρφίτσωμα στο σημειωματάριο",
"Look up a word to see its definitions here.": "Αναζητήστε μια λέξη για να δείτε εδώ τους ορισμούς της.",
"Add Audio to Anki Cards": "Προσθήκη ήχου στις κάρτες Anki",
@ -3076,6 +3075,7 @@
"Highlight Button": "Κουμπί επισήμανσης",
"Export to Anki puts this dictionary's entry on the back of each card": "Η εξαγωγή σε Anki βάζει το λήμμα αυτού του λεξικού στο πίσω μέρος κάθε κάρτας",
"Looking up dictionary entries ({{done}}/{{total}})…": "Αναζήτηση λημμάτων λεξικού ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Ο πάροχος AI σταμάτησε να αποκρίνεται.",
"characters/min": "χαρακτήρες/λεπτό",
"words/min": "λέξεις/λεπτό",
"Average Speed": "Μέση ταχύτητα",

View file

@ -2944,7 +2944,6 @@
"Oldest Added": "Añadidas primero",
"Alphabetical A-Z": "Alfabético A-Z",
"Alphabetical Z-A": "Alfabético Z-A",
"All Languages": "Todos los idiomas",
"Pin to Notebook": "Anclar al cuaderno",
"Look up a word to see its definitions here.": "Busca una palabra para ver aquí sus definiciones.",
"Add Audio to Anki Cards": "Añadir audio a las tarjetas de Anki",
@ -3155,6 +3154,7 @@
"Highlight Button": "Botón de resaltar",
"Export to Anki puts this dictionary's entry on the back of each card": "Exportar a Anki pone la entrada de este diccionario en el reverso de cada tarjeta",
"Looking up dictionary entries ({{done}}/{{total}})…": "Buscando entradas del diccionario ({{done}}/{{total}})…",
"The AI provider stopped responding.": "El proveedor de IA dejó de responder.",
"characters/min": "caracteres/min",
"words/min": "palabras/min",
"Average Speed": "Velocidad media",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "قدیمی‌ترین افزوده‌ها",
"Alphabetical A-Z": "الفبایی A تا Z",
"Alphabetical Z-A": "الفبایی Z تا A",
"All Languages": "همه زبان‌ها",
"Pin to Notebook": "سنجاق به دفترچه یادداشت",
"Look up a word to see its definitions here.": "یک واژه را جست‌وجو کنید تا تعریف‌هایش اینجا نمایش داده شود.",
"Add Audio to Anki Cards": "افزودن صدا به کارت‌های Anki",
@ -3076,6 +3075,7 @@
"Highlight Button": "دکمه هایلایت",
"Export to Anki puts this dictionary's entry on the back of each card": "خروجی برای Anki مدخل این فرهنگ لغت را پشت هر کارت می‌گذارد",
"Looking up dictionary entries ({{done}}/{{total}})…": "در حال جستجوی مدخل‌های فرهنگ لغت ({{done}}/{{total}})…",
"The AI provider stopped responding.": "ارائه‌دهندهٔ هوش مصنوعی دیگر پاسخ نمی‌دهد.",
"characters/min": "نویسه در دقیقه",
"words/min": "واژه در دقیقه",
"Average Speed": "سرعت میانگین",

View file

@ -2944,7 +2944,6 @@
"Oldest Added": "Ajouts les plus anciens",
"Alphabetical A-Z": "Alphabétique A-Z",
"Alphabetical Z-A": "Alphabétique Z-A",
"All Languages": "Toutes les langues",
"Pin to Notebook": "Épingler dans le carnet de notes",
"Look up a word to see its definitions here.": "Recherchez un mot pour voir ses définitions ici.",
"Add Audio to Anki Cards": "Ajouter l'audio aux cartes Anki",
@ -3155,6 +3154,7 @@
"Highlight Button": "Bouton Surligner",
"Export to Anki puts this dictionary's entry on the back of each card": "L'exportation vers Anki place l'entrée de ce dictionnaire au verso de chaque carte",
"Looking up dictionary entries ({{done}}/{{total}})…": "Recherche des entrées du dictionnaire ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Le fournisseur d'IA ne répond plus.",
"characters/min": "caractères/min",
"words/min": "mots/min",
"Average Speed": "Vitesse moyenne",

View file

@ -2944,7 +2944,6 @@
"Oldest Added": "נוספו ראשונים",
"Alphabetical A-Z": "אלפביתי A-Z",
"Alphabetical Z-A": "אלפביתי Z-A",
"All Languages": "כל השפות",
"Pin to Notebook": "הצמדה למחברת",
"Look up a word to see its definitions here.": "חפשו מילה כדי לראות כאן את ההגדרות שלה.",
"Add Audio to Anki Cards": "הוספת שמע לכרטיסי Anki",
@ -3155,6 +3154,7 @@
"Highlight Button": "כפתור הדגשה",
"Export to Anki puts this dictionary's entry on the back of each card": "הייצוא ל-Anki מוסיף את הערך של המילון הזה לגב כל כרטיס",
"Looking up dictionary entries ({{done}}/{{total}})…": "מחפש ערכים במילון ({{done}}/{{total}})…",
"The AI provider stopped responding.": "ספק ה-AI הפסיק להגיב.",
"characters/min": "תווים לדקה",
"words/min": "מילים לדקה",
"Average Speed": "מהירות ממוצעת",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "सबसे पुराने जोड़े गए",
"Alphabetical A-Z": "वर्णानुक्रम A-Z",
"Alphabetical Z-A": "वर्णानुक्रम Z-A",
"All Languages": "सभी भाषाएँ",
"Pin to Notebook": "नोटबुक में पिन करें",
"Look up a word to see its definitions here.": "किसी शब्द को खोजें, उसकी परिभाषाएँ यहाँ दिखेंगी।",
"Add Audio to Anki Cards": "Anki कार्ड में ऑडियो जोड़ें",
@ -3076,6 +3075,7 @@
"Highlight Button": "हाइलाइट बटन",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki में निर्यात हर कार्ड के पीछे इस शब्दकोश की प्रविष्टि जोड़ता है",
"Looking up dictionary entries ({{done}}/{{total}})…": "शब्दकोश की प्रविष्टियाँ खोजी जा रही हैं ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI प्रदाता ने जवाब देना बंद कर दिया।",
"characters/min": "अक्षर/मिनट",
"words/min": "शब्द/मिनट",
"Average Speed": "औसत गति",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "Legrégebben hozzáadott",
"Alphabetical A-Z": "Betűrendben A–Z",
"Alphabetical Z-A": "Betűrendben Z–A",
"All Languages": "Minden nyelv",
"Pin to Notebook": "Rögzítés a jegyzetfüzetben",
"Look up a word to see its definitions here.": "Keress rá egy szóra, hogy itt lásd a jelentéseit.",
"Add Audio to Anki Cards": "Hang hozzáadása az Anki-kártyákhoz",
@ -3076,6 +3075,7 @@
"Highlight Button": "Kiemelés gomb",
"Export to Anki puts this dictionary's entry on the back of each card": "Az Ankiba exportálás ennek a szótárnak a szócikkét teszi minden kártya hátoldalára",
"Looking up dictionary entries ({{done}}/{{total}})…": "Szótári szócikkek keresése ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Az MI-szolgáltató nem válaszol többé.",
"characters/min": "karakter/perc",
"words/min": "szó/perc",
"Average Speed": "Átlagos sebesség",

View file

@ -2798,7 +2798,6 @@
"Oldest Added": "Terlama ditambahkan",
"Alphabetical A-Z": "Abjad A-Z",
"Alphabetical Z-A": "Abjad Z-A",
"All Languages": "Semua bahasa",
"Pin to Notebook": "Sematkan ke buku catatan",
"Look up a word to see its definitions here.": "Cari sebuah kata untuk melihat definisinya di sini.",
"Add Audio to Anki Cards": "Tambahkan Audio ke Kartu Anki",
@ -2997,6 +2996,7 @@
"Highlight Button": "Tombol sorot",
"Export to Anki puts this dictionary's entry on the back of each card": "Ekspor ke Anki menaruh entri kamus ini di balik setiap kartu",
"Looking up dictionary entries ({{done}}/{{total}})…": "Mencari entri kamus ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Penyedia AI berhenti merespons.",
"characters/min": "karakter/menit",
"words/min": "kata/menit",
"Average Speed": "Kecepatan Rata-rata",

View file

@ -2944,7 +2944,6 @@
"Oldest Added": "Aggiunte meno recenti",
"Alphabetical A-Z": "Alfabetico A-Z",
"Alphabetical Z-A": "Alfabetico Z-A",
"All Languages": "Tutte le lingue",
"Pin to Notebook": "Fissa nel quaderno",
"Look up a word to see its definitions here.": "Cerca una parola per vederne qui le definizioni.",
"Add Audio to Anki Cards": "Aggiungi audio alle schede Anki",
@ -3155,6 +3154,7 @@
"Highlight Button": "Pulsante Evidenzia",
"Export to Anki puts this dictionary's entry on the back of each card": "L'esportazione in Anki mette la voce di questo dizionario sul retro di ogni scheda",
"Looking up dictionary entries ({{done}}/{{total}})…": "Ricerca delle voci del dizionario ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Il fornitore di IA ha smesso di rispondere.",
"characters/min": "caratteri/min",
"words/min": "parole/min",
"Average Speed": "Velocità media",

View file

@ -2798,7 +2798,6 @@
"Oldest Added": "追加日が古い順",
"Alphabetical A-Z": "アルファベット順 A-Z",
"Alphabetical Z-A": "アルファベット順 Z-A",
"All Languages": "すべての言語",
"Pin to Notebook": "ノートにピン留め",
"Look up a word to see its definitions here.": "単語を調べると、ここに定義が表示されます。",
"Add Audio to Anki Cards": "Anki カードに音声を追加",
@ -2997,6 +2996,7 @@
"Highlight Button": "ハイライトボタン",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki へのエクスポートで、この辞書の項目を各カードの裏面に追加します",
"Looking up dictionary entries ({{done}}/{{total}})…": "辞書の項目を検索中 ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AIプロバイダーからの応答が途絶えました。",
"characters/min": "文字/分",
"words/min": "語/分",
"Average Speed": "平均速度",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "პირველად დამატებული",
"Alphabetical A-Z": "ანბანით A-Z",
"Alphabetical Z-A": "ანბანით Z-A",
"All Languages": "ყველა ენა",
"Pin to Notebook": "რვეულში ჩამაგრება",
"Look up a word to see its definitions here.": "მოძებნეთ სიტყვა, რომ აქ ნახოთ მისი განმარტებები.",
"Add Audio to Anki Cards": "აუდიოს დამატება Anki-ის ბარათებზე",
@ -3076,6 +3075,7 @@
"Highlight Button": "მარკირების ღილაკი",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki-ში ექსპორტი ამ ლექსიკონის სტატიას თითოეული ბარათის უკანა მხარეს ათავსებს",
"Looking up dictionary entries ({{done}}/{{total}})…": "ლექსიკონის სტატიების ძიება ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI პროვაიდერმა პასუხის გაცემა შეწყვიტა.",
"characters/min": "სიმბოლო/წთ",
"words/min": "სიტყვა/წთ",
"Average Speed": "საშუალო სიჩქარე",

View file

@ -2798,7 +2798,6 @@
"Oldest Added": "오래된 추가순",
"Alphabetical A-Z": "알파벳순 A-Z",
"Alphabetical Z-A": "알파벳순 Z-A",
"All Languages": "모든 언어",
"Pin to Notebook": "노트북에 고정",
"Look up a word to see its definitions here.": "단어를 찾아보면 여기에 뜻이 표시됩니다.",
"Add Audio to Anki Cards": "Anki 카드에 오디오 추가",
@ -2997,6 +2996,7 @@
"Highlight Button": "하이라이트 버튼",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki로 내보내면 이 사전의 항목을 각 카드 뒷면에 넣습니다",
"Looking up dictionary entries ({{done}}/{{total}})…": "사전 항목 찾는 중 ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI 제공처가 응답을 멈췄습니다.",
"characters/min": "자/분",
"words/min": "단어/분",
"Average Speed": "평균 속도",

View file

@ -2798,7 +2798,6 @@
"Oldest Added": "Terlama ditambah",
"Alphabetical A-Z": "Abjad A-Z",
"Alphabetical Z-A": "Abjad Z-A",
"All Languages": "Semua bahasa",
"Pin to Notebook": "Pin ke buku nota",
"Look up a word to see its definitions here.": "Cari sesuatu perkataan untuk melihat definisinya di sini.",
"Add Audio to Anki Cards": "Tambah Audio pada Kad Anki",
@ -2997,6 +2996,7 @@
"Highlight Button": "Butang tonjolkan",
"Export to Anki puts this dictionary's entry on the back of each card": "Eksport ke Anki meletakkan entri kamus ini di belakang setiap kad",
"Looking up dictionary entries ({{done}}/{{total}})…": "Mencari entri kamus ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Penyedia AI berhenti memberi respons.",
"characters/min": "aksara/min",
"words/min": "perkataan/min",
"Average Speed": "Kelajuan Purata",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "Oudst toegevoegd",
"Alphabetical A-Z": "Alfabetisch A-Z",
"Alphabetical Z-A": "Alfabetisch Z-A",
"All Languages": "Alle talen",
"Pin to Notebook": "Vastmaken aan notitieblok",
"Look up a word to see its definitions here.": "Zoek een woord op om hier de definities te zien.",
"Add Audio to Anki Cards": "Audio toevoegen aan Anki-kaarten",
@ -3076,6 +3075,7 @@
"Highlight Button": "Markeerknop",
"Export to Anki puts this dictionary's entry on the back of each card": "Exporteren naar Anki zet het lemma uit dit woordenboek op de achterkant van elke kaart",
"Looking up dictionary entries ({{done}}/{{total}})…": "Woordenboeklemma's opzoeken ({{done}}/{{total}})…",
"The AI provider stopped responding.": "De AI-provider reageert niet meer.",
"characters/min": "tekens/min",
"words/min": "woorden/min",
"Average Speed": "Gemiddelde snelheid",

View file

@ -3017,7 +3017,6 @@
"Oldest Added": "Najstarsze",
"Alphabetical A-Z": "Alfabetycznie A-Z",
"Alphabetical Z-A": "Alfabetycznie Z-A",
"All Languages": "Wszystkie języki",
"Pin to Notebook": "Przypnij do notatnika",
"Look up a word to see its definitions here.": "Wyszukaj słowo, aby zobaczyć tutaj jego definicje.",
"Add Audio to Anki Cards": "Dodaj dźwięk do kart Anki",
@ -3234,6 +3233,7 @@
"Highlight Button": "Przycisk zaznaczania",
"Export to Anki puts this dictionary's entry on the back of each card": "Eksport do Anki umieszcza hasło z tego słownika na odwrocie każdej karty",
"Looking up dictionary entries ({{done}}/{{total}})…": "Wyszukiwanie haseł w słowniku ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Dostawca AI przestał odpowiadać.",
"characters/min": "znaków/min",
"words/min": "słów/min",
"Average Speed": "Średnia szybkość",

View file

@ -2944,7 +2944,6 @@
"Oldest Added": "Adicionadas há mais tempo",
"Alphabetical A-Z": "Alfabética A-Z",
"Alphabetical Z-A": "Alfabética Z-A",
"All Languages": "Todos os idiomas",
"Pin to Notebook": "Fixar no caderno",
"Look up a word to see its definitions here.": "Pesquise uma palavra para ver as definições dela aqui.",
"Add Audio to Anki Cards": "Adicionar áudio aos cartões do Anki",
@ -3155,6 +3154,7 @@
"Highlight Button": "Botão de destaque",
"Export to Anki puts this dictionary's entry on the back of each card": "A exportação para o Anki coloca o verbete deste dicionário no verso de cada cartão",
"Looking up dictionary entries ({{done}}/{{total}})…": "Buscando verbetes do dicionário ({{done}}/{{total}})…",
"The AI provider stopped responding.": "O provedor de IA parou de responder.",
"characters/min": "caracteres/min",
"words/min": "palavras/min",
"Average Speed": "Velocidade média",

View file

@ -2944,7 +2944,6 @@
"Oldest Added": "Adicionadas há mais tempo",
"Alphabetical A-Z": "Alfabética A-Z",
"Alphabetical Z-A": "Alfabética Z-A",
"All Languages": "Todos os idiomas",
"Pin to Notebook": "Fixar no caderno",
"Look up a word to see its definitions here.": "Procure uma palavra para ver aqui as suas definições.",
"Add Audio to Anki Cards": "Adicionar áudio aos cartões do Anki",
@ -3155,6 +3154,7 @@
"Highlight Button": "Botão de destaque",
"Export to Anki puts this dictionary's entry on the back of each card": "A exportação para o Anki coloca a entrada deste dicionário no verso de cada cartão",
"Looking up dictionary entries ({{done}}/{{total}})…": "A procurar entradas do dicionário ({{done}}/{{total}})…",
"The AI provider stopped responding.": "O fornecedor de IA deixou de responder.",
"characters/min": "caracteres/min",
"words/min": "palavras/min",
"Average Speed": "Velocidade média",

View file

@ -2944,7 +2944,6 @@
"Oldest Added": "Cele mai vechi adăugate",
"Alphabetical A-Z": "Alfabetic A-Z",
"Alphabetical Z-A": "Alfabetic Z-A",
"All Languages": "Toate limbile",
"Pin to Notebook": "Fixează în carnețel",
"Look up a word to see its definitions here.": "Caută un cuvânt pentru a-i vedea aici definițiile.",
"Add Audio to Anki Cards": "Adaugă audio la cardurile Anki",
@ -3155,6 +3154,7 @@
"Highlight Button": "Butonul de evidențiere",
"Export to Anki puts this dictionary's entry on the back of each card": "Exportul în Anki pune intrarea din acest dicționar pe spatele fiecărui card",
"Looking up dictionary entries ({{done}}/{{total}})…": "Se caută intrările din dicționar ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Furnizorul de IA nu mai răspunde.",
"characters/min": "caractere/min",
"words/min": "cuvinte/min",
"Average Speed": "Viteză medie",

View file

@ -3017,7 +3017,6 @@
"Oldest Added": "Давно добавленные",
"Alphabetical A-Z": "По алфавиту А-Я",
"Alphabetical Z-A": "По алфавиту Я-А",
"All Languages": "Все языки",
"Pin to Notebook": "Закрепить в блокноте",
"Look up a word to see its definitions here.": "Найдите слово, чтобы увидеть здесь его определения.",
"Add Audio to Anki Cards": "Добавить аудио в карточки Anki",
@ -3234,6 +3233,7 @@
"Highlight Button": "Кнопка выделения",
"Export to Anki puts this dictionary's entry on the back of each card": "Экспорт в Anki добавляет статью из этого словаря на обратную сторону каждой карточки",
"Looking up dictionary entries ({{done}}/{{total}})…": "Поиск словарных статей ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Провайдер ИИ перестал отвечать.",
"characters/min": "знаков/мин",
"words/min": "слов/мин",
"Average Speed": "Средняя скорость",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "පැරණිම එක් කළ",
"Alphabetical A-Z": "අකාරාදී A-Z",
"Alphabetical Z-A": "අකාරාදී Z-A",
"All Languages": "සියලු භාෂා",
"Pin to Notebook": "සටහන් පොතට අමුණන්න",
"Look up a word to see its definitions here.": "මෙහි අර්ථ දැක්වීම් බැලීමට වචනයක් සොයන්න.",
"Add Audio to Anki Cards": "Anki කාඩ්පත්වලට ශ්‍රව්‍ය එක් කරන්න",
@ -3076,6 +3075,7 @@
"Highlight Button": "ඉස්මතු කිරීමේ බොත්තම",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki වෙත නිර්යාතය එක් එක් කාඩ්පතේ පිටුපසට මෙම ශබ්දකෝෂයේ ඇතුළත් කිරීම එක් කරයි",
"Looking up dictionary entries ({{done}}/{{total}})…": "ශබ්දකෝෂ ඇතුළත් කිරීම් සොයමින් ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI සපයන්නා ප්‍රතිචාර දැක්වීම නැවැත්වීය.",
"characters/min": "අකුරු/විනාඩිය",
"words/min": "වචන/විනාඩිය",
"Average Speed": "සාමාන්‍ය වේගය",

View file

@ -3017,7 +3017,6 @@
"Oldest Added": "Najstarejše dodane",
"Alphabetical A-Z": "Abecedno A–Ž",
"Alphabetical Z-A": "Abecedno Ž–A",
"All Languages": "Vsi jeziki",
"Pin to Notebook": "Pripni v beležnico",
"Look up a word to see its definitions here.": "Poiščite besedo, da tukaj vidite njene definicije.",
"Add Audio to Anki Cards": "Dodaj zvok karticam Anki",
@ -3234,6 +3233,7 @@
"Highlight Button": "Gumb za označevanje",
"Export to Anki puts this dictionary's entry on the back of each card": "Izvoz v Anki doda geslo iz tega slovarja na hrbtno stran vsake kartice",
"Looking up dictionary entries ({{done}}/{{total}})…": "Iskanje slovarskih gesel ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Ponudnik UI se je nehal odzivati.",
"characters/min": "znakov/min",
"words/min": "besed/min",
"Average Speed": "Povprečna hitrost",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "Först tillagda",
"Alphabetical A-Z": "Alfabetisk A–Ö",
"Alphabetical Z-A": "Alfabetisk Ö–A",
"All Languages": "Alla språk",
"Pin to Notebook": "Fäst i anteckningsboken",
"Look up a word to see its definitions here.": "Slå upp ett ord för att se dess definitioner här.",
"Add Audio to Anki Cards": "Lägg till ljud på Anki-kort",
@ -3076,6 +3075,7 @@
"Highlight Button": "Markeringsknapp",
"Export to Anki puts this dictionary's entry on the back of each card": "Export till Anki lägger den här ordbokens uppslag på baksidan av varje kort",
"Looking up dictionary entries ({{done}}/{{total}})…": "Slår upp ordboksuppslag ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI-leverantören slutade svara.",
"characters/min": "tecken/min",
"words/min": "ord/min",
"Average Speed": "Genomsnittlig hastighet",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "முதலில் சேர்த்தவை",
"Alphabetical A-Z": "அகர வரிசை A-Z",
"Alphabetical Z-A": "அகர வரிசை Z-A",
"All Languages": "அனைத்து மொழிகள்",
"Pin to Notebook": "குறிப்பேட்டில் பொருத்து",
"Look up a word to see its definitions here.": "ஒரு சொல்லின் வரையறைகளை இங்கே காண அதைத் தேடுங்கள்.",
"Add Audio to Anki Cards": "Anki அட்டைகளில் ஒலியைச் சேர்",
@ -3076,6 +3075,7 @@
"Highlight Button": "முத்திரை பொத்தான்",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki-க்கு ஏற்றுமதி ஒவ்வொரு அட்டையின் பின்புறத்திலும் இந்த அகராதியின் பதிவைச் சேர்க்கிறது",
"Looking up dictionary entries ({{done}}/{{total}})…": "அகராதிப் பதிவுகளைத் தேடுகிறது ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI வழங்குநர் பதிலளிப்பதை நிறுத்திவிட்டது.",
"characters/min": "எழுத்துகள்/நிமிடம்",
"words/min": "சொற்கள்/நிமிடம்",
"Average Speed": "சராசரி வேகம்",

View file

@ -2798,7 +2798,6 @@
"Oldest Added": "เพิ่มเก่าสุด",
"Alphabetical A-Z": "ตามตัวอักษร A-Z",
"Alphabetical Z-A": "ตามตัวอักษร Z-A",
"All Languages": "ทุกภาษา",
"Pin to Notebook": "ตรึงไว้ที่สมุดบันทึก",
"Look up a word to see its definitions here.": "ค้นหาคำเพื่อดูความหมายของคำนั้นที่นี่",
"Add Audio to Anki Cards": "เพิ่มเสียงในการ์ด Anki",
@ -2997,6 +2996,7 @@
"Highlight Button": "ปุ่มไฮไลต์",
"Export to Anki puts this dictionary's entry on the back of each card": "การส่งออกไปยัง Anki จะใส่คำอธิบายจากพจนานุกรมนี้ไว้ด้านหลังการ์ดแต่ละใบ",
"Looking up dictionary entries ({{done}}/{{total}})…": "กำลังค้นหาคำอธิบายในพจนานุกรม ({{done}}/{{total}})…",
"The AI provider stopped responding.": "ผู้ให้บริการ AI หยุดตอบสนอง",
"characters/min": "ตัวอักษร/นาที",
"words/min": "คำ/นาที",
"Average Speed": "ความเร็วเฉลี่ย",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "En eski eklenen",
"Alphabetical A-Z": "Alfabetik A-Z",
"Alphabetical Z-A": "Alfabetik Z-A",
"All Languages": "Tüm diller",
"Pin to Notebook": "Not defterine sabitle",
"Look up a word to see its definitions here.": "Tanımlarını burada görmek için bir kelime arayın.",
"Add Audio to Anki Cards": "Anki kartlarına ses ekle",
@ -3076,6 +3075,7 @@
"Highlight Button": "Vurgulama düğmesi",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki’ye aktarma, bu sözlüğün maddesini her kartın arka yüzüne koyar",
"Looking up dictionary entries ({{done}}/{{total}})…": "Sözlük maddeleri aranıyor ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Yapay zekâ sağlayıcısı yanıt vermeyi bıraktı.",
"characters/min": "karakter/dk",
"words/min": "kelime/dk",
"Average Speed": "Ortalama Hız",

View file

@ -3017,7 +3017,6 @@
"Oldest Added": "Найдавніше додані",
"Alphabetical A-Z": "За алфавітом А-Я",
"Alphabetical Z-A": "За алфавітом Я-А",
"All Languages": "Усі мови",
"Pin to Notebook": "Закріпити в нотатнику",
"Look up a word to see its definitions here.": "Знайдіть слово, щоб побачити тут його визначення.",
"Add Audio to Anki Cards": "Додати аудіо до карток Anki",
@ -3234,6 +3233,7 @@
"Highlight Button": "Кнопка виділення",
"Export to Anki puts this dictionary's entry on the back of each card": "Експорт в Anki додає статтю з цього словника на зворот кожної картки",
"Looking up dictionary entries ({{done}}/{{total}})…": "Пошук словникових статей ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Постачальник ШІ перестав відповідати.",
"characters/min": "символів/хв",
"words/min": "слів/хв",
"Average Speed": "Середня швидкість",

View file

@ -2871,7 +2871,6 @@
"Oldest Added": "Eng eski qo‘shilgan",
"Alphabetical A-Z": "Alifbo bo‘yicha A-Z",
"Alphabetical Z-A": "Alifbo bo‘yicha Z-A",
"All Languages": "Barcha tillar",
"Pin to Notebook": "Daftarga mahkamlash",
"Look up a word to see its definitions here.": "Taʼriflarini shu yerda koʻrish uchun soʻzni qidiring.",
"Add Audio to Anki Cards": "Anki kartalariga audio qo'shish",
@ -3076,6 +3075,7 @@
"Highlight Button": "Belgilash tugmasi",
"Export to Anki puts this dictionary's entry on the back of each card": "Anki’ga eksport har bir kartaning orqa tomoniga ushbu lug'at maqolasini qo'yadi",
"Looking up dictionary entries ({{done}}/{{total}})…": "Lug'at maqolalari qidirilmoqda ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI provayderi javob berishni toʻxtatdi.",
"characters/min": "belgi/daqiqa",
"words/min": "soʻz/daqiqa",
"Average Speed": "Oʻrtacha tezlik",

View file

@ -2798,7 +2798,6 @@
"Oldest Added": "Thêm cũ nhất",
"Alphabetical A-Z": "Theo bảng chữ cái A-Z",
"Alphabetical Z-A": "Theo bảng chữ cái Z-A",
"All Languages": "Tất cả ngôn ngữ",
"Pin to Notebook": "Ghim vào sổ ghi chép",
"Look up a word to see its definitions here.": "Tra một từ để xem định nghĩa của nó tại đây.",
"Add Audio to Anki Cards": "Thêm âm thanh vào thẻ Anki",
@ -2997,6 +2996,7 @@
"Highlight Button": "Nút đánh dấu",
"Export to Anki puts this dictionary's entry on the back of each card": "Xuất sang Anki sẽ đặt mục từ của từ điển này ở mặt sau mỗi thẻ",
"Looking up dictionary entries ({{done}}/{{total}})…": "Đang tra mục từ trong từ điển ({{done}}/{{total}})…",
"The AI provider stopped responding.": "Nhà cung cấp AI đã ngừng phản hồi.",
"characters/min": "ký tự/phút",
"words/min": "từ/phút",
"Average Speed": "Tốc độ trung bình",

View file

@ -2802,7 +2802,6 @@
"Oldest Added": "最早添加",
"Alphabetical A-Z": "字母顺序 A-Z",
"Alphabetical Z-A": "字母顺序 Z-A",
"All Languages": "所有语言",
"Pin to Notebook": "固定到笔记本",
"Look up a word to see its definitions here.": "查询单词后,释义会显示在这里。",
"Add Audio to Anki Cards": "为 Anki 卡片添加音频",
@ -2997,6 +2996,7 @@
"Highlight Button": "划线按钮",
"Export to Anki puts this dictionary's entry on the back of each card": "导出到 Anki 时,会把此词典的词条放到每张卡片的背面",
"Looking up dictionary entries ({{done}}/{{total}})…": "正在查询词典词条 ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI 服务商已停止响应。",
"characters/min": "字/分钟",
"words/min": "词/分钟",
"Average Speed": "平均速度",

View file

@ -2802,7 +2802,6 @@
"Oldest Added": "最早加入",
"Alphabetical A-Z": "字母順序 A-Z",
"Alphabetical Z-A": "字母順序 Z-A",
"All Languages": "所有語言",
"Pin to Notebook": "固定到筆記本",
"Look up a word to see its definitions here.": "查詢單字後,釋義會顯示在這裡。",
"Add Audio to Anki Cards": "為 Anki 卡片加入音訊",
@ -2997,6 +2996,7 @@
"Highlight Button": "劃線按鈕",
"Export to Anki puts this dictionary's entry on the back of each card": "匯出到 Anki 時,會把此辭典的詞條放到每張卡片的背面",
"Looking up dictionary entries ({{done}}/{{total}})…": "正在查詢辭典詞條 ({{done}}/{{total}})…",
"The AI provider stopped responding.": "AI 服務商已停止回應。",
"characters/min": "字/分鐘",
"words/min": "詞/分鐘",
"Average Speed": "平均速度",

View file

@ -2,7 +2,7 @@
import { afterEach, describe, it, expect, vi } from 'vitest';
import { act, render } from '@testing-library/react';
import SectionInfo from '@/app/reader/components/SectionInfo';
import { clearBookProgress, setBookProgress } from '@/store/readerProgressStore';
import { clearBookProgress, setBookProgress, setPagePreview } from '@/store/readerProgressStore';
import type { BookProgress } from '@/types/book';
let currentBookData:
@ -77,6 +77,20 @@ describe('SectionInfo title', () => {
expect(title()).toBe('Chapter 2');
});
// A native page turn captures the next page with the header over it (#8068).
it('shows the section of a page a native turn previews, then the reading position again', () => {
turnInto('Chapter 1');
const { container } = render(<SectionInfo {...baseProps} />);
const title = () => container.querySelector('[aria-label^="Section Title"]')?.textContent;
const progress = { location: 'cfi', sectionLabel: 'Chapter 2' } as BookProgress;
act(() => setPagePreview('book-1', { progress, page: 0, pages: 5, atEnd: false }));
expect(title()).toBe('Chapter 2');
act(() => setPagePreview('book-1', null));
expect(title()).toBe('Chapter 1');
});
});
describe('SectionInfo notch mask', () => {

View file

@ -3,6 +3,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import type { ComponentProps } from 'react';
import FoliateViewer from '@/app/reader/components/FoliateViewer';
import { useFoliateEvents } from '@/app/reader/hooks/useFoliateEvents';
import { setBookProgress, useReaderProgressStore } from '@/store/readerProgressStore';
import type { BookProgress } from '@/types/book';
const { setProgress, readerState, wipe, linked } = vi.hoisted(() => {
const setProgress = vi.fn();
@ -126,6 +128,11 @@ const relocate = (detail: object) => {
act(() => handlers?.onRelocate?.(new CustomEvent('relocate', { detail })));
};
const preview = (detail: object | null) => {
const handlers = vi.mocked(useFoliateEvents).mock.lastCall?.[1];
act(() => handlers?.onPreview?.(new CustomEvent('preview', { detail })));
};
const rendererRelocate = (detail: object) => {
const handlers = vi.mocked(useFoliateEvents).mock.lastCall?.[1];
act(() => handlers?.onRendererRelocate?.(new CustomEvent('relocate', { detail })));
@ -270,6 +277,65 @@ describe('reader relocation during an Auto Scroll wipe', () => {
});
});
// A native page turn paints the next page under its cover to capture it, with
// the header and footer over it (#8068).
describe('page preview under a native page turn', () => {
const tocItem = { label: 'Chapter 2', href: 'ch2.xhtml' };
const next = {
location: { current: 8, next: 10, total: 10 },
section: { current: 3, total: 4 },
time: { section: 0.5, total: 0.5 },
fraction: 1,
tocItem,
pageItem: null,
page: 4,
pages: 5,
atEnd: true,
};
const previewed = () => useReaderProgressStore.getState().previews['test-book'];
beforeEach(() => {
vi.clearAllMocks();
setBookProgress('test-book', {
location: 'epubcfi(/6/6)',
sectionLabel: 'Chapter 1',
sectionHref: 'ch1.xhtml',
pageinfo: { current: 7, next: 8, total: 10 },
} as BookProgress);
});
afterEach(() => {
cleanup();
setBookProgress('test-book', null);
});
it('shows the previewed page in the chrome until the reading position is back', () => {
render(<FoliateViewer {...props} />);
preview(next);
expect(previewed()).toMatchObject({
progress: {
location: 'epubcfi(/6/6)',
sectionLabel: 'Chapter 2',
sectionHref: 'ch2.xhtml',
section: next.section,
// The book's last page reads total / total, as a relocation there does.
pageinfo: { current: 9, next: 10, total: 10 },
timeinfo: next.time,
fraction: 1,
page: 10,
},
page: 4,
pages: 5,
atEnd: true,
});
preview(null);
expect(previewed()).toBeNull();
// Display only: the reading position never moved.
expect(setProgress).not.toHaveBeenCalled();
});
});
describe('parallel reading', () => {
beforeEach(() => {
vi.clearAllMocks();

View file

@ -31,12 +31,16 @@ const stores = vi.hoisted(() => ({
updateBooknotes: vi.fn(() => ({})),
booknotes: [] as BookNote[],
isFixedLayout: true,
lang: undefined as string | undefined,
}));
vi.mock('@/store/bookDataStore', () => ({
...bookDataStoreHooks(() => ({
getConfig: () => ({ booknotes: stores.booknotes }),
getBookData: () => ({ isFixedLayout: stores.isFixedLayout }),
getBookData: () => ({
isFixedLayout: stores.isFixedLayout,
book: { primaryLanguage: stores.lang },
}),
saveConfig: stores.saveConfig,
updateBooknotes: stores.updateBooknotes,
})),
@ -52,6 +56,10 @@ vi.mock('@/store/readerStore', () => ({
getProgress: () => ({ page: 1 }),
}),
}));
vi.mock('@/utils/jieba', async (importOriginal) => ({
...(await importOriginal<typeof import('@/utils/jieba')>()),
isJiebaReady: () => true,
}));
vi.mock('@/app/reader/utils/annotatorUtil', async (importOriginal) => ({
...(await importOriginal<typeof import('@/app/reader/utils/annotatorUtil')>()),
toParentViewportPoint: (_doc: Document, x: number, y: number) => ({ x, y }),
@ -96,6 +104,7 @@ beforeEach(() => {
settingsStore.state.settings = settingsStore.initial();
stores.booknotes = [];
stores.isFixedLayout = true;
stores.lang = undefined;
scrolled = false;
p1 = document.createElement('p');
p1.textContent = 'first page text here';
@ -120,6 +129,7 @@ beforeEach(() => {
});
afterEach(() => {
vi.unstubAllGlobals();
document.body.replaceChildren();
cleanup();
});
@ -226,6 +236,33 @@ describe('useInstantAnnotation hold-a-word engage and commit', () => {
expect(setSelection).toHaveBeenLastCalledWith(null);
});
// #8018: Android's Intl.Segmenter has no Chinese dictionary and splits
// Chinese into characters; in a Chinese book the held word is the jieba word.
test('a hold on Chinese in a Chinese book on Android commits the word', async () => {
stores.lang = 'zh';
vi.stubGlobal('Intl', {
...Intl,
Segmenter: class {
segment(text: string) {
return [...text].map((segment, index) => ({ segment, index, isWordLike: true }));
}
},
});
p1.textContent = '独立思考是一种重要的能力。';
const zh = p1.firstChild as Text;
(document as unknown as { caretPositionFromPoint: unknown }).caretPositionFromPoint = () => ({
offsetNode: zh,
offset: 3, // after 思
});
const { result, captured } = setup();
result.current.handleInstantAnnotationPointerDown(document, 0, pointer(10, 10));
result.current.handleInstantAnnotationEngage(document, 0);
await result.current.handleInstantAnnotationPointerUp(document, 0, pointer(12, 11));
expect(captured.selection?.text).toBe('思考');
});
test('engage without a resolvable word leaves the release a tap', async () => {
const { result } = setup();

View file

@ -0,0 +1,240 @@
import { bookDataStoreHooks } from '@/__tests__/helpers/book-data-store-mock';
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import { cleanup, renderHook } from '@testing-library/react';
// #8018: Android's WebView has no Chinese word dictionary, so a long-press on
// 思 in 独立思考 selects 思 alone, where iOS selects 思考. The selector widens
// the long-press (and a double-tap) to the word. The press's own selection
// takes the word at the release, and since the WebView drops its handles for a
// selection set from script, the app's own handles take over.
const h = vi.hoisted(() => ({
view: {
next: vi.fn(),
prev: vi.fn(),
deselect: vi.fn(),
getCFI: vi.fn(() => 'cfi'),
renderer: { containerPosition: 0, scrollLocked: false, getContents: () => [] },
},
appService: { isAndroidApp: true, isMobile: true },
osPlatform: 'android',
lang: 'zh',
}));
vi.mock('@/context/EnvContext', () => ({
useEnv: () => ({ appService: h.appService }),
}));
vi.mock('@/store/readerStore', () => ({
useReaderStore: () => ({
getView: () => h.view,
getViewSettings: () => ({ scrolled: false }),
getProgress: () => null,
}),
}));
vi.mock('@/store/bookDataStore', () => ({
...bookDataStoreHooks(() => ({
getBookData: () => ({ book: { format: 'EPUB', primaryLanguage: h.lang } }),
})),
}));
vi.mock('@/utils/event', () => ({
eventDispatcher: { onSync: vi.fn(), offSync: vi.fn(), on: vi.fn(), off: vi.fn() },
}));
vi.mock('@/utils/bridge', () => ({
setSelectionSuppressed: vi.fn(async () => {}),
}));
vi.mock('@/utils/jieba', async (importActual) => ({
...(await importActual<typeof import('@/utils/jieba')>()),
initJieba: vi.fn(async () => {}),
isJiebaReady: () => true,
}));
vi.mock('@/app/reader/hooks/useInstantAnnotation', () => ({
useInstantAnnotation: () => ({
isInstantAnnotationEnabled: () => false,
handleInstantAnnotationPointerDown: vi.fn(),
handleInstantAnnotationPointerMove: vi.fn(),
handleInstantAnnotationPointerCancel: vi.fn(),
handleInstantAnnotationPointerUp: vi.fn(),
reapplyInstantAnnotation: vi.fn(),
cancelInstantAnnotation: vi.fn(),
}),
}));
vi.mock('@/utils/misc', async (importActual) => {
const actual = await importActual<typeof import('@/utils/misc')>();
return { ...actual, getOSPlatform: () => h.osPlatform };
});
import { useTextSelector } from '@/app/reader/hooks/useTextSelector';
import type { TextSelection } from '@/utils/sel';
// Intl.Segmenter as Android has it: one segment per Han character.
class AndroidSegmenter {
segment(text: string) {
return [...text].map((segment, index) => ({
segment,
index,
isWordLike: /\p{Script=Han}/u.test(segment),
}));
}
}
const TEXT = '独立思考是一种重要的能力。';
const ZERO_INSETS = { top: 0, right: 0, bottom: 0, left: 0 };
const setup = () => {
const setSelection = vi.fn();
const noop = vi.fn();
const hook = renderHook(() =>
useTextSelector(
'book-1',
ZERO_INSETS,
setSelection as never,
noop,
noop,
async (range: Range) => range.toString(),
noop,
),
);
return { ...hook, setSelection };
};
const makePage = () => {
const p = document.createElement('p');
p.textContent = TEXT;
document.body.appendChild(p);
return { doc: document, node: p.firstChild as Text };
};
// What the WebView's long-press leaves: the one character under the finger.
const selectChar = (node: Text, char: string) => {
const start = TEXT.indexOf(char);
document.getSelection()!.setBaseAndExtent(node, start, node, start + char.length);
};
const touchDown = (result: ReturnType<typeof setup>['result'], doc: Document) => {
result.current.handleTouchStart();
result.current.handlePointerDown(doc, 0, {
pointerType: 'touch',
button: 0,
clientX: 50,
clientY: 50,
target: doc.body,
preventDefault: vi.fn(),
} as unknown as PointerEvent);
};
// The WebView takes a long-press over once it selects: the page gets a
// pointercancel, and the release arrives only through the native-touch bridge
// (Annotator's handleNativeTouch).
const takeOver = (result: ReturnType<typeof setup>['result'], doc: Document) =>
result.current.handlePointerCancel(doc, 0, { pointerType: 'touch' } as PointerEvent);
const release = async (result: ReturnType<typeof setup>['result'], doc: Document) => {
result.current.handleTouchEnd();
await result.current.handlePointerUp(doc, 0);
};
const flush = () => new Promise((r) => setTimeout(r, 20));
const lastSelection = (setSelection: ReturnType<typeof vi.fn>) =>
setSelection.mock.calls.at(-1)?.[0] as TextSelection;
beforeEach(() => {
vi.clearAllMocks();
h.appService = { isAndroidApp: true, isMobile: true };
h.osPlatform = 'android';
h.lang = 'zh';
vi.stubGlobal('Intl', { ...Intl, Segmenter: AndroidSegmenter });
document.getSelection()?.removeAllRanges();
});
afterEach(() => {
cleanup();
vi.unstubAllGlobals();
delete (document as { caretRangeFromPoint?: unknown }).caretRangeFromPoint;
document.body.innerHTML = '';
});
describe('Chinese word selection on Android (#8018)', () => {
test('a long-press publishes the word and leaves the press its selection', async () => {
const { result, setSelection } = setup();
const { doc, node } = makePage();
touchDown(result, doc);
selectChar(node, '思');
result.current.handleSelectionchange(doc, 0);
takeOver(result, doc);
result.current.handleSelectionchange(doc, 0);
await flush();
expect(lastSelection(setSelection)).toMatchObject({ text: '思考', handlesSuppressed: false });
// Set from script while the finger is down, the selection would stop the
// press from dragging it on.
expect(document.getSelection()!.toString()).toBe('思');
});
test('the release selects the word, on the app handles', async () => {
const { result, setSelection } = setup();
const { doc, node } = makePage();
touchDown(result, doc);
selectChar(node, '思');
result.current.handleSelectionchange(doc, 0);
takeOver(result, doc);
await flush();
await release(result, doc);
await flush();
expect(document.getSelection()!.toString()).toBe('思考');
expect(lastSelection(setSelection)).toMatchObject({ text: '思考', handlesSuppressed: true });
});
test('a long-press in a book of another language keeps the character', async () => {
h.lang = 'en';
const { result, setSelection } = setup();
const { doc, node } = makePage();
touchDown(result, doc);
selectChar(node, '思');
result.current.handleSelectionchange(doc, 0);
await flush();
expect(document.getSelection()!.toString()).toBe('思');
expect(lastSelection(setSelection)).toMatchObject({ text: '思', handlesSuppressed: false });
});
test('a drag that changes the long-press selection is left as dragged', async () => {
const { result, setSelection } = setup();
const { doc, node } = makePage();
touchDown(result, doc);
selectChar(node, '思');
result.current.handleSelectionchange(doc, 0);
await flush();
// The finger drags on to 是: the selection now runs 思考是.
const start = TEXT.indexOf('思');
document.getSelection()!.setBaseAndExtent(node, start, node, start + 3);
result.current.handleSelectionchange(doc, 0);
await flush();
await release(result, doc);
await flush();
expect(document.getSelection()!.toString()).toBe('思考是');
expect(lastSelection(setSelection)).toMatchObject({ text: '思考是', handlesSuppressed: false });
});
test('a double-tap on one character selects its word', async () => {
const { result, setSelection } = setup();
const { doc, node } = makePage();
Object.assign(document, {
caretRangeFromPoint: () => {
const range = document.createRange();
range.setStart(node, TEXT.indexOf('思') + 1); // a caret after 思
return range;
},
});
await result.current.handleDoubleClick(doc, 0, 50, 50);
expect(document.getSelection()!.toString()).toBe('思考');
expect(lastSelection(setSelection)).toMatchObject({ text: '思考' });
});
});

View file

@ -35,6 +35,7 @@ vi.mock('@/store/readerStore', () => {
vi.mock('@/store/readerProgressStore', () => ({
useBookProgress: () => null,
getBookProgress: () => null,
usePagePreview: () => null,
}));
vi.mock('@/store/bookDataStore', () => {
const state = { getBookData: () => ({ isFixedLayout: false }) };

View file

@ -6,6 +6,7 @@ import ProgressBar from '@/app/reader/components/ProgressBar';
import { DEFAULT_VIEW_CONFIG } from '@/services/constants';
import { clearChapterScreens, recordChapterScreens } from '@/utils/chapterScreens';
import type { BookProgress, ViewSettings } from '@/types/book';
import type { PagePreview } from '@/store/readerProgressStore';
import type { TOCItem } from '@/libs/document';
const saveViewSettings = vi.fn();
@ -16,6 +17,7 @@ vi.mock('@/hooks/useMedianPageDurationSecs', () => ({
let currentViewSettings: ViewSettings;
let currentProgress: BookProgress | null;
let currentPreview: PagePreview | null = null;
let currentBookData: {
isFixedLayout: boolean;
bookDoc?: {
@ -74,6 +76,7 @@ vi.mock('@/store/readerStore', () => {
vi.mock('@/store/readerProgressStore', () => ({
useBookProgress: () => currentProgress,
getBookProgress: () => currentProgress,
usePagePreview: () => currentPreview,
}));
vi.mock('@/store/bookDataStore', () => {
@ -124,6 +127,7 @@ beforeEach(() => {
medianPageDurationSecs = null;
currentAppService = { isMobile: false, hasSafeAreaInset: false };
currentProgress = null;
currentPreview = null;
currentBookData = { isFixedLayout: false };
currentRenderer = { page: 0, pages: 0 };
currentSectionFractions = [];
@ -316,6 +320,41 @@ describe('ProgressBar — calibrated page pair', () => {
});
});
// A native page turn captures the next page with the footer over it (#8068).
describe('ProgressBar — a page a native turn previews', () => {
it('shows the previewed page, then the reading position again', () => {
currentViewSettings = {
...baseSettings,
progressStyle: 'fraction',
showProgressInfo: true,
showRemainingPages: true,
} as ViewSettings;
currentProgress = makeProgress(2, 10);
currentRenderer = { page: 1, pages: 4 };
currentPreview = { progress: makeProgress(3, 10), page: 2, pages: 4, atEnd: false };
const { container, rerender } = renderProgressBar();
const label = () => container.querySelector('.progress-info-label')?.textContent;
const info = () => container.querySelector('.progressinfo')?.getAttribute('aria-label');
expect(label()).toBe('4 / 10');
expect(info()).toContain('On 3 of 4 page');
expect(info()).toContain('2 pages left in chapter');
currentPreview = null;
rerender(
<ProgressBar
bookKey='book-1'
horizontalGap={0}
contentInsets={{ top: 0, right: 0, bottom: 0, left: 0 }}
gridInsets={{ top: 0, right: 0, bottom: 0, left: 0 }}
/>,
);
expect(label()).toBe('3 / 10');
expect(info()).toContain('On 2 of 4 page');
expect(info()).toContain('3 pages left in chapter');
});
});
describe('ProgressBar — remaining time and pages together', () => {
it.each([
['in book', true],

View file

@ -86,7 +86,7 @@ vi.mock('@/app/reader/utils/annotatorUtil', () => ({
import AnnotationPopup from '@/app/reader/components/annotator/AnnotationPopup';
import { annotationToolButtons } from '@/app/reader/components/annotator/AnnotationTools';
import { DEFAULT_ANNOTATION_TOOLBAR_ITEMS } from '@/utils/annotationToolbar';
import { DEFAULT_ANNOTATION_TOOLBAR_ITEMS, getToolbarGrid } from '@/utils/annotationToolbar';
// ── Constants ───────────────────────────────────────────────────────────
@ -564,3 +564,71 @@ describe('note card over the popup box', () => {
}
});
});
// #8013: past the tools that fit, the toolbar scrolled the rest out of sight
// with no scrollbar. They wrap onto a second row, with the style/color strip
// clear of both.
describe('a toolbar with more tools than fit', () => {
const allTools = annotationToolButtons.map(({ label, Icon }) => ({
tooltipText: label,
Icon,
onClick: vi.fn(),
}));
const { rows, columns } = getToolbarGrid(allTools.length, POPUP_W);
it.each([
'up',
'down',
'left',
'right',
] as const)('shows every tool, in rows, with the strip beside them (%s)', async (dir) => {
const vertical = dir === 'left' || dir === 'right';
const point = { x: 200, y: 200 };
const { container } = render(
<div style={{ position: 'fixed', left: 0, top: 0, width: 700, height: 600 }}>
<AnnotationPopup
bookKey='test'
dir='ltr'
isVertical={vertical}
buttons={allTools}
notes={[]}
position={{ dir, point }}
trianglePosition={{ dir, point: { x: point.x, y: point.y + 20 } }}
highlightOptionsVisible
selectedStyle='highlight'
selectedColor='yellow'
popupWidth={POPUP_W}
popupHeight={POPUP_H * rows}
toolbarColumns={columns}
onHighlight={vi.fn()}
onDismiss={vi.fn()}
/>
</div>,
);
const popup = container.querySelector<HTMLElement>('#popup-container')!.getBoundingClientRect();
const tools = [...container.querySelectorAll('.selection-buttons button')].map((button) =>
button.getBoundingClientRect(),
);
expect(rows).toBe(2);
expect(tools).toHaveLength(allTools.length);
for (const tool of tools) {
expect(tool.left).toBeGreaterThanOrEqual(popup.left);
expect(tool.right).toBeLessThanOrEqual(popup.right);
expect(tool.top).toBeGreaterThanOrEqual(popup.top);
expect(tool.bottom).toBeLessThanOrEqual(popup.bottom);
}
const lines = new Set(tools.map((tool) => Math.round(vertical ? tool.left : tool.top)));
expect(lines.size).toBe(rows);
const options = container.querySelector<HTMLElement>('.highlight-options')!;
await vi.waitFor(() => {
for (const button of options.querySelectorAll('button')) {
const rect = button.getBoundingClientRect();
const clear = vertical
? rect.right <= popup.left || rect.left >= popup.right
: rect.bottom <= popup.top || rect.top >= popup.bottom;
expect(clear).toBe(true);
}
});
});
});

View file

@ -28,6 +28,9 @@ const h = vi.hoisted(() => ({
// The rects the toolbar is positioned against, and where it renders.
rects: [] as Rect[],
toolbar: null as null | Position,
// The toolbar's size, as placed and as rendered.
placedSizes: [] as [number, number][],
rendered: null as null | { width: number; height: number; columns?: number },
}));
const settings = {
@ -165,7 +168,10 @@ vi.mock('@/utils/sel', async (importOriginal) => {
h.rects.push(rect);
return { point: { x: 120, y: 200 }, dir: 'up' as const };
},
getPopupPosition: () => ({ point: { x: 120, y: 140 }, dir: 'up' as const }),
getPopupPosition: (_target: unknown, _rect: Rect, width: number, height: number) => {
h.placedSizes.push([width, height]);
return { point: { x: 120, y: 140 }, dir: 'up' as const };
},
};
});
@ -175,8 +181,19 @@ vi.mock('@/services/transformService', () => ({
vi.mock('@/app/reader/components/annotator/AnnotationRangeEditor', () => ({ default: () => null }));
vi.mock('@/app/reader/components/annotator/SelectionRangeEditor', () => ({ default: () => null }));
vi.mock('@/app/reader/components/annotator/AnnotationPopup', () => ({
default: ({ position }: { position: Position }) => {
default: ({
position,
popupWidth,
popupHeight,
toolbarColumns,
}: {
position: Position;
popupWidth: number;
popupHeight: number;
toolbarColumns?: number;
}) => {
h.toolbar = position;
h.rendered = { width: popupWidth, height: popupHeight, columns: toolbarColumns };
return null;
},
}));
@ -196,6 +213,9 @@ afterEach(() => {
document.getElementById('gridcell-book-1')?.remove();
h.rects = [];
h.toolbar = null;
h.placedSizes = [];
h.rendered = null;
h.viewSettings.annotationToolbarItems = ['copy'];
});
test('places the selection toolbar inside the safe area off the Duo', () => {
@ -232,3 +252,46 @@ test('places the selection toolbar inside the safe area off the Duo', () => {
// Placed relative to the safe region, then shifted back to cell coordinates.
expect(h.toolbar?.point).toEqual({ x: 120, y: 140 + 59 });
});
// #8013: on a phone, the tools past the ninth scrolled out of sight with no
// scrollbar. They take a second row, and the toolbar is placed at that height.
test.each([
[8, { width: 300, height: 44, columns: undefined }],
[10, { width: 220, height: 88, columns: 5 }],
])('sizes a toolbar of %i tools to rows that fit', (count, size) => {
h.viewSettings.annotationToolbarItems = [
'copy',
'copylink',
'annotate',
'search',
'dictionary',
'vocabulary',
'translate',
'tts',
'proofread',
'quotecard',
].slice(0, count);
const gridCell = document.createElement('div');
gridCell.id = 'gridcell-book-1';
gridCell.getBoundingClientRect = () =>
({ left: 0, top: 0, right: 360, bottom: 780, width: 360, height: 780 }) as DOMRect;
document.body.appendChild(gridCell);
render(<Annotator bookKey='book-1' contentInsets={{ top: 0, right: 0, bottom: 0, left: 0 }} />);
const doc = document.implementation.createHTMLDocument('page');
doc.body.innerHTML = '<p>a passage</p>';
const range = doc.createRange();
range.selectNodeContents(doc.body.firstChild!);
act(() =>
h.setSelection!({
key: 'book-1',
text: 'a passage',
page: 1,
range,
index: 2,
cfi: 'epubcfi(/6/4!/4/2,/1:0,/1:9)',
}),
);
expect(h.rendered).toEqual(size);
expect(h.placedSizes[0]).toEqual([size.width, size.height]);
});

View file

@ -71,7 +71,11 @@ vi.mock('@/store/readerProgressStore', () => {
pageinfo: { current: 2, total: 5 },
timeinfo: { section: 0, total: 0 },
} as BookProgress;
return { useBookProgress: () => progress, getBookProgress: () => progress };
return {
useBookProgress: () => progress,
getBookProgress: () => progress,
usePagePreview: () => null,
};
});
vi.mock('@/store/bookDataStore', async () => {
const { bookDataStoreHooks } = await import('@/__tests__/helpers/book-data-store-mock');

View file

@ -259,37 +259,52 @@ describe('VocabularyView', () => {
expect(scrollIntoView.mock.contexts[0]).toBe(select.parentElement);
});
it('offers a language filter only when words span languages', () => {
const languageTab = (name: RegExp) =>
within(screen.getByRole('group', { name: 'Language' })).getByRole('button', { name });
it('puts language tabs with word counts above the filters only when words span languages', () => {
render(<VocabularyView />);
expect(screen.queryByRole('combobox', { name: 'Language' })).toBeNull();
expect(screen.queryByRole('group', { name: 'Language' })).toBeNull();
cleanup();
seed([
entry('sandworm', {}),
entry('haus', { id: 'de:haus', lang: 'de' }),
entry('haus', { id: 'de:haus', lang: 'de', state: 'learning' }),
entry('baum', { id: 'de:baum', lang: 'de' }),
]);
render(<VocabularyView />);
fireEvent.change(screen.getByRole('combobox', { name: 'Language' }), {
target: { value: 'de' },
});
const tabs = screen.getByRole('group', { name: 'Language' });
expect(
within(tabs)
.getAllByRole('button')
.map((b) => b.textContent),
).toEqual(['All3', 'English1', 'German2']);
const filters = screen.getByRole('group', { name: 'Filter' });
expect(tabs.compareDocumentPosition(filters) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
expect(within(filters).queryByRole('combobox', { name: 'Language' })).toBeNull();
fireEvent.click(languageTab(/^German/));
expect(languageTab(/^German/).getAttribute('aria-pressed')).toBe('true');
expect(listWords()).toEqual(['haus', 'baum']);
// The status chips count within the language; the tabs keep their totals.
expect(screen.getByRole('button', { name: /^Learning/ }).textContent).toBe('Learning1');
fireEvent.click(screen.getByRole('button', { name: /^Learning/ }));
expect(listWords()).toEqual(['haus']);
expect(languageTab(/^English/).textContent).toBe('English1');
fireEvent.click(languageTab(/^All/));
expect(listWords()).toEqual(['haus']);
});
it('drops the language filter when its last word is deleted', () => {
seed([entry('sandworm', {}), entry('haus', { id: 'de:haus', lang: 'de' })]);
render(<VocabularyView />);
fireEvent.change(screen.getByRole('combobox', { name: 'Language' }), {
target: { value: 'de' },
});
fireEvent.click(languageTab(/^German/));
expect(listWords()).toEqual(['haus']);
act(() => useVocabularyStore.getState().remove('de:haus'));
expect(screen.queryByRole('combobox', { name: 'Language' })).toBeNull();
expect(screen.queryByRole('group', { name: 'Language' })).toBeNull();
expect(listWords()).toEqual(['sandworm']);
// A German word coming back (a Sync pull) doesn't turn the filter back on.
act(() => useVocabularyStore.getState().importWords([{ word: 'baum', lang: 'de' }]));
expect((screen.getByRole('combobox', { name: 'Language' }) as HTMLSelectElement).value).toBe(
'',
);
expect(languageTab(/^All/).getAttribute('aria-pressed')).toBe('true');
expect(listWords()).toEqual(expect.arrayContaining(['sandworm', 'baum']));
});

View file

@ -1,5 +1,5 @@
import { afterEach, describe, expect, it, vi } from 'vitest';
import { act, cleanup, fireEvent, render, screen } from '@testing-library/react';
import { act, cleanup, fireEvent, render, screen, within } from '@testing-library/react';
import { page, userEvent } from 'vitest/browser';
import VocabularyDialog, {
setVocabularyDialogVisible,
@ -19,6 +19,7 @@ await import('@/styles/globals.css');
afterEach(() => {
cleanup();
document.documentElement.removeAttribute('data-eink');
document.documentElement.removeAttribute('dir');
});
const openWindow = async (width: number, bookTitle?: string) => {
@ -80,6 +81,46 @@ describe('vocabulary window layout', () => {
expect(list.getBoundingClientRect().width).toBeCloseTo(width, 0);
});
for (const rtl of [false, true]) {
it(`moves through the language tabs with the arrow keys, RTL ${rtl}`, async () => {
if (rtl) document.documentElement.dir = 'rtl';
await page.viewport(390, 800);
const word = (lang: string, key: string) => ({
id: `${lang}:${key}`,
lang,
key,
word: key,
state: 'none' as const,
occurrences: [],
createdAt: 1,
modifiedAt: 1,
deletedAt: null,
});
useVocabularyStore.setState({
entries: { 'en:spice': word('en', 'spice'), 'de:haus': word('de', 'haus') },
loaded: true,
});
render(<VocabularyDialog />);
act(() => setVocabularyDialogVisible(true));
const group = await screen.findByRole('group', { name: 'Language' });
const tabs = within(group).getAllByRole('button');
expect(tabs.map((t) => t.textContent)).toEqual(['All2', 'English1', 'German1']);
const [next, back] = rtl ? ['{ArrowLeft}', '{ArrowRight}'] : ['{ArrowRight}', '{ArrowLeft}'];
tabs[0]!.focus();
await userEvent.keyboard(next);
expect(document.activeElement).toBe(tabs[1]);
expect(tabs[1]!.getAttribute('aria-pressed')).toBe('true');
await userEvent.keyboard(next);
await userEvent.keyboard(next);
// The last tab stays put.
expect(document.activeElement).toBe(tabs[2]);
expect(tabs[2]!.getAttribute('aria-pressed')).toBe('true');
await userEvent.keyboard(back);
expect(document.activeElement).toBe(tabs[1]);
expect(tabs[1]!.getAttribute('aria-pressed')).toBe('true');
});
}
for (const eink of [false, true]) {
it(`shows keyboard focus on the search field and book chip, e-ink ${eink}`, async () => {
document.documentElement.dataset['eink'] = String(eink);

View file

@ -831,4 +831,73 @@ describe('FoliateView CFI navigation (browser)', () => {
expect(chapterHeading).toBeDefined();
expect(chapterHeading!.textContent).toContain('Chapter 5');
});
// A native page turn paints the adjacent page under its cover to capture it,
// with the header and footer over it (#8068). The preview names that page's
// location, so they can show it: it must be the location the turn reaches.
it.each([
360, 800,
])('previews the location a turn then reaches, within and across sections (%ipx)', async (width) => {
view = createView();
view.style.width = `${width}px`;
await view.open(book);
const start = book.sections!.findIndex((s) => s.linear !== 'no' && s.size > 10000);
const stabilized = new Promise<void>((resolve) => {
view.renderer.addEventListener('stabilized', () => resolve(), { once: true });
});
await view.goTo(start);
await stabilized;
const previewThenTurn = async (forward: boolean) => {
// The next section has to be loaded beside this one to be previewed.
await vi.waitUntil(() => view.renderer.getPageTurnKey?.(forward ? 1 : -1), {
timeout: 5000,
});
let previews: unknown[] = [];
const onPreview = (e: Event) => previews.push((e as CustomEvent).detail);
view.addEventListener('preview', onPreview);
// A resize can cancel a preview during its paint frames: try again.
await vi.waitUntil(
async () => {
previews = [];
return (await view.renderer.previewPage!(forward, async () => 'captured')) !== null;
},
{ timeout: 3000, interval: 20 },
);
view.removeEventListener('preview', onPreview);
expect(previews).toHaveLength(2);
expect(previews[1]).toBeNull();
const preview = previews[0] as Record<string, unknown>;
const relocates: Record<string, unknown>[] = [];
const onRelocate = (e: Event) => relocates.push((e as CustomEvent).detail);
view.addEventListener('relocate', onRelocate);
await (forward ? view.next() : view.prev());
await new Promise((resolve) => setTimeout(resolve, 300));
view.removeEventListener('relocate', onRelocate);
const relocated = relocates.at(-1)!;
expect(preview).toMatchObject({
fraction: relocated['fraction'],
section: relocated['section'],
location: relocated['location'],
time: relocated['time'],
tocItem: relocated['tocItem'],
pageItem: relocated['pageItem'],
page: view.renderer.page,
pages: view.renderer.pages,
atEnd: view.renderer.atEnd,
});
return (relocated['section'] as { current: number }).current;
};
// Within the section both ways, then on into the next one.
expect(await previewThenTurn(true)).toBe(start);
expect(await previewThenTurn(false)).toBe(start);
let section = start;
for (let turns = 0; section === start; turns++) {
expect(turns).toBeLessThan(40);
section = await previewThenTurn(true);
}
expect(section).toBeGreaterThan(start);
}, 30000);
});

View file

@ -133,6 +133,25 @@ describe('iframeEventHandlers click gestures', () => {
expect(types).not.toContain('iframe-single-click');
});
test('a double-click whose handling holds the thread posts no single click (#8018)', async () => {
const { handleClick, handleMousedown, handleMouseup } = await importHandlers();
const doubleClickDisabled = { current: false };
handleMousedown('book-1', mouseEvent());
handleMouseup('book-1', mouseEvent());
handleClick('book-1', doubleClickDisabled, false, false, mouseEvent());
vi.advanceTimersByTime(100);
handleMousedown('book-1', mouseEvent());
handleMouseup('book-1', mouseEvent());
handleClick('book-1', doubleClickDisabled, false, false, mouseEvent({ target: document.body }));
// Selecting the word blocks the thread for half a second (the first jieba
// lookup in a Chinese book on Android), so the first click's timer runs late.
vi.setSystemTime(Date.now() + 500);
vi.advanceTimersByTime(260);
expect(postedTypes(postSpy)).not.toContain('iframe-single-click');
});
test('a double-click reports where it landed in the window, not just in its section (#6583)', async () => {
const { handleClick, handleMousedown, handleMouseup } = await importHandlers();
const doubleClickDisabled = { current: false };

View file

@ -202,6 +202,51 @@ describe('extractXRay', () => {
await vi.advanceTimersByTimeAsync(2_000);
expect(options.abortSignal.aborted).toBe(true);
});
const extractOnce = () =>
extractXRay(
useCustomTranslatorStore.getState().translators[0]!,
[{ position: 0, text: 'Soon Anna met Boris.', cfiAt: () => '' }],
[],
{ bookTitle: 'Sea', bookAuthor: 'A', sourceLang: 'en', targetLang: 'de' },
new AbortController().signal,
);
// #8013: the SDK words that abort as a failed response on Android.
it('says a server gone silent stopped responding', async () => {
vi.useFakeTimers();
h.generateChatText.mockImplementation((_translator, { abortSignal, onProgress }) => {
onProgress('text-delta');
return new Promise((_resolve, fail) =>
abortSignal.addEventListener('abort', () =>
fail(new Error('Failed to process successful response')),
),
);
});
const failed = expect(extractOnce()).rejects.toThrow('The AI provider stopped responding.');
await vi.advanceTimersByTimeAsync(61_000);
await failed;
});
// #8013: Android freezes an app in the background, and the reading of the
// reply with it. Its timers then fire late, with the reply waiting.
it('waits again for a reply once the app is back from a freeze', async () => {
vi.useFakeTimers();
let options!: { abortSignal: AbortSignal; onProgress: (type: string) => void };
h.generateChatText.mockImplementation((_translator, sent) => {
options = sent;
return new Promise(() => {});
});
void extractOnce().catch(() => {});
options.onProgress('text-delta');
await vi.advanceTimersByTimeAsync(30_000);
// Frozen for 90 seconds.
vi.setSystemTime(Date.now() + 90_000);
await vi.advanceTimersByTimeAsync(31_000);
expect(options.abortSignal.aborted).toBe(false);
await vi.advanceTimersByTimeAsync(61_000);
expect(options.abortSignal.aborted).toBe(true);
});
});
describe('XRay', () => {

View file

@ -11,6 +11,7 @@ import {
reorderToolbar,
shouldShowHighlightOptions,
supportsProofread,
getToolbarGrid,
} from '@/utils/annotationToolbar';
describe('annotationToolbar helpers', () => {
@ -198,3 +199,20 @@ describe('shouldShowHighlightOptions (#5983)', () => {
expect(shouldShowHighlightOptions(toolbarWithHighlight, null)).toBe(false);
});
});
// #8013: past what fits, the tools scrolled out of sight with no scrollbar.
describe('getToolbarGrid', () => {
test('keeps one row while the 32px tools fit', () => {
// A 360px phone leaves a 335px toolbar: nine tools and its padding.
expect(getToolbarGrid(9, 335)).toEqual({ rows: 1, columns: 9 });
expect(getToolbarGrid(8, 300)).toEqual({ rows: 1, columns: 8 });
expect(getToolbarGrid(0, 300)).toEqual({ rows: 1, columns: 0 });
});
test('wraps the rest onto rows of even length', () => {
expect(getToolbarGrid(10, 335)).toEqual({ rows: 2, columns: 5 });
expect(getToolbarGrid(9, 300)).toEqual({ rows: 2, columns: 5 });
expect(getToolbarGrid(16, 300)).toEqual({ rows: 2, columns: 8 });
expect(getToolbarGrid(16, 200)).toEqual({ rows: 4, columns: 4 });
});
});

View file

@ -0,0 +1,36 @@
import { describe, expect, test } from 'vitest';
import { findZhWord } from '@/utils/jieba';
// The word a long-press on `char` selects (#8018): the span jieba gives back
// for that one character.
const wordAt = (text: string, char: string) => {
const start = text.indexOf(char);
const word = findZhWord(text, start, start + char.length);
return word && text.slice(word[0], word[1]);
};
describe('findZhWord', () => {
test.each([
// #8018's example. jieba keeps 独立思考 whole; iOS and desktop select 思考.
['独立思考是一种重要的能力。', '思', '思考'],
['独立思考是一种重要的能力。', '独', '独立'],
['独立思考是一种重要的能力。', '能', '能力'],
['独立思考是一种重要的能力。', '是', '是'],
['中华人民共和国成立了', '华', '中华'],
['中华人民共和国成立了', '人', '人民'],
['中华人民共和国成立了', '国', '共和国'],
['我们明天去北京大学看看', '学', '大学'],
// Character names, which jieba's HMM finds and the dictionary doesn't have.
['韩立看着南宫婉,微微一笑。', '立', '韩立'],
// 微微一笑 has 微微 in it but not 一笑: the rest stays together.
['韩立看着南宫婉,微微一笑。', '笑', '一笑'],
])('%s: %s selects %s', (text, char, word) => {
expect(wordAt(text, char)).toBe(word);
});
test('a span that crosses words is in none of them', () => {
const text = '独立思考是一种重要的能力。';
const start = text.indexOf('考是');
expect(findZhWord(text, start, start + 2)).toBeNull();
});
});

View file

@ -0,0 +1,96 @@
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
// Android's ICU ships without its Chinese dictionary, so Intl.Segmenter (like
// the WebView's own long-press) splits Chinese into single characters (#8018).
// jieba widens the character to its word there; everywhere else the platform
// segments Chinese itself and nothing changes.
const h = vi.hoisted(() => ({ jiebaReady: true }));
vi.mock('@/utils/jieba', async (importActual) => ({
...(await importActual<typeof import('@/utils/jieba')>()),
isJiebaReady: () => h.jiebaReady,
}));
import { getWordRangeAt, widenToChineseWord } from '@/utils/sel';
// Intl.Segmenter as Android has it: one segment per Han character.
class AndroidSegmenter {
segment(text: string) {
return [...text].map((segment, index) => ({
segment,
index,
isWordLike: /\p{Script=Han}/u.test(segment),
}));
}
}
const TEXT = '独立思考是一种重要的能力。';
const textNode = () => {
const node = document.createTextNode(TEXT);
document.body.appendChild(node);
return node;
};
const charRange = (node: Text, char: string) => {
const range = document.createRange();
const start = TEXT.indexOf(char);
range.setStart(node, start);
range.setEnd(node, start + char.length);
return range;
};
beforeEach(() => {
h.jiebaReady = true;
vi.stubGlobal('Intl', { ...Intl, Segmenter: AndroidSegmenter });
});
afterEach(() => {
vi.unstubAllGlobals();
document.body.innerHTML = '';
});
describe('widenToChineseWord', () => {
test('widens a Chinese character to its word', () => {
const node = textNode();
expect(widenToChineseWord(charRange(node, '思'), 'zh')?.toString()).toBe('思考');
});
test('leaves a character that is a word by itself', () => {
const node = textNode();
expect(widenToChineseWord(charRange(node, '是'), 'zh')).toBeNull();
});
test('only in a Chinese book', () => {
const node = textNode();
expect(widenToChineseWord(charRange(node, '思'), 'ja')).toBeNull();
expect(widenToChineseWord(charRange(node, '思'), undefined)).toBeNull();
});
test('only once jieba is loaded', () => {
h.jiebaReady = false;
const node = textNode();
expect(widenToChineseWord(charRange(node, '思'), 'zh')).toBeNull();
});
test('not where Intl.Segmenter segments Chinese itself', () => {
vi.unstubAllGlobals();
const node = textNode();
expect(widenToChineseWord(charRange(node, '思'), 'zh')).toBeNull();
});
});
describe('getWordRangeAt in a Chinese book on Android', () => {
// A caret between two characters belongs to the one before it.
const afterSi = TEXT.indexOf('思') + 1;
test('returns the word, not the character', () => {
const node = textNode();
expect(getWordRangeAt(node, afterSi, 'zh')?.toString()).toBe('思考');
});
test('keeps the character in a book of another language', () => {
const node = textNode();
expect(getWordRangeAt(node, afterSi)?.toString()).toBe('思');
});
});

View file

@ -8,12 +8,13 @@ import Providers from '@/components/Providers';
import '../styles/globals.css';
const url = 'https://web.readest.com/';
const title = 'Readest — Where You Read, Digest and Get Insight';
// What search results show for web.readest.com, so it names what people search
// for. The installed apps set their own window titles, and the reader replaces
// this with the book's title.
const title = 'Readest Web — Free Online EPUB Reader';
const description =
'Discover Readest, the ultimate online ebook reader for immersive and organized reading. ' +
'Enjoy seamless access to your digital library, powerful tools for highlighting, bookmarking, ' +
'and note-taking, and support for multiple book views. ' +
'Perfect for deep reading, analysis, and understanding. Explore now!';
'Read EPUB, PDF and other ebooks in your browser with Readest: free, no install, ' +
'with highlights, notes and read aloud. Syncs with the Readest apps.';
const previewImage = 'https://cdn.readest.com/images/open_graph_preview_read_now.png';
export const metadata: Metadata = {

View file

@ -14,6 +14,7 @@ import { Insets } from '@/types/misc';
import { useEnv } from '@/context/EnvContext';
import { useThemeStore } from '@/store/themeStore';
import { useReaderStore } from '@/store/readerStore';
import { getBookProgress, setPagePreview } from '@/store/readerProgressStore';
import { useBookDataStore } from '@/store/bookDataStore';
import { useSettingsStore } from '@/store/settingsStore';
import { useCustomFontStore } from '@/store/customFontStore';
@ -186,6 +187,13 @@ const PositionFollowers: React.FC<{
);
};
// Foliate rounds a location down, so the book's last page reads total / total.
const pageInfoAt = ({ current, next, total }: PageInfo, atEnd: boolean): PageInfo => ({
current: atEnd && total > 0 ? total - 1 : current,
next,
total,
});
const FoliateViewer: React.FC<{
bookKey: string;
bookDoc: BookDoc;
@ -394,10 +402,7 @@ const FoliateViewer: React.FC<{
pendingRelocateRef.current = null;
if (!event) return;
const detail = event.detail;
const atEnd = viewRef.current?.renderer.atEnd || false;
const { current, next, total } = detail.location as PageInfo;
const currentPage = atEnd && total > 0 ? total - 1 : current;
const pageInfo = { current: currentPage, next, total };
const pageInfo = pageInfoAt(detail.location, viewRef.current?.renderer.atEnd || false);
setProgress(
bookKey,
detail.cfi,
@ -445,6 +450,38 @@ const FoliateViewer: React.FC<{
relocateTimeoutRef.current = setTimeout(commitRelocate, 100);
};
// A native page turn paints the next or previous page under its cover to
// capture it, header and footer included (#8068). Foliate names that page,
// then null once the reading position is back on screen.
const pagePreviewHandler = (event: Event) => {
const detail = (event as CustomEvent).detail;
const progress = getBookProgress(bookKey);
if (!detail?.location || !progress) {
setPagePreview(bookKey, null);
return;
}
const pageinfo = pageInfoAt(detail.location, detail.atEnd);
// What setProgress would store for a relocation to that page.
setPagePreview(bookKey, {
progress: {
...progress,
sectionHref: detail.tocItem?.href,
sectionLabel: detail.tocItem?.label,
pageItem: detail.pageItem,
section: detail.section,
pageinfo,
timeinfo: detail.time,
fraction: detail.fraction,
index: detail.section.current,
range: detail.range,
page: pageinfo.current + 1,
},
page: detail.page,
pages: detail.pages,
atEnd: detail.atEnd,
});
};
useEffect(() => {
// On unmount: flush any pending commit synchronously before tearing
// down — otherwise the last page-turn before the user closes the
@ -1053,6 +1090,7 @@ const FoliateViewer: React.FC<{
onLoad: docLoadHandler,
onStabilized: stabilizedHandler,
onRelocate: progressRelocateHandler,
onPreview: pagePreviewHandler,
onRendererRelocate: docRelocateHandler,
onNavigateStart: navigateStartHandler,
onNavigateEnd: navigateEndHandler,

View file

@ -5,7 +5,7 @@ import type { Insets } from '@/types/misc';
import { useEnv } from '@/context/EnvContext';
import { useReaderStore } from '@/store/readerStore';
import { useThemeStore } from '@/store/themeStore';
import { useBookProgress } from '@/store/readerProgressStore';
import { useBookProgress, usePagePreview } from '@/store/readerProgressStore';
import { useTranslation } from '@/hooks/useTranslation';
import { useBookDataStore } from '@/store/bookDataStore';
import {
@ -106,8 +106,11 @@ const ProgressBar: React.FC<ProgressBarProps> = ({
const bookData = getBookData(bookKey);
const viewSettings = getViewSettings(bookKey)!;
// Reactive: this is the on-screen footer that has to refresh on every
// page turn. Reads from readerProgressStore only.
const progress = useBookProgress(bookKey);
// page turn. Reads from readerProgressStore only: the reading position, or
// the page a native turn is capturing under its cover.
const preview = usePagePreview(bookKey);
const liveProgress = useBookProgress(bookKey);
const progress = preview?.progress ?? liveProgress;
const { section, pageinfo } = progress || {};
const showDoubleBorder = viewSettings.vertical && viewSettings.doubleBorder;
@ -135,7 +138,7 @@ const ProgressBar: React.FC<ProgressBarProps> = ({
// same pages (screenPages.ts). Fixed layout keeps its real page pairs,
// scrolled mode has no spreads, and formats without section sizes keep the
// byte-grid pair.
const { page: current = 0, pages: total = 0 } = view?.renderer || {};
const { page: current = 0, pages: total = 0 } = preview ?? view?.renderer ?? {};
const sectionFractions = view?.getSectionFractions() ?? [];
const sectionIndex = section?.current ?? 0;
const sections = bookData?.bookDoc?.sections;
@ -143,7 +146,7 @@ const ProgressBar: React.FC<ProgressBarProps> = ({
// re-renders the pair.
useSyncExternalStore(subscribeChapterScreens, getChapterScreensVersion);
const calibratedPair = usesScreenPages(viewSettings, bookData?.isFixedLayout, sections)
? getScreenPageInfo(bookKey, view, sections!, progress)
? getScreenPageInfo(bookKey, view, sections!, progress, preview ?? view?.renderer)
: null;
const referenceInfo =
readingProgressStyle === 'reference'

View file

@ -4,7 +4,7 @@ import { Insets } from '@/types/misc';
import { useEnv } from '@/context/EnvContext';
import { useThemeStore } from '@/store/themeStore';
import { useReaderStore } from '@/store/readerStore';
import { useBookProgressValue } from '@/store/readerProgressStore';
import { useBookProgressValue, usePagePreview } from '@/store/readerProgressStore';
import { useTranslation } from '@/hooks/useTranslation';
import { eventDispatcher } from '@/utils/event';
import {
@ -51,7 +51,10 @@ const SectionInfo: React.FC<SectionInfoProps> = ({
const _ = useTranslation();
const { appService } = useEnv();
// Subscribed here, not in the cell: a turn into the next section re-renders the title alone.
const section = useBookProgressValue(bookKey, (p) => p.sectionLabel);
const liveSection = useBookProgressValue(bookKey, (p) => p.sectionLabel);
// The page a native turn is capturing under its cover, as in ProgressBar.
const preview = usePagePreview(bookKey);
const section = preview ? preview.progress.sectionLabel : liveSection;
const { hoveredBookKey, getView, getViewSettings, setHoveredBookKey } = useReaderStore();
const { systemUIVisible, statusBarHeight, isIPhoneDuo } = useThemeStore();
const getBookData = useBookDataStore((s) => s.getBookData);

View file

@ -42,6 +42,8 @@ interface AnnotationPopupProps {
selectedColor: HighlightColor;
popupWidth: number;
popupHeight: number;
/** Set when the tools wrap onto more than one row: how many go in a row. */
toolbarColumns?: number;
globalToggleAvailable?: boolean;
globalToggleActive?: boolean;
onToggleGlobal?: () => void;
@ -64,6 +66,7 @@ const AnnotationPopup: React.FC<AnnotationPopupProps> = ({
selectedColor,
popupWidth,
popupHeight,
toolbarColumns,
globalToggleAvailable,
globalToggleActive,
onToggleGlobal,
@ -113,13 +116,27 @@ const AnnotationPopup: React.FC<AnnotationPopupProps> = ({
<div className={clsx('flex h-full gap-4', isVertical ? 'flex-row' : 'flex-col')}>
<div
className={clsx(
'selection-buttons flex h-full w-full items-center justify-between p-2',
isVertical
? 'flex-col overflow-y-auto'
: 'flex-row overflow-x-auto overflow-y-hidden',
'selection-buttons h-full w-full p-2',
toolbarColumns
? 'grid place-content-evenly place-items-center'
: [
'flex items-center justify-between',
isVertical
? 'flex-col overflow-y-auto'
: 'flex-row overflow-x-auto overflow-y-hidden',
],
(notes.length > 0 || noteEditor) && 'hidden',
)}
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
style={
toolbarColumns
? isVertical
? {
gridAutoFlow: 'column',
gridTemplateRows: `repeat(${toolbarColumns}, minmax(0, 1fr))`,
}
: { gridTemplateColumns: `repeat(${toolbarColumns}, minmax(0, 1fr))` }
: { scrollbarWidth: 'none', msOverflowStyle: 'none' }
}
>
{buttons.map((button, index) => {
if (button.visible === false) return null;

View file

@ -82,6 +82,7 @@ import { DEFAULT_NOTE_EXPORT_CONFIG } from '@/services/constants';
import { canShareText, shareSelectedText } from '@/utils/share';
import {
getToolbarToolTypes,
getToolbarGrid,
shouldShowHighlightOptions,
supportsProofread,
} from '@/utils/annotationToolbar';
@ -421,17 +422,21 @@ const Annotator: React.FC<{ bookKey: string; contentInsets: Insets; gridInsets?:
(globalToggleAvailable ? 30 + highlightOptionsGap : 0),
);
const highlightOptionsAvailable = shouldShowHighlightOptions(toolbarToolTypes, selection ?? null);
const annotPopupWidth =
annotationNotes.length > 0 || noteEditorTarget
? annotPopupMaxWidth
: Math.min(
Math.max(
Math.max(toolbarToolTypes.length, 1) * annotPopupToolSize,
highlightOptionsAvailable ? highlightOptionsMinWidth : 0,
),
annotPopupMaxWidth,
);
const annotPopupHeight = useResponsiveSize(44);
const showsNotes = annotationNotes.length > 0 || !!noteEditorTarget;
// The tools that don't fit wrap onto more rows (#8013).
const toolbarGrid = showsNotes
? { rows: 1, columns: 0 }
: getToolbarGrid(toolbarToolTypes.length, annotPopupMaxWidth);
const annotPopupWidth = showsNotes
? annotPopupMaxWidth
: Math.min(
Math.max(
Math.max(toolbarGrid.columns, 1) * annotPopupToolSize,
highlightOptionsAvailable ? highlightOptionsMinWidth : 0,
),
annotPopupMaxWidth,
);
const annotPopupHeight = useResponsiveSize(44) * toolbarGrid.rows;
// The style/color strip that rides on the toolbar's far side, with its gap.
const highlightOptionsBlock = useResponsiveSize(28 + 16);
// Set while the toolbar shares its side with the footnote popup because the
@ -3133,6 +3138,7 @@ const Annotator: React.FC<{ bookKey: string; contentInsets: Insets; gridInsets?:
selectedColor={selectedColor}
popupWidth={annotPopupWidth}
popupHeight={annotPopupHeight}
toolbarColumns={toolbarGrid.rows > 1 ? toolbarGrid.columns : undefined}
globalToggleAvailable={globalToggleAvailable}
globalToggleActive={globalToggleActive}
onToggleGlobal={handleToggleGlobal}

View file

@ -240,13 +240,15 @@ const HighlightOptions: React.FC<HighlightOptionsProps> = ({
'highlight-options absolute flex items-center justify-between',
isVertical ? 'flex-col' : 'flex-row',
)}
// The strip and its padding, beside the toolbar: past all of its rows
// when the tools wrap (#8013).
style={{
gap: optionsGap,
width: `${popupWidth}px`,
height: `${popupHeight}px`,
width: `${isVertical ? optionsOffset : popupWidth}px`,
height: `${isVertical ? popupHeight : optionsOffset}px`,
...(isVertical
? { left: `${optionsOffset * (placeBefore ? -1 : 1)}px` }
: { top: `${optionsOffset * (placeBefore ? -1 : 1)}px` }),
? { left: `${placeBefore ? -optionsOffset : popupWidth}px` }
: { top: `${placeBefore ? -optionsOffset : popupHeight}px` }),
}}
>
<div

View file

@ -428,8 +428,9 @@ export const useCapturedTurn = (bookKey: string, viewRef: React.RefObject<Foliat
// Apple Books), so the capture spans the full cell, not just the
// text content box.
getContentRect: () =>
// Buffered EPUB sheets exclude app chrome: page counters and controls
// stay live, rather than caching the current page's counter on a neighbour.
// Buffered EPUB sheets take the renderer box. The running header and
// footer paint inside it, so while a neighbour is captured they show
// that page (the page preview in FoliateViewer, #8068).
bufferedPagesEnabled()
? view.renderer.getBoundingClientRect()
: (document.getElementById(`gridcell-${bookKey}`)?.getBoundingClientRect() ?? null),

View file

@ -5,6 +5,7 @@ type FoliateEventHandler = {
onLoad?: (event: Event) => void;
onStabilized?: (event: Event) => void;
onRelocate?: (event: Event) => void;
onPreview?: (event: Event) => void;
onLinkClick?: (event: Event) => void;
onRendererRelocate?: (event: Event) => void;
onCreateOverlay?: (event: Event) => void;
@ -18,6 +19,7 @@ export const useFoliateEvents = (view: FoliateView | null, handlers?: FoliateEve
const onLoad = handlers?.onLoad;
const onStabilized = handlers?.onStabilized;
const onRelocate = handlers?.onRelocate;
const onPreview = handlers?.onPreview;
const onLinkClick = handlers?.onLinkClick;
const onRendererRelocate = handlers?.onRendererRelocate;
const onCreateOverlay = handlers?.onCreateOverlay;
@ -31,6 +33,7 @@ export const useFoliateEvents = (view: FoliateView | null, handlers?: FoliateEve
if (onLoad) view.addEventListener('load', onLoad);
if (onStabilized) view.renderer.addEventListener('stabilized', onStabilized);
if (onRelocate) view.addEventListener('relocate', onRelocate);
if (onPreview) view.addEventListener('preview', onPreview);
if (onLinkClick) view.addEventListener('link', onLinkClick);
if (onRendererRelocate) view.renderer.addEventListener('relocate', onRendererRelocate);
if (onCreateOverlay) view.addEventListener('create-overlay', onCreateOverlay);
@ -43,6 +46,7 @@ export const useFoliateEvents = (view: FoliateView | null, handlers?: FoliateEve
if (onLoad) view.removeEventListener('load', onLoad);
if (onStabilized) view.renderer.removeEventListener('stabilized', onStabilized);
if (onRelocate) view.removeEventListener('relocate', onRelocate);
if (onPreview) view.removeEventListener('preview', onPreview);
if (onLinkClick) view.removeEventListener('link', onLinkClick);
if (onRendererRelocate) view.renderer.removeEventListener('relocate', onRendererRelocate);
if (onCreateOverlay) view.removeEventListener('create-overlay', onCreateOverlay);

View file

@ -339,12 +339,13 @@ export const useInstantAnnotation = ({
if (!isInstantAnnotationEnabled()) return;
const start = startPointRef.current;
if (!start) return;
const wordRange = getWordRangeFromPoint(doc, start.x, start.y);
const lang = getBookData(bookKey)?.book?.primaryLanguage;
const wordRange = getWordRangeFromPoint(doc, start.x, start.y, lang);
if (!wordRange) return;
engageRangeRef.current = wordRange;
drawPreview(doc, index, wordRange, start);
},
[isInstantAnnotationEnabled, drawPreview],
[bookKey, getBookData, isInstantAnnotationEnabled, drawPreview],
);
const handleInstantAnnotationPointerMove = useCallback(

View file

@ -9,6 +9,7 @@ import { eventDispatcher } from '@/utils/event';
import { LONG_HOLD_THRESHOLD } from '@/services/constants';
import { setSelectionSuppressed } from '@/utils/bridge';
import { suppressSystemSelectionMenu } from '@/hooks/useSystemSelectionMenu';
import { initJieba } from '@/utils/jieba';
import { LINK_TOUCH_HOLD_CLASS, TEXT_SELECTED_CLASS } from '@/utils/style';
import {
focusCaretWindowPos,
@ -19,9 +20,11 @@ import {
Point,
rangeFromAnchorToPoint,
repairJumpedSelectionRange,
splitsChineseByCharacter,
TextSelection,
trimNoteMarkersFromWordRange,
trimRangeWhitespaceAroundPoint,
widenToChineseWord,
} from '@/utils/sel';
import { Corner, useAutoPageTurn } from './useAutoPageTurn';
import { useInstantAnnotation } from './useInstantAnnotation';
@ -88,8 +91,15 @@ export const useTextSelector = (
const { getView, getViewSettings, getProgress } = useReaderStore();
const view = getView(bookKey);
const bookData = useBookData(bookKey);
const bookLang = bookData?.book?.primaryLanguage;
const osPlatform = getOSPlatform();
// A word selection in a Chinese book widens through jieba where the platform
// splits Chinese by character (#8018); load it before the first one.
useEffect(() => {
if (bookLang?.startsWith('zh') && splitsChineseByCharacter()) initJieba().catch(() => {});
}, [bookLang]);
// Corner-dwell auto page-turn (#1354), now driven by every selection gesture
// through a shared engagement point — see useAutoPageTurn.
const {
@ -179,6 +189,8 @@ export const useTextSelector = (
const wordGestureRef = useRef<{
range: Range;
trimPoint?: { node: Node; offset: number } | null;
// A Chinese word widened from one character (#8018), on the app's handles.
widened?: boolean;
} | null>(null);
// Android hyphen selection-bounds bug (#1553): the selection anchor captured
@ -554,11 +566,30 @@ export const useTextSelector = (
const publication = ++selectionPublicationId.current;
isTextSelected.current = true;
const navigated = navigatedSelectionRef.current;
const liveRange = sel.getRangeAt(0);
let liveRange = sel.getRangeAt(0);
const lastGesture = wordGestureRef.current;
const sameAsLast = !!lastGesture && isSameRange(liveRange, lastGesture.range);
// A long-press on Chinese in Android's WebView selects one character
// (#8018): publish its word. The page selection takes the word only once
// the finger lifts: set from script, it stops the press from dragging the
// selection on, and it has no WebView handles, so the app's own take over.
let word =
wordGesture && appService?.isAndroidApp ? widenToChineseWord(liveRange, bookLang) : null;
let widened = sameAsLast && !!lastGesture?.widened;
if (word && !isTouchStarted.current) {
guardProgrammaticSelection();
sel.removeAllRanges();
sel.addRange(word);
releaseProgrammaticSelection();
liveRange = sel.getRangeAt(0);
if (touchWordGestureRef.current) touchWordGestureRef.current.range = liveRange.cloneRange();
word = null;
widened = true;
}
if (widened) handlesSuppressed = true;
if (wordGesture) {
wordGestureRef.current = { range: liveRange.cloneRange(), trimPoint };
} else if (lastGesture && isSameRange(liveRange, lastGesture.range)) {
wordGestureRef.current = { range: liveRange.cloneRange(), trimPoint, widened };
} else if (lastGesture && sameAsLast) {
trimPoint = lastGesture.trimPoint;
wordGesture = true;
} else {
@ -587,7 +618,7 @@ export const useTextSelector = (
// Selection.getRangeAt() returns the live, associated Range by reference.
// Clone only for double-click normalization so native touch paths retain
// their established Range behavior and browser handles stay untouched.
const range = trimPoint || wordGesture ? liveRange.cloneRange() : liveRange;
const range = word ?? (trimPoint || wordGesture ? liveRange.cloneRange() : liveRange);
if (trimPoint) trimRangeWhitespaceAroundPoint(range, trimPoint.node, trimPoint.offset);
if (wordGesture) trimNoteMarkersFromWordRange(range);
const text = await getAnnotationText(range);
@ -1091,7 +1122,7 @@ export const useTextSelector = (
if (isInstantAnnotating.current) return;
const sel = doc.getSelection();
if (!sel || isValidSelection(sel)) return;
const range = getWordRangeFromPoint(doc, x, y);
const range = getWordRangeFromPoint(doc, x, y, bookLang);
if (!range) return;
guardProgrammaticSelection();
sel.removeAllRanges();
@ -1215,6 +1246,16 @@ export const useTextSelector = (
}
if (osPlatform === 'android' && appService?.isAndroidApp) {
// The WebView keeps a long-press's release to itself (the page got a
// pointercancel), so a Chinese word published mid-press takes the
// selection here, at the native release (#8018).
if (
isValidSelection(sel) &&
isTouchWordSelection(sel) &&
widenToChineseWord(sel.getRangeAt(0), bookLang)
) {
await makeSelection(sel, index, false, false, null, true);
}
await sanitizeAndroidHyphenSelection(doc, index);
await suppressNativeHandlesForPages();

View file

@ -805,9 +805,9 @@ export const handleClick = (
};
if (!doubleClickDisabled.current) {
setTimeout(() => {
if (Date.now() - lastClickTime >= DOUBLE_CLICK_INTERVAL_THRESHOLD_MS) {
postSingleClick();
}
// No click came since this one. Timed from now instead, a timer the
// thread ran late (#8018) reads a double-click as a single one.
if (lastClickTime === now) postSingleClick();
}, DOUBLE_CLICK_INTERVAL_THRESHOLD_MS);
} else {
// Mouse clicks remain synchronous. A touch-synthesized click waits one

View file

@ -37,6 +37,8 @@ export const getScreenPageInfo = (
view: FoliateView | null | undefined,
sections: CalibratedSectionSource[],
progress: BookProgress | null | undefined,
// The page on screen: the renderer's, or the page a native turn previews.
screen: { page: number; atEnd?: boolean } | undefined = view?.renderer,
): PageInfo => {
const spine = progress?.section?.current ?? 0;
const sectionFractions = view?.getSectionFractions() ?? [];
@ -48,14 +50,14 @@ export const getScreenPageInfo = (
bookKey,
sections,
spine,
view?.renderer?.page ?? 0,
screen?.page ?? 0,
(sections[spine]?.size ?? 0) > CHUNKED_SECTION_THRESHOLD,
chapterFraction,
);
// At two columns a short last chapter can share the last screen with the
// one before, and only the first is the screen's primary chapter: the last
// screen still reads total / total, as the byte-grid pair does.
const current = view?.renderer?.atEnd ? pair.total - 1 : pair.current;
const current = screen?.atEnd ? pair.total - 1 : pair.current;
return { current, next: current, total: pair.total };
};

View file

@ -12,7 +12,6 @@ import {
PiDownloadSimple,
PiExport,
PiFileCsv,
PiGlobe,
PiSpeakerHigh,
} from 'react-icons/pi';
import type { IconType } from 'react-icons';
@ -133,6 +132,7 @@ const VocabularyView: React.FC<VocabularyViewProps> = ({ onOpenBook }) => {
.map((code) => ({
value: code,
label: code === 'und' ? _('Unknown') : languageLabel(code),
count: all.filter((e) => !e.deletedAt && e.lang === code).length,
}))
.sort((a, b) => a.label.localeCompare(b.label)),
[all, _],
@ -371,6 +371,48 @@ const VocabularyView: React.FC<VocabularyViewProps> = ({ onOpenBook }) => {
</Dropdown>
</div>
{/* Language comes first (#8022): each language's words are a list of their own. */}
{languages.length > 1 && (
<div
role='group'
aria-label={_('Language')}
// Arrows pick the next language. Capture phase: Dialog stops every
// keydown at its own node, so a bubbling handler never runs.
onKeyDownCapture={(e) => {
const rtl = getComputedStyle(e.currentTarget).direction === 'rtl';
const step = { ArrowLeft: rtl ? 1 : -1, ArrowRight: rtl ? -1 : 1 }[e.key];
const tabs = [...e.currentTarget.querySelectorAll('button')];
const tab = step && tabs[tabs.indexOf(e.target as HTMLButtonElement) + step];
if (!tab) return;
e.preventDefault();
tab.focus();
tab.click();
}}
className='no-scrollbar -mx-4 flex scroll-px-4 items-center gap-1 overflow-x-auto px-4 pb-2 sm:-mx-6 sm:scroll-px-6 sm:px-6'
>
{[
{ value: '', label: _('All'), count: languages.reduce((n, l) => n + l.count, 0) },
...languages,
].map((l) => (
<button
key={l.value}
type='button'
aria-pressed={lang === l.value}
onClick={() => setLang(l.value)}
className={clsx(
'flex h-9 shrink-0 items-center gap-1.5 rounded-full px-4 font-medium whitespace-nowrap',
lang === l.value
? 'eink-bordered bg-base-200'
: 'not-eink:text-base-content/60 not-eink:hover:text-base-content',
)}
>
<span>{l.label}</span>
<span className='not-eink:opacity-60 text-xs tabular-nums'>{l.count}</span>
</button>
))}
</div>
)}
<div
role='group'
aria-label={_('Filter')}
@ -407,15 +449,6 @@ const VocabularyView: React.FC<VocabularyViewProps> = ({ onOpenBook }) => {
...books.map((b) => ({ value: b.hash, label: b.title })),
]}
/>
{languages.length > 1 && (
<FilterChip
icon={PiGlobe}
label={_('Language')}
value={lang}
onChange={setLang}
options={[{ value: '', label: _('All Languages') }, ...languages]}
/>
)}
{profiles.length > 0 && (
<FilterChip
icon={PiCards}

View file

@ -5,6 +5,7 @@ import {
stripReasoning,
} from '@/services/translators/custom/openaiCompatible';
import type { CustomTranslator } from '@/types/translation';
import { stubTranslation as _ } from '@/utils/misc';
import type { XRayPassage } from './bookText';
import { XRAY_ENTITY_TYPES, type XRayData, type XRayEntityType, type XRayQuote } from './types';
@ -12,6 +13,8 @@ import { XRAY_ENTITY_TYPES, type XRayData, type XRayEntityType, type XRayQuote }
// waiting, with nothing streamed, until their turn.
const FIRST_REPLY_TIMEOUT_MS = 300_000;
const IDLE_TIMEOUT_MS = 60_000;
// A timer this late found the app frozen in the background (#8013).
const FROZEN_MS = 10_000;
const QUOTES = '"quotes": [{"passage": 0, "text": ""}]';
const XRAY_PROMPT = `You build a spoiler-free X-Ray of the book "{{bookTitle}}" by {{bookAuthor}} for its reader.
@ -112,7 +115,21 @@ const ask = async (
// signal of a finished request fires (see openaiCompatible.ts).
const controller = new AbortController();
const abort = () => controller.abort();
let timer = setTimeout(abort, FIRST_REPLY_TIMEOUT_MS);
let silent = false;
let timer: ReturnType<typeof setTimeout> | undefined;
// Android freezes an app in the background, and the reading of its reply
// with it: the reply may be waiting when the timer fires late, so it waits
// again then.
const wait = (ms: number) => {
clearTimeout(timer);
const due = Date.now() + ms;
timer = setTimeout(() => {
if (Date.now() - due > FROZEN_MS) return wait(ms);
silent = true;
abort();
}, ms);
};
wait(FIRST_REPLY_TIMEOUT_MS);
signal.addEventListener('abort', abort, { once: true });
try {
const text = await generateChatText(translator, {
@ -126,13 +143,15 @@ const ask = async (
onText: () => {},
onProgress: (type) => {
// The SDK starts its stream before the server takes the request.
if (type === 'start') return;
clearTimeout(timer);
timer = setTimeout(abort, IDLE_TIMEOUT_MS);
if (type !== 'start') wait(IDLE_TIMEOUT_MS);
},
});
signal.throwIfAborted();
return text;
} catch (err) {
// The SDK words this abort as a failed response or an aborted signal.
if (silent) throw new Error(_('The AI provider stopped responding.'));
throw err;
} finally {
clearTimeout(timer);
signal.removeEventListener('abort', abort);

View file

@ -1,6 +1,20 @@
import { create } from 'zustand';
import { BookProgress } from '@/types/book';
/**
* A page a native page turn paints under its cover to capture it (paginator
* `previewPage`). The capture takes in the running header and footer
* (#8068), so while it is set they show this page, not the reading position.
* Display only: nothing takes it as reading progress.
*/
export interface PagePreview {
progress: BookProgress;
// The renderer's page, pages and atEnd once on this page.
page: number;
pages: number;
atEnd: boolean;
}
/**
* Per-book reading progress, kept in its own store so that high-frequency
* `setProgress` writes (fired once per page turn / scroll snap) do not
@ -55,10 +69,12 @@ import { BookProgress } from '@/types/book';
interface ReaderProgressState {
// Keyed by book view key (matches readerStore.viewStates keys).
progresses: { [key: string]: BookProgress | null };
previews: { [key: string]: PagePreview | null };
}
export const useReaderProgressStore = create<ReaderProgressState>(() => ({
progresses: {},
previews: {},
}));
/**
@ -90,13 +106,26 @@ export const setBookProgress = (key: string, progress: BookProgress | null) => {
*/
export const clearBookProgress = (key: string) => {
useReaderProgressStore.setState((state) => {
if (!(key in state.progresses)) return state;
const next = { ...state.progresses };
delete next[key];
return { progresses: next };
if (!(key in state.progresses) && !(key in state.previews)) return state;
const progresses = { ...state.progresses };
const previews = { ...state.previews };
delete progresses[key];
delete previews[key];
return { progresses, previews };
});
};
export const setPagePreview = (key: string, preview: PagePreview | null) => {
useReaderProgressStore.setState((state) =>
(state.previews[key] ?? null) === preview
? state
: { previews: { ...state.previews, [key]: preview } },
);
};
export const usePagePreview = (key: string): PagePreview | null =>
useReaderProgressStore((s) => s.previews[key] ?? null);
/**
* Reactive subscription — components that need to re-render when this
* specific book's progress changes should use this hook. Selector form

View file

@ -135,3 +135,12 @@ export const reorderToolbar = (
next.splice(to, 0, spliced[0]!);
return next;
};
// The selection toolbar's 32px tools and its 8px padding. Rows of even length
// hold the tools that don't fit `maxWidth`, which used to scroll out of sight
// with no scrollbar (#8013).
export const getToolbarGrid = (count: number, maxWidth: number) => {
const perRow = Math.max(1, Math.floor((maxWidth - 16) / 32));
const rows = Math.max(1, Math.ceil(count / perRow));
return { rows, columns: Math.ceil(count / rows) };
};

View file

@ -1,4 +1,4 @@
import init, { cut } from 'jieba-wasm';
import init, { cut, cut_for_search } from 'jieba-wasm';
let initialized = false;
let initPromise: Promise<void> | null = null;
@ -28,4 +28,41 @@ const cutZh = (text: string): string[] => {
return cut(text, true);
};
export { initJieba, isJiebaReady, cutZh };
// The word around text[start, end), as [start, end) offsets, or null when the
// span crosses words. jieba keeps compounds whole (独立思考, 北京大学) where iOS
// and desktop select their parts (思考, 大学), so a longer word is split into
// the dictionary words search mode finds in it, left to right and longest
// first. Characters none of them covers stay together.
const findZhWord = (text: string, start: number, end: number): [number, number] | null => {
let wordStart = 0;
for (const word of cut(text, true)) {
const wordEnd = wordStart + word.length;
if (end <= wordEnd) {
if (start < wordStart) return null;
const parts = cut_for_search(word, true).filter((part) => part.length < word.length);
const bounds = new Set([0, word.length]);
for (let i = 0; i < word.length; ) {
const part = parts
.filter((p) => word.startsWith(p, i))
.reduce((a, b) => (b.length > a.length ? b : a), '');
if (!part) {
i++;
continue;
}
bounds.add(i).add(i + part.length);
i += part.length;
}
const sorted = [...bounds].sort((a, b) => a - b);
for (let k = 1; k < sorted.length; k++) {
const pieceStart = wordStart + sorted[k - 1]!;
const pieceEnd = wordStart + sorted[k]!;
if (start >= pieceStart && end <= pieceEnd) return [pieceStart, pieceEnd];
}
return [wordStart, wordEnd];
}
wordStart = wordEnd;
}
return null;
};
export { initJieba, isJiebaReady, cutZh, findZhWord };

View file

@ -1,4 +1,5 @@
import { getPdfCaretPosition, getPdfTextFromRange, getPdfTextLayer } from '@/utils/pdfText';
import { findZhWord, isJiebaReady } from '@/utils/jieba';
export interface Frame {
top: number;
@ -634,11 +635,36 @@ export const snapRangeToWords = (range: Range): void => {
snapEndToWordBoundary();
};
// Android ships ICU without its Chinese dictionary, so Intl.Segmenter and the
// WebView's own long-press split Chinese into single characters (#8018).
export const splitsChineseByCharacter = (): boolean =>
typeof Intl !== 'undefined' &&
!!Intl.Segmenter &&
[...new Intl.Segmenter('zh', { granularity: 'word' }).segment('思考')].length > 1;
// Widen a range on Chinese text to the word around it, where the platform
// splits Chinese by character. Null when there is nothing to widen.
export const widenToChineseWord = (range: Range, lang?: string): Range | null => {
if (!lang?.startsWith('zh') || !isJiebaReady() || !splitsChineseByCharacter()) return null;
const node = range.startContainer;
if (node !== range.endContainer || node.nodeType !== Node.TEXT_NODE) return null;
const text = node.textContent ?? '';
const { startOffset, endOffset } = range;
if (!/^\p{Script=Han}+$/u.test(text.slice(startOffset, endOffset))) return null;
const word = findZhWord(text, startOffset, endOffset);
if (!word || (word[0] === startOffset && word[1] === endOffset)) return null;
const widened = range.cloneRange();
widened.setStart(node, word[0]);
widened.setEnd(node, word[1]);
return widened;
};
// Expand a caret position (a text node + offset) to the word-like segment that
// contains it — the same word a native double-click would select. Returns null
// when the position isn't inside word-like text (whitespace, punctuation, a
// non-text node). CJK is segmented via Intl.Segmenter, matching snapRangeToWords.
export const getWordRangeAt = (node: Node, offset: number): Range | null => {
// non-text node). CJK is segmented via Intl.Segmenter, matching snapRangeToWords,
// and in a Chinese book (`lang`) widened where that splits it by character.
export const getWordRangeAt = (node: Node, offset: number, lang?: string): Range | null => {
if (node.nodeType !== Node.TEXT_NODE) return null;
if (typeof Intl === 'undefined' || !Intl.Segmenter) return null;
const text = node.textContent ?? '';
@ -660,7 +686,8 @@ export const getWordRangeAt = (node: Node, offset: number): Range | null => {
} catch {
return null;
}
return range.collapsed ? null : range;
if (range.collapsed) return null;
return widenToChineseWord(range, lang) ?? range;
}
}
return null;
@ -692,9 +719,14 @@ export const getCaretPointFromPoint = (
return { node, offset };
};
export const getWordRangeFromPoint = (doc: Document, x: number, y: number): Range | null => {
export const getWordRangeFromPoint = (
doc: Document,
x: number,
y: number,
lang?: string,
): Range | null => {
const point = getCaretPointFromPoint(doc, x, y);
return point ? getWordRangeAt(point.node, point.offset) : null;
return point ? getWordRangeAt(point.node, point.offset, lang) : null;
};
interface SelectedTextSlice {

View file

@ -174,7 +174,12 @@ def submit_apple_build(deliver_opts, testflight_opts)
# (Before fastlane/metadata/en-US existed this only sent the two inline
# fields and left the rest of App Store Connect untouched.)
skip_metadata: false,
release_notes: { "en-US" => release_notes_text },
# "default" fills every localization in the metadata folder, not just en-US.
# An update needs What's New in each language it is listed in, so without it
# the zh-Hans, ja, de-DE... folders would make the submission fail. The notes
# come from release-notes.json, which is English, so every language gets them
# in English until that file carries translations.
release_notes: { "default" => release_notes_text },
promotional_text: { "en-US" => PROMOTIONAL_TEXT },
precheck_include_in_app_purchases: false,
submission_information: { add_id_info_uses_idfa: false },

View file

@ -0,0 +1,42 @@
Readest ist ein E-Book-Reader für Menschen, die viel lesen und ihre Bücher, Notizen und Leseposition auf dem Gerät haben möchten, das gerade am nächsten liegt.
Auf dem Mac haben Sie Platz, sich auszubreiten. Öffnen Sie mehrere Bücher in eigenen Fenstern, behalten Sie Text und Notizen gleichzeitig im Blick und steuern Sie alles über die Tastatur.
Gemacht für den Mac
• Bücher in eigenen Fenstern öffnen und nebeneinander anordnen
• Blättern, suchen, markieren und durch die Bibliothek navigieren, ohne zur Maus zu greifen
• Jedes Wort in den bereits installierten macOS-Wörterbüchern nachschlagen
• Bis zu vier Bücher gleichzeitig öffnen, mit flexiblen Layouts
Lesen
• Seitenweise oder scrollend, mit eigenen Schriften, Themen, Abständen und Rändern
• Vertikaler Text für CJK-Bücher
• Kontrast und Bildaufbau für E-Ink-Displays abgestimmt
• Volltextsuche im Buch
Ihre Bibliothek
• EPUB, PDF, MOBI, AZW3, FB2, CBZ, TXT und Markdown öffnen
• OPDS-Kataloge und öffentliche Bibliotheken durchsuchen und Bücher herunterladen
• Mit Calibre oder Calibre-Web verbinden, samt Covern und Metadaten
• Mit umbenennbaren Bücherregal-Gruppen ordnen
Notizen
• Markierungen, Lesezeichen und strukturierte Notizen
• Eine Markierung samt Deep Link zurück zur Textstelle kopieren
• Anmerkungen exportieren
Zuhören und Sprachen
• Sprachausgabe mit herunterladbaren Offline-Stimmen
• Einen Satz, eine Seite oder ein ganzes Buch übersetzen
• Wikipedia und Wörterbuch nachschlagen, ohne die Seite zu verlassen
Synchronisierung
• Readest Cloud oder Ihr eigener Speicher: iCloud, Google Drive, OneDrive, WebDAV, S3
• KOReader-Sync hält Ihren Lesefortschritt mit Ihrem E-Reader auf demselben Stand
• Mac, iPhone, iPad, alle anderen Plattformen und das Web
Readest ist Open Source.
Support: support@readest.com
Datenschutzerklärung: https://readest.com/privacy-policy
Nutzungsbedingungen: https://www.apple.com/legal/internet-services/itunes/dev/stdeula/

View file

@ -0,0 +1 @@
ebook,bücher,lesen,mobi,azw3,bibliothek,notizen,übersetzen,wörterbuch,mac,calibre,opds,koreader

View file

@ -0,0 +1 @@
../../metadata/en-US/marketing_url.txt

View file

@ -0,0 +1 @@
../../metadata/de-DE/name.txt

View file

@ -0,0 +1 @@
../../metadata/en-US/privacy_url.txt

View file

@ -0,0 +1 @@
../../metadata/de-DE/subtitle.txt

View file

@ -0,0 +1 @@
../../metadata/en-US/support_url.txt

View file

@ -0,0 +1,42 @@
Readest es un lector de ebooks para quienes leen mucho y quieren tener sus libros, notas y posición de lectura en el dispositivo que tengan más cerca.
En el Mac tienes espacio de sobra. Abre varios libros, cada uno en su ventana, mantén a la vista el texto y tus notas al mismo tiempo y controla todo desde el teclado.
Hecho para el Mac
• Abre libros en ventanas separadas y colócalos uno junto a otro
• Pasa páginas, busca, anota y recorre tu biblioteca sin tocar el ratón
• Consulta cualquier palabra en los diccionarios de macOS que ya tienes instalados
• Abre hasta cuatro libros a la vez con diseños flexibles
Lectura
• Paginado o con desplazamiento, con fuentes, temas, espaciado y márgenes personalizados
• Texto vertical para libros CJK
• Contraste y actualización ajustados para pantallas de tinta electrónica
• Búsqueda de texto completo dentro de un libro
Tu biblioteca
• Abre EPUB, PDF, MOBI, AZW3, FB2, CBZ, TXT y Markdown
• Explora, busca y descarga de catálogos OPDS y bibliotecas públicas
• Conéctate a Calibre o Calibre-Web, con portadas y metadatos incluidos
• Organiza con grupos de estanterías que puedes renombrar
Notas
• Resaltados, marcadores y notas estructuradas
• Copia un resaltado junto con un enlace directo al pasaje
• Exporta tus anotaciones
Escucha e idiomas
• Texto a voz con voces descargables sin conexión
• Traduce una frase, una página o un libro entero
• Consulta Wikipedia y el diccionario sin salir de la página
Sincronización
• Readest Cloud, o tu propio almacenamiento: iCloud, Google Drive, OneDrive, WebDAV, S3
• La sincronización con KOReader mantiene tu progreso al día con tu lector de libros electrónicos
• Mac, iPhone, iPad, todas las demás plataformas y la web
Readest es de código abierto.
Soporte: support@readest.com
Política de privacidad: https://readest.com/privacy-policy
Términos del servicio: https://www.apple.com/legal/internet-services/itunes/dev/stdeula/

View file

@ -0,0 +1 @@
ebook,leer,libro,mobi,azw3,biblioteca,resaltar,traducir,diccionario,mac,calibre,opds,koreader

View file

@ -0,0 +1 @@
../../metadata/en-US/marketing_url.txt

View file

@ -0,0 +1 @@
../../metadata/es-ES/name.txt

View file

@ -0,0 +1 @@
../../metadata/en-US/privacy_url.txt

View file

@ -0,0 +1 @@
../../metadata/es-ES/subtitle.txt

View file

@ -0,0 +1 @@
../../metadata/en-US/support_url.txt

View file

@ -0,0 +1 @@
../es-ES/description.txt

View file

@ -0,0 +1 @@
../es-ES/keywords.txt

View file

@ -0,0 +1 @@
../es-ES/marketing_url.txt

View file

@ -0,0 +1 @@
../es-ES/name.txt

View file

@ -0,0 +1 @@
../es-ES/privacy_url.txt

View file

@ -0,0 +1 @@
../es-ES/subtitle.txt

View file

@ -0,0 +1 @@
../es-ES/support_url.txt

View file

@ -0,0 +1,42 @@
Readest est un lecteur d'ebooks pour celles et ceux qui lisent beaucoup et veulent retrouver leurs livres, leurs notes et leur position de lecture sur l'appareil le plus proche.
Sur Mac, vous avez de la place. Ouvrez plusieurs livres dans leurs propres fenêtres, gardez le texte et vos notes sous les yeux en même temps et pilotez le tout au clavier.
Conçu pour Mac
• Ouvrez des livres dans des fenêtres séparées et placez-les côte à côte
• Tournez les pages, cherchez, annotez et parcourez votre bibliothèque sans toucher à la souris
• Cherchez n'importe quel mot dans les dictionnaires macOS déjà installés
• Ouvrez jusqu'à quatre livres à la fois avec des dispositions flexibles
Lecture
• Mode paginé ou défilement, avec polices, thèmes, espacements et marges personnalisés
• Texte vertical pour les livres CJK
• Contraste et rafraîchissement adaptés aux écrans e-ink
• Recherche plein texte dans un livre
Votre bibliothèque
• Ouvrez EPUB, PDF, MOBI, AZW3, FB2, CBZ, TXT et Markdown
• Parcourez, cherchez et téléchargez depuis des catalogues OPDS et des bibliothèques publiques
• Connectez-vous à Calibre ou Calibre-Web, couvertures et métadonnées comprises
• Rangez vos livres dans des groupes d'étagères renommables
Notes
• Surlignages, signets et notes structurées
• Copiez un surlignage avec un lien direct vers le passage
• Exportez vos annotations
Écoute et langues
• Synthèse vocale avec des voix hors ligne téléchargeables
• Traduisez une phrase, une page ou un livre entier
• Consultez Wikipédia et le dictionnaire sans quitter la page
Synchronisation
• Readest Cloud, ou votre propre stockage : iCloud, Google Drive, OneDrive, WebDAV, S3
• La synchro KOReader garde votre progression alignée avec votre liseuse
• Mac, iPhone, iPad, toutes les autres plateformes et le Web
Readest est open source.
Assistance : support@readest.com
Politique de confidentialité : https://readest.com/privacy-policy
Conditions d'utilisation : https://www.apple.com/legal/internet-services/itunes/dev/stdeula/

View file

@ -0,0 +1 @@
livre,lire,numérique,mobi,azw3,bibliothèque,traduire,dictionnaire,notes,mac,calibre,opds,koreader

View file

@ -0,0 +1 @@
../../metadata/en-US/marketing_url.txt

View file

@ -0,0 +1 @@
../../metadata/fr-FR/name.txt

View file

@ -0,0 +1 @@
../../metadata/en-US/privacy_url.txt

View file

@ -0,0 +1 @@
../../metadata/fr-FR/subtitle.txt

View file

@ -0,0 +1 @@
../../metadata/en-US/support_url.txt

View file

@ -0,0 +1,42 @@
Readest は、たくさん本を読む人のための電子書籍リーダーです。本もメモも読みかけの位置も、いちばん近くにあるデバイスでそのまま続きから。
Mac なら広い画面を存分に使えます。何冊もの本をそれぞれのウインドウで開き、本文とメモを同時に表示して、すべてをキーボードで操作できます。
Mac のために
• 本を別々のウインドウで開いて横に並べられます
• ページめくり、検索、書き込み、ライブラリの移動まで、マウスに手を伸ばさずに操作できます
• インストール済みの macOS の辞書でどんな単語も調べられます
• 最大 4 冊を同時に開き、レイアウトを自由に変えられます
読書
• ページめくりまたはスクロール。フォント、テーマ、間隔、余白を自由に設定
• CJK の本の縦書きに対応
• 電子ペーパー向けに調整したコントラストとリフレッシュ
• 本の中の全文検索
ライブラリ
• EPUB、PDF、MOBI、AZW3、FB2、CBZ、TXT、Markdown を開けます
• OPDS カタログや公共図書館から本を閲覧、検索、ダウンロード
• Calibre や Calibre-Web に接続。表紙とメタデータも一緒に
• 名前を変えられる本棚グループで整理
メモ
• ハイライト、ブックマーク、構造化されたメモ
• ハイライトを、その箇所に戻れるディープリンク付きでコピー
• 注釈をエクスポート
読み上げと言語
• ダウンロードできるオフライン音声でテキストを読み上げ
• 一文、1 ページ、本まるごと 1 冊を翻訳
• ページを離れずに Wikipedia と辞書を検索
同期
• Readest Cloud のほか、iCloud、Google Drive、OneDrive、WebDAV、S3 も利用可能
• KOReader 同期で電子書籍リーダー端末と読書位置をそろえられます
• Mac、iPhone、iPad、その他すべてのプラットフォームと Web
Readest はオープンソースです。
サポート:support@readest.com
プライバシーポリシー:https://readest.com/privacy-policy
利用規約:https://www.apple.com/legal/internet-services/itunes/dev/stdeula/

Some files were not shown because too many files have changed in this diff Show more