Skip to content

Commit c20e540

Browse files
committed
添加翻译
1 parent 387a4ee commit c20e540

17 files changed

+1048
-956
lines changed

CrazyCar/Assembly-CSharp-Editor.csproj

Lines changed: 187 additions & 187 deletions
Large diffs are not rendered by default.

CrazyCar/Assembly-CSharp-firstpass.csproj

Lines changed: 181 additions & 181 deletions
Large diffs are not rendered by default.

CrazyCar/Assembly-CSharp.csproj

Lines changed: 181 additions & 181 deletions
Large diffs are not rendered by default.

CrazyCar/Assets/Resources/Language/Locales/en.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,28 @@
1818
"Did not have" : "Did not have",
1919
"Tips" : "Tips",
2020
"Confirm" : "Confirm",
21-
"Cancel" : "Cancel"
21+
"Cancel" : "Cancel",
22+
"Whether to spend {0} star on this equip" : "Whether to spend {0} star on this equip",
23+
"Give up to buy" : "Give up to buy",
24+
"This equip requires {0} star" : "This equip requires {0} star",
25+
"Buy" : "Buy",
26+
"Consistent with the original nickname" : "Consistent with the original nickname",
27+
"Consistent with the original password" : "Consistent with the original password",
28+
"The password must contain more than six characters" : "The password must contain more than six characters",
29+
"Modify Successfully" : "Modify Successfully",
30+
"Fail To Modify" : "Fail To Modify",
31+
"Information Error" : "Information Error",
32+
"Version is too low" : "Version is too low",
33+
"Download" : "Download",
34+
"Download assets failed" : "Download assets failed",
35+
"Resource loading" : "Resource loading",
36+
"Please enter the content" : "Please enter the content",
37+
"Login Success" : "Login Success",
38+
"User not registered" : "User not registered",
39+
"Unknown Error" : "Unknown Error",
40+
"User registered" : "User registered",
41+
"Incorrect information format" : "Incorrect information format",
42+
"Does it cost {0} stars to purchase this course" : "Does it cost {0} stars to purchase this course",
43+
"This course requires {0} star" : "This course requires {0} star",
44+
"Quit the game?" : "Quit the game?"
2245
}

CrazyCar/Assets/Resources/Language/Locales/jp.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,28 @@
1818
"Did not have" : "がなかった",
1919
"Tips" : "ヒント",
2020
"Confirm" : "確認",
21-
"Cancel" : "取り消し"
21+
"Cancel" : "取り消し",
22+
"Whether to spend {0} star on this equip" : "この装置で{0}星を使うかどうか",
23+
"Give up to buy" : "買い切る",
24+
"This equip requires {0} star" : "これには{0}星が必要です",
25+
"Buy" : "買い",
26+
"Consistent with the original nickname" : "オリジナルのニックネームと一致する",
27+
"Consistent with the original password" : "元のパスワードと一致する",
28+
"The password must contain more than six characters" : "パスワードは6文字以上含まなければなりません",
29+
"Modify Successfully" : "正常に変更",
30+
"Fail To Modify" : "変更に失敗",
31+
"Information Error" : "情報エラー",
32+
"Version is too low" : "バージョンが低すぎる",
33+
"Download" : "ダウンロード",
34+
"Download assets failed" : "ダウンロード資産",
35+
"Resource loading" : "リソースロード",
36+
"Please enter the content" : "内容を入力してください",
37+
"Login Success" : "ログイン成功",
38+
"User not registered" : "ユーザ登録",
39+
"Unknown Error" : "不明エラー",
40+
"User registered" : "ユーザ登録",
41+
"Incorrect information format" : "不正確な情報形式",
42+
"Does it cost {0} stars to purchase this course" : "このコース{0}を購入するには",
43+
"This course requires {0} star" : "このコースは{0}星を必要とする",
44+
"Quit the game?" : "終了ゲーム?"
2245
}

