mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Properly default to English for UI text
This commit is contained in:
parent
0dccc020b4
commit
6cc848e2c9
@ -9,8 +9,8 @@
|
||||
"UIDictionary":
|
||||
{
|
||||
"INTERSTELLAR_MODE" : "Interstellar Mode",
|
||||
"Statue" : "Nomai Statue",
|
||||
"WarpCore" : "Anit-Graviton Flux",
|
||||
"???" : "???"
|
||||
"FREQ_STATUE" : "Nomai Statue",
|
||||
"FREQ_WARP_CORE" : "Anti-Graviton Flux",
|
||||
"FREQ_UNKNOWN" : "???"
|
||||
}
|
||||
}
|
||||
@ -9,8 +9,8 @@
|
||||
"UIDictionary":
|
||||
{
|
||||
"INTERSTELLAR_MODE" : "Mode Interstellaire",
|
||||
"Statue" : "Statue Nomaï",
|
||||
"WarpCore" : "Flux Anti-Gravitonique",
|
||||
"???" : "???"
|
||||
"FREQ_STATUE" : "Statue Nomaï",
|
||||
"FREQ_WARP_CORE" : "Flux Anti-Gravitonique",
|
||||
"FREQ_UNKNOWN" : "???"
|
||||
}
|
||||
}
|
||||
@ -68,9 +68,9 @@ namespace NewHorizons.Builder.Props
|
||||
SignalName.WhiteHole_GD_Receiver,
|
||||
});
|
||||
_customFrequencyNames = new Dictionary<SignalFrequency, string>() {
|
||||
{ SignalFrequency.Statue, "Nomai Statue" },
|
||||
{ SignalFrequency.Default, "???" },
|
||||
{ SignalFrequency.WarpCore, "Anti-Graviton Flux" }
|
||||
{ SignalFrequency.Statue, "FREQ_STATUE" },
|
||||
{ SignalFrequency.Default, "FREQ_UNKNOWN" },
|
||||
{ SignalFrequency.WarpCore, "FREQ_WARP_CORE" }
|
||||
};
|
||||
_nextCustomSignalName = 200;
|
||||
_nextCustomFrequencyName = 256;
|
||||
|
||||
@ -53,6 +53,7 @@ namespace NewHorizons.Handlers
|
||||
// Try to default to English
|
||||
if(dictionary.TryGetValue(TextTranslation.Language.ENGLISH, out var englishTable))
|
||||
{
|
||||
|
||||
if (englishTable.TryGetValue(text, out var englishText))
|
||||
{
|
||||
return englishText;
|
||||
@ -109,10 +110,8 @@ namespace NewHorizons.Handlers
|
||||
public static void AddDialogue(string rawText, params string[] rawPreText)
|
||||
{
|
||||
var key = string.Join(string.Empty, rawPreText) + rawText;
|
||||
var language = TextTranslation.Get().m_language;
|
||||
|
||||
string text = rawText;
|
||||
if (_dialogueTranslationDictionary.TryGetValue(language, out var dict) && dict.TryGetValue(rawText, out var translatedText)) text = translatedText;
|
||||
var text = GetTranslation(rawText, TextType.DIALOGUE);
|
||||
|
||||
TextTranslation.Get().m_table.Insert(key, text);
|
||||
}
|
||||
@ -120,10 +119,8 @@ namespace NewHorizons.Handlers
|
||||
public static void AddShipLog(string rawText, params string[] rawPreText)
|
||||
{
|
||||
var key = string.Join(string.Empty, rawPreText) + rawText;
|
||||
var language = TextTranslation.Get().m_language;
|
||||
|
||||
string text = rawText;
|
||||
if (_shipLogTranslationDictionary.TryGetValue(language, out var dict) && dict.TryGetValue(rawText, out var translatedText)) text = translatedText;
|
||||
string text = GetTranslation(rawText, TextType.SHIPLOG);
|
||||
|
||||
TextTranslation.Get().m_table.InsertShipLog(key, text);
|
||||
}
|
||||
@ -131,11 +128,8 @@ namespace NewHorizons.Handlers
|
||||
public static int AddUI(string rawText)
|
||||
{
|
||||
var uiTable = TextTranslation.Get().m_table.theUITable;
|
||||
var language = TextTranslation.Get().m_language;
|
||||
|
||||
string text = rawText;
|
||||
if (_shipLogTranslationDictionary.TryGetValue(language, out var dict) && dict.TryGetValue(rawText, out var translatedText)) text = translatedText;
|
||||
text = text.ToUpper();
|
||||
var text = GetTranslation(rawText, TextType.UI).ToUpper();
|
||||
|
||||
var key = uiTable.Keys.Max() + 1;
|
||||
try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user