feat(app): the dictionary in the app: look words up, add them as cards

A studyset's dictionary follows from its language, as decided: the
instance's dictionary of its front's language, with meanings in its
back's (else English). Nothing to attach or detach; nothing of it shows
where there is none.

- Add material › From the dictionary: search a word (kanji, kana,
  romaji, meaning) and add it as a flashcard, or add a whole level
  (JLPT N5…N1, common words) at once, asked first above 500 words, its
  progress shown. Words already in the studyset show as such and are
  left out. Each card is a vocabulary card (headword, reading, senses
  with their codes), tagged `jlpt-n5` and with its word class, and
  marked as imported from the dictionary.
- Look up beside a vocabulary card's front fills the card with the word
  chosen, keeping its hints, explanation and tags.
- A card keeps the dictionary entry it was made from (card schema 6:
  `dictionary` {source, id}), to be found again and not added twice.
- The dictionary's credits show at its foot and in About, as its licence
  asks.

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:
Tizian 「ティツィアーン」 2026-10-09 01:33:12 +02:00
commit add1c76842
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1732,6 +1732,114 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get cardSenses => 'Senses';
@override
String get cardDictionaryEntry => 'Dictionary entry';
@override
String get studysetFromDictionary => 'From the dictionary';
@override
String get dictionaryTitle => 'Dictionary';
@override
String get dictionarySearchHint =>
'A word in kanji, kana or romaji, or a meaning';
@override
String dictionaryNothingFound(String query) {
return 'Nothing found for “$query”.';
}
@override
String get dictionaryUnreachable =>
'The dictionary can\'t be reached right now.';
@override
String get dictionaryRetry => 'Retry';
@override
String get dictionaryAdd => 'Add';
@override
String get dictionaryInStudyset => 'In this studyset';
@override
String dictionaryAdded(String word) {
return 'Added “$word”.';
}
@override
String get dictionaryLevels => 'Add a whole level';
@override
String get dictionaryLevelsHint =>
'Every word of a level becomes a flashcard, in the order of the level\'s list, tagged with its level and word class. Words already in this studyset are left out.';
@override
String get dictionaryLabelCommon => 'Common';
@override
String dictionaryAddLevel(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: 'Add $count words',
one: 'Add 1 word',
);
return '$_temp0';
}
@override
String dictionaryAddingLevel(int done, int count) {
return 'Adding… $done of $count';
}
@override
String dictionaryWordsAdded(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: 'Added $count words.',
one: 'Added 1 word.',
zero: 'No new words.',
);
return '$_temp0';
}
@override
String dictionaryWordsSkipped(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count were in this studyset already.',
one: '1 was in this studyset already.',
);
return '$_temp0';
}
@override
String dictionaryConfirmTitle(int count) {
return 'Add $count words?';
}
@override
String get dictionaryConfirmMessage =>
'Each becomes a flashcard in this studyset.';
@override
String get dictionaryConfirmAdd => 'Add';
@override
String dictionaryCredits(String sources) {
return 'Words from $sources.';
}
@override
String get dictionaryLookUp => 'Look up in the dictionary';
@override
String get aboutDictionaries => 'Dictionaries on this instance';
@override
String get cardReportTitle => 'Report an error';