feat(i18n): localize ViewModel-built strings via ambient Loc accessor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using ClaudeDo.Data;
|
||||
using ClaudeDo.Data.Models;
|
||||
using ClaudeDo.Ui.Localization;
|
||||
using ClaudeDo.Ui.Services;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
using ClaudeDo.Ui.ViewModels.Modals;
|
||||
@@ -23,9 +24,9 @@ public sealed partial class IslandsShellViewModel : ViewModelBase
|
||||
public UpdateCheckService UpdateCheck => _updateCheck;
|
||||
|
||||
public string ConnectionText =>
|
||||
Worker?.IsConnected == true ? "Online"
|
||||
: Worker?.IsReconnecting == true ? "Connecting…"
|
||||
: "Offline";
|
||||
Worker?.IsConnected == true ? Loc.T("vm.connection.online")
|
||||
: Worker?.IsReconnecting == true ? Loc.T("vm.connection.connecting")
|
||||
: Loc.T("vm.connection.offline");
|
||||
|
||||
public bool IsOffline => Worker?.IsConnected != true && Worker?.IsReconnecting != true;
|
||||
|
||||
@@ -358,7 +359,7 @@ public sealed partial class IslandsShellViewModel : ViewModelBase
|
||||
[RelayCommand]
|
||||
private async Task RestartWorkerAsync()
|
||||
{
|
||||
RestartWorkerStatus = "Restarting worker…";
|
||||
RestartWorkerStatus = Loc.T("vm.shell.restartingWorker");
|
||||
try
|
||||
{
|
||||
await Task.Run(RestartWorkerService);
|
||||
|
||||
Reference in New Issue
Block a user