Add dependency check texts to language pack

Co-authored-by: Kvarkas <3611964+Kvarkas@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-09 10:12:02 +00:00
parent 4d2d24efb3
commit fcca1a1fa3
3 changed files with 40 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ using System.Runtime.Versioning;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using LiteDB;
using mRemoteNG.Resources.Language;
namespace mRemoteNG.Config.DatabaseConnectors
{
@@ -111,19 +112,19 @@ namespace mRemoteNG.Config.DatabaseConnectors
catch (PlatformNotSupportedException ex)
{
// Log or handle architecture mismatch
Console.WriteLine($"Platform error: {ex.Message}");
Console.WriteLine(string.Format(Language.ErrorPlatformNotSupported, ex.Message));
return ConnectionTestResult.UnknownError;
}
catch (DllNotFoundException ex)
{
// Handle missing native dependencies
Console.WriteLine($"Missing dependency: {ex.Message}");
Console.WriteLine(string.Format(Language.ErrorMissingDependency, ex.Message));
return ConnectionTestResult.UnknownError;
}
catch (BadImageFormatException ex)
{
// Handle architecture mismatch in native libraries
Console.WriteLine($"Architecture mismatch: {ex.Message}");
Console.WriteLine(string.Format(Language.ErrorArchitectureMismatch, ex.Message));
return ConnectionTestResult.UnknownError;
}
catch (SqlException sqlException)

View File

@@ -1528,6 +1528,33 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Platform error: {0}.
/// </summary>
internal static string ErrorPlatformNotSupported {
get {
return ResourceManager.GetString("ErrorPlatformNotSupported", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Missing dependency: {0}.
/// </summary>
internal static string ErrorMissingDependency {
get {
return ResourceManager.GetString("ErrorMissingDependency", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Architecture mismatch: {0}.
/// </summary>
internal static string ErrorArchitectureMismatch {
get {
return ResourceManager.GetString("ErrorArchitectureMismatch", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Debug.
/// </summary>

View File

@@ -1940,6 +1940,15 @@ mRemoteNG will now quit and begin with the installation.</value>
<data name="DatabaseNotAvailable" xml:space="preserve">
<value>Database '{0}' not available.</value>
</data>
<data name="ErrorPlatformNotSupported" xml:space="preserve">
<value>Platform error: {0}</value>
</data>
<data name="ErrorMissingDependency" xml:space="preserve">
<value>Missing dependency: {0}</value>
</data>
<data name="ErrorArchitectureMismatch" xml:space="preserve">
<value>Architecture mismatch: {0}</value>
</data>
<data name="SaveConnectionsAfterEveryEdit" xml:space="preserve">
<value>Save connections after every edit</value>
</data>