Add TranslationProvider
This commit is contained in:
committed by
Matthias Mailänder
parent
a065e6a47c
commit
68eec52cef
@@ -279,7 +279,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
|
||||
var arguments = Translation.Arguments("cheat", order.OrderString, "player", self.Owner.PlayerName, "suffix", debugSuffix);
|
||||
TextNotificationsManager.Debug(Game.ModData.Translation.GetString(CheatUsed, arguments));
|
||||
TextNotificationsManager.Debug(TranslationProvider.GetString(CheatUsed, arguments));
|
||||
}
|
||||
|
||||
bool IUnlocksRenderPlayer.RenderPlayerUnlocked => Enabled;
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
techLevels, TechLevel, TechLevelDropdownLocked);
|
||||
|
||||
var gameSpeeds = Game.ModData.Manifest.Get<GameSpeeds>();
|
||||
var speeds = gameSpeeds.Speeds.ToDictionary(s => s.Key, s => Game.ModData.Translation.GetString(s.Value.Name));
|
||||
var speeds = gameSpeeds.Speeds.ToDictionary(s => s.Key, s => TranslationProvider.GetString(s.Value.Name));
|
||||
|
||||
// NOTE: This is just exposing the UI, the backend logic for this option is hardcoded in World.
|
||||
yield return new LobbyOption(map, "gamespeed",
|
||||
|
||||
@@ -87,9 +87,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var timelimits = TimeLimitOptions.ToDictionary(m => m.ToString(), m =>
|
||||
{
|
||||
if (m == 0)
|
||||
return Game.ModData.Translation.GetString(NoTimeLimit);
|
||||
return TranslationProvider.GetString(NoTimeLimit);
|
||||
else
|
||||
return Game.ModData.Translation.GetString(TimeLimitOption, Translation.Arguments("minutes", m));
|
||||
return TranslationProvider.GetString(TimeLimitOption, Translation.Arguments("minutes", m));
|
||||
});
|
||||
|
||||
yield return new LobbyOption(map, "timelimit", TimeLimitLabel, TimeLimitDescription, TimeLimitDropdownVisible, TimeLimitDisplayOrder,
|
||||
@@ -181,7 +181,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
countdownLabel.GetText = () => null;
|
||||
|
||||
if (!info.SkipTimerExpiredNotification)
|
||||
TextNotificationsManager.AddSystemLine(Game.ModData.Translation.GetString(TimeLimitExpired));
|
||||
TextNotificationsManager.AddSystemLine(TranslationProvider.GetString(TimeLimitExpired));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user