Add TranslationProvider

This commit is contained in:
Matthias Mailänder
2023-04-13 17:14:01 +03:00
committed by Matthias Mailänder
parent a065e6a47c
commit 68eec52cef
66 changed files with 384 additions and 333 deletions

View File

@@ -96,7 +96,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
this.modData = modData;
panel = widget;
allPackages = modData.Translation.GetString(AllPackages);
allPackages = TranslationProvider.GetString(AllPackages);
var colorPickerPalettes = world.WorldActor.TraitsImplementing<IProvidesAssetBrowserColorPickerPalettes>()
.SelectMany(p => p.ColorPickerPaletteNames)
@@ -238,7 +238,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (frameText != null)
{
var soundLength = new CachedTransform<double, string>(p =>
modData.Translation.GetString(LengthInSeconds, Translation.Arguments("length", Math.Round(p, 3))));
TranslationProvider.GetString(LengthInSeconds, Translation.Arguments("length", Math.Round(p, 3))));
frameText.GetText = () =>
{