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

@@ -76,7 +76,7 @@ namespace OpenRA.Network
return arguments.ToArray();
}
public LocalizedMessage(ModData modData, MiniYaml yaml)
public LocalizedMessage(MiniYaml yaml)
{
// Let the FieldLoader do the dirty work of loading the public fields.
FieldLoader.Load(this, yaml);
@@ -95,7 +95,7 @@ namespace OpenRA.Network
argumentDictionary.Add(argument.Key, argument.Value);
}
TranslatedText = modData.Translation.GetString(Key, argumentDictionary);
TranslatedText = TranslationProvider.GetString(Key, argumentDictionary);
}
public static string Serialize(string key, Dictionary<string, object> arguments = null)