多语言微调
This commit is contained in:
1 parent
51834b709c
commit
eb9338390c
19 files changed
+2132
-1735
No files matched your search
@@ -66,7 +66,7 @@ namespace Assets.Scripts.UI.Control
|
||||
|
||||
isSelected = false;
|
||||
this.mInnerInputField.OnDeselect(eventData);
|
||||
transform.Find("Placeholder").GetComponent<Text>().text = placeHolderText;
|
||||
transform.Find("Placeholder").GetComponent<Text>().text = App.GetLocalString(placeHolderText);
|
||||
//var image = this.transform.GetComponent<Image>();
|
||||
//var png1 = Resources.Load<Sprite>("Images/ipt-0");
|
||||
//image.sprite = png1;
|
||||
|
||||
@@ -85,6 +85,9 @@ public class Confirm : PFUIPanel
|
||||
ok = "Yes";
|
||||
cancel = "No";
|
||||
}
|
||||
ok = App.GetLocalString(ok);
|
||||
cancel = App.GetLocalString(cancel);
|
||||
|
||||
_ok.transform.Find("Text").GetComponent<Text>().text = ok;
|
||||
_cancel.transform.Find("Text").GetComponent<Text>().text = cancel;
|
||||
}
|
||||
|
||||
@@ -54,13 +54,14 @@ namespace Assets.Scripts.UI.Prefab.Login
|
||||
{
|
||||
months.Add(new Dropdown.OptionData(m.ToString()));
|
||||
}
|
||||
|
||||
days = new List<Dropdown.OptionData>();
|
||||
genders = new List<Dropdown.OptionData>() {new Dropdown.OptionData("Male"), new Dropdown.OptionData("FeMale") };
|
||||
genders = new List<Dropdown.OptionData>() {new Dropdown.OptionData(App.GetLocalString("Male")), new Dropdown.OptionData(App.GetLocalString("FeMale")) };
|
||||
var countryJson = Resources.Load<TextAsset>("UI/flags-mini").text;
|
||||
countryList = JsonConvert.DeserializeObject<List<CountryModel>>(countryJson);
|
||||
countrys = countryList.Select(x => new Dropdown.OptionData(x.country)).ToList();
|
||||
countryDefaultValue = countryList.FindIndex(x => x.country == "中国");
|
||||
units = new List<Dropdown.OptionData>() { new Dropdown.OptionData("Metric"), new Dropdown.OptionData("Imperial") };
|
||||
units = new List<Dropdown.OptionData>() { new Dropdown.OptionData(App.GetLocalString("Metric")), new Dropdown.OptionData(App.GetLocalString("Imperial")) };
|
||||
}
|
||||
public Texture GetCountryImage(int index)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Assets.Scripts.UI.Prefab.MapList
|
||||
{
|
||||
public class MapFilterOptions
|
||||
{
|
||||
public static List<Dropdown.OptionData> distances = new string[] {"All",
|
||||
public static List<Dropdown.OptionData> distances = new string[] {App.GetLocalString("All"),
|
||||
"0-5KM",
|
||||
"5-10KM",
|
||||
"10-20KM",
|
||||
@@ -20,7 +20,7 @@ namespace Assets.Scripts.UI.Prefab.MapList
|
||||
"Over 200KM", }.Select(x=>new Dropdown.OptionData(x)).ToList();
|
||||
public static Dictionary<string, string> distanceDict = new Dictionary<string, string>()
|
||||
{
|
||||
{"All","" },
|
||||
{App.GetLocalString("All"),"" },
|
||||
{"0-5KM","0-5" },
|
||||
{"5-10KM","5-10" },
|
||||
{"10-20KM","10-20" },
|
||||
@@ -32,7 +32,7 @@ namespace Assets.Scripts.UI.Prefab.MapList
|
||||
};
|
||||
public static Dictionary<string,string> diffDict = new Dictionary<string, string>()
|
||||
{
|
||||
{"FLAT","0-100" },
|
||||
{App.GetLocalString("FLAT"),"0-100" },
|
||||
{"LV.4","100-250" },
|
||||
{"LV.3","250-350" },
|
||||
{"LV.2","350-550" },
|
||||
@@ -40,11 +40,22 @@ namespace Assets.Scripts.UI.Prefab.MapList
|
||||
{"HC","750-99999" },
|
||||
};
|
||||
public static List<Dropdown.OptionData> sorts = new string[] {
|
||||
"Near", "Trend","Name","Distance","Difficulty","Time"
|
||||
App.GetLocalString("Near"), App.GetLocalString("Trend"), App.GetLocalString("Name"), App.GetLocalString("Distance"), App.GetLocalString("Difficulty"), App.GetLocalString("Time")
|
||||
}.Select(x => new Dropdown.OptionData(x)).ToList();
|
||||
|
||||
public static Dictionary<string, string> sortsDict = new Dictionary<string, string>()
|
||||
{
|
||||
{App.GetLocalString("Near"),"Near" },
|
||||
{App.GetLocalString("Trend"),"Trend" },
|
||||
{App.GetLocalString("Name"),"Name" },
|
||||
{App.GetLocalString("Distance"),"Distance" },
|
||||
{App.GetLocalString("Difficulty"),"Difficulty" },
|
||||
{App.GetLocalString("Time"),"Time" },
|
||||
};
|
||||
|
||||
public static Dictionary<string, string> diffDisplayDict = new Dictionary<string, string>()
|
||||
{
|
||||
{"FLAT","0-100" },
|
||||
{App.GetLocalString("FLAT"),"0-100" },
|
||||
{"LV.4","100-250" },
|
||||
{"LV.3","250-350" },
|
||||
{"LV.2","350-550" },
|
||||
|
||||
@@ -175,7 +175,7 @@ public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
|
||||
mSexDropdown.ClearOptions();
|
||||
mSexDropdown.AddOptions(new List<string>
|
||||
{
|
||||
"Male","Female"
|
||||
App.GetLocalString("Male"),App.GetLocalString("Female")
|
||||
});
|
||||
mUnitDropdown.ClearOptions();
|
||||
mUnitDropdown.AddOptions(UIManager.Instance.loginRegOptions.units);
|
||||
|
||||
@@ -222,7 +222,9 @@ public class MapListController : PFUIPanel
|
||||
drop.value = 0;
|
||||
drop.onValueChanged.AddListener((int index)=>
|
||||
{
|
||||
sort = drop.options[index].text;
|
||||
var text = drop.options[index].text;
|
||||
|
||||
sort = MapFilterOptions.sortsDict[text];
|
||||
if (sort == "Trend")
|
||||
{
|
||||
sort = "Hot";
|
||||
|
||||
Reference in new issue
Block a user