Improve error message

This commit is contained in:
Nikolaj Olsson 2024-04-09 20:35:29 +02:00
parent fb7126504a
commit a4b079f142

View File

@ -948,10 +948,11 @@ namespace Nikse.SubtitleEdit.Forms.Translate
engineType == typeof(LmStudioTranslate) || engineType == typeof(LmStudioTranslate) ||
engineType == typeof(OllamaTranslate)) engineType == typeof(OllamaTranslate))
{ {
var err = string.IsNullOrEmpty(_autoTranslator.Error) ? string.Empty : _autoTranslator.Error + Environment.NewLine;
var dr = MessageBox.Show( var dr = MessageBox.Show(
string.Format(LanguageSettings.Current.GoogleTranslate.XRequiresALocalWebServer, _autoTranslator.Name) string.Format(LanguageSettings.Current.GoogleTranslate.XRequiresALocalWebServer, _autoTranslator.Name)
+ Environment.NewLine + Environment.NewLine + err
+ Environment.NewLine + LanguageSettings.Current.GoogleTranslate.ReadMore, + Environment.NewLine + LanguageSettings.Current.GoogleTranslate.ReadMore + Environment.NewLine,
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Error); MessageBoxButtons.YesNoCancel, MessageBoxIcon.Error);
if (dr == DialogResult.Yes) if (dr == DialogResult.Yes)