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
|
|
@ -27,7 +27,7 @@ import 'widgets/widgets.dart';
|
|||
/// Studio's own build version. Bump on every UI commit so the
|
||||
/// running app self-identifies — visible in the sidebar header
|
||||
/// 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 {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
|
@ -547,29 +547,35 @@ class _SidebarState extends State<_Sidebar>
|
|||
// disconnected fires the daemon-start action,
|
||||
// so we can drop the inline "Start hub" button
|
||||
// that used to make this row's height balloon.
|
||||
SizedBox(
|
||||
height: _connRowH,
|
||||
child: _sidebarRow(
|
||||
leading: Tooltip(
|
||||
message: widget.connected == true
|
||||
? 'Connected · ${widget.endpointLabel}'
|
||||
: widget.connected == false
|
||||
? 'Disconnected · tap to start · ${widget.endpointLabel}'
|
||||
: 'Connecting · ${widget.endpointLabel}',
|
||||
child: _CollapsedConnectionDot(
|
||||
connected: widget.connected,
|
||||
Builder(
|
||||
builder: (context) {
|
||||
final l = AppLocalizations.of(context)!;
|
||||
final caption = widget.connected == true
|
||||
? l.connectionConnected
|
||||
: widget.connected == false
|
||||
? l.connectionTapToStart
|
||||
: l.connectionConnecting;
|
||||
return SizedBox(
|
||||
height: _connRowH,
|
||||
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),
|
||||
// Channel row — fixed 28px. Always reserved
|
||||
|
|
@ -732,10 +738,9 @@ class _ChannelPill extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final accent = _accent(theme.colorScheme);
|
||||
final l = AppLocalizations.of(context)!;
|
||||
return Tooltip(
|
||||
message:
|
||||
'Active channel — click to switch in Settings (⌘;).\n'
|
||||
'production = stable · beta = pre-release · dev = rolling · local = workspace',
|
||||
message: l.sidebarChannelTooltip,
|
||||
child: Material(
|
||||
color: theme.colorScheme.surfaceContainerHigh,
|
||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||
|
|
@ -905,14 +910,15 @@ class _ConnectionLabel extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final l = AppLocalizations.of(context)!;
|
||||
final captionColor = connected == false
|
||||
? theme.colorScheme.error
|
||||
: theme.colorScheme.onSurface;
|
||||
final caption = connected == true
|
||||
? 'connected'
|
||||
? l.connectionConnected
|
||||
: connected == false
|
||||
? 'tap to start'
|
||||
: 'connecting…';
|
||||
? l.connectionTapToStart
|
||||
: l.connectionConnecting;
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
@ -1076,6 +1082,7 @@ class _Footer extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l = AppLocalizations.of(context)!;
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
|
|
@ -1084,7 +1091,7 @@ class _Footer extends StatelessWidget {
|
|||
child: Center(
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.settings_outlined, size: 16),
|
||||
tooltip: 'Settings (⌘;)',
|
||||
tooltip: l.sidebarSettingsTooltip,
|
||||
visualDensity: VisualDensity.compact,
|
||||
onPressed: onOpenSettings,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue