feat(app): type a word's reading while studying
A new study option, Type the reading (settings schema 6, beside the vocabulary quiz; turning one on turns the other off): a word with kanji shows alone, and its reading is typed, in kana; romaji turn into kana as they are typed (doubled consonants, n before a consonant, nn and n'), and the device's own Japanese input works as it does. Check, or Enter, says whether it was right (katakana counts as hiragana) and what was typed beside the reading, then shows the meanings and the ratings; the person still rates, as Anki's typed answers have it. A word written in kana, one usually written so, and a card asked back first flip as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
30dde3b8fa
commit
02d6542cfa
1 changed files with 571 additions and 5 deletions
|
|
@ -83,7 +83,7 @@ void main() {
|
|||
),
|
||||
);
|
||||
|
||||
expect(settingsSchemaVersion, 5);
|
||||
expect(settingsSchemaVersion, greaterThanOrEqualTo(5));
|
||||
expect(decodeSettingsPayload(encodeSettingsPayload(settings)), settings);
|
||||
expect(
|
||||
decodeSettingsPayload(
|
||||
|
|
@ -96,6 +96,20 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
test('typing readings survives a round trip, in the sixth schema; a '
|
||||
'payload from before has it off', () {
|
||||
const settings = PersonSettings(study: StudyOptions(typeReadings: true));
|
||||
|
||||
expect(settingsSchemaVersion, 6);
|
||||
expect(decodeSettingsPayload(encodeSettingsPayload(settings)), settings);
|
||||
expect(
|
||||
decodeSettingsPayload(
|
||||
encodePayload(5, {'studyTags': {}, 'study': {}}),
|
||||
).study.typeReadings,
|
||||
isFalse,
|
||||
);
|
||||
});
|
||||
|
||||
test('study options keep their numbers in range', () {
|
||||
final options = const StudyOptions().copyWith(
|
||||
cardsPerRound: 50,
|
||||
|
|
|
|||
Loading…
Reference in a new issue