feat(learn): an archive's import shows its steps, counts and percent, with Abort

Importing a Halkyon archive showed one bar. It now says which of its three
steps it is in (copying files; writing studysets, flashcards and notes;
bringing over the progress), how many of the step's items are done and the
percent of all of it, and offers Abort (decided 9 Nov 2026).

The copier checks between items, never leaving one half written, and
keeps a trail of what it wrote: the top studyset once made, and the files'
rows it made (not those the person had, found before each file is added).
Aborted, the importer deletes the top studyset for good with everything
inside it, as Delete now does (the reviews, answers and pages read going
with their cards, steps and PDFs), and those rows; the tags it made stay,
as names the person may well use anyway. Once all of it is written, Abort
no longer undoes it.

WorkProgress, WorkStages and AbortSignal (core/work/) and
WorkProgressView (core/widget/) are shared with the Anki import and the
exports, which follow.

Whats-New: Importing an archive shows its steps and how far it has come, and Abort stops it, keeping nothing of it.
Whats-New-De: Der Import eines Archivs zeigt seine Schritte und wie weit er ist, und „Abbrechen“ beendet ihn, ohne etwas davon zu behalten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-10 15:53:31 +01:00
commit 5f7cb70c3c
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -12367,6 +12367,108 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Files'**
String get assistantAddFiles;
/// An import's or export's progress: the step it is in, of all, and its name (decided 9 Nov 2026).
///
/// In en, this message translates to:
/// **'Step {step} of {steps}: {name}'**
String workStep(int step, int steps, String name);
/// An import's or export's progress: how many of the step's items are done, the numbers formatted.
///
/// In en, this message translates to:
/// **'{done} of {total}'**
String workCount(String done, String total);
/// An import's or export's progress: how much of all of it is done.
///
/// In en, this message translates to:
/// **'{percent}%'**
String workPercent(int percent);
/// Stops an import or an export under way; an import's Abort deletes what it made.
///
/// In en, this message translates to:
/// **'Abort'**
String get workAbort;
/// An import or export stopping after Abort, an import deleting what it made.
///
/// In en, this message translates to:
/// **'Aborting…'**
String get workAborting;
/// An import's step: the files its content names.
///
/// In en, this message translates to:
/// **'Copying files'**
String get workStageFiles;
/// An archive import's step: its content.
///
/// In en, this message translates to:
/// **'Writing studysets, flashcards and notes'**
String get workStageContent;
/// An archive import's step: reviews, answers and pages read.
///
/// In en, this message translates to:
/// **'Bringing over your progress'**
String get workStageProgress;
/// An Anki import's step: its notes as flashcards.
///
/// In en, this message translates to:
/// **'Writing flashcards'**
String get workStageCards;
/// An Anki import's step: the flashcards' tags.
///
/// In en, this message translates to:
/// **'Tagging'**
String get workStageTags;
/// An Anki import's step: its reviews.
///
/// In en, this message translates to:
/// **'Bringing over the review history'**
String get workStageReviews;
/// An export's step: the studysets and what is in them.
///
/// In en, this message translates to:
/// **'Reading the content'**
String get workStageReading;
/// An export's step: the files its content names.
///
/// In en, this message translates to:
/// **'Gathering files'**
String get workStageGathering;
/// An export's step: the zip file made.
///
/// In en, this message translates to:
/// **'Packing'**
String get workStagePacking;
/// Snack bar after an import's Abort, which deleted what it had made.
///
/// In en, this message translates to:
/// **'Import aborted: nothing of it was kept.'**
String get importAborted;
/// Snack bar after an export's Abort.
///
/// In en, this message translates to:
/// **'Export aborted.'**
String get exportAborted;
/// The sheet showing an export's progress.
///
/// In en, this message translates to:
/// **'Exporting'**
String get exportProgressTitle;
}
class _AppLocalizationsDelegate