Skip to content

Commit

Permalink
Merge pull request #18917 from peppy/framework-bump
Browse files Browse the repository at this point in the history
Update framework
  • Loading branch information
peppy authored Jun 28, 2022
2 parents d630b62 + c282e19 commit 6ef7c3c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.623.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.624.1" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.628.1" />
</ItemGroup>
<ItemGroup Label="Transitive Dependencies">
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
Expand Down
17 changes: 10 additions & 7 deletions osu.Game/OsuGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Framework.Threading;
Expand Down Expand Up @@ -686,27 +687,29 @@ protected override void LoadComplete()
{
base.LoadComplete();

foreach (var language in Enum.GetValues(typeof(Language)).OfType<Language>())
var languages = Enum.GetValues(typeof(Language)).OfType<Language>();

var mappings = languages.Select(language =>
{
#if DEBUG
if (language == Language.debug)
{
Localisation.AddLanguage(Language.debug.ToString(), new DebugLocalisationStore());
continue;
}
return new LocaleMapping("debug", new DebugLocalisationStore());
#endif

string cultureCode = language.ToCultureCode();

try
{
Localisation.AddLanguage(cultureCode, new ResourceManagerLocalisationStore(cultureCode));
return new LocaleMapping(new ResourceManagerLocalisationStore(cultureCode));
}
catch (Exception ex)
{
Logger.Error(ex, $"Could not load localisations for language \"{cultureCode}\"");
return null;
}
}
}).Where(m => m != null);

Localisation.AddLocaleMappings(mappings);

// The next time this is updated is in UpdateAfterChildren, which occurs too late and results
// in the cursor being shown for a few frames during the intro.
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/osu.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Realm" Version="10.14.0" />
<PackageReference Include="ppy.osu.Framework" Version="2022.624.1" />
<PackageReference Include="ppy.osu.Framework" Version="2022.628.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.623.0" />
<PackageReference Include="Sentry" Version="3.17.1" />
<PackageReference Include="SharpCompress" Version="0.31.0" />
Expand Down
4 changes: 2 additions & 2 deletions osu.iOS.props
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.624.1" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.628.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.623.0" />
</ItemGroup>
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net6.0) -->
Expand All @@ -84,7 +84,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.14" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="ppy.osu.Framework" Version="2022.624.1" />
<PackageReference Include="ppy.osu.Framework" Version="2022.628.1" />
<PackageReference Include="SharpCompress" Version="0.31.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
Expand Down

0 comments on commit 6ef7c3c

Please sign in to comment.