diff --git a/OpenRA.Game/GameSpeed.cs b/OpenRA.Game/GameSpeed.cs index fb33c1d811..e06753f637 100644 --- a/OpenRA.Game/GameSpeed.cs +++ b/OpenRA.Game/GameSpeed.cs @@ -16,6 +16,7 @@ namespace OpenRA { public class GameSpeed { + [TranslationReference] [FieldLoader.Require] public readonly string Name; diff --git a/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs b/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs index f4526823d1..c8261f6fd9 100644 --- a/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs +++ b/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs @@ -58,6 +58,15 @@ namespace OpenRA.Mods.Common.Lint } } + var gameSpeeds = modData.Manifest.Get(); + foreach (var speed in gameSpeeds.Speeds.Values) + { + if (!translation.HasMessage(speed.Name)) + emitError($"{speed.Name} not present in {language} translation."); + + referencedKeys.Add(speed.Name); + } + foreach (var modType in modData.ObjectCreator.GetTypes()) { foreach (var fieldInfo in modType.GetFields(Binding).Where(m => m.HasAttribute()))