feat(studio): Flows + Module sheet + System-AI editor i18n (v0.28.0)

- Localize Flows page: app-bar title and reload tooltip,
  hub-unreachable / no-saved-flows empty states, run-flow input
  dialog (title with flow name, description, hint, Cancel /
  Run), running dialog (title, "Flow running…" status, no-output
  message, Close button), flow-card Run button.
- Localize the module-sheet bottom sheet: failed-to-load text,
  Capabilities and "Declared permissions" section headers,
  no-permissions placeholder copy.
- Localize the System-AI configuration dialog: title, intro
  paragraph, provider dropdown label, endpoint label, API-key
  env-var label (required vs optional) and disclaimer, privacy
  mode header and three options (Off / Redacted / Full) plus
  their descriptions, test-result panel ("Connection ok" /
  "Connection failed", "Reply: …" prefix), model picker (label,
  hint fallback, helper text with Ollama variant, Refresh /
  Pull / Pulling… buttons, list errors and empty states),
  hardware banner ("Detected: …" + " · curation reviewed …"
  suffix), suitability legend (recommended / balanced / small /
  large / huge / unknown), cache row with pluralized count and
  Clear button, cache cleared / clear-failed toasts, pull-empty
  / pull-failed errors. Suitability label moved off a getter
  onto a `labelFor(BuildContext)` method so it can read the
  current locale.

Provider preset descriptions and modelHint strings stay in
English in `_ProviderPreset.all` — they're tightly coupled to
the wire-protocol identifiers and would require a runtime
factory rebuild rather than a const list.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-08 02:59:08 +02:00
parent e2b2639a86
commit b5a4c74c4b
10 changed files with 1120 additions and 91 deletions

View file

@ -114,7 +114,8 @@ class _FaiModuleSheetState extends State<FaiModuleSheet> {
Padding(
padding: const EdgeInsets.all(FaiSpace.xl),
child: Text(
'Failed to load: ${snapshot.error}',
AppLocalizations.of(context)!
.moduleSheetFailedToLoad(snapshot.error.toString()),
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.error,
),
@ -168,6 +169,7 @@ class _Body extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final l = AppLocalizations.of(context)!;
return ListView(
padding: const EdgeInsets.fromLTRB(
FaiSpace.xxl,
@ -202,7 +204,7 @@ class _Body extends StatelessWidget {
),
),
const SizedBox(height: FaiSpace.xl),
_SectionHeader('Capabilities'),
_SectionHeader(l.moduleSheetCapabilities),
const SizedBox(height: FaiSpace.sm),
Wrap(
spacing: FaiSpace.xs,
@ -218,11 +220,11 @@ class _Body extends StatelessWidget {
.toList(),
),
const SizedBox(height: FaiSpace.xl),
_SectionHeader('Declared permissions'),
_SectionHeader(l.moduleSheetPermissions),
const SizedBox(height: FaiSpace.sm),
if (detail.permissions.isEmpty)
Text(
'(none — pure-computation module)',
l.moduleSheetNoPermissions,
style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
fontStyle: FontStyle.italic,