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

@ -1196,6 +1196,96 @@ abstract class AppLocalizations {
/// **'Uninstalling…'**
String get modulesUninstalling;
/// No description provided for @moduleSheetFailedToLoad.
///
/// In en, this message translates to:
/// **'Failed to load: {error}'**
String moduleSheetFailedToLoad(String error);
/// No description provided for @moduleSheetCapabilities.
///
/// In en, this message translates to:
/// **'Capabilities'**
String get moduleSheetCapabilities;
/// No description provided for @moduleSheetPermissions.
///
/// In en, this message translates to:
/// **'Declared permissions'**
String get moduleSheetPermissions;
/// No description provided for @moduleSheetNoPermissions.
///
/// In en, this message translates to:
/// **'(none — pure-computation module)'**
String get moduleSheetNoPermissions;
/// No description provided for @flowsTitle.
///
/// In en, this message translates to:
/// **'Flows'**
String get flowsTitle;
/// No description provided for @flowsReloadTooltip.
///
/// In en, this message translates to:
/// **'Reload'**
String get flowsReloadTooltip;
/// No description provided for @flowsNoneTitle.
///
/// In en, this message translates to:
/// **'No saved flows'**
String get flowsNoneTitle;
/// No description provided for @flowsNoneHint.
///
/// In en, this message translates to:
/// **'Save a flow with `fai admin flows save <name> <flow.yaml>` and it shows up here.'**
String get flowsNoneHint;
/// No description provided for @flowsRunDialogTitle.
///
/// In en, this message translates to:
/// **'Run {name}'**
String flowsRunDialogTitle(String name);
/// No description provided for @flowsRunDialogBody.
///
/// In en, this message translates to:
/// **'Inputs as key=value, one per line. All values are sent as text payloads. For binary inputs use the `fai run` CLI.'**
String get flowsRunDialogBody;
/// No description provided for @flowsInputsHint.
///
/// In en, this message translates to:
/// **'name=World\ntarget_language=English\nsummary_style=three bullet points'**
String get flowsInputsHint;
/// No description provided for @flowsRunButton.
///
/// In en, this message translates to:
/// **'Run'**
String get flowsRunButton;
/// No description provided for @flowsRunningTitle.
///
/// In en, this message translates to:
/// **'Running {name}'**
String flowsRunningTitle(String name);
/// No description provided for @flowsRunning.
///
/// In en, this message translates to:
/// **'Flow running…'**
String get flowsRunning;
/// No description provided for @flowsNoOutputs.
///
/// In en, this message translates to:
/// **'Flow completed with no declared outputs.'**
String get flowsNoOutputs;
/// No description provided for @approvalsTitle.
///
/// In en, this message translates to:
@ -1783,6 +1873,300 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'saved flow'**
String get searchSavedFlowHint;
/// No description provided for @systemAiTitle.
///
/// In en, this message translates to:
/// **'System AI'**
String get systemAiTitle;
/// No description provided for @systemAiIntro.
///
/// In en, this message translates to:
/// **'The hub-internal LLM the platform itself uses for inline failure explanations and operator help. Off by default; configure here. See docs/architecture/system-ai.md for what crosses the wire.'**
String get systemAiIntro;
/// No description provided for @systemAiProviderLabel.
///
/// In en, this message translates to:
/// **'Provider'**
String get systemAiProviderLabel;
/// No description provided for @systemAiEndpointLabel.
///
/// In en, this message translates to:
/// **'Endpoint URL (up to /v1)'**
String get systemAiEndpointLabel;
/// No description provided for @systemAiApiKeyRequired.
///
/// In en, this message translates to:
/// **'API key env var (required)'**
String get systemAiApiKeyRequired;
/// No description provided for @systemAiApiKeyOptional.
///
/// In en, this message translates to:
/// **'API key env var (optional)'**
String get systemAiApiKeyOptional;
/// No description provided for @systemAiApiKeyDisclaimer.
///
/// In en, this message translates to:
/// **'Studio never reads or stores the key value — only its env-var name. The hub reads `\${name}` at request time.'**
String systemAiApiKeyDisclaimer(String name);
/// No description provided for @systemAiTestConnection.
///
/// In en, this message translates to:
/// **'Test connection'**
String get systemAiTestConnection;
/// No description provided for @systemAiTesting.
///
/// In en, this message translates to:
/// **'Testing…'**
String get systemAiTesting;
/// No description provided for @systemAiSave.
///
/// In en, this message translates to:
/// **'Save'**
String get systemAiSave;
/// No description provided for @systemAiPrivacyHeader.
///
/// In en, this message translates to:
/// **'PRIVACY MODE'**
String get systemAiPrivacyHeader;
/// No description provided for @systemAiPrivacyOffLabel.
///
/// In en, this message translates to:
/// **'Off'**
String get systemAiPrivacyOffLabel;
/// No description provided for @systemAiPrivacyOffDesc.
///
/// In en, this message translates to:
/// **'Feature disabled. No requests leave the hub.'**
String get systemAiPrivacyOffDesc;
/// No description provided for @systemAiPrivacyRedactedLabel.
///
/// In en, this message translates to:
/// **'Redacted'**
String get systemAiPrivacyRedactedLabel;
/// No description provided for @systemAiPrivacyRedactedDesc.
///
/// In en, this message translates to:
/// **'Only event_type / error / module names. KRITIS-friendly default.'**
String get systemAiPrivacyRedactedDesc;
/// No description provided for @systemAiPrivacyFullLabel.
///
/// In en, this message translates to:
/// **'Full'**
String get systemAiPrivacyFullLabel;
/// No description provided for @systemAiPrivacyFullDesc.
///
/// In en, this message translates to:
/// **'Includes the audit detail JSON (hash-only — no raw payloads).'**
String get systemAiPrivacyFullDesc;
/// No description provided for @systemAiConnectionOk.
///
/// In en, this message translates to:
/// **'Connection ok'**
String get systemAiConnectionOk;
/// No description provided for @systemAiConnectionFailed.
///
/// In en, this message translates to:
/// **'Connection failed'**
String get systemAiConnectionFailed;
/// No description provided for @systemAiReplyPrefix.
///
/// In en, this message translates to:
/// **'Reply: {text}'**
String systemAiReplyPrefix(String text);
/// No description provided for @systemAiModelLabel.
///
/// In en, this message translates to:
/// **'Model (required)'**
String get systemAiModelLabel;
/// No description provided for @systemAiModelHintFallback.
///
/// In en, this message translates to:
/// **'model identifier the provider expects'**
String get systemAiModelHintFallback;
/// No description provided for @systemAiModelHelperBase.
///
/// In en, this message translates to:
/// **'Required: pick from the list (Refresh) or type one.'**
String get systemAiModelHelperBase;
/// No description provided for @systemAiModelHelperOllama.
///
/// In en, this message translates to:
/// **'Required: pick from the list (Refresh) or type one. Use Pull to download from Ollama.'**
String get systemAiModelHelperOllama;
/// No description provided for @systemAiRefresh.
///
/// In en, this message translates to:
/// **'Refresh'**
String get systemAiRefresh;
/// No description provided for @systemAiPull.
///
/// In en, this message translates to:
/// **'Pull'**
String get systemAiPull;
/// No description provided for @systemAiPulling.
///
/// In en, this message translates to:
/// **'Pulling…'**
String get systemAiPulling;
/// No description provided for @systemAiCouldNotListModels.
///
/// In en, this message translates to:
/// **'Could not list models: {error}'**
String systemAiCouldNotListModels(String error);
/// No description provided for @systemAiNoModelsOllama.
///
/// In en, this message translates to:
/// **'No models on the Ollama server yet. Type one above and click Pull.'**
String get systemAiNoModelsOllama;
/// No description provided for @systemAiNoModelsGeneric.
///
/// In en, this message translates to:
/// **'Provider returned no models.'**
String get systemAiNoModelsGeneric;
/// No description provided for @systemAiSuitabilityRecommended.
///
/// In en, this message translates to:
/// **'recommended'**
String get systemAiSuitabilityRecommended;
/// No description provided for @systemAiSuitabilityBalanced.
///
/// In en, this message translates to:
/// **'balanced'**
String get systemAiSuitabilityBalanced;
/// No description provided for @systemAiSuitabilitySmall.
///
/// In en, this message translates to:
/// **'small — quality may be limited'**
String get systemAiSuitabilitySmall;
/// No description provided for @systemAiSuitabilityLarge.
///
/// In en, this message translates to:
/// **'large — slower'**
String get systemAiSuitabilityLarge;
/// No description provided for @systemAiSuitabilityHuge.
///
/// In en, this message translates to:
/// **'huge — likely too slow on a laptop'**
String get systemAiSuitabilityHuge;
/// No description provided for @systemAiSuitabilityUnknown.
///
/// In en, this message translates to:
/// **'size unknown'**
String get systemAiSuitabilityUnknown;
/// No description provided for @systemAiHwDetected.
///
/// In en, this message translates to:
/// **'Detected: {summary}'**
String systemAiHwDetected(String summary);
/// No description provided for @systemAiHwReviewed.
///
/// In en, this message translates to:
/// **' · curation reviewed {date}'**
String systemAiHwReviewed(String date);
/// No description provided for @systemAiLegendRecommended.
///
/// In en, this message translates to:
/// **'recommended for this hardware{tier}'**
String systemAiLegendRecommended(String tier);
/// No description provided for @systemAiLegendBalanced.
///
/// In en, this message translates to:
/// **'balanced (4-8B)'**
String get systemAiLegendBalanced;
/// No description provided for @systemAiLegendSmallLarge.
///
/// In en, this message translates to:
/// **'small <3B / large 9-15B / above hardware'**
String get systemAiLegendSmallLarge;
/// No description provided for @systemAiLegendHuge.
///
/// In en, this message translates to:
/// **'huge >15B'**
String get systemAiLegendHuge;
/// No description provided for @systemAiLegendUnknown.
///
/// In en, this message translates to:
/// **'size unknown'**
String get systemAiLegendUnknown;
/// No description provided for @systemAiCacheRow.
///
/// In en, this message translates to:
/// **'Cache: {n} cached {n, plural, =1{explanation} other{explanations}}. Identical prompts hit the cache; switching model or privacy mode flushes automatically.'**
String systemAiCacheRow(int n);
/// No description provided for @systemAiCacheClear.
///
/// In en, this message translates to:
/// **'Clear'**
String get systemAiCacheClear;
/// No description provided for @systemAiCacheClearedToast.
///
/// In en, this message translates to:
/// **'Cleared {n} cached System-AI explanations.'**
String systemAiCacheClearedToast(int n);
/// No description provided for @systemAiCacheClearFailed.
///
/// In en, this message translates to:
/// **'Cache clear failed: {error}'**
String systemAiCacheClearFailed(String error);
/// No description provided for @systemAiPullEmptyError.
///
/// In en, this message translates to:
/// **'Type a model id (e.g. gemma3:4b) first.'**
String get systemAiPullEmptyError;
/// No description provided for @systemAiPullFailedError.
///
/// In en, this message translates to:
/// **'Pull failed: {error}'**
String systemAiPullFailedError(String error);
}
class _AppLocalizationsDelegate