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",
|
||||
"connectionConnecting": "verbinde…",
|
||||
"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",
|
||||
"buttonSave": "Speichern",
|
||||
"buttonClose": "Schließen",
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@
|
|||
"connectionUnreachable": "unreachable",
|
||||
"connectionConnecting": "connecting…",
|
||||
"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",
|
||||
"buttonSave": "Save",
|
||||
"buttonClose": "Close",
|
||||
|
|
|
|||
|
|
@ -428,6 +428,24 @@ abstract class AppLocalizations {
|
|||
/// **'Start hub'**
|
||||
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.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
|
|
|||
|
|
@ -192,6 +192,16 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||
@override
|
||||
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
|
||||
String get buttonCancel => 'Abbrechen';
|
||||
|
||||
|
|
|
|||
|
|
@ -192,6 +192,16 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
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
|
||||
String get buttonCancel => 'Cancel';
|
||||
|
||||
|
|
|
|||
|
|
@ -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