中文版本
This commit is contained in:
1 parent
8e88b4adba
commit
51834b709c
85 files changed
+12545
-4847
No files matched your search
@@ -11,6 +11,7 @@ namespace Assets.Scripts.UI.Control
|
||||
[RequireComponent(typeof(Text))]
|
||||
public class PFUIText : PFUIComponentBase
|
||||
{
|
||||
public string key;
|
||||
private Text text;
|
||||
|
||||
public string Text
|
||||
@@ -27,6 +28,28 @@ namespace Assets.Scripts.UI.Control
|
||||
protected void Awake()
|
||||
{
|
||||
text = this.transform.GetComponent<Text>();
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
key = text.text;//默认英文内容为key值
|
||||
}
|
||||
}
|
||||
protected void Start()
|
||||
{
|
||||
Debug.Log(text.text);
|
||||
if (App.LanguageManager != null && App.LanguageManager.ContainsKey(key))
|
||||
{
|
||||
Debug.Log(text.text);
|
||||
text.text = App.LanguageManager[key];
|
||||
}
|
||||
App.ChangeLanguageEvent += App_ChangeLanguageEvent;
|
||||
}
|
||||
|
||||
private void App_ChangeLanguageEvent()
|
||||
{
|
||||
if (App.LanguageManager != null && App.LanguageManager.ContainsKey(text.text))
|
||||
{
|
||||
text.text = App.LanguageManager[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,8 +71,8 @@ public class Confirm : PFUIPanel
|
||||
// return;
|
||||
//}
|
||||
//text.text = txt;
|
||||
_title.Text = title;
|
||||
_content.Text = content;
|
||||
_title.Text = App.GetLocalString(title);
|
||||
_content.Text = App.GetLocalString(content);
|
||||
_callback = callback;
|
||||
_cancelCallback = cancelCallback;
|
||||
}
|
||||
|
||||
@@ -242,8 +242,8 @@ public class DeviceView : MonoBehaviour
|
||||
connectionPanel.SetActive(false);
|
||||
|
||||
logo.sprite = sprite0;
|
||||
noDevice.text = "NO DEVICE";
|
||||
searchState.text = "Searching...";
|
||||
noDevice.text = App.GetLocalString("NO DEVICE");
|
||||
searchState.text = App.GetLocalString("Searching...");
|
||||
|
||||
var hasDevice = false;
|
||||
if (SensorType == SensorType.SpeedCadence) {
|
||||
|
||||
@@ -83,10 +83,10 @@ public class RaceScript : PFUIPanel
|
||||
var map = currentItem.GetComponent<RaceItemScript>().mapCompetition;
|
||||
if (map.Status == 1)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Start for Registration";
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = App.GetLocalString("Start for Registration");
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
|
||||
map.StartApplyTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
|
||||
currentItem.Find("GetReadyContainer-2/Title").GetComponent<Text>().text = "Deadline for Registration";
|
||||
currentItem.Find("GetReadyContainer-2/Title").GetComponent<Text>().text = App.GetLocalString("Deadline for Registration");
|
||||
currentItem.Find("GetReadyContainer-2/Value").GetComponent<Text>().text =
|
||||
map.EndApplyTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
|
||||
|
||||
@@ -102,7 +102,7 @@ public class RaceScript : PFUIPanel
|
||||
}
|
||||
else if (map.Status == 3)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Start Time";
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = App.GetLocalString("Start Time");
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
|
||||
map.StartTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public class RaceScript : PFUIPanel
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 1;
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text
|
||||
= map.HasJoin ? "Get Ready" : "Start Time";
|
||||
= App.GetLocalString(map.HasJoin ? "Get Ready" : "Start Time");
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text
|
||||
= map.HasJoin ? Utils.GetCountDown(time): map.StartTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user