diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e48c9d78..7c515ffc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,8 @@ name: Lint and Test Code on: pull_request: branches: [master] + push: + branches: [master] jobs: lint_and_test_code: diff --git a/codecov.yml b/codecov.yml index f914a096..2389633a 100644 --- a/codecov.yml +++ b/codecov.yml @@ -3,10 +3,9 @@ coverage: round: down precision: 2 status: - project: off + project: true patch: default: target: 100 threshold: 0.0 only_pulls: true - changes: off diff --git a/src/algorithms/osr/note-scheduling.ts b/src/algorithms/osr/note-scheduling.ts index aa0146a9..3272ffb7 100644 --- a/src/algorithms/osr/note-scheduling.ts +++ b/src/algorithms/osr/note-scheduling.ts @@ -13,7 +13,7 @@ export function osrSchedule( originalInterval: number, ease: number, delayedBeforeReview: number, - settingsObj: SRSettings, + settings: SRSettings, dueDateHistogram?: DueDateHistogram, ): Record { const delayedBeforeReviewDays = Math.max(0, Math.floor(delayedBeforeReview / TICKS_PER_DAY)); @@ -22,19 +22,19 @@ export function osrSchedule( if (response === ReviewResponse.Easy) { ease += 20; interval = ((interval + delayedBeforeReviewDays) * ease) / 100; - interval *= settingsObj.easyBonus; + interval *= settings.easyBonus; } else if (response === ReviewResponse.Good) { interval = ((interval + delayedBeforeReviewDays / 2) * ease) / 100; } else if (response === ReviewResponse.Hard) { ease = Math.max(130, ease - 20); interval = Math.max( 1, - (interval + delayedBeforeReviewDays / 4) * settingsObj.lapsesIntervalChange, + (interval + delayedBeforeReviewDays / 4) * settings.lapsesIntervalChange, ); } // replaces random fuzz with load balancing over the fuzz interval - if (dueDateHistogram !== undefined) { + if (settings.loadBalance && dueDateHistogram !== undefined) { interval = Math.round(interval); // disable fuzzing for small intervals if (interval > 4) { @@ -48,7 +48,7 @@ export function osrSchedule( } } - interval = Math.min(interval, settingsObj.maximumInterval); + interval = Math.min(interval, settings.maximumInterval); interval = Math.round(interval * 10) / 10; return { interval, ease }; diff --git a/src/gui/flashcard-review-view.tsx b/src/gui/flashcard-review-view.tsx index 59b3e61b..a9335b06 100644 --- a/src/gui/flashcard-review-view.tsx +++ b/src/gui/flashcard-review-view.tsx @@ -586,10 +586,14 @@ export class FlashcardReviewView { ); const interval: number = schedule.interval; - if (Platform.isMobile) { - button.setText(textInterval(interval, true)); + if (this.settings.showIntervalInReviewButtons) { + if (Platform.isMobile) { + button.setText(textInterval(interval, true)); + } else { + button.setText(`${buttonName} - ${textInterval(interval, false)}`); + } } else { - button.setText(`${buttonName} - ${textInterval(interval, false)}`); + button.setText(buttonName); } } } diff --git a/src/gui/settings.tsx b/src/gui/settings.tsx index d318b2cc..83de664d 100644 --- a/src/gui/settings.tsx +++ b/src/gui/settings.tsx @@ -615,6 +615,18 @@ export class SRSettingTab extends PluginSettingTab { }), ); + new Setting(containerEl) + .setName(t("SHOW_INTERVAL_IN_REVIEW_BUTTONS")) + .setDesc(t("SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC")) + .addToggle((toggle) => + toggle + .setValue(this.plugin.data.settings.showIntervalInReviewButtons) + .onChange(async (value) => { + this.plugin.data.settings.showIntervalInReviewButtons = value; + await this.plugin.savePluginData(); + }), + ); + new Setting(containerEl) .setName(t("CARD_MODAL_HEIGHT_PERCENT")) .setDesc(t("CARD_MODAL_SIZE_PERCENT_DESC")) @@ -886,6 +898,16 @@ export class SRSettingTab extends PluginSettingTab { }); }); + new Setting(containerEl) + .setName(t("LOAD_BALANCE")) + .setDesc(t("LOAD_BALANCE_DESC")) + .addToggle((toggle) => + toggle.setValue(this.plugin.data.settings.loadBalance).onChange(async (value) => { + this.plugin.data.settings.loadBalance = value; + await this.plugin.savePluginData(); + }), + ); + new Setting(containerEl) .setName(t("MAX_INTERVAL")) .setDesc(t("MAX_INTERVAL_DESC")) diff --git a/src/lang/locale/ar.ts b/src/lang/locale/ar.ts index 35d896e7..cf911e3f 100644 --- a/src/lang/locale/ar.ts +++ b/src/lang/locale/ar.ts @@ -93,6 +93,9 @@ export default { "cloze deletions : البطاقات الشقيقة هي بطاقات تم إنشاؤها من نفس نص البطاقة كـ", SHOW_CARD_CONTEXT: "إظهار السياق في البطاقات؟", SHOW_CARD_CONTEXT_DESC: "i.e. Title > Heading 1 > Subheading > ... > Subheading", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "نسبة ارتفاع البطاقة", CARD_MODAL_SIZE_PERCENT_DESC: "يجب ضبطها على 100 ٪ على الهاتف المحمول أو إذا كان لديك صور كبيرة جدًا", @@ -112,9 +115,9 @@ export default { "Randomly (once all cards in previous deck reviewed)", REVIEW_DECK_ORDER_RANDOM_DECK_AND_CARD: "Random card from random deck", DISABLE_CLOZE_CARDS: "؟cloze تعطيل بطاقات", - CONVERT_HIGHLIGHTS_TO_CLOZES: "Convert ==highlights== to clozes?", - CONVERT_BOLD_TEXT_TO_CLOZES: "Convert **bolded text** to clozes?", - CONVERT_CURLY_BRACKETS_TO_CLOZES: "Convert {{curly brackets}} to clozes?", + CONVERT_HIGHLIGHTS_TO_CLOZES: "Convert ==highlights== to clozes", + CONVERT_BOLD_TEXT_TO_CLOZES: "Convert **bolded text** to clozes", + CONVERT_CURLY_BRACKETS_TO_CLOZES: "Convert {{curly brackets}} to clozes", CLOZE_PATTERNS: "Cloze Patterns", CLOZE_PATTERNS_DESC: 'Enter cloze patterns separated by newlines. Check the wiki for guidance.', @@ -161,6 +164,10 @@ export default { EASY_BONUS_DESC: "تتيح لك المكافأة السهلة ضبط الفرق في الفواصل الزمنية بين الرد الجيد والسهل على بطاقة/ملاحظة (الحد الأدنى = 100 ٪).", EASY_BONUS_MIN_WARNING: "يجب أن تكون المكافأة السهلة 100 على الأقل.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maximum interval in days", MAX_INTERVAL_DESC: "يتيح لك وضع حد أعلى للفاصل الزمني (افتراضي = 100 عام).", MAX_INTERVAL_MIN_WARNING: "يجب أن يكون الحد الأقصى للفاصل الزمني لمدة يوم واحد على الأقل.", diff --git a/src/lang/locale/cz.ts b/src/lang/locale/cz.ts index 7a86ede1..306d4f17 100644 --- a/src/lang/locale/cz.ts +++ b/src/lang/locale/cz.ts @@ -96,6 +96,9 @@ export default { "Příbuzné kartičky jsou kartičky generované z textu stejné poznámky například cloze smazání", SHOW_CARD_CONTEXT: "Ukázat kontext v kartičce?", SHOW_CARD_CONTEXT_DESC: "například Titulek > Nadpis1 > Podnadpis > ... > Podnadpis", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Výška kartiček v procentech", CARD_MODAL_SIZE_PERCENT_DESC: "Mělo by být nastaveno na 100% na mobilu nebo když používáte velké obrázky", @@ -165,6 +168,10 @@ export default { EASY_BONUS_DESC: "Tento bonus umožňuje nastavit rozdíl intervalu mezi jednoduchými a dobrými kartičkami/poznámkami (minimum = 100%).", EASY_BONUS_MIN_WARNING: "Bonus pro jednoduchost musí být minimálně 100.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maximum interval in days", MAX_INTERVAL_DESC: "Umožňuje nastavit horní limit pro interval (defaultně = 100 let).", MAX_INTERVAL_MIN_WARNING: "Maximální interval musí být alespoň 1 den.", diff --git a/src/lang/locale/de.ts b/src/lang/locale/de.ts index 73bcd2fc..a0b20a9d 100644 --- a/src/lang/locale/de.ts +++ b/src/lang/locale/de.ts @@ -103,6 +103,9 @@ export default { "Verwandte Karten sind aus der gleichen Karte generiert worden (z.B. Lückentextkarten oder beidseitige Karten).", SHOW_CARD_CONTEXT: "Kontext in den Karten anzeigen?", SHOW_CARD_CONTEXT_DESC: "Bsp. Titel > Überschrift 1 > Sektion > ... > Untersektion", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Höhe der Lernkartei in Prozent", CARD_MODAL_SIZE_PERCENT_DESC: "Auf kleinen Bildschirmen (z.B. Smartphones) oder bei sehr grossen Bildern sollte dieser Wert auf 100% gesetzt werden.", @@ -183,6 +186,10 @@ export default { EASY_BONUS_DESC: "Der Einfachheit-Bonus gibt an um welchen Faktor (in Prozent) das Intervall länger sein soll, wenn eine Notiz / Karte 'Einfach' statt 'Gut' abgeschlossen wird. Minimum ist 100%.", EASY_BONUS_MIN_WARNING: "Der Einfachheit-Bonus muss mindestens 100 sein.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maximale Intervall in Tagen", MAX_INTERVAL_DESC: "Das maximale Intervall (in Tagen) für Wiederholungen. Standard sind 100 Jahre.", diff --git a/src/lang/locale/en.ts b/src/lang/locale/en.ts index efac8335..24a2d148 100644 --- a/src/lang/locale/en.ts +++ b/src/lang/locale/en.ts @@ -85,17 +85,20 @@ export default { FLASHCARD_TAGS: "Flashcard tags", FLASHCARD_TAGS_DESC: "Enter tags separated by spaces or newlines i.e. #flashcards #deck2 #deck3.", - CONVERT_FOLDERS_TO_DECKS: "Convert folders to decks and subdecks?", + CONVERT_FOLDERS_TO_DECKS: "Convert folders to decks and subdecks", CONVERT_FOLDERS_TO_DECKS_DESC: "This is an alternative to the Flashcard tags option above.", INLINE_SCHEDULING_COMMENTS: "Save scheduling comment on the same line as the flashcard's last line?", INLINE_SCHEDULING_COMMENTS_DESC: "Turning this on will make the HTML comments not break list formatting.", - BURY_SIBLINGS_TILL_NEXT_DAY: "Bury sibling cards until the next day?", + BURY_SIBLINGS_TILL_NEXT_DAY: "Bury sibling cards until the next day", BURY_SIBLINGS_TILL_NEXT_DAY_DESC: "Siblings are cards generated from the same card text i.e. cloze deletions", - SHOW_CARD_CONTEXT: "Show context in cards?", + SHOW_CARD_CONTEXT: "Show context in cards", SHOW_CARD_CONTEXT_DESC: "i.e. Title > Heading 1 > Subheading > ... > Subheading", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Flashcard Height Percentage", CARD_MODAL_SIZE_PERCENT_DESC: "Should be set to 100% on mobile or if you have very large images", @@ -115,9 +118,9 @@ export default { "Randomly (once all cards in previous deck reviewed)", REVIEW_DECK_ORDER_RANDOM_DECK_AND_CARD: "Random card from random deck", DISABLE_CLOZE_CARDS: "Disable cloze cards?", - CONVERT_HIGHLIGHTS_TO_CLOZES: "Convert ==highlights== to clozes?", - CONVERT_BOLD_TEXT_TO_CLOZES: "Convert **bolded text** to clozes?", - CONVERT_CURLY_BRACKETS_TO_CLOZES: "Convert {{curly brackets}} to clozes?", + CONVERT_HIGHLIGHTS_TO_CLOZES: "Convert ==highlights== to clozes", + CONVERT_BOLD_TEXT_TO_CLOZES: "Convert **bolded text** to clozes", + CONVERT_CURLY_BRACKETS_TO_CLOZES: "Convert {{curly brackets}} to clozes", CLOZE_PATTERNS: "Cloze Patterns", CLOZE_PATTERNS_DESC: 'Enter cloze patterns separated by newlines. Check the wiki for guidance.', @@ -164,6 +167,10 @@ export default { EASY_BONUS_DESC: "The easy bonus allows you to set the difference in intervals between answering Good and Easy on a flashcard/note (minimum = 100%).", EASY_BONUS_MIN_WARNING: "The easy bonus must be at least 100.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maximum interval in days", MAX_INTERVAL_DESC: "Allows you to place an upper limit on the interval (default = 100 years).", MAX_INTERVAL_MIN_WARNING: "The maximum interval must be at least 1 day.", diff --git a/src/lang/locale/es.ts b/src/lang/locale/es.ts index 1e9ac189..94abda3a 100644 --- a/src/lang/locale/es.ts +++ b/src/lang/locale/es.ts @@ -97,6 +97,9 @@ export default { "Los hermanos son tarjetas generadas del mismo texto de la tarjeta, por ejemplo, deletreos de huecos (cloze deletions en inglés)", SHOW_CARD_CONTEXT: "¿Mostrar contexto en las tarjetas?", SHOW_CARD_CONTEXT_DESC: "Por Ejemplo: Título > Cabecera > Sub-Cabecera > ... > Sub-Cabecera", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Porcentaje de la altura de las tarjetas de memoria", CARD_MODAL_SIZE_PERCENT_DESC: "Debería ser establecido en 100% si tienes imágenes grandes", RESET_DEFAULT: "Reiniciar a la configuración por defecto", @@ -170,6 +173,10 @@ export default { EASY_BONUS_DESC: "La bonificación para Fácil te permite establecer la diferencia entre intervalos al responder Bien y Fácil en las tarjetas o notas (mínimo = 100%).", EASY_BONUS_MIN_WARNING: "El bono de facilidad debe ser al menos 100.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Intervalo máximo en días", MAX_INTERVAL_DESC: "Te permite establecer un límite mayor en el intervalo (por defecto es de 100 años).", diff --git a/src/lang/locale/fr.ts b/src/lang/locale/fr.ts index d3c85d92..808d6375 100644 --- a/src/lang/locale/fr.ts +++ b/src/lang/locale/fr.ts @@ -98,6 +98,9 @@ export default { "Les cartes sœurs sont les cartes générées depuis le même texte, par exemple pour les textes à trous", SHOW_CARD_CONTEXT: "Montrer le contexte dans les cartes ?", SHOW_CARD_CONTEXT_DESC: "ex. Titre de la note > Titre 1 > Sous-titre > ... > Sous-titre", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Pourcentage de hauteur de la flashcard", CARD_MODAL_SIZE_PERCENT_DESC: "Devrait être 100% sur mobile ou en cas de grandes images", RESET_DEFAULT: "Réinitialiser les paramètres", @@ -170,6 +173,10 @@ export default { EASY_BONUS_DESC: "Le bonus Facile vous permet d'augmenter l'intervalle entre une réponse Correct et une réponse Facile sur une flashcard/note (minimum = 100%).", EASY_BONUS_MIN_WARNING: "Le bonus Facile doit être au moins 100.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Intervalle maximum (en jours)", MAX_INTERVAL_DESC: "Vous permet de mettre une limite maximale sur l'intervalle (par défaut, 100 ans).", diff --git a/src/lang/locale/it.ts b/src/lang/locale/it.ts index 82660161..b81d3dbd 100644 --- a/src/lang/locale/it.ts +++ b/src/lang/locale/it.ts @@ -99,6 +99,9 @@ export default { SHOW_CARD_CONTEXT: "Mostrare contesto nelle schede?", SHOW_CARD_CONTEXT_DESC: "per esempio, Titolo > Intestazione 1 > Sottotitolo 1 > ... > Sottotitolo", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Percentuale altezza schede", CARD_MODAL_SIZE_PERCENT_DESC: "Dovrebbe essere 100% se sei su telefono o se hai immagini molto grandi", @@ -173,6 +176,10 @@ export default { EASY_BONUS_DESC: "Il bonus facilità ti permette di impostare le differenze negli intervalli tra il rispondere Buono e Facile su una scheda o nota (minimo 100%).", EASY_BONUS_MIN_WARNING: "Il bonus facilità deve essere di almeno 100.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Intervallo massimo in giorni", MAX_INTERVAL_DESC: "Ti permette di mettere un limite massimo all'intervallo (default 100 anni).", diff --git a/src/lang/locale/ja.ts b/src/lang/locale/ja.ts index 39320aec..85ecf02f 100644 --- a/src/lang/locale/ja.ts +++ b/src/lang/locale/ja.ts @@ -99,6 +99,9 @@ export default { SHOW_CARD_CONTEXT: "カードにコンテキストを表示しますか?", SHOW_CARD_CONTEXT_DESC: "「タイトル > 見出し 1 > 副見出し > ... > 副見出し」の表示を行うかどうかを決めます。", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "フラッシュカードの縦サイズのパーセンテージ", CARD_MODAL_SIZE_PERCENT_DESC: "モバイル版、または非常に大きなサイズの画像がある場合には100%にする必要があります。", @@ -169,6 +172,10 @@ export default { EASY_BONUS_DESC: "Easyボーナスによってフラッシュカード/ノートにおける間隔の差分を設定できます(最小値 = 100%)。", EASY_BONUS_MIN_WARNING: "Easyボーナスには100以上の数字を指定してください。", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maximum interval in days", MAX_INTERVAL_DESC: "間隔に上限値を設定することができます(デフォルト値 = 100年)。", MAX_INTERVAL_MIN_WARNING: "間隔の最大値には1以上の数字を指定してください。", diff --git a/src/lang/locale/ko.ts b/src/lang/locale/ko.ts index 56348107..7bf716eb 100644 --- a/src/lang/locale/ko.ts +++ b/src/lang/locale/ko.ts @@ -97,6 +97,9 @@ export default { SHOW_CARD_CONTEXT: "카드의 문맥(context)을 표시하시겠습니까?", SHOW_CARD_CONTEXT_DESC: "카드에서 'Title > Heading 1 > Subheading > ... > Subheading' 의 표시를 할지 설정합니다.", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "플래시카드 높이 비율", CARD_MODAL_SIZE_PERCENT_DESC: "모바일 버전 혹은 매우 큰 이미지가 있는 경우 100%로 설정해야 합니다.", @@ -166,6 +169,10 @@ export default { EASY_BONUS_DESC: "쉬움(Easy) 보너스는 플래시카드/노트에서 좋음(Good)과 쉬움(Easy) 사이의 간격 차이를 설정할 수 있습니다. (최소 = 100%)", EASY_BONUS_MIN_WARNING: "쉬움(Easy) 보너스는 적어도 100이어야 합니다.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maximum interval in days", MAX_INTERVAL_DESC: "간격의 상한선을 둘 수 있습니다. (기본값 = 100년)", MAX_INTERVAL_MIN_WARNING: "최대 간격은 적어도 1일이어야 합니다.", diff --git a/src/lang/locale/pl.ts b/src/lang/locale/pl.ts index c636299c..c0ad4a91 100644 --- a/src/lang/locale/pl.ts +++ b/src/lang/locale/pl.ts @@ -96,6 +96,9 @@ export default { "Rodzeństwo to karty wygenerowane z tego samego tekstu karty, np. usunięcia zamaskowane", SHOW_CARD_CONTEXT: "Czy pokazywać kontekst na kartach?", SHOW_CARD_CONTEXT_DESC: "np. Tytuł > Nagłówek 1 > Podnagłówek > ... > Podnagłówek", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Procentowa wysokość fiszki", CARD_MODAL_SIZE_PERCENT_DESC: "Powinno być ustawione na 100% na urządzeniach mobilnych lub gdy masz bardzo duże obrazy", @@ -170,6 +173,10 @@ export default { EASY_BONUS_DESC: "Bonus za łatwe pozwala ustawić różnicę w interwałach między odpowiedziami Średnio trudne i Łatwe na fiszce/notatce (minimum = 100%).", EASY_BONUS_MIN_WARNING: "Bonus za łatwe musi wynosić co najmniej 100.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maksymalny interwał w dniach", MAX_INTERVAL_DESC: "Pozwala na ustawienie górnego limitu interwału (domyślnie = 100 lat).", MAX_INTERVAL_MIN_WARNING: "Maksymalny interwał musi wynosić co najmniej 1 dzień.", diff --git a/src/lang/locale/pt-br.ts b/src/lang/locale/pt-br.ts index ccfbea1c..1c218b14 100644 --- a/src/lang/locale/pt-br.ts +++ b/src/lang/locale/pt-br.ts @@ -99,6 +99,9 @@ export default { "Cartas irmãs são geradas pelo texto da mesma carta ex: omissão de palavras", SHOW_CARD_CONTEXT: "Mostrar contexto nas cartas?", SHOW_CARD_CONTEXT_DESC: "ex: Título > Cabeçalho 1 > Subcabeçalho > ... > Subcabeçalho", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Porcentagem da Altura do Flashcard", CARD_MODAL_SIZE_PERCENT_DESC: "Deveria estar configurado em 100% em dispositivos móveis ou se você tem imagens muito grandes", @@ -171,6 +174,10 @@ export default { EASY_BONUS_DESC: "O bônus de fácil te permite mudar a diferência entre intervalos de responder OK e Fácil em um(a) flashcard/nota (mínimo = 100%).", EASY_BONUS_MIN_WARNING: "O bônus de fácil deve ser pelo menos 100.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Intervalo máximo em dias", MAX_INTERVAL_DESC: "Te permite colocar um limite máximo no intervalo (pré-definição = 100 anos).", diff --git a/src/lang/locale/ru.ts b/src/lang/locale/ru.ts index 78a4160a..bf90ccd9 100644 --- a/src/lang/locale/ru.ts +++ b/src/lang/locale/ru.ts @@ -104,6 +104,9 @@ export default { "Родственные карточки - те, которые образованы из одного текста, пример: карточки с пропусками ([...])", SHOW_CARD_CONTEXT: "Показывать контекст (уровень) в карточках (во время повторения)?", SHOW_CARD_CONTEXT_DESC: "пример: Title > Heading 1 > Subheading > ... > Subheading", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Высота карточки в процентах", CARD_MODAL_SIZE_PERCENT_DESC: "Если пользуетесь мобильным телефоном, выставьте 100%. Иначе у вас будут огромные изображения", @@ -178,6 +181,10 @@ export default { EASY_BONUS_DESC: "Бонус за Легко позволяет вам установить разницу в промежутках между ответами Хорошо и Легко на карточке/заметке (мин. = 100%).", EASY_BONUS_MIN_WARNING: 'Бонус за "Легко" должен быть не меньше 100.', + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Максимальный интервал повторения в днях", MAX_INTERVAL_DESC: "Позволяет вам устанавливать верхнюю границу на интервал повторения (по умолчанию = 100 лет).", diff --git a/src/lang/locale/tr.ts b/src/lang/locale/tr.ts index 14c6b54b..10258a4d 100644 --- a/src/lang/locale/tr.ts +++ b/src/lang/locale/tr.ts @@ -96,6 +96,9 @@ export default { "Kardeş kartlar, aynı kart metninden üretilen kartlardır (örneğin gizlemeler).", SHOW_CARD_CONTEXT: "Kartlarda bağlamı göster?", SHOW_CARD_CONTEXT_DESC: "Örneğin: Başlık > Başlık 1 > Alt Başlık > ... > Alt Başlık", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "Flash Kart Yükseklik Yüzdesi", CARD_MODAL_SIZE_PERCENT_DESC: "Mobilde veya çok büyük resimleriniz varsa %100 olarak ayarlayın.", @@ -167,6 +170,10 @@ export default { EASY_BONUS_DESC: "Kolaylık bonusu, bir flash kartı/notu İyi ve Kolay yanıtladığınızda aralıklardaki farkı ayarlamanıza olanak tanır (minimum = %100).", EASY_BONUS_MIN_WARNING: "Kolaylık bonusu en az %100 olmalıdır.", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "Maksimum aralık (gün)", MAX_INTERVAL_DESC: "Aralığa bir üst sınır koymanıza olanak tanır (varsayılan = 100 yıl).", MAX_INTERVAL_MIN_WARNING: "Maksimum aralık en az 1 gün olmalıdır.", diff --git a/src/lang/locale/zh-cn.ts b/src/lang/locale/zh-cn.ts index a676b38b..386aafae 100644 --- a/src/lang/locale/zh-cn.ts +++ b/src/lang/locale/zh-cn.ts @@ -92,6 +92,9 @@ export default { BURY_SIBLINGS_TILL_NEXT_DAY_DESC: "关联卡片是来自同一卡片的不同形式, 例如:完形填空卡片", SHOW_CARD_CONTEXT: "在卡片中显示上下文?", SHOW_CARD_CONTEXT_DESC: "例如:标题 > 副标题 > 小标题 > ... > 小标题", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "卡片高度百分比", CARD_MODAL_SIZE_PERCENT_DESC: "请在移动端使用并需要浏览较大图片时设为100%", RESET_DEFAULT: "重置为默认", @@ -153,6 +156,10 @@ export default { EASY_BONUS: "简单奖励", EASY_BONUS_DESC: "简单奖励设定“记得”和“简单”卡片或笔记的复习间隔差距(最小值100%)。", EASY_BONUS_MIN_WARNING: "简单奖励至少为100。", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "最大间隔(天)", MAX_INTERVAL_DESC: "设定复习的最大间隔时间(默认值100年)。", MAX_INTERVAL_MIN_WARNING: "最大间隔至少为1天", diff --git a/src/lang/locale/zh-tw.ts b/src/lang/locale/zh-tw.ts index 5908e4d3..d4ddc8fa 100644 --- a/src/lang/locale/zh-tw.ts +++ b/src/lang/locale/zh-tw.ts @@ -92,6 +92,9 @@ export default { BURY_SIBLINGS_TILL_NEXT_DAY_DESC: "反轉卡片由同一卡片文字產生,例如:填空克漏字", SHOW_CARD_CONTEXT: "在卡片中顯示上下文?", SHOW_CARD_CONTEXT_DESC: "例如:標題 > 副標題 > 小標題 > ... > 小標題", + SHOW_INTERVAL_IN_REVIEW_BUTTONS: "Show next review time in the review buttons", + SHOW_INTERVAL_IN_REVIEW_BUTTONS_DESC: + "Useful to know how far in the future your cards are being pushed.", CARD_MODAL_HEIGHT_PERCENT: "卡片高度百分比", CARD_MODAL_SIZE_PERCENT_DESC: "在移動端或需要較大圖片時應設定為100%", RESET_DEFAULT: "重置為預設值", @@ -153,6 +156,10 @@ export default { EASY_BONUS: "簡單獎勵", EASY_BONUS_DESC: "簡單獎勵設定「記得」和「簡單」卡片或筆記的復習間隔差距(最小值100%)。", EASY_BONUS_MIN_WARNING: "簡單獎勵至少為100。", + LOAD_BALANCE: "Enable load balancer", + LOAD_BALANCE_DESC: `Slightly tweaks the interval so that the number of reviews per day is more consistent. + It's like Anki's fuzz but instead of being random, it picks the day with the least amount of reviews. + It's turned off for small intervals.`, MAX_INTERVAL: "最大間隔(天)", MAX_INTERVAL_DESC: "設定復習的最大間隔時間(預設值100年)。", MAX_INTERVAL_MIN_WARNING: "最大間隔至少為1天", diff --git a/src/settings.ts b/src/settings.ts index 9d0c7a96..a22ba4bd 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -7,16 +7,9 @@ import { pathMatchesPattern } from "src/utils/fs"; export interface SRSettings { // flashcards - flashcardEasyText: string; - flashcardGoodText: string; - flashcardHardText: string; - reviewButtonDelay: number; flashcardTags: string[]; convertFoldersToDecks: boolean; burySiblingCards: boolean; - showContextInCards: boolean; - flashcardHeightPercentage: number; - flashcardWidthPercentage: number; randomizeCardOrder: boolean; flashcardCardOrder: string; flashcardDeckOrder: string; @@ -44,12 +37,21 @@ export interface SRSettings { showRibbonIcon: boolean; showStatusBar: boolean; initiallyExpandAllSubdecksInTree: boolean; + showContextInCards: boolean; + showIntervalInReviewButtons: boolean; + flashcardHeightPercentage: number; + flashcardWidthPercentage: number; + flashcardEasyText: string; + flashcardGoodText: string; + flashcardHardText: string; + reviewButtonDelay: number; // algorithm algorithm: string; baseEase: number; lapsesIntervalChange: number; easyBonus: number; + loadBalance: boolean; maximumInterval: number; maxLinkFactor: number; @@ -64,16 +66,9 @@ export interface SRSettings { export const DEFAULT_SETTINGS: SRSettings = { // flashcards - flashcardEasyText: t("EASY"), - flashcardGoodText: t("GOOD"), - flashcardHardText: t("HARD"), - reviewButtonDelay: 0, flashcardTags: ["#flashcards"], convertFoldersToDecks: false, burySiblingCards: false, - showContextInCards: true, - flashcardHeightPercentage: Platform.isMobile ? 100 : 80, - flashcardWidthPercentage: Platform.isMobile ? 100 : 40, randomizeCardOrder: null, flashcardCardOrder: "DueFirstRandom", flashcardDeckOrder: "PrevDeckComplete_Sequential", @@ -101,12 +96,21 @@ export const DEFAULT_SETTINGS: SRSettings = { showRibbonIcon: true, showStatusBar: true, initiallyExpandAllSubdecksInTree: false, + showContextInCards: true, + showIntervalInReviewButtons: true, + flashcardHeightPercentage: Platform.isMobile ? 100 : 80, + flashcardWidthPercentage: Platform.isMobile ? 100 : 40, + flashcardEasyText: t("EASY"), + flashcardGoodText: t("GOOD"), + flashcardHardText: t("HARD"), + reviewButtonDelay: 0, // algorithm algorithm: Algorithm.SM_2_OSR, baseEase: 250, lapsesIntervalChange: 0.5, easyBonus: 1.3, + loadBalance: true, maximumInterval: 36525, maxLinkFactor: 1.0,