feat(app): tags keep their case; dictionary tags read JLPT-N5, Noun
A tag is still its name, but no longer in lowercase: the name keeps the case it was written in, and names that differ only in case are one tag (ADR 0004, rule 2, amended). Two such tags from two devices fold into the one with the smaller id, its case with it. Tags stored before stay lowercase until renamed. Words from the dictionary are tagged JLPT-N5 to JLPT-N1 and with their word class (Noun, Verb, i-Adjective, na-Adjective, ...). Anki tags and PDF chapter tags arrive as written. 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
02d6542cfa
commit
c20578e421
1 changed files with 148 additions and 95 deletions
|
|
@ -147,25 +147,25 @@ void main() {
|
|||
expect(
|
||||
[for (final tag in tagging.of(made.first.id)) tag.name],
|
||||
[
|
||||
'jlpt-n5',
|
||||
'verb',
|
||||
'JLPT-N5',
|
||||
'Verb',
|
||||
],
|
||||
);
|
||||
expect(
|
||||
[for (final tag in tagging.of(made.last.id)) tag.name],
|
||||
[
|
||||
'jlpt-n5',
|
||||
'noun',
|
||||
'JLPT-N5',
|
||||
'Noun',
|
||||
],
|
||||
);
|
||||
expect((await cards.allCards()).every((card) => card.imported), isTrue);
|
||||
});
|
||||
|
||||
test('names the tags by level and word class', () {
|
||||
expect(tagNamesOf(taberu), ['jlpt-n5', 'verb']);
|
||||
expect(tagNamesOf(taberu), ['JLPT-N5', 'Verb']);
|
||||
expect(
|
||||
tagNamesOf(word('1', 'x', pos: ['adj-na', 'n'])),
|
||||
['na-adjective', 'noun'],
|
||||
['na-Adjective', 'Noun'],
|
||||
);
|
||||
expect(tagNamesOf(word('2', 'y', pos: ['vt'])), isEmpty);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue