chain-studio/lib/l10n/app_localizations_en.dart
flemming-it ee83eb851a feat(studio): app-wide i18n via flutter_localizations (v0.24.0)
Replaces the Store-only DE/EN toggle with an app-wide one
parked in the sidebar footer next to the theme button.
Pressing it flips every translated string at once: nav
labels, page titles, common buttons, the bilingual
store-index content.

Implementation:
- Adds `flutter_localizations` + `intl` to pubspec, plus
  `flutter.generate: true` so `flutter gen-l10n` runs in the
  build pipeline.
- ARB sources at `lib/l10n/app_en.arb` and `app_de.arb`. The
  EN file is the template; DE carries the German strings.
  Initial coverage: navigation, common buttons, page titles,
  channels / store / audit / modules / approvals headers,
  hub-unreachable copy, MCP + n8n panel headers + hints.
  Rest of the UI strings are still English-literal — those
  fall in incrementally as we touch each surface.
- Generated `AppLocalizations` lives at
  `lib/l10n/app_localizations*.dart` (regenerated via
  `flutter gen-l10n` on every ARB edit).
- `StudioAppState` gains `localeNotifier` alongside
  `modeNotifier`; persisted via SharedPreferences key
  `locale.code`.
- Sidebar `_LanguageToggle` reads/writes through the
  notifier. The Store's per-page locale state is gone:
  `_locale` now reads `Localizations.localeOf(context)
  .languageCode`, so the bilingual store-index content
  follows the global setting without a second toggle.
- `_NavPage.label` becomes `_NavPage.id` + `labelOf(context)`;
  Cmd+K palette and Sidebar both read the localized label.

Out of scope this iteration: localizing the remaining
~80% of UI strings (Settings dialog labels, Store search
hint, error messages). Those land incrementally — the i18n
infrastructure now means each is a one-line ARB edit + one
call-site swap.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-08 01:19:32 +02:00

244 lines
5.1 KiB
Dart

// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for English (`en`).
class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale);
@override
String get appTitle => 'F∆I Studio';
@override
String get navDoctor => 'Doctor';
@override
String get navModules => 'Modules';
@override
String get navStore => 'Store';
@override
String get navFlows => 'Flows';
@override
String get navAudit => 'Audit';
@override
String get navApprovals => 'Approvals';
@override
String get connectionConnected => 'connected';
@override
String get connectionUnreachable => 'unreachable';
@override
String get connectionConnecting => 'connecting…';
@override
String get connectionStartHub => 'Start hub';
@override
String get buttonCancel => 'Cancel';
@override
String get buttonSave => 'Save';
@override
String get buttonClose => 'Close';
@override
String get buttonRetry => 'Retry';
@override
String get buttonRefresh => 'Refresh';
@override
String get buttonInstall => 'Install';
@override
String get buttonUninstall => 'Uninstall';
@override
String get buttonDetails => 'Details';
@override
String get buttonAdd => 'Add';
@override
String get buttonRemove => 'Remove';
@override
String get buttonOpen => 'Open';
@override
String get buttonExplain => 'Explain';
@override
String get buttonReadDocs => 'Read docs';
@override
String get settingsTitle => 'Hub endpoint';
@override
String get settingsHost => 'Host';
@override
String get settingsPort => 'Port';
@override
String get settingsTls => 'TLS';
@override
String get settingsSaveAndConnect => 'Save & connect';
@override
String get settingsLanguage => 'Language';
@override
String get settingsLanguageHint =>
'App language. Affects every page; bilingual store entries also flip via this toggle.';
@override
String get channelsHeader => 'CHANNELS';
@override
String get channelsActive => 'active';
@override
String get channelsRunning => 'running';
@override
String get channelsStopped => 'stopped';
@override
String get channelsConnect => 'Connect Studio to this channel';
@override
String get channelsSwitch => 'Make this the active channel';
@override
String get channelsEnableAutostart => 'Enable autostart at login';
@override
String get channelsDisableAutostart => 'Disable autostart';
@override
String get storeSearchHint =>
'Search modules — name, tagline, tag, capability…';
@override
String get storeFeatured => 'FEATURED';
@override
String get storeFeaturedHint => 'curated picks · click for details';
@override
String get storeNoMatches => 'No matches';
@override
String get storeNoMatchesHint =>
'Adjust the filters or clear the search to see all entries.';
@override
String get storeClearFilters => 'Clear filters';
@override
String get storeStatusAll => 'All';
@override
String get storeStatusPublished => 'Published';
@override
String get storeStatusAlpha => 'Alpha';
@override
String get storeStatusPlanned => 'Planned';
@override
String get storeInstalledOnly => 'Installed';
@override
String storeNResults(int n) {
String _temp0 = intl.Intl.pluralLogic(
n,
locale: localeName,
other: 's',
one: '',
);
return '$n result$_temp0';
}
@override
String get auditTitle => 'Audit';
@override
String get auditNoEvents => 'No events yet';
@override
String get auditNoEventsHint =>
'Run a flow to populate the audit stream.\nEvents appear here within seconds.';
@override
String get modulesTitle => 'Modules';
@override
String get modulesNoneTitle => 'No modules yet';
@override
String get modulesRecentActivity => 'RECENT ACTIVITY';
@override
String get approvalsTitle => 'Approvals';
@override
String get approvalsTabPending => 'Pending';
@override
String get approvalsTabHistory => 'History';
@override
String get approvalsInboxZero => 'Inbox zero';
@override
String get approvalsInboxHint =>
'All caught up. New `system.approval@^0` steps land here automatically.';
@override
String get doctorTitle => 'Doctor';
@override
String get mcpHeader => 'MCP CLIENTS';
@override
String get mcpHint =>
'External MCP servers federate their tools as `mcp.<server>.<tool>` capabilities. Configure once, see them in the Store.';
@override
String get mcpEmpty => 'No MCP servers configured. Click + to add one.';
@override
String get n8nHeader => 'N8N ENDPOINTS';
@override
String get n8nHint =>
'Active n8n workflows surface as `n8n.<endpoint>.<slug>` capabilities. Configure once, see them in the Store.';
@override
String get n8nEmpty => 'No n8n endpoints configured. Click + to add one.';
@override
String get hubUnreachable => 'Hub unreachable';
@override
String get hubUnreachableHint => 'Start the hub with `fai serve`.';
@override
String get languageEnglish => 'English';
@override
String get languageGerman => 'Deutsch';
}