From e879798bdfc3d05d69450e2f87ccf7321f93b831 Mon Sep 17 00:00:00 2001 From: Tommi Nieminen Date: Mon, 26 Aug 2024 15:48:30 +0300 Subject: [PATCH] added startup bat for Windows, enabled loggin for translation errors --- OpusCatMTEngineCore/OpusCatMtEngine.sh | 1 + OpusCatMTEngineCore/UI/TranslateView.axaml.cs | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpusCatMTEngineCore/OpusCatMtEngine.sh b/OpusCatMTEngineCore/OpusCatMtEngine.sh index 10ab9b4..3ebdafd 100644 --- a/OpusCatMTEngineCore/OpusCatMtEngine.sh +++ b/OpusCatMTEngineCore/OpusCatMtEngine.sh @@ -1,2 +1,3 @@ #!/bin/bash +cd OpusCatMtEngine LD_LIBRARY_PATH=$LD_LIBRARY_PATH./python3-linux-3.8.13-x86_64/lib/ PYTHONHOME=./python3-linux-3.8.13-x86_64/ ./OpusCatMtEngineCore \ No newline at end of file diff --git a/OpusCatMTEngineCore/UI/TranslateView.axaml.cs b/OpusCatMTEngineCore/UI/TranslateView.axaml.cs index e9ff906..0e1356d 100644 --- a/OpusCatMTEngineCore/UI/TranslateView.axaml.cs +++ b/OpusCatMTEngineCore/UI/TranslateView.axaml.cs @@ -203,10 +203,9 @@ private async void TranslateButtonClick(object? sender, RoutedEventArgs e) } this.TranslationActive = true; } - catch (Exception) + catch (Exception ex) { - //Log.Error(x.Exception.ToString()); - //MessageBox.Show(x.Exception.ToString()); + Log.Error(ex.ToString()); var errorRun = new Run("Error in the translation service, see log file for details"); errorRun.Background = Brushes.Red; errorRun.Foreground = Brushes.White;