fixt pop up box about unsaved porgrass
This commit is contained in:
@@ -225,16 +225,24 @@ namespace TheGame
|
||||
|
||||
public string GetText(string key)
|
||||
{
|
||||
string text = null;
|
||||
|
||||
// Försök hämta från nuvarande språk
|
||||
if (_currentTranslations != null && _currentTranslations.ContainsKey(key))
|
||||
{
|
||||
return _currentTranslations[key];
|
||||
text = _currentTranslations[key];
|
||||
}
|
||||
// Fallback till engelska
|
||||
else if (_fallbackTranslations != null && _fallbackTranslations.ContainsKey(key))
|
||||
{
|
||||
text = _fallbackTranslations[key];
|
||||
}
|
||||
|
||||
// Fallback till engelska
|
||||
if (_fallbackTranslations != null && _fallbackTranslations.ContainsKey(key))
|
||||
// Konvertera escape-sekvenser om vi hittade text
|
||||
if (text != null)
|
||||
{
|
||||
return _fallbackTranslations[key];
|
||||
text = text.Replace("\\n", "\n").Replace("\\t", "\t");
|
||||
return text;
|
||||
}
|
||||
|
||||
// Om inte ens engelska finns, returnera nyckeln
|
||||
|
||||
Reference in New Issue
Block a user