CrazyCar/Assets/Resources/Language/Locales/kr.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,28 @@
1818
"Did not have" : "없다",
1919
"Tips" : "제시 하 다.",
2020
"Confirm" : "실증",
21-
"Cancel" : "취소 하 다."
21+
"Cancel" : "취소 하 다.",
22+
"Whether to spend {0} star on this equip" : "이 장비 에 {0} 성 소비 여부",
23+
"Give up to buy" : "구 매 를 포기 하 다",
24+
"This equip requires {0} star" : "이 장 비 는{0} 성 이 필요 합 니 다.",
25+
"Buy" : "사다",
26+
"Consistent with the original nickname" : "원본 닉네임 과 일치",
27+
"Consistent with the original password" : "원본 암호 와 일치 합 니 다.",
28+
"The password must contain more than six characters" : "비밀 번 호 는 6 개 이상 의 문 자 를 포함해 야 합 니 다.",
29+
"Modify Successfully" : "수정 성공",
30+
"Fail To Modify" : "수정 실패",
31+
"Information Error" : "정보 오류",
32+
"Version is too low" : "판본 이 너무 낮다",
33+
"Download" : "다운로드 하 다.",
34+
"Download assets failed" : "자산 다운로드 실패",
35+
"Resource loading" : "자원 로드",
36+
"Please enter the content" : "내용 입력",
37+
"Login Success" : "로그 인 성공",
38+
"User not registered" : "사용자 미등 록",
39+
"Unknown Error" : "알 수 없 는 오류",
40+
"User registered" : "사용자 등록",
41+
"Incorrect information format" : "부정 확 한 정보 형식",
42+
"Does it cost {0} stars to purchase this course" : "이 과정 을 구 매 하려 면{0} 별 이 필요 합 니까?",
43+
"This course requires {0} star" : "이 과정 은 {0} 별 이 필요 합 니 다.",
44+
"Quit the game?" : "게임 종료?"
2245
}

CrazyCar/Assets/Resources/Language/Locales/zh-cn.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,28 @@
1818
"Did not have" : "未拥有",
1919
"Tips" : "提示",
2020
"Confirm" : "确定",
21-
"Cancel" : "取消"
21+
"Cancel" : "取消",
22+
"Whether to spend {0} star on this equip" : "是否在此装备上花费{0}颗星",
23+
"Give up to buy" : "放弃购买",
24+
"This equip requires {0} star" : "此装备需要{0}颗星",
25+
"Buy" : "购买",
26+
"Consistent with the original nickname" : "与原始昵称一致",
27+
"Consistent with the original password" : "与原始密码一致",
28+
"The password must contain more than six characters" : "密码必须包含六个以上的字符",
29+
"Modify Successfully" : "修改成功",
30+
"Fail To Modify" : "修改失败",
31+
"Information Error" : "信息错误",
32+
"Version is too low" : "版本太低",
33+
"Download" : "下载",
34+
"Download assets failed" : "下载资源失败",
35+
"Resource loading" : "资源加载",
36+
"Please enter the content" : "请输入内容",
37+
"Login Success" : "登录成功",
38+
"User not registered" : "用户未注册",
39+
"Unknown Error" : "未知错误",
40+
"User registered" : "用户已注册",
41+
"Incorrect information format" : "信息格式不正确",
42+
"Does it cost {0} stars to purchase this course" : "购买此课程需要花费{0}颗星",
43+
"This course requires {0} star" : "本课程需要{0}颗星",
44+
"Quit the game?" : "退出游戏?"
2245
}

CrazyCar/Assets/Scripts/Equipment/ChangeCarUI.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,35 +67,35 @@ private void Start() {
6767
data: bytes, token: GameController.manager.token,
6868
succData: (data) => {
6969
GameController.manager.userInfo.equipInfo = GameController.manager.equipManager.equipDic[(int)data["eid"]];
70-
GameController.manager.warningAlert.ShowWithText("设置成功");
70+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Successfully Set"));
7171
},
7272
code: (code) => {
7373
if (code == 423) {
74-
GameController.manager.warningAlert.ShowWithText("未拥有");
74+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Did not have"));
7575
}
7676
}));
7777
} else {
7878
if (GameController.manager.userInfo.star > curEquipInfo.star) {
79-
GameController.manager.infoConfirmAlert.ShowWithText(content: "是否花费" + curEquipInfo.star + "颗星购买此装备",
79+
GameController.manager.infoConfirmAlert.ShowWithText(content: string.Format(I18N.manager.GetText("Whether to spend {0} star on this equip"), curEquipInfo.star),
8080
success: () => {
8181
StartCoroutine(Util.POSTHTTP(url: NetworkController.manager.HttpBaseUrl +
8282
RequestUrl.buyEquipUrl,
8383
data: bytes,
8484
token: GameController.manager.token,
8585
succData: (data) => {
8686
GameController.manager.userInfo.star = (int)data["star"];
87-
applyBtnText.text = "Apply";
87+
applyBtnText.text = I18N.manager.GetText("Apply");
8888
curEquipInfo.isHas = true;
8989
for (int i = 0; i < changeCarItems.Count; i++) {
9090
changeCarItems[i].SetUnlockState();
9191
}
9292
}));
9393
},
9494
fail: () => {
95-
Debug.Log("放弃购买");
95+
Debug.Log(I18N.manager.GetText("Give up to buy"));
9696
});
9797
} else {
98-
GameController.manager.warningAlert.ShowWithText("此装备需要" + curEquipInfo.star + "颗星");
98+
GameController.manager.warningAlert.ShowWithText(string.Format(I18N.manager.GetText("This equip requires {0} star"), curEquipInfo.star));
9999
}
100100
}
101101

@@ -129,9 +129,9 @@ private void UpdateUI(EquipInfo info) {
129129
applyBtn.interactable = true;
130130
}
131131
if (info.isHas) {
132-
applyBtnText.text = "Apply";
132+
applyBtnText.text = I18N.manager.GetText("Apply");
133133
} else {
134-
applyBtnText.text = "buy";
134+
applyBtnText.text = I18N.manager.GetText("Buy");
135135
}
136136
}
137137

