halkyon_app: instances, sign-in and sync plumbing for Halkyon's apps
What every Halkyon app's shell needs, taken from Halkyon Learn's and set on halkyon_base's client: the instances a device keeps an account on, the first start's tiles and where an instance keeps people's data, the account switcher; signing in anonymously, with GitHub or an email code, switching person and the start screen; the gates that build an app's dependencies per instance and per person; and the sync service with its status, Settings card and banner. Texts of its own in English and German take the app's name; what only the app can say, it passes in. Fakes for apps' tests are in testing.dart. An instance's basics now name the app it serves (`app`, set by the host's configuration), and an app accepts only an instance of its own. SerialQueue and CoalescingRunner move into halkyon_core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
af1de799f4
commit
e23cc77f7c
1 changed files with 10761 additions and 10 deletions
297
packages/halkyon_app/lib/l10n/halkyon_app_localizations_en.dart
Normal file
297
packages/halkyon_app/lib/l10n/halkyon_app_localizations_en.dart
Normal file
|
|
@ -0,0 +1,297 @@
|
|||
// ignore: unused_import
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
|
||||
import 'halkyon_app_localizations.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
/// The translations for English (`en`).
|
||||
class HalkyonAppLocalizationsEn extends HalkyonAppLocalizations {
|
||||
HalkyonAppLocalizationsEn([String locale = 'en']) : super(locale);
|
||||
|
||||
@override
|
||||
String get tryAgain => 'Try again';
|
||||
|
||||
@override
|
||||
String instanceWelcome(String app) {
|
||||
return 'Welcome to $app';
|
||||
}
|
||||
|
||||
@override
|
||||
String get instanceBuiltInTagline => 'Comes with the app';
|
||||
|
||||
@override
|
||||
String get instanceAnother => 'Another instance';
|
||||
|
||||
@override
|
||||
String get instanceAnotherTagline => 'Enter its address';
|
||||
|
||||
@override
|
||||
String get instanceAddress => 'Instance address';
|
||||
|
||||
@override
|
||||
String get instanceAddressInvalid => 'This isn\'t an address.';
|
||||
|
||||
@override
|
||||
String get instanceAddressRequired => 'Enter the address of an instance.';
|
||||
|
||||
@override
|
||||
String get instanceContinue => 'Continue';
|
||||
|
||||
@override
|
||||
String instanceUnreachable(String app, String name) {
|
||||
return 'No instance of $app answers at $name.';
|
||||
}
|
||||
|
||||
@override
|
||||
String instanceUseBuiltIn(String name) {
|
||||
return 'Use $name';
|
||||
}
|
||||
|
||||
@override
|
||||
String instanceOpenFailed(String name) {
|
||||
return 'Couldn\'t open the app on $name.';
|
||||
}
|
||||
|
||||
@override
|
||||
String instanceDataAndBackupsIn(String place) {
|
||||
return 'Data and backups: $place';
|
||||
}
|
||||
|
||||
@override
|
||||
String instanceDataIn(String place) {
|
||||
return 'Data: $place';
|
||||
}
|
||||
|
||||
@override
|
||||
String instanceBackupsIn(String place) {
|
||||
return 'Backups: $place';
|
||||
}
|
||||
|
||||
@override
|
||||
String get instanceNoBackups => 'No backups';
|
||||
|
||||
@override
|
||||
String get instanceEuropeanUnion => 'European Union';
|
||||
|
||||
@override
|
||||
String get accountsTitle => 'Accounts';
|
||||
|
||||
@override
|
||||
String get accountAdd => 'Add account';
|
||||
|
||||
@override
|
||||
String get accountAddSubtitle =>
|
||||
'Choose the instance for the account to add.';
|
||||
|
||||
@override
|
||||
String get accountSignedIn => 'Signed in';
|
||||
|
||||
@override
|
||||
String get accountAnonymous => 'Anonymous';
|
||||
|
||||
@override
|
||||
String get accountRemoveTooltip => 'Remove account';
|
||||
|
||||
@override
|
||||
String get accountRemoveTitle => 'Remove account?';
|
||||
|
||||
@override
|
||||
String accountRemoveMessage(String name) {
|
||||
return 'Removes the account on $name from this device, with all the device holds of it. What it synced stays on $name: sign in there again to have it. An anonymous account can\'t be signed into again.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get accountRemoveConfirm => 'Remove';
|
||||
|
||||
@override
|
||||
String get sessionUnreachable => 'Couldn\'t reach the server.';
|
||||
|
||||
@override
|
||||
String get personDataFailed => 'Couldn\'t open this device\'s data.';
|
||||
|
||||
@override
|
||||
String get startSignedOut => 'Signed out';
|
||||
|
||||
@override
|
||||
String startOn(String instance) {
|
||||
return 'Start on $instance:';
|
||||
}
|
||||
|
||||
@override
|
||||
String get startWithGitHub => 'Sign in with GitHub';
|
||||
|
||||
@override
|
||||
String get startWithEmail => 'Continue with email';
|
||||
|
||||
@override
|
||||
String get startWithoutAccount => 'Start without an account';
|
||||
|
||||
@override
|
||||
String get startAnonymous =>
|
||||
'Progress is saved on this device. Sign in to keep it.';
|
||||
|
||||
@override
|
||||
String get startGitHubFailed => 'Couldn\'t sign in with GitHub.';
|
||||
|
||||
@override
|
||||
String get startNoGitHubAccount =>
|
||||
'No account here signs in with this GitHub account yet. Start without an account, then add GitHub in Profile.';
|
||||
|
||||
@override
|
||||
String get startOtherInstance => 'Use another instance';
|
||||
|
||||
@override
|
||||
String get emailSignInTitle => 'Continue with email';
|
||||
|
||||
@override
|
||||
String get emailSignInIntro =>
|
||||
'We mail you a code to sign in. This instance keeps only a fingerprint of your address, never the address itself, and writes to it only when you ask for a code.';
|
||||
|
||||
@override
|
||||
String get emailSignInAddress => 'Email address';
|
||||
|
||||
@override
|
||||
String get emailSignInSend => 'Send code';
|
||||
|
||||
@override
|
||||
String emailSignInCodeSent(String address) {
|
||||
return 'We mailed a code to $address. It\'s valid for 15 minutes.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get emailSignInResent => 'A new code is on its way.';
|
||||
|
||||
@override
|
||||
String get emailSignInCode => 'Code';
|
||||
|
||||
@override
|
||||
String get emailSignInContinue => 'Continue';
|
||||
|
||||
@override
|
||||
String get emailSignInResend => 'Send a new code';
|
||||
|
||||
@override
|
||||
String get emailSignInOtherAddress => 'Use another address';
|
||||
|
||||
@override
|
||||
String emailSignInSwitchTitle(String address) {
|
||||
return 'Switch to the account of $address?';
|
||||
}
|
||||
|
||||
@override
|
||||
String get emailSignInSwitchConfirm => 'Switch';
|
||||
|
||||
@override
|
||||
String get emailSignInSwitchStay => 'Stay anonymous';
|
||||
|
||||
@override
|
||||
String emailSignInTaken(String address) {
|
||||
return '$address already signs in to another account. To switch to it, sign out first.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get emailSignInUnavailable =>
|
||||
'This instance doesn\'t offer signing in with email.';
|
||||
|
||||
@override
|
||||
String get emailSignInNotAnAddress => 'This isn\'t an email address.';
|
||||
|
||||
@override
|
||||
String get emailSignInTooManyCodes =>
|
||||
'Too many codes in the last hour. Try again later.';
|
||||
|
||||
@override
|
||||
String get emailSignInWrongCode => 'That code isn\'t right.';
|
||||
|
||||
@override
|
||||
String get emailSignInTooManyTries =>
|
||||
'Too many wrong codes. Ask for a new one.';
|
||||
|
||||
@override
|
||||
String get emailSignInCodeExpired =>
|
||||
'This code is no longer valid. Ask for a new one.';
|
||||
|
||||
@override
|
||||
String get emailSignInOtherAddressLinked =>
|
||||
'You already sign in with another address.';
|
||||
|
||||
@override
|
||||
String get emailSignInMailFailed =>
|
||||
'The instance couldn\'t send the mail. Try again later.';
|
||||
|
||||
@override
|
||||
String get emailSignInFailed => 'Couldn\'t reach the instance. Try again.';
|
||||
|
||||
@override
|
||||
String get syncTitle => 'Sync';
|
||||
|
||||
@override
|
||||
String get syncNow => 'Sync now';
|
||||
|
||||
@override
|
||||
String get syncStateSyncing => 'Syncing…';
|
||||
|
||||
@override
|
||||
String get syncStateSynced => 'Everything synced';
|
||||
|
||||
@override
|
||||
String get syncStateFailing => 'Sync is failing';
|
||||
|
||||
@override
|
||||
String get syncStateNotYet => 'Not synced yet';
|
||||
|
||||
@override
|
||||
String syncStateMismatch(String server) {
|
||||
return 'This app can\'t sync with $server';
|
||||
}
|
||||
|
||||
@override
|
||||
String get syncMismatchDetail =>
|
||||
'Update the app. If it is up to date, the server needs an update. What you do meanwhile stays on this device and syncs afterwards.';
|
||||
|
||||
@override
|
||||
String syncLastCompleted(String time) {
|
||||
return 'Last completed at $time';
|
||||
}
|
||||
|
||||
@override
|
||||
String syncLastFailed(String time) {
|
||||
return 'Last attempt failed at $time';
|
||||
}
|
||||
|
||||
@override
|
||||
String get syncNoRunYet => 'No sync has completed since the app started';
|
||||
|
||||
@override
|
||||
String syncPending(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count changes wait to sync',
|
||||
one: '1 change waits to sync',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get syncTroubleLabel => 'Sync needs attention';
|
||||
|
||||
@override
|
||||
String syncMismatchBanner(String server) {
|
||||
return 'This app can\'t sync with $server any more. Update it to keep syncing.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get syncMismatchMore => 'More';
|
||||
}
|
||||
|
||||
/// The translations for English, as used in the United Kingdom (`en_GB`).
|
||||
class HalkyonAppLocalizationsEnGb extends HalkyonAppLocalizationsEn {
|
||||
HalkyonAppLocalizationsEnGb() : super('en_GB');
|
||||
}
|
||||
|
||||
/// The translations for English, as used in the United States (`en_US`).
|
||||
class HalkyonAppLocalizationsEnUs extends HalkyonAppLocalizationsEn {
|
||||
HalkyonAppLocalizationsEnUs() : super('en_US');
|
||||
}
|
||||
Loading…
Reference in a new issue