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