From 155eb46af5dc6d5c2fafb95981d72c248d34ab5a Mon Sep 17 00:00:00 2001 From: juliangiebel Date: Wed, 22 Jan 2025 01:14:13 +0100 Subject: [PATCH] Add tranlation strings for error reporting --- SS14.Launcher/Assets/Locale/en-US/text.ftl | 15 +++++++++++++++ SS14.Launcher/ViewModels/MainWindowViewModel.cs | 8 ++++---- .../Views/MainWindowTabs/OptionsTabView.xaml | 4 ++-- SS14.Launcher/Views/SentryFeedbackWindow.xaml | 11 ++++++----- SS14.Launcher/Views/SentryFeedbackWindow.xaml.cs | 3 ++- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/SS14.Launcher/Assets/Locale/en-US/text.ftl b/SS14.Launcher/Assets/Locale/en-US/text.ftl index 6c433f05..e09cbe04 100644 --- a/SS14.Launcher/Assets/Locale/en-US/text.ftl +++ b/SS14.Launcher/Assets/Locale/en-US/text.ftl @@ -333,6 +333,21 @@ tab-options-disable-signing-desc = { "[" }DEV ONLY] Disables verification of eng tab-options-hub-settings = Hub Settings tab-options-hub-settings-desc = Change what hub server or servers you would like to use to fetch the server list. tab-options-desc-incompatible = This option is incompatible with your platform and has been disabled. +tab-options-sentry = Error Reporting +tab-options-sentry-desc = Automatically report errors. (requires launcher restart) + +## Strings for error reporting +sentry-permission-dialog-title = Error Reporting +sentry-permission-dialog-content = Allow errors to automatically be uploaded? +sentry-permission-dialog-confirm = Allow +sentry-permission-dialog-cancel = Deny +sentry-error-dialog-title = Launcher Error +sentry-error-dialog-message = An error occured and an anonymous report will automatically be sent. +sentry-error-dialog-feedback-label = Feedback +sentry-error-dialog-feedback-placeholder = Write what happened... +sentry-error-dialog-send-button = Send +sentry-error-dialog-validation-max-length-error = Feedback can't be longer than { $maxFeedbackLength } characters + ## For the language selection menu. diff --git a/SS14.Launcher/ViewModels/MainWindowViewModel.cs b/SS14.Launcher/ViewModels/MainWindowViewModel.cs index 8c28a80d..a4c3a2af 100644 --- a/SS14.Launcher/ViewModels/MainWindowViewModel.cs +++ b/SS14.Launcher/ViewModels/MainWindowViewModel.cs @@ -296,10 +296,10 @@ private async Task InquireSentryPermission() var dialog = new ConfirmDialog { - Title = "Error Reporting", - DialogContent = "Allow errors to automatically be uploaded?", - ConfirmButtonText = "Allow", - CancelButtonText = "Deny" + Title = LocalizationManager.Instance.GetString("sentry-permission-dialog-title"), + DialogContent = LocalizationManager.Instance.GetString("sentry-permission-dialog-content"), + ConfirmButtonText = LocalizationManager.Instance.GetString("sentry-permission-dialog-confirm"), + CancelButtonText = LocalizationManager.Instance.GetString("sentry-permission-dialog-cancel"), }; var result = await dialog.ShowDialog(Control!); diff --git a/SS14.Launcher/Views/MainWindowTabs/OptionsTabView.xaml b/SS14.Launcher/Views/MainWindowTabs/OptionsTabView.xaml index 5e777a7e..377f05fb 100644 --- a/SS14.Launcher/Views/MainWindowTabs/OptionsTabView.xaml +++ b/SS14.Launcher/Views/MainWindowTabs/OptionsTabView.xaml @@ -56,9 +56,9 @@ Text="{loc:Loc tab-options-verbose-launcher-logging-desc}" Margin="8" /> - Error Reporting + diff --git a/SS14.Launcher/Views/SentryFeedbackWindow.xaml b/SS14.Launcher/Views/SentryFeedbackWindow.xaml index bd44feae..d673d21a 100644 --- a/SS14.Launcher/Views/SentryFeedbackWindow.xaml +++ b/SS14.Launcher/Views/SentryFeedbackWindow.xaml @@ -2,12 +2,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:loc="clr-namespace:SS14.Launcher.Localization" mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="100" MinWidth="550" MinHeight="300" Width="550" Height="300" x:Class="SS14.Launcher.Views.SentryFeedbackWindow" Icon="{DynamicResource WindowIcon}" - Title="Launcher Error" + Title="{loc:Loc sentry-error-dialog-title }" Padding="8" WindowStartupLocation="CenterOwner"> @@ -34,18 +35,18 @@ + Text="{loc:Loc sentry-error-dialog-message }"/> - - + -