diff --git a/src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw b/src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw
index 41f28d3..1782815 100644
--- a/src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw
+++ b/src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw
@@ -624,6 +624,138 @@ Use one of these options:
Open Activity Stream
+
+
+
+ OpenClaw Setup
+
+
+ Step 1 of 3 — Connect
+
+
+ Connect to your gateway
+
+
+ On your gateway host (Mac/Linux), run this to get a setup code:
+
+
+ Setup Code
+
+
+ Paste the setup code from your gateway dashboard
+
+
+ Or enter URL and token manually ▾
+
+
+ Hide manual entry ▴
+
+
+ Gateway URL
+
+
+ ws://192.168.1.x:18789
+
+
+ 💡 Accepts ws://, wss://, http://, or https://
+
+
+ Gateway Token
+
+
+ Paste your token here
+
+
+ Test Connection
+
+
+ ⏳ Connecting to gateway...
+
+
+ ✅ Connected!
+
+
+ ✅ Gateway reached! Device needs pairing approval.
+
+On your gateway host (Mac/Linux), run:
+
+ openclaw devices approve {0}
+
+
+ ❌ Token doesn't match.
+
+💡 Check gateway auth token:
+ cat ~/.openclaw/openclaw.json | grep token
+
+
+ ❌ Origin not allowed.
+
+💡 Add this machine to gateway.controlUi.allowedOrigins.
+
+
+ ❌ Rate-limited. Wait a minute and try again.
+
+
+ ❌ Timed out. Check the URL and gateway is running.
+
+
+ ❌ Please enter a token
+
+
+ ⚠️ Please test the connection first
+
+
+ ✅ Setup code decoded — press Test Connection
+
+
+ Enable Node Mode (optional)
+
+
+ Node Mode lets your Windows machine run tasks for OpenClaw — like screen capture, camera access, and canvas drawing.
+
+
+ Enable Node Mode
+
+
+ Device ID: loading...
+
+
+ Device ID: (will be generated on first connect)
+
+
+ 📋 Copy Device ID
+
+
+ ✅ Copied!
+
+
+ To approve this node, run on your gateway host:
+
+
+ 💡 You can finish setup now — pairing will continue in the background. You'll get a notification when approved.
+
+
+ 🎉 You're all set!
+
+
+ OpenClaw Tray will connect to your gateway and start monitoring.
+
+
+ Back
+
+
+ Next
+
+
+ Finish
+
+
+ Step 2 of 3 — Node Mode
+
+
+ Step 3 of 3 — Done
+
+
diff --git a/src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw b/src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw
index 332c082..7a44441 100644
--- a/src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw
+++ b/src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw
@@ -624,6 +624,138 @@ Utilisez l'une de ces options :
Créer un nouveau flux d'activités
+
+
+
+ Configuration d'OpenClaw
+
+
+ Étape 1 sur 3 — Connexion
+
+
+ Connectez-vous à votre passerelle
+
+
+ Sur votre hôte passerelle (Mac/Linux), exécutez cette commande pour obtenir un code de configuration :
+
+
+ Code de configuration
+
+
+ Collez le code de configuration depuis le tableau de bord de votre passerelle
+
+
+ Ou entrez l'URL et le jeton manuellement ▾
+
+
+ Masquer la saisie manuelle ▴
+
+
+ URL de la passerelle
+
+
+ ws://192.168.1.x:18789
+
+
+ 💡 Accepte ws://, wss://, http:// ou https://
+
+
+ Jeton de la passerelle
+
+
+ Collez votre jeton ici
+
+
+ Tester la connexion
+
+
+ ⏳ Connexion à la passerelle...
+
+
+ ✅ Connecté !
+
+
+ ✅ Passerelle atteinte ! L'appareil nécessite une approbation d'appariement.
+
+Sur votre hôte passerelle (Mac/Linux), exécutez :
+
+ openclaw devices approve {0}
+
+
+ ❌ Le jeton ne correspond pas.
+
+💡 Vérifiez le jeton d'authentification de la passerelle :
+ cat ~/.openclaw/openclaw.json | grep token
+
+
+ ❌ Origine non autorisée.
+
+💡 Ajoutez cette machine à gateway.controlUi.allowedOrigins.
+
+
+ ❌ Trop de tentatives. Attendez une minute et réessayez.
+
+
+ ❌ Délai expiré. Vérifiez l'URL et que la passerelle fonctionne.
+
+
+ ❌ Veuillez entrer un jeton
+
+
+ ⚠️ Veuillez d'abord tester la connexion
+
+
+ ✅ Code de configuration décodé — appuyez sur Tester la connexion
+
+
+ Activer le mode nœud (optionnel)
+
+
+ Le mode nœud permet à votre machine Windows d'exécuter des tâches pour OpenClaw — comme la capture d'écran, l'accès caméra et le dessin sur canevas.
+
+
+ Activer le mode nœud
+
+
+ ID de l'appareil : chargement...
+
+
+ ID de l'appareil : (sera généré lors de la première connexion)
+
+
+ 📋 Copier l'ID de l'appareil
+
+
+ ✅ Copié !
+
+
+ Pour approuver ce nœud, exécutez sur votre hôte passerelle :
+
+
+ 💡 Vous pouvez terminer la configuration maintenant — l'appariement continuera en arrière-plan. Vous recevrez une notification une fois approuvé.
+
+
+ 🎉 Tout est prêt !
+
+
+ OpenClaw Tray se connectera à votre passerelle et commencera la surveillance.
+
+
+ Retour
+
+
+ Suivant
+
+
+ Terminer
+
+
+ Étape 2 sur 3 — Mode nœud
+
+
+ Étape 3 sur 3 — Terminé
+
+
diff --git a/src/OpenClaw.Tray.WinUI/Strings/nl-nl/Resources.resw b/src/OpenClaw.Tray.WinUI/Strings/nl-nl/Resources.resw
index 57117e7..c177a1c 100644
--- a/src/OpenClaw.Tray.WinUI/Strings/nl-nl/Resources.resw
+++ b/src/OpenClaw.Tray.WinUI/Strings/nl-nl/Resources.resw
@@ -624,6 +624,138 @@ Gebruik een van deze opties:
Activiteitenstroom openen
+
+
+
+ OpenClaw Instellen
+
+
+ Stap 1 van 3 — Verbinden
+
+
+ Verbind met uw gateway
+
+
+ Voer op uw gateway-host (Mac/Linux) deze opdracht uit om een installatiecode te krijgen:
+
+
+ Installatiecode
+
+
+ Plak de installatiecode van uw gateway-dashboard
+
+
+ Of voer URL en token handmatig in ▾
+
+
+ Handmatige invoer verbergen ▴
+
+
+ Gateway-URL
+
+
+ ws://192.168.1.x:18789
+
+
+ 💡 Accepteert ws://, wss://, http:// of https://
+
+
+ Gateway-token
+
+
+ Plak hier uw token
+
+
+ Verbinding testen
+
+
+ ⏳ Verbinden met gateway...
+
+
+ ✅ Verbonden!
+
+
+ ✅ Gateway bereikt! Apparaat moet worden goedgekeurd voor koppeling.
+
+Voer op uw gateway-host (Mac/Linux) uit:
+
+ openclaw devices approve {0}
+
+
+ ❌ Token komt niet overeen.
+
+💡 Controleer het gateway-verificatietoken:
+ cat ~/.openclaw/openclaw.json | grep token
+
+
+ ❌ Oorsprong niet toegestaan.
+
+💡 Voeg deze machine toe aan gateway.controlUi.allowedOrigins.
+
+
+ ❌ Te veel verzoeken. Wacht een minuut en probeer opnieuw.
+
+
+ ❌ Time-out. Controleer de URL en of de gateway draait.
+
+
+ ❌ Voer een token in
+
+
+ ⚠️ Test eerst de verbinding
+
+
+ ✅ Installatiecode gedecodeerd — druk op Verbinding testen
+
+
+ Knooppuntmodus inschakelen (optioneel)
+
+
+ Knooppuntmodus laat uw Windows-machine taken uitvoeren voor OpenClaw — zoals schermopname, cameratoegang en canvas-tekenen.
+
+
+ Knooppuntmodus inschakelen
+
+
+ Apparaat-ID: laden...
+
+
+ Apparaat-ID: (wordt gegenereerd bij eerste verbinding)
+
+
+ 📋 Apparaat-ID kopiëren
+
+
+ ✅ Gekopieerd!
+
+
+ Om dit knooppunt goed te keuren, voer uit op uw gateway-host:
+
+
+ 💡 U kunt de installatie nu voltooien — koppeling gaat op de achtergrond door. U ontvangt een melding wanneer goedgekeurd.
+
+
+ 🎉 Alles is klaar!
+
+
+ OpenClaw Tray zal verbinding maken met uw gateway en beginnen met monitoren.
+
+
+ Vorige
+
+
+ Volgende
+
+
+ Voltooien
+
+
+ Stap 2 van 3 — Knooppuntmodus
+
+
+ Stap 3 van 3 — Gereed
+
+
diff --git a/src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw b/src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw
index 043519a..7221528 100644
--- a/src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw
+++ b/src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw
@@ -624,6 +624,138 @@
打开活动流
+
+
+
+ OpenClaw 设置
+
+
+ 第 1 步(共 3 步)— 连接
+
+
+ 连接到您的网关
+
+
+ 在您的网关主机(Mac/Linux)上运行以下命令获取设置码:
+
+
+ 设置码
+
+
+ 粘贴来自网关仪表板的设置码
+
+
+ 或手动输入 URL 和令牌 ▾
+
+
+ 隐藏手动输入 ▴
+
+
+ 网关地址
+
+
+ ws://192.168.1.x:18789
+
+
+ 💡 支持 ws://、wss://、http:// 或 https://
+
+
+ 网关令牌
+
+
+ 在此粘贴您的令牌
+
+
+ 测试连接
+
+
+ ⏳ 正在连接网关...
+
+
+ ✅ 连接成功!
+
+
+ ✅ 已连接到网关!设备需要配对批准。
+
+在您的网关主机(Mac/Linux)上运行:
+
+ openclaw devices approve {0}
+
+
+ ❌ 令牌不匹配。
+
+💡 检查网关认证令牌:
+ cat ~/.openclaw/openclaw.json | grep token
+
+
+ ❌ 来源不被允许。
+
+💡 将此机器添加到 gateway.controlUi.allowedOrigins。
+
+
+ ❌ 请求过于频繁。请等待一分钟后重试。
+
+
+ ❌ 连接超时。请检查 URL 和网关是否正在运行。
+
+
+ ❌ 请输入令牌
+
+
+ ⚠️ 请先测试连接
+
+
+ ✅ 设置码已解码 — 请点击"测试连接"
+
+
+ 启用节点模式(可选)
+
+
+ 节点模式允许您的 Windows 电脑为 OpenClaw 执行任务 — 如屏幕截图、摄像头访问和画布绘制。
+
+
+ 启用节点模式
+
+
+ 设备 ID:加载中...
+
+
+ 设备 ID:(将在首次连接时生成)
+
+
+ 📋 复制设备 ID
+
+
+ ✅ 已复制!
+
+
+ 要批准此节点,请在网关主机上运行:
+
+
+ 💡 您可以现在完成设置 — 配对将在后台继续。获得批准后会收到通知。
+
+
+ 🎉 一切就绪!
+
+
+ OpenClaw 托盘将连接到您的网关并开始监控。
+
+
+ 上一步
+
+
+ 下一步
+
+
+ 完成
+
+
+ 第 2 步(共 3 步)— 节点模式
+
+
+ 第 3 步(共 3 步)— 完成
+
+
diff --git a/src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw b/src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw
index e945810..e33d5c0 100644
--- a/src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw
+++ b/src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw
@@ -624,6 +624,138 @@
打開串流活動
+
+
+
+ OpenClaw 設定
+
+
+ 第 1 步(共 3 步)— 連線
+
+
+ 連線到您的閘道器
+
+
+ 在您的閘道器主機(Mac/Linux)上執行以下命令取得設定碼:
+
+
+ 設定碼
+
+
+ 貼上來自閘道器儀表板的設定碼
+
+
+ 或手動輸入 URL 和權杖 ▾
+
+
+ 隱藏手動輸入 ▴
+
+
+ 閘道器網址
+
+
+ ws://192.168.1.x:18789
+
+
+ 💡 支援 ws://、wss://、http:// 或 https://
+
+
+ 閘道器權杖
+
+
+ 在此貼上您的權杖
+
+
+ 測試連線
+
+
+ ⏳ 正在連線到閘道器...
+
+
+ ✅ 已連線!
+
+
+ ✅ 已連線到閘道器!裝置需要配對核准。
+
+在您的閘道器主機(Mac/Linux)上執行:
+
+ openclaw devices approve {0}
+
+
+ ❌ 權杖不符。
+
+💡 檢查閘道器認證權杖:
+ cat ~/.openclaw/openclaw.json | grep token
+
+
+ ❌ 來源不被允許。
+
+💡 將此機器加入 gateway.controlUi.allowedOrigins。
+
+
+ ❌ 請求過於頻繁。請等待一分鐘後重試。
+
+
+ ❌ 連線逾時。請檢查網址和閘道器是否正在執行。
+
+
+ ❌ 請輸入權杖
+
+
+ ⚠️ 請先測試連線
+
+
+ ✅ 設定碼已解碼 — 請點擊「測試連線」
+
+
+ 啟用節點模式(選用)
+
+
+ 節點模式允許您的 Windows 電腦為 OpenClaw 執行任務 — 如螢幕擷取、攝影機存取和畫布繪製。
+
+
+ 啟用節點模式
+
+
+ 裝置 ID:載入中...
+
+
+ 裝置 ID:(將在首次連線時產生)
+
+
+ 📋 複製裝置 ID
+
+
+ ✅ 已複製!
+
+
+ 要核准此節點,請在閘道器主機上執行:
+
+
+ 💡 您可以現在完成設定 — 配對將在背景繼續。獲得核准後會收到通知。
+
+
+ 🎉 一切就緒!
+
+
+ OpenClaw 系統匣將連線到您的閘道器並開始監控。
+
+
+ 上一步
+
+
+ 下一步
+
+
+ 完成
+
+
+ 第 2 步(共 3 步)— 節點模式
+
+
+ 第 3 步(共 3 步)— 完成
+
+
diff --git a/src/OpenClaw.Tray.WinUI/Windows/ActivityStreamWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/ActivityStreamWindow.xaml
index 371f98a..6958a78 100644
--- a/src/OpenClaw.Tray.WinUI/Windows/ActivityStreamWindow.xaml
+++ b/src/OpenClaw.Tray.WinUI/Windows/ActivityStreamWindow.xaml
@@ -25,7 +25,7 @@
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
-
+
@@ -34,7 +34,7 @@
-
@@ -90,9 +90,9 @@
-
-
-
+
+
+
diff --git a/src/OpenClaw.Tray.WinUI/Windows/CanvasWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/CanvasWindow.xaml
index 4daa2d8..536c14a 100644
--- a/src/OpenClaw.Tray.WinUI/Windows/CanvasWindow.xaml
+++ b/src/OpenClaw.Tray.WinUI/Windows/CanvasWindow.xaml
@@ -32,7 +32,7 @@
Spacing="16"
Padding="32">
-
diff --git a/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml
index f901dfc..6061bdb 100644
--- a/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml
+++ b/src/OpenClaw.Tray.WinUI/Windows/NotificationHistoryWindow.xaml
@@ -26,7 +26,7 @@
-
@@ -80,8 +80,8 @@
-
-
+
+
diff --git a/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml
index e0f15ac..4c746f9 100644
--- a/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml
+++ b/src/OpenClaw.Tray.WinUI/Windows/SettingsWindow.xaml
@@ -24,9 +24,9 @@
+ Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" FontWeight="Bold"/>
-
+
-
-
+
+
@@ -50,18 +50,18 @@
-
-
+
+
-
-
-
@@ -72,20 +72,20 @@
+ Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" FontWeight="Bold"/>
-
-
+
+
+ Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" FontWeight="Bold"/>
-
+
-
+
@@ -98,27 +98,27 @@
Margin="0,0,0,4"/>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+ Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" FontWeight="Bold"/>
-
+
-
diff --git a/src/OpenClaw.Tray.WinUI/Windows/SetupWizardWindow.cs b/src/OpenClaw.Tray.WinUI/Windows/SetupWizardWindow.cs
index 30073fb..b34013f 100644
--- a/src/OpenClaw.Tray.WinUI/Windows/SetupWizardWindow.cs
+++ b/src/OpenClaw.Tray.WinUI/Windows/SetupWizardWindow.cs
@@ -1,4 +1,5 @@
using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Automation;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Text;
@@ -60,7 +61,7 @@ public sealed class SetupWizardWindow : WindowEx
_draftToken = settings.Token;
_draftEnableNodeMode = settings.EnableNodeMode;
- Title = "OpenClaw Setup";
+ Title = LocalizationHelper.GetString("Setup_Title");
this.SetWindowSize(720, 700);
this.CenterOnScreen();
this.SetIcon("Assets\\openclaw.ico");
@@ -77,7 +78,7 @@ public sealed class SetupWizardWindow : WindowEx
header.Children.Add(new TextBlock { Text = "🦞", FontSize = 36 });
header.Children.Add(new TextBlock
{
- Text = "OpenClaw Setup",
+ Text = LocalizationHelper.GetString("Setup_Title"),
Style = (Style)Application.Current.Resources["TitleTextBlockStyle"],
VerticalAlignment = VerticalAlignment.Center
});
@@ -87,8 +88,8 @@ public sealed class SetupWizardWindow : WindowEx
// Step indicator
_stepIndicator = new TextBlock
{
- Text = "Step 1 of 3 — Connect",
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray),
+ Text = LocalizationHelper.GetString("Setup_StepConnect"),
+ Foreground = (SolidColorBrush)Application.Current.Resources["TextFillColorSecondaryBrush"],
Margin = new Thickness(0, 0, 0, 16)
};
Grid.SetRow(_stepIndicator, 1);
@@ -101,15 +102,15 @@ public sealed class SetupWizardWindow : WindowEx
_stepPanels[0] = new StackPanel { Spacing = 12 };
_stepPanels[0].Children.Add(new TextBlock
{
- Text = "Connect to your gateway",
+ Text = LocalizationHelper.GetString("Setup_ConnectTitle"),
FontWeight = FontWeights.SemiBold,
- FontSize = 16
+ Style = (Style)Application.Current.Resources["SubtitleTextBlockStyle"]
});
_stepPanels[0].Children.Add(new TextBlock
{
- Text = "On your gateway host (Mac/Linux), run this to get a setup code:",
+ Text = LocalizationHelper.GetString("Setup_ConnectDescription"),
TextWrapping = TextWrapping.Wrap,
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray)
+ Foreground = (SolidColorBrush)Application.Current.Resources["TextFillColorSecondaryBrush"]
});
var cmdHint = new TextBox
{
@@ -117,58 +118,64 @@ public sealed class SetupWizardWindow : WindowEx
IsReadOnly = true,
FontFamily = new FontFamily("Cascadia Mono, Consolas"),
BorderThickness = new Thickness(1),
- Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 40, 40, 40)),
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.LightGreen),
+ Background = (SolidColorBrush)Application.Current.Resources["CardBackgroundFillColorDefaultBrush"],
+ Foreground = (SolidColorBrush)Application.Current.Resources["SystemFillColorSuccessBrush"],
Padding = new Thickness(12, 8, 12, 8)
};
_stepPanels[0].Children.Add(cmdHint);
_setupCodeBox = new TextBox
{
- Header = "Setup Code",
- PlaceholderText = "Paste the setup code from your gateway dashboard",
+ Header = LocalizationHelper.GetString("Setup_SetupCodeHeader"),
+ PlaceholderText = LocalizationHelper.GetString("Setup_SetupCodePlaceholder"),
TextWrapping = TextWrapping.Wrap,
AcceptsReturn = false
};
+ AutomationProperties.SetAutomationId(_setupCodeBox, "SetupCodeBox");
_setupCodeBox.TextChanged += OnSetupCodeChanged;
_stepPanels[0].Children.Add(_setupCodeBox);
// Manual entry toggle
- var manualToggle = new HyperlinkButton { Content = "Or enter URL and token manually ▾" };
+ var manualToggle = new HyperlinkButton { Content = LocalizationHelper.GetString("Setup_ManualEntryToggle") };
+ AutomationProperties.SetAutomationId(manualToggle, "ManualEntryToggle");
_manualEntryPanel = new StackPanel { Spacing = 8, Visibility = Visibility.Collapsed };
manualToggle.Click += (s, e) =>
{
_manualEntryPanel.Visibility = _manualEntryPanel.Visibility == Visibility.Visible
? Visibility.Collapsed : Visibility.Visible;
manualToggle.Content = _manualEntryPanel.Visibility == Visibility.Visible
- ? "Hide manual entry ▴" : "Or enter URL and token manually ▾";
+ ? LocalizationHelper.GetString("Setup_ManualEntryToggleHide") : LocalizationHelper.GetString("Setup_ManualEntryToggle");
};
_stepPanels[0].Children.Add(manualToggle);
_gatewayUrlBox = new TextBox
{
- Header = "Gateway URL",
- PlaceholderText = "ws://192.168.1.x:18789",
+ Header = LocalizationHelper.GetString("Setup_GatewayUrlHeader"),
+ PlaceholderText = LocalizationHelper.GetString("Setup_GatewayUrlPlaceholder"),
Text = _draftGatewayUrl
};
+ AutomationProperties.SetAutomationId(_gatewayUrlBox, "GatewayUrlBox");
_gatewayUrlBox.TextChanged += (s, e) => _connectionTested = false;
_manualEntryPanel.Children.Add(_gatewayUrlBox);
_manualEntryPanel.Children.Add(new TextBlock
{
- Text = "💡 Accepts ws://, wss://, http://, or https://",
- FontSize = 12, Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray)
+ Text = LocalizationHelper.GetString("Setup_GatewayUrlHint"),
+ Style = (Style)Application.Current.Resources["CaptionTextBlockStyle"],
+ Foreground = (SolidColorBrush)Application.Current.Resources["TextFillColorSecondaryBrush"]
});
_tokenBox = new PasswordBox
{
- Header = "Gateway Token",
- PlaceholderText = "Paste your token here",
+ Header = LocalizationHelper.GetString("Setup_TokenHeader"),
+ PlaceholderText = LocalizationHelper.GetString("Setup_TokenPlaceholder"),
Password = _draftToken
};
+ AutomationProperties.SetAutomationId(_tokenBox, "TokenBox");
_tokenBox.PasswordChanged += (s, e) => _connectionTested = false;
_manualEntryPanel.Children.Add(_tokenBox);
_stepPanels[0].Children.Add(_manualEntryPanel);
// Test connection
- _testButton = new Button { Content = "Test Connection" };
+ _testButton = new Button { Content = LocalizationHelper.GetString("Setup_TestButton") };
+ AutomationProperties.SetAutomationId(_testButton, "TestConnectionButton");
_testButton.Click += OnTestConnection;
_stepPanels[0].Children.Add(_testButton);
_testStatusLabel = new TextBlock
@@ -183,21 +190,22 @@ public sealed class SetupWizardWindow : WindowEx
_stepPanels[1] = new StackPanel { Spacing = 12, Visibility = Visibility.Collapsed };
_stepPanels[1].Children.Add(new TextBlock
{
- Text = "Enable Node Mode (optional)",
+ Text = LocalizationHelper.GetString("Setup_NodeModeTitle"),
FontWeight = FontWeights.SemiBold,
- FontSize = 16
+ Style = (Style)Application.Current.Resources["SubtitleTextBlockStyle"]
});
_stepPanels[1].Children.Add(new TextBlock
{
- Text = "Node Mode lets your Windows machine run tasks for OpenClaw — like screen capture, camera access, and canvas drawing.",
+ Text = LocalizationHelper.GetString("Setup_NodeModeDescription"),
TextWrapping = TextWrapping.Wrap,
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray)
+ Foreground = (SolidColorBrush)Application.Current.Resources["TextFillColorSecondaryBrush"]
});
_nodeModeToggle = new ToggleSwitch
{
- Header = "Enable Node Mode",
+ Header = LocalizationHelper.GetString("Setup_NodeModeToggle"),
IsOn = _draftEnableNodeMode
};
+ AutomationProperties.SetAutomationId(_nodeModeToggle, "NodeModeToggle");
_nodeModeToggle.Toggled += (s, e) =>
{
var showPairing = _nodeModeToggle.IsOn;
@@ -209,7 +217,7 @@ public sealed class SetupWizardWindow : WindowEx
_deviceIdText = new TextBlock
{
- Text = "Device ID: loading...",
+ Text = LocalizationHelper.GetString("Setup_DeviceIdLoading"),
FontFamily = new FontFamily("Cascadia Mono, Consolas"),
IsTextSelectionEnabled = true,
TextWrapping = TextWrapping.Wrap,
@@ -219,9 +227,10 @@ public sealed class SetupWizardWindow : WindowEx
_copyDeviceIdButton = new Button
{
- Content = "📋 Copy Device ID",
+ Content = LocalizationHelper.GetString("Setup_CopyDeviceId"),
Visibility = _draftEnableNodeMode ? Visibility.Visible : Visibility.Collapsed
};
+ AutomationProperties.SetAutomationId(_copyDeviceIdButton, "CopyDeviceIdButton");
_copyDeviceIdButton.Click += OnCopyDeviceId;
_stepPanels[1].Children.Add(_copyDeviceIdButton);
@@ -239,9 +248,9 @@ public sealed class SetupWizardWindow : WindowEx
};
pairingInstructions.Children.Add(new TextBlock
{
- Text = "To approve this node, run on your gateway host:",
+ Text = LocalizationHelper.GetString("Setup_ApproveInstructions"),
TextWrapping = TextWrapping.Wrap,
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray)
+ Foreground = (SolidColorBrush)Application.Current.Resources["TextFillColorSecondaryBrush"]
});
var approveCmd = new TextBox
{
@@ -249,8 +258,8 @@ public sealed class SetupWizardWindow : WindowEx
IsReadOnly = true,
FontFamily = new FontFamily("Cascadia Mono, Consolas"),
BorderThickness = new Thickness(1),
- Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 40, 40, 40)),
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.LightGreen),
+ Background = (SolidColorBrush)Application.Current.Resources["CardBackgroundFillColorDefaultBrush"],
+ Foreground = (SolidColorBrush)Application.Current.Resources["SystemFillColorSuccessBrush"],
Padding = new Thickness(12, 8, 12, 8),
AcceptsReturn = true,
TextWrapping = TextWrapping.Wrap
@@ -258,10 +267,10 @@ public sealed class SetupWizardWindow : WindowEx
pairingInstructions.Children.Add(approveCmd);
pairingInstructions.Children.Add(new TextBlock
{
- Text = "💡 You can finish setup now — pairing will continue in the background. You'll get a notification when approved.",
+ Text = LocalizationHelper.GetString("Setup_ApproveHint"),
TextWrapping = TextWrapping.Wrap,
- FontSize = 12,
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray)
+ Style = (Style)Application.Current.Resources["CaptionTextBlockStyle"],
+ Foreground = (SolidColorBrush)Application.Current.Resources["TextFillColorSecondaryBrush"]
});
_stepPanels[1].Children.Add(pairingInstructions);
contentArea.Children.Add(_stepPanels[1]);
@@ -270,15 +279,15 @@ public sealed class SetupWizardWindow : WindowEx
_stepPanels[2] = new StackPanel { Spacing = 12, Visibility = Visibility.Collapsed };
_stepPanels[2].Children.Add(new TextBlock
{
- Text = "🎉 You're all set!",
+ Text = LocalizationHelper.GetString("Setup_DoneTitle"),
FontWeight = FontWeights.SemiBold,
- FontSize = 16
+ Style = (Style)Application.Current.Resources["SubtitleTextBlockStyle"]
});
_stepPanels[2].Children.Add(new TextBlock
{
- Text = "OpenClaw Tray will connect to your gateway and start monitoring.",
+ Text = LocalizationHelper.GetString("Setup_DoneDescription"),
TextWrapping = TextWrapping.Wrap,
- Foreground = new SolidColorBrush(Microsoft.UI.Colors.Gray)
+ Foreground = (SolidColorBrush)Application.Current.Resources["TextFillColorSecondaryBrush"]
});
contentArea.Children.Add(_stepPanels[2]);
@@ -298,15 +307,17 @@ public sealed class SetupWizardWindow : WindowEx
Spacing = 8,
Margin = new Thickness(0, 16, 0, 0)
};
- _backButton = new Button { Content = "Back", Visibility = Visibility.Collapsed };
+ _backButton = new Button { Content = LocalizationHelper.GetString("Setup_BackButton"), Visibility = Visibility.Collapsed };
+ AutomationProperties.SetAutomationId(_backButton, "BackButton");
_backButton.Click += (s, e) => GoToStep(_currentStep - 1);
navPanel.Children.Add(_backButton);
_nextButton = new Button
{
- Content = "Next",
+ Content = LocalizationHelper.GetString("Setup_NextButton"),
Style = (Style)Application.Current.Resources["AccentButtonStyle"]
};
+ AutomationProperties.SetAutomationId(_nextButton, "NextButton");
_nextButton.Click += OnNextClicked;
navPanel.Children.Add(_nextButton);
@@ -330,16 +341,16 @@ public sealed class SetupWizardWindow : WindowEx
_backButton.Visibility = _currentStep > 0 ? Visibility.Visible : Visibility.Collapsed;
- var stepNames = new[] { "Connect", "Node Mode", "Done" };
- _stepIndicator.Text = $"Step {_currentStep + 1} of {TotalSteps} — {stepNames[_currentStep]}";
+ var stepKeys = new[] { "Setup_StepConnect", "Setup_StepNodeMode", "Setup_StepDone" };
+ _stepIndicator.Text = LocalizationHelper.GetString(stepKeys[_currentStep]);
if (_currentStep == TotalSteps - 1)
{
- _nextButton.Content = "Finish";
+ _nextButton.Content = LocalizationHelper.GetString("Setup_FinishButton");
}
else
{
- _nextButton.Content = "Next";
+ _nextButton.Content = LocalizationHelper.GetString("Setup_NextButton");
}
}
@@ -350,7 +361,7 @@ public sealed class SetupWizardWindow : WindowEx
case 0: // Connection — must have tested successfully
if (!_connectionTested)
{
- _testStatusLabel.Text = "⚠️ Please test the connection first";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_TestFirst");
return;
}
GoToStep(1);
@@ -396,7 +407,7 @@ public sealed class SetupWizardWindow : WindowEx
// Show manual fields so user can see what was decoded
_manualEntryPanel.Visibility = Visibility.Visible;
- _testStatusLabel.Text = "✅ Setup code decoded — press Test Connection";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_CodeDecoded");
Logger.Info($"[Setup] Setup code decoded: gateway={GatewayUrlHelper.SanitizeForDisplay(_draftGatewayUrl)}");
}
catch
@@ -418,11 +429,11 @@ public sealed class SetupWizardWindow : WindowEx
if (string.IsNullOrWhiteSpace(_draftToken))
{
- _testStatusLabel.Text = "❌ Please enter a token";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_TokenRequired");
return;
}
- _testStatusLabel.Text = "⏳ Testing...";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_Testing");
_testButton.IsEnabled = false;
_connectionTested = false;
@@ -465,7 +476,7 @@ public sealed class SetupWizardWindow : WindowEx
if (connected)
{
Logger.Info("[Setup] Test succeeded - fully connected");
- _testStatusLabel.Text = "✅ Connected!";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_Connected");
_connectionTested = true;
}
else if (lastError.Contains("pairing required", StringComparison.OrdinalIgnoreCase) ||
@@ -473,20 +484,20 @@ public sealed class SetupWizardWindow : WindowEx
{
Logger.Info("[Setup] Test succeeded - pairing approval needed");
var deviceId = _copyDeviceIdButton.Tag?.ToString() ?? "your-device-id";
- _testStatusLabel.Text = $"✅ Gateway reached! Device needs pairing approval.\n\nOn your gateway host (Mac/Linux), run:\n\n openclaw devices approve {deviceId}";
+ _testStatusLabel.Text = string.Format(LocalizationHelper.GetString("Setup_PairingRequired"), deviceId);
_connectionTested = true;
}
else if (lastError.Contains("token mismatch", StringComparison.OrdinalIgnoreCase))
{
- _testStatusLabel.Text = "❌ Token doesn't match.\n\n💡 Check gateway auth token:\n cat ~/.openclaw/openclaw.json | grep token";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_TokenMismatch");
}
else if (lastError.Contains("origin not allowed", StringComparison.OrdinalIgnoreCase))
{
- _testStatusLabel.Text = "❌ Origin not allowed.\n\n💡 Add this machine to gateway.controlUi.allowedOrigins.";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_OriginNotAllowed");
}
else if (lastError.Contains("too many failed", StringComparison.OrdinalIgnoreCase))
{
- _testStatusLabel.Text = "❌ Rate-limited. Wait a minute and try again.";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_RateLimited");
}
else if (!string.IsNullOrEmpty(lastError))
{
@@ -494,7 +505,7 @@ public sealed class SetupWizardWindow : WindowEx
}
else
{
- _testStatusLabel.Text = "❌ Timed out. Check the URL and gateway is running.";
+ _testStatusLabel.Text = LocalizationHelper.GetString("Setup_TimedOut");
}
}
catch (Exception ex)
@@ -540,7 +551,7 @@ public sealed class SetupWizardWindow : WindowEx
catch (Exception ex)
{
Logger.Warn($"[Setup] Could not load device identity: {ex.Message}");
- _deviceIdText.Text = "Device ID: (will be generated on first connect)";
+ _deviceIdText.Text = LocalizationHelper.GetString("Setup_DeviceIdFallback");
}
}
@@ -554,13 +565,13 @@ public sealed class SetupWizardWindow : WindowEx
var dataPackage = new global::Windows.ApplicationModel.DataTransfer.DataPackage();
dataPackage.SetText(fullId);
global::Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
- _copyDeviceIdButton.Content = "✅ Copied!";
+ _copyDeviceIdButton.Content = LocalizationHelper.GetString("Setup_DeviceIdCopied");
Logger.Info("[Setup] Device ID copied to clipboard");
// Reset button text after 2 seconds
_ = Task.Delay(2000).ContinueWith(_ =>
{
- DispatcherQueue.TryEnqueue(() => _copyDeviceIdButton.Content = "📋 Copy Device ID");
+ DispatcherQueue.TryEnqueue(() => _copyDeviceIdButton.Content = LocalizationHelper.GetString("Setup_CopyDeviceId"));
});
}
catch (Exception ex)
diff --git a/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml
index c5ce528..b841f9b 100644
--- a/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml
+++ b/src/OpenClaw.Tray.WinUI/Windows/StatusDetailWindow.xaml
@@ -16,7 +16,7 @@
+ Foreground="{ThemeResource SystemFillColorCriticalBrush}"/>
@@ -29,7 +29,7 @@
+ Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" FontWeight="Bold"/>
@@ -59,7 +59,7 @@
+ Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" FontWeight="Bold"/>
@@ -92,7 +92,7 @@
+ Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" FontWeight="Bold"/>
@@ -114,7 +114,7 @@
-
+
diff --git a/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml b/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml
index ce2db83..9cc4060 100644
--- a/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml
+++ b/src/OpenClaw.Tray.WinUI/Windows/WebChatWindow.xaml
@@ -20,22 +20,26 @@
-
-
-
-
@@ -52,10 +56,10 @@
-
+ FontFamily="Consolas" Style="{StaticResource CaptionTextBlockStyle}"/>