feat(paths): path files carry tables, callouts and furigana, and several import at once

The import format gains the blocks lessons need: tables (rows of cells),
callouts (a kind, a title, blocks inside, but no table or callout),
spoilers, quotes and dividers; and runs of text gain a reading shown as
furigana, a colour, underline and strikethrough. A line break is a "\n"
in the text. Still simple blocks turned into rich text here, so a change
of the editor's own format never breaks a file written before. A table's
columns are as wide as their longest line, narrowed alike to fit a
phone, where the cells wrap.

A studyset's Import › Learning paths now takes several files at once,
one path each, stored in the order of their names, so a chapter's
lessons come in with one pick. Every file is read before anything is
stored: one that can't be read is named, and nothing comes in.

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-11 19:31:39 +02:00
commit 7d99feca7f
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -387,6 +387,23 @@ class AppLocalizationsEn extends AppLocalizations {
return 'Couldn\'t import this file. $reason';
}
@override
String pathImportFileFailed(String file, String reason) {
return 'Couldn\'t import $file. $reason';
}
@override
String pathsImported(int count, int steps) {
String _temp0 = intl.Intl.pluralLogic(
steps,
locale: localeName,
other: 'Imported $count paths with $steps steps.',
one: 'Imported $count paths with 1 step.',
zero: 'Imported $count paths without steps.',
);
return '$_temp0';
}
@override
String get pathImportUnreadable => 'It isn\'t text in UTF-8.';
@ -1043,10 +1060,11 @@ class AppLocalizationsEn extends AppLocalizations {
String get exportUnavailable => 'not available on this device';
@override
String get studysetImportPath => 'Learning path';
String get studysetImportPath => 'Learning paths';
@override
String get studysetImportPathHint => 'From a Halkyon path JSON file';
String get studysetImportPathHint =>
'From Halkyon path JSON files, one path each';
@override
String get studysetImportAnki => 'Anki deck';
@ -4851,6 +4869,20 @@ class AppLocalizationsEn extends AppLocalizations {
String get pathImportMalformedSource =>
'a source must be an object or text, and its parts text.';
@override
String get pathImportMalformedTable =>
'a table needs \"rows\" of cells, each as long as the first.';
@override
String pathImportMalformedCallout(String detail) {
return 'a callout with a malformed $detail.';
}
@override
String pathImportNotInCallout(String detail) {
return 'a $detail can\'t be inside a callout.';
}
@override
String get pomodoroTopBarHint =>
'The timer can count down in GNOME\'s top bar, with its buttons, once the AppIndicator extension is on.';