From eb397df6611747e8eb3792b23406c363201f6a37 Mon Sep 17 00:00:00 2001
From: Q-Sharp <8755388+Q-Sharp@users.noreply.github.com>
Date: Fri, 30 Aug 2024 14:37:43 +0200
Subject: [PATCH] add en to lang selection
---
.github/workflows/dotnet-desktop.yml | 2 +-
RemnantSaveGuardian/App.xaml.cs | 7 +++++--
RemnantSaveGuardian/RemnantSaveGuardian.csproj | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml
index ef9f3d4..9e2403b 100644
--- a/.github/workflows/dotnet-desktop.yml
+++ b/.github/workflows/dotnet-desktop.yml
@@ -41,7 +41,7 @@ jobs:
proj-path: ${{ env.Project }}
- name: publish
- run: dotnet publish -o "./publish"
+ run: dotnet publish RemnantSaveGuardian/RemnantSaveGuardian.csproj -o "./publish"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
diff --git a/RemnantSaveGuardian/App.xaml.cs b/RemnantSaveGuardian/App.xaml.cs
index 9c3898a..673a83f 100644
--- a/RemnantSaveGuardian/App.xaml.cs
+++ b/RemnantSaveGuardian/App.xaml.cs
@@ -110,9 +110,12 @@ private CultureInfo[] EnumerateSupportedCultures()
{
CultureInfo[] culture = CultureInfo.GetCultures(CultureTypes.AllCultures);
- string exeLocation = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
+ string exeLocation = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path)) ?? "";
+
+ var c = culture.Where(cultureInfo => Directory.Exists(Path.Combine(exeLocation, cultureInfo.Name)) && cultureInfo.Name != "")
+ .Prepend(CultureInfo.GetCultureInfo("en"))
+ .ToArray();
- var c = culture.Where(cultureInfo => Directory.Exists(Path.Combine(exeLocation, cultureInfo.Name)) && cultureInfo.Name != "").ToArray();
return c;
}
diff --git a/RemnantSaveGuardian/RemnantSaveGuardian.csproj b/RemnantSaveGuardian/RemnantSaveGuardian.csproj
index eabb267..b53f9c6 100644
--- a/RemnantSaveGuardian/RemnantSaveGuardian.csproj
+++ b/RemnantSaveGuardian/RemnantSaveGuardian.csproj
@@ -8,7 +8,7 @@
en;ru;de;es;fr;it;ja;ko;pt-BR;zh-Hans;zh-Hant
app.manifest
Assets\256.ico
- 1.3.1.0
+ 1.3.2.0
OnOutputUpdated