fix: Fix potentially bad formats in culture info
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Cryville.EEW.Unity.UI {
|
||||
}
|
||||
void SetView(float mainSeverity, string title, string location, CultureInfo culture) {
|
||||
SetSeverity(mainSeverity);
|
||||
SetText(m_textView, string.Format("{0} {1}", title, location), culture);
|
||||
SetText(m_textView, string.Format(culture, "{0} {1}", title, location), culture);
|
||||
}
|
||||
static void SetText(TMPLocalizedText view, string text, CultureInfo culture) {
|
||||
if (string.IsNullOrWhiteSpace(text)) {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -19,7 +18,7 @@ namespace Cryville.EEW.Unity.UI {
|
||||
time = TimeZoneInfo.ConvertTime(time, timeZone, tTimeZone);
|
||||
else
|
||||
tTimeZone = timeZone;
|
||||
_textView.text = SharedSettings.Instance.DoDisplayTimeZone ? string.Format(CultureInfo.CurrentCulture, "{0:G} ({1})", time, tTimeZone.ToTimeZoneString()) : time.ToString(CultureInfo.CurrentCulture);
|
||||
_textView.text = SharedSettings.Instance.DoDisplayTimeZone ? string.Format(SharedCultures.CurrentCulture, "{0:G} ({1})", time, tTimeZone.ToTimeZoneString()) : time.ToString(SharedCultures.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user