CrazyCar/Assets/Scripts/Homepage/ProfileUI.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ private void Start() {
3636
});
3737
userNameBtn.onClick.AddListener(() => {
3838
if (userNameInput.text == GameController.manager.userInfo.name) {
39-
GameController.manager.warningAlert.ShowWithText("与原昵称一致");
39+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Consistent with the original nickname"));
4040
} else {
4141

4242
}
4343
});
4444
passwordBtn.onClick.AddListener(() => {
4545
if (passwordInput.text == PlayerPrefs.GetString(PrefKeys.password)) {
46-
GameController.manager.warningAlert.ShowWithText("与原密码一致");
46+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Consistent with the original password"));
4747
} else if (passwordInput.text.Length < 6) {
48-
GameController.manager.warningAlert.ShowWithText("密码长度应大于6位");
48+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("The password must contain more than six characters"));
4949
} else {
5050
StringBuilder sb = new StringBuilder();
5151
JsonWriter w = new JsonWriter(sb);
@@ -58,14 +58,14 @@ private void Start() {
5858
StartCoroutine(Util.POSTHTTP(url: NetworkController.manager.HttpBaseUrl + RequestUrl.modifyPersonalInfoUrl,
5959
data: bytes, token: GameController.manager.token,
6060
succData: (data) => {
61-
GameController.manager.warningAlert.ShowWithText("修改成功");
61+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Modify Successfully"));
6262
PlayerPrefs.SetString(PrefKeys.password, passwordInput.text);
6363
},
6464
code: (code) => {
6565
if (code == 423) {
66-
GameController.manager.warningAlert.ShowWithText("修改失败");
66+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Fail To Modify"));
6767
} else if (code == 404) {
68-
GameController.manager.warningAlert.ShowWithText("信息有误");
68+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Information Error"));
6969
}
7070
}));
7171
}

CrazyCar/Assets/Scripts/Login/DownloadResUI.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class DownloadResUI : MonoBehaviour {
1111
public Slider progressSlider;
1212

1313
private void Start() {
14-
#if UNITY_EDITOR
14+
#if !UNITY_EDITOR
1515
CheckResource(() => {
1616
GameController.manager.tinyMsgHub.Publish(new DownloadResFinishMsg());
1717
});
@@ -29,12 +29,12 @@ private void Start() {
2929
StartCoroutine(Util.POSTHTTP(url: NetworkController.manager.HttpBaseUrl + RequestUrl.forcedUpdatingUrl,
3030
data: bytes, succData: (data) => {
3131
if ((bool)data["is_forced_updating"]) {
32-
GameController.manager.infoConfirmAlert.ShowWithText(content: "版本过低",
32+
GameController.manager.infoConfirmAlert.ShowWithText(content: I18N.manager.GetText("Version is too low"),
3333
success: () => {
3434
Application.OpenURL((string)data["url"]);
3535
Application.Quit();
3636
},
37-
confirmText: "Download");
37+
confirmText: I18N.manager.GetText("Download"));
3838
} else {
3939
CheckResource(() => {
4040
GameController.manager.tinyMsgHub.Publish(new DownloadResFinishMsg());
@@ -62,7 +62,7 @@ private IEnumerator Check(Action success) {
6262
GameController.manager.resourceManager.DownloadAssets(() => {
6363
success?.Invoke();
6464
}, UpdateProgress, () => {
65-
GameController.manager.warningAlert.ShowWithText(text: "Download assets failed", callback: () => {
65+
GameController.manager.warningAlert.ShowWithText(text: I18N.manager.GetText("Download assets failed"), callback: () => {
6666
Application.Quit();
6767
});
6868
});
@@ -100,7 +100,7 @@ private void UpdateProgress(float value, float totalBytes, bool isDownloading) {
100100
showText.text = speed.ToString("0.0") + "K/s";
101101
}
102102
} else {
103-
showText.text = "Resource loading";
103+
showText.text = I18N.manager.GetText("Resource loading");
104104
}
105105
}
106106
}

CrazyCar/Assets/Scripts/Login/LoginUI.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private void Start() {
2222

2323
loginBtn.onClick.AddListener(() => {
2424
if (userNameInput.text == "" || passwordInput.text == "") {
25-
GameController.manager.warningAlert.ShowWithText("请输入内容");
25+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Please enter the content"));
2626
return;
2727
}
2828

@@ -45,7 +45,7 @@ private void Start() {
4545
if (userNameInput.text.ToLower() == "tast") {
4646
GameController.manager.gameHelper.gameObject.SetActiveFast(true);
4747
}
48-
GameController.manager.warningAlert.ShowWithText(text: "登录成功", callback: () => {
48+
GameController.manager.warningAlert.ShowWithText(text: I18N.manager.GetText("Login Success"), callback: () => {
4949
PlayerPrefs.SetString(PrefKeys.userName, userNameInput.text);
5050
PlayerPrefs.SetString(PrefKeys.password, passwordInput.text);
5151
PlayerPrefs.SetInt(PrefKeys.rememberPassword.ToString(), (rememberToggle.isOn ? 1 : 0));
@@ -54,11 +54,11 @@ private void Start() {
5454
});
5555

5656
} else if (code == 423) {
57-
GameController.manager.warningAlert.ShowWithText("密码错误");
57+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Password Error"));
5858
} else if (code == 404) {
59-
GameController.manager.warningAlert.ShowWithText("用户未注册");
59+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("User not registered"));
6060
} else {
61-
GameController.manager.warningAlert.ShowWithText("未知错误");
61+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Unknown Error"));
6262
}
6363
}));
6464
});

CrazyCar/Assets/Scripts/Login/RegisterUI.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ private void Start() {
2525

2626
registerBtn.onClick.AddListener(() => {
2727
if (userNameInput.text == "" || passwordInput.text == "") {
28-
GameController.manager.warningAlert.ShowWithText("请输入内容");
28+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Please enter the content"));
2929
return;
3030
}
3131

3232
if (passwordInput.text.Length < 6) {
33-
GameController.manager.warningAlert.ShowWithText("密码长度应大于六个字符");
33+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("The password must contain more than six characters"));
3434
return;
3535
}
3636

@@ -53,15 +53,15 @@ private void Start() {
5353
PlayerPrefs.SetString(PrefKeys.userName, userNameInput.text);
5454
PlayerPrefs.SetString(PrefKeys.password, passwordInput.text);
5555
}
56-
GameController.manager.warningAlert.ShowWithText(text : "注册成功", callback : () => {
56+
GameController.manager.warningAlert.ShowWithText(text : I18N.manager.GetText("Registration Successful"), callback : () => {
5757
Util.LoadingScene(SceneID.Index);
5858
});
5959
} else if (code == 423) {
60-
GameController.manager.warningAlert.ShowWithText("用户已注册");
60+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("User registered"));
6161
} else if (code == 425) {
62-
GameController.manager.warningAlert.ShowWithText("信息格式不对");
62+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Incorrect information format"));
6363
} else {
64-
GameController.manager.warningAlert.ShowWithText("未知错误");
64+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("Unknown Error"));
6565
}
6666
}));
6767
});

CrazyCar/Assets/Scripts/Match/MatchItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private void Start() {
2727
GameController.manager.curGameType = CurGameType.Match;
2828
Util.LoadingScene(SceneID.Game);
2929
} else {
30-
GameController.manager.warningAlert.ShowWithText("比赛已结束");
30+
GameController.manager.warningAlert.ShowWithText(I18N.manager.GetText("The game is over"));
3131
}
3232

3333
});

CrazyCar/Assets/Scripts/TimeTrial/TimeTrialItem.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private void Start() {
2727
Util.LoadingScene(SceneID.Game);
2828
} else {
2929
if (GameController.manager.userInfo.star > timeTrialInfo.star) {
30-
GameController.manager.infoConfirmAlert.ShowWithText(content: "是否花费" + timeTrialInfo.star + "颗星购买此课程",
30+
GameController.manager.infoConfirmAlert.ShowWithText(content: string.Format(I18N.manager.GetText("Does it cost {0} stars to purchase this course"), timeTrialInfo.star),
3131
success: () => {
3232
StringBuilder sb = new StringBuilder();
3333
JsonWriter w = new JsonWriter(sb);
@@ -48,10 +48,10 @@ private void Start() {
4848
}));
4949
},
5050
fail: () => {
51-
Debug.Log("放弃购买");
51+
Debug.Log(I18N.manager.GetText("Give up to buy"));
5252
});
5353
} else {
54-
GameController.manager.warningAlert.ShowWithText("此课程需要" + timeTrialInfo.star + "颗星");
54+
GameController.manager.warningAlert.ShowWithText(string.Format(I18N.manager.GetText("This course requires {0} star"), timeTrialInfo.star));
5555
}
5656
}
5757
});

0 commit comments

Comments
 (0)