Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add en to lang selection #276

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions RemnantSaveGuardian/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
public static T GetService<T>()
where T : class
{
return _host.Services.GetService(typeof(T)) as T;

Check warning on line 80 in RemnantSaveGuardian/App.xaml.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference return.
}

/// <summary>
Expand Down Expand Up @@ -110,9 +110,12 @@
{
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)) ?? "";

Check warning on line 113 in RemnantSaveGuardian/App.xaml.cs

View workflow job for this annotation

GitHub Actions / build

'Assembly.CodeBase' is obsolete: 'Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location.' (https://aka.ms/dotnet-warnings/SYSLIB0012)

Check warning on line 113 in RemnantSaveGuardian/App.xaml.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'uri' in 'UriBuilder.UriBuilder(string uri)'.

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;
}

Expand Down
2 changes: 1 addition & 1 deletion RemnantSaveGuardian/RemnantSaveGuardian.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<SatelliteResourceLanguages>en;ru;de;es;fr;it;ja;ko;pt-BR;zh-Hans;zh-Hant</SatelliteResourceLanguages>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Assets\256.ico</ApplicationIcon>
<AssemblyVersion>1.3.1.0</AssemblyVersion>
<AssemblyVersion>1.3.2.0</AssemblyVersion>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>

Expand Down
Loading