fix(studio): localize sidebar tooltips that stayed English
Some checks failed
Security / Security check (push) Failing after 1s
Some checks failed
Security / Security check (push) Failing after 1s
The connection-row tooltip, the _ConnectionLabel caption, the footer settings tooltip, and the channel-pill explainer were hardcoded English even when the running app was set to German. Move all four through AppLocalizations. Adds ARB strings (de + en): - connectionTapToStart antippen zum Starten / tap to start - sidebarSettingsTooltip Einstellungen (Cmd-;) / Settings (Cmd-;) - sidebarChannelTooltip multi-line channel explainer Existing connectionConnected / connectionUnreachable / connectionConnecting are reused as the caption pieces; only those two new strings (plus the channel tooltip) needed adding. Version 0.51.7 -> 0.51.8. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
dbcff6f7a6
commit
b40da56b8d
7 changed files with 82 additions and 31 deletions
|
|
@ -62,6 +62,9 @@
|
||||||
"connectionUnreachable": "nicht erreichbar",
|
"connectionUnreachable": "nicht erreichbar",
|
||||||
"connectionConnecting": "verbinde…",
|
"connectionConnecting": "verbinde…",
|
||||||
"connectionStartHub": "Hub starten",
|
"connectionStartHub": "Hub starten",
|
||||||
|
"connectionTapToStart": "antippen zum Starten",
|
||||||
|
"sidebarSettingsTooltip": "Einstellungen (⌘;)",
|
||||||
|
"sidebarChannelTooltip": "Aktiver Kanal — klicken um in Einstellungen (⌘;) zu wechseln.\nproduction = stabil · beta = Vorabversion · dev = laufend · local = Arbeitsumgebung",
|
||||||
"buttonCancel": "Abbrechen",
|
"buttonCancel": "Abbrechen",
|
||||||
"buttonSave": "Speichern",
|
"buttonSave": "Speichern",
|
||||||
"buttonClose": "Schließen",
|
"buttonClose": "Schließen",
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,9 @@
|
||||||
"connectionUnreachable": "unreachable",
|
"connectionUnreachable": "unreachable",
|
||||||
"connectionConnecting": "connecting…",
|
"connectionConnecting": "connecting…",
|
||||||
"connectionStartHub": "Start hub",
|
"connectionStartHub": "Start hub",
|
||||||
|
"connectionTapToStart": "tap to start",
|
||||||
|
"sidebarSettingsTooltip": "Settings (⌘;)",
|
||||||
|
"sidebarChannelTooltip": "Active channel — click to switch in Settings (⌘;).\nproduction = stable · beta = pre-release · dev = rolling · local = workspace",
|
||||||
"buttonCancel": "Cancel",
|
"buttonCancel": "Cancel",
|
||||||
"buttonSave": "Save",
|
"buttonSave": "Save",
|
||||||
"buttonClose": "Close",
|
"buttonClose": "Close",
|
||||||
|
|
|
||||||
|
|
@ -428,6 +428,24 @@ abstract class AppLocalizations {
|
||||||
/// **'Start hub'**
|
/// **'Start hub'**
|
||||||
String get connectionStartHub;
|
String get connectionStartHub;
|
||||||
|
|
||||||
|
/// No description provided for @connectionTapToStart.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'tap to start'**
|
||||||
|
String get connectionTapToStart;
|
||||||
|
|
||||||
|
/// No description provided for @sidebarSettingsTooltip.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Settings (⌘;)'**
|
||||||
|
String get sidebarSettingsTooltip;
|
||||||
|
|
||||||
|
/// No description provided for @sidebarChannelTooltip.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Active channel — click to switch in Settings (⌘;).\nproduction = stable · beta = pre-release · dev = rolling · local = workspace'**
|
||||||
|
String get sidebarChannelTooltip;
|
||||||
|
|
||||||
/// No description provided for @buttonCancel.
|
/// No description provided for @buttonCancel.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,16 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||||
@override
|
@override
|
||||||
String get connectionStartHub => 'Hub starten';
|
String get connectionStartHub => 'Hub starten';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get connectionTapToStart => 'antippen zum Starten';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sidebarSettingsTooltip => 'Einstellungen (⌘;)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sidebarChannelTooltip =>
|
||||||
|
'Aktiver Kanal — klicken um in Einstellungen (⌘;) zu wechseln.\nproduction = stabil · beta = Vorabversion · dev = laufend · local = Arbeitsumgebung';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get buttonCancel => 'Abbrechen';
|
String get buttonCancel => 'Abbrechen';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,16 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||||
@override
|
@override
|
||||||
String get connectionStartHub => 'Start hub';
|
String get connectionStartHub => 'Start hub';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get connectionTapToStart => 'tap to start';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sidebarSettingsTooltip => 'Settings (⌘;)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sidebarChannelTooltip =>
|
||||||
|
'Active channel — click to switch in Settings (⌘;).\nproduction = stable · beta = pre-release · dev = rolling · local = workspace';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get buttonCancel => 'Cancel';
|
String get buttonCancel => 'Cancel';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import 'widgets/widgets.dart';
|
||||||
/// Studio's own build version. Bump on every UI commit so the
|
/// Studio's own build version. Bump on every UI commit so the
|
||||||
/// running app self-identifies — visible in the sidebar header
|
/// running app self-identifies — visible in the sidebar header
|
||||||
/// and quick-glance proof that you're seeing the current build.
|
/// and quick-glance proof that you're seeing the current build.
|
||||||
const String kStudioVersion = '0.51.7';
|
const String kStudioVersion = '0.51.8';
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
@ -547,29 +547,35 @@ class _SidebarState extends State<_Sidebar>
|
||||||
// disconnected fires the daemon-start action,
|
// disconnected fires the daemon-start action,
|
||||||
// so we can drop the inline "Start hub" button
|
// so we can drop the inline "Start hub" button
|
||||||
// that used to make this row's height balloon.
|
// that used to make this row's height balloon.
|
||||||
SizedBox(
|
Builder(
|
||||||
height: _connRowH,
|
builder: (context) {
|
||||||
child: _sidebarRow(
|
final l = AppLocalizations.of(context)!;
|
||||||
leading: Tooltip(
|
final caption = widget.connected == true
|
||||||
message: widget.connected == true
|
? l.connectionConnected
|
||||||
? 'Connected · ${widget.endpointLabel}'
|
: widget.connected == false
|
||||||
: widget.connected == false
|
? l.connectionTapToStart
|
||||||
? 'Disconnected · tap to start · ${widget.endpointLabel}'
|
: l.connectionConnecting;
|
||||||
: 'Connecting · ${widget.endpointLabel}',
|
return SizedBox(
|
||||||
child: _CollapsedConnectionDot(
|
height: _connRowH,
|
||||||
connected: widget.connected,
|
child: _sidebarRow(
|
||||||
|
leading: Tooltip(
|
||||||
|
message: '$caption · ${widget.endpointLabel}',
|
||||||
|
child: _CollapsedConnectionDot(
|
||||||
|
connected: widget.connected,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
label: _ConnectionLabel(
|
||||||
|
connected: widget.connected,
|
||||||
|
endpoint: widget.endpointLabel,
|
||||||
|
),
|
||||||
|
t: t,
|
||||||
|
labelsInteractive: labelsInteractive,
|
||||||
|
onTap: widget.connected == false
|
||||||
|
? () => _startDaemon(context)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
label: _ConnectionLabel(
|
},
|
||||||
connected: widget.connected,
|
|
||||||
endpoint: widget.endpointLabel,
|
|
||||||
),
|
|
||||||
t: t,
|
|
||||||
labelsInteractive: labelsInteractive,
|
|
||||||
onTap: widget.connected == false
|
|
||||||
? () => _startDaemon(context)
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: _rowGap),
|
const SizedBox(height: _rowGap),
|
||||||
// Channel row — fixed 28px. Always reserved
|
// Channel row — fixed 28px. Always reserved
|
||||||
|
|
@ -732,10 +738,9 @@ class _ChannelPill extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
final accent = _accent(theme.colorScheme);
|
final accent = _accent(theme.colorScheme);
|
||||||
|
final l = AppLocalizations.of(context)!;
|
||||||
return Tooltip(
|
return Tooltip(
|
||||||
message:
|
message: l.sidebarChannelTooltip,
|
||||||
'Active channel — click to switch in Settings (⌘;).\n'
|
|
||||||
'production = stable · beta = pre-release · dev = rolling · local = workspace',
|
|
||||||
child: Material(
|
child: Material(
|
||||||
color: theme.colorScheme.surfaceContainerHigh,
|
color: theme.colorScheme.surfaceContainerHigh,
|
||||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||||
|
|
@ -905,14 +910,15 @@ class _ConnectionLabel extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
|
final l = AppLocalizations.of(context)!;
|
||||||
final captionColor = connected == false
|
final captionColor = connected == false
|
||||||
? theme.colorScheme.error
|
? theme.colorScheme.error
|
||||||
: theme.colorScheme.onSurface;
|
: theme.colorScheme.onSurface;
|
||||||
final caption = connected == true
|
final caption = connected == true
|
||||||
? 'connected'
|
? l.connectionConnected
|
||||||
: connected == false
|
: connected == false
|
||||||
? 'tap to start'
|
? l.connectionTapToStart
|
||||||
: 'connecting…';
|
: l.connectionConnecting;
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
@ -1076,6 +1082,7 @@ class _Footer extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final l = AppLocalizations.of(context)!;
|
||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -1084,7 +1091,7 @@ class _Footer extends StatelessWidget {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: const Icon(Icons.settings_outlined, size: 16),
|
icon: const Icon(Icons.settings_outlined, size: 16),
|
||||||
tooltip: 'Settings (⌘;)',
|
tooltip: l.sidebarSettingsTooltip,
|
||||||
visualDensity: VisualDensity.compact,
|
visualDensity: VisualDensity.compact,
|
||||||
onPressed: onOpenSettings,
|
onPressed: onOpenSettings,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
name: fai_studio
|
name: fai_studio
|
||||||
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.51.7
|
version: 0.51.8
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.11.0-200.1.beta
|
sdk: ^3.11.0-200.1.beta
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue