refactor(halkyon_app): the app says where GitHub is added later
The start screen's sentence after a GitHub account nobody here signs in
with named Learn's Profile screen. The package now says only that no
account signs in with it; the app's frame adds the rest as a sentence
of its own (thenAddGitHub), since the place takes its language's
grammar ("im Profil"). Learn's reads as before, which a test now pins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
bf20134819
commit
38770569ea
8 changed files with 59 additions and 18 deletions
|
|
@ -37,7 +37,7 @@
|
|||
"startWithoutAccount": "Ohne Konto starten",
|
||||
"startAnonymous": "Dein Fortschritt wird auf diesem Gerät gespeichert. Melde dich an, um ihn zu behalten.",
|
||||
"startGitHubFailed": "Anmeldung mit GitHub fehlgeschlagen.",
|
||||
"startNoGitHubAccount": "Noch kein Konto hier meldet sich mit diesem GitHub-Konto an. Starte ohne Konto und füge GitHub dann im Profil hinzu.",
|
||||
"startNoGitHubAccount": "Noch kein Konto hier meldet sich mit diesem GitHub-Konto an.",
|
||||
"startOtherInstance": "Andere Instanz verwenden",
|
||||
"emailSignInTitle": "Mit E-Mail fortfahren",
|
||||
"emailSignInIntro": "Wir schicken dir einen Code zum Anmelden. Diese Instanz behält nur einen Fingerabdruck deiner Adresse, nie die Adresse selbst, und schreibt ihr nur, wenn du einen Code anforderst.",
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
"startWithoutAccount": "Start without an account",
|
||||
"startAnonymous": "Progress is saved on this device. Sign in to keep it.",
|
||||
"startGitHubFailed": "Couldn't sign in with GitHub.",
|
||||
"startNoGitHubAccount": "No account here signs in with this GitHub account yet. Start without an account, then add GitHub in Profile.",
|
||||
"startNoGitHubAccount": "No account here signs in with this GitHub account yet.",
|
||||
"startOtherInstance": "Use another instance",
|
||||
"emailSignInTitle": "Continue with email",
|
||||
"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.",
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ abstract class HalkyonAppLocalizations {
|
|||
/// No description provided for @startNoGitHubAccount.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No account here signs in with this GitHub account yet. Start without an account, then add GitHub in Profile.'**
|
||||
/// **'No account here signs in with this GitHub account yet.'**
|
||||
String get startNoGitHubAccount;
|
||||
|
||||
/// No description provided for @startOtherInstance.
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class HalkyonAppLocalizationsDe extends HalkyonAppLocalizations {
|
|||
|
||||
@override
|
||||
String get startNoGitHubAccount =>
|
||||
'Noch kein Konto hier meldet sich mit diesem GitHub-Konto an. Starte ohne Konto und füge GitHub dann im Profil hinzu.';
|
||||
'Noch kein Konto hier meldet sich mit diesem GitHub-Konto an.';
|
||||
|
||||
@override
|
||||
String get startOtherInstance => 'Andere Instanz verwenden';
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ class HalkyonAppLocalizationsEn extends HalkyonAppLocalizations {
|
|||
|
||||
@override
|
||||
String get startNoGitHubAccount =>
|
||||
'No account here signs in with this GitHub account yet. Start without an account, then add GitHub in Profile.';
|
||||
'No account here signs in with this GitHub account yet.';
|
||||
|
||||
@override
|
||||
String get startOtherInstance => 'Use another instance';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import 'package:material_ui/material_ui.dart';
|
|||
typedef LookSettings = ({ThemeMode themeMode, Locale? locale});
|
||||
|
||||
/// What this package's own screens need to know of the app they are part
|
||||
/// of: its name and look, and the few words only it can say. `InstanceGate`
|
||||
/// of: its name and look, and the few sentences only it can say. `InstanceGate`
|
||||
/// hands it down ([AppFrameScope]) to every screen beneath, the person's
|
||||
/// app included.
|
||||
final class const AppFrame({
|
||||
|
|
@ -35,6 +35,13 @@ final class const AppFrame({
|
|||
/// can't be combined with it yet: if you switch, they are deleted.").
|
||||
required final String Function(BuildContext context) switchLeavesBehind,
|
||||
|
||||
/// What the start screen says after a GitHub account nobody here signs in
|
||||
/// with: how to have it anyway, naming where the app adds a way to sign in
|
||||
/// ("Start without an account, then add GitHub in Profile."). A sentence of
|
||||
/// its own, as the place takes the grammar of the app's language ("im
|
||||
/// Profil").
|
||||
required final String Function(BuildContext context) thenAddGitHub,
|
||||
|
||||
/// The app's theme in a [Brightness].
|
||||
required final ThemeData Function(Brightness brightness) theme,
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:halkyon_app/l10n/halkyon_app_localizations.dart';
|
||||
import 'package:halkyon_app/src/app/app_frame.dart';
|
||||
import 'package:halkyon_app/src/app/app_scope.dart';
|
||||
import 'package:halkyon_app/src/auth/bloc/session_bloc.dart';
|
||||
import 'package:halkyon_app/src/instance/instance_scope.dart';
|
||||
|
|
@ -105,8 +106,10 @@ class _StartScreenState() extends State<StartScreen> {
|
|||
const SizedBox(height: 16),
|
||||
Text(
|
||||
switch (problem) {
|
||||
// Whole sentences: the app's names where.
|
||||
SignedOutProblem.noGitHubAccount =>
|
||||
l10n.startNoGitHubAccount,
|
||||
'${l10n.startNoGitHubAccount} '
|
||||
'${AppFrameScope.of(context).thenAddGitHub(context)}',
|
||||
SignedOutProblem.failed => l10n.startGitHubFailed,
|
||||
},
|
||||
textAlign: TextAlign.center,
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ AppFrame testFrame() => AppFrame(
|
|||
switchLeavesBehind: (context) =>
|
||||
"The notes on this device can't be combined with it yet: if you "
|
||||
'switch, they are deleted.',
|
||||
thenAddGitHub: (context) =>
|
||||
'Start without an account, then add GitHub in Settings.',
|
||||
theme: appTheme,
|
||||
localizationsDelegates: testLocalizationsDelegates,
|
||||
supportedLocales: HalkyonAppLocalizations.supportedLocales,
|
||||
|
|
|
|||
Loading…
Reference in a new issue