Skip to content

Commit

Permalink
Add TORMapOptions Translation
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyx0412 committed Apr 20, 2024
1 parent 3a2da87 commit c593b9d
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 17 deletions.
Binary file modified Strings.xlsx
Binary file not shown.
8 changes: 4 additions & 4 deletions TheOtherRoles/Modules/CustomOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,13 +1173,13 @@ private static string buildOptionsOfType(CustomOptionType type, bool headerOnly)
}
else if (option.parent.getSelection() > 0)
{
if (option.id == 103) //Deputy
if (option.id == 30170) //Deputy
sb.AppendLine(
$"- {Helpers.cs(Deputy.color, "捕快")}: {option.selections[option.selection].ToString()}");
else if (option.id == 224) //Sidekick
else if (option.id == 20136) //Sidekick
sb.AppendLine(
$"- {Helpers.cs(Sidekick.color, "跟班")}: {option.selections[option.selection].ToString()}");
else if (option.id == 358) //Prosecutor
else if (option.id == 20181) //Prosecutor
sb.AppendLine(
$"- {Helpers.cs(Lawyer.color, "处刑者")}: {option.selections[option.selection].ToString()}");
}
Expand Down Expand Up @@ -1250,7 +1250,7 @@ private static string buildOptionsOfType(CustomOptionType type, bool headerOnly)
}
else if (option == CustomOptionHolder.modifiersCountMin)
{
var optionName = CustomOptionHolder.cs(new Color(204f / 255f, 204f / 255f, 0, 1f), "附加职业");
var optionName = CustomOptionHolder.cs(new Color(204f / 255f, 204f / 255f, 0, 1f), "附加能力");
var min = CustomOptionHolder.modifiersCountMin.getSelection();
var max = CustomOptionHolder.modifiersCountMax.getSelection();
if (min > max) min = max;
Expand Down
26 changes: 13 additions & 13 deletions TheOtherRoles/Patches/ClientOptionsPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,39 @@ public static class ClientOptionsPatch
{
private static readonly SelectionBehaviour[] AllOptions =
[
new SelectionBehaviour("灵魂可见任务&其他信息",
new SelectionBehaviour(getString("GhostsSeeInformationText"),
() => TORMapOptions.ghostsSeeInformation = Main.GhostsSeeInformation.Value =
!Main.GhostsSeeInformation.Value, Main.GhostsSeeInformation.Value),
new SelectionBehaviour("灵魂可见投票",
new SelectionBehaviour(getString("GhostsSeeVotesText"),
() => TORMapOptions.ghostsSeeVotes =
Main.GhostsSeeVotes.Value = !Main.GhostsSeeVotes.Value,
Main.GhostsSeeVotes.Value),
new SelectionBehaviour("灵魂可以看到职业",
new SelectionBehaviour(getString("GhostsSeeRolesText"),
() => TORMapOptions.ghostsSeeRoles =
Main.GhostsSeeRoles.Value = !Main.GhostsSeeRoles.Value,
Main.GhostsSeeRoles.Value),
new SelectionBehaviour("灵魂可见附加职业",
new SelectionBehaviour(getString("GhostsSeeModifierText"),
() => TORMapOptions.ghostsSeeModifier = Main.GhostsSeeModifier.Value =
!Main.GhostsSeeModifier.Value, Main.GhostsSeeModifier.Value),
new SelectionBehaviour("显示职业总结",
new SelectionBehaviour(getString("ShowRoleSummaryText"),
() => TORMapOptions.showRoleSummary =
Main.ShowRoleSummary.Value = !Main.ShowRoleSummary.Value,
Main.ShowRoleSummary.Value),
new SelectionBehaviour("显示颜色深浅",
new SelectionBehaviour(getString("ShowLighterDarkerText"),
() => TORMapOptions.showLighterDarker = Main.ShowLighterDarker.Value =
!Main.ShowLighterDarker.Value, Main.ShowLighterDarker.Value),
new SelectionBehaviour("启用模组光标",
new SelectionBehaviour(getString("ToggleCursorText"),
() => TORMapOptions.toggleCursor =
Main.ToggleCursor.Value = !Main.ToggleCursor.Value,
Main.ToggleCursor.Value),
new SelectionBehaviour("启用模组音效",
new SelectionBehaviour(getString("EnableSoundEffectsText"),
() => TORMapOptions.enableSoundEffects = Main.EnableSoundEffects.Value =
!Main.EnableSoundEffects.Value, Main.EnableSoundEffects.Value),
new SelectionBehaviour("在地图上显示管道",
new SelectionBehaviour(getString("ShowVentsOnMapText"),
() => TORMapOptions.ShowVentsOnMap =
Main.ShowVentsOnMap.Value = !Main.ShowVentsOnMap.Value,
Main.ShowVentsOnMap.Value),
new SelectionBehaviour("Debug日志模式",
new SelectionBehaviour(getString("EnableDebugLogModeText"),
() => TORMapOptions.enableDebugLogMode =
Main.enableDebugLogMode.Value = !Main.enableDebugLogMode.Value,
Main.enableDebugLogMode.Value)
Expand Down Expand Up @@ -128,7 +128,7 @@ private static void InitializeMoreButton(OptionsMenuBehaviour __instance)
transform2.localScale = new Vector3(0.66f, 1, 1);

moreOptions.gameObject.SetActive(true);
moreOptions.Text.text = "模组选项";
moreOptions.Text.text = getString("TORMapOptionsButtonText");
moreOptions.Text.transform.localScale = new Vector3(1 / 0.66f, 1, 1);
var moreOptionsButton = moreOptions.GetComponent<PassiveButton>();
moreOptionsButton.OnClick = new ButtonClickedEvent();
Expand Down Expand Up @@ -171,7 +171,7 @@ private static void CheckSetTitle()
var title = Object.Instantiate(titleText, popUp.transform);
title.GetComponent<RectTransform>().localPosition = Vector3.up * 2.3f;
title.gameObject.SetActive(true);
title.text = "模组选项";
title.text = getString("TORMapOptionsTitleText");
title.name = "TitleText";
}

Expand Down Expand Up @@ -211,7 +211,7 @@ private static void SetUpOptions()

passiveButton.OnClick.AddListener((Action)(() =>
{
if (info.Title == "启用模组光标") Helpers.enableCursor(false);
if (info.Title == "Better Cursor") Helpers.enableCursor(false);
button.onState = info.OnClick();
button.Background.color = button.onState ? Color.green : Palette.ImpostorRed;
}));
Expand Down
40 changes: 40 additions & 0 deletions TheOtherRoles/Resources/stringData.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,46 @@
"0": "<align=\"center\"><b>TheOtherUs-Edited Team:</b>\nmxyx Huier-Huang haoren\nImp2 FangKuaiYa\n\n<b>Former TheOtherUs Team Members:</b>\nSpexGH Xer FangKuaiYa mxyx Huier-Huang\n\nThanks to The Other Roles, The Other Roles CE, The Other Roles GM IA, Town of Us, Stellar Roles!\n\nThanks to miniduikboot & GD for hosting modded servers (and so much more)\n\n",
"13": "<align=\"center\"><b>TheOtherUs-Edited \u5f00\u53d1\u8005:</b>\n\u6cab\u590f\u60a0\u8f69 \u5929\u5bf8\u68a6\u521d \u5584\u826f\u7684\u597d\u4eba Imp11\n\n<b>\u7f8e\u5de5:</b>\n\u65b9\u5757\n\n<b>\u7ffb\u8bd1:</b>\nEN\uff1a\u4e5d\u5934\u86c7\nCN\uff1a\u6cab\u590f\u60a0\u8f69\n\n<b>GitHub\u8d21\u732e\u8005:</b>\n\u6cab\u590f\u60a0\u8f69 \u5929\u5bf8\u68a6\u521d Imp11\n\n<b>\u524d TheOtherUs \u5f00\u53d1\u8005:</b>\nSpexGH Xer \u65b9\u5757 \u6cab\u590f\u60a0\u8f69 \u5929\u5bf8\u68a6\u521d\n\n\n\u672c\u6a21\u7ec4\u4f7f\u7528\u4e86\u90e8\u5206[https://github.com/dabao40/TheOtherRolesGMIA]TheOtherRolesGMIA[]\u7684\u4ee3\u7801\uff0c\u611f\u8c22Imp11\u7684\u652f\u6301\uff01\n\nThanks to The Other Roles, The Other Roles CE, The Other Roles GM IA, Town of Us, Stellar Roles!\n\nThanks to miniduikboot & GD for hosting modded servers (and so much more)\n"
},
"GhostsSeeInformationText": {
"0": "Ghosts See Tasks & Other Info",
"13": "\u7075\u9b42\u53ef\u89c1\u4efb\u52a1&\u5176\u4ed6\u4fe1\u606f"
},
"GhostsSeeVotesText": {
"0": "Ghosts Can See Votes",
"13": "\u7075\u9b42\u53ef\u89c1\u6295\u7968"
},
"GhostsSeeRolesText": {
"0": "Ghosts Can See Roles",
"13": "\u7075\u9b42\u53ef\u4ee5\u770b\u5230\u804c\u4e1a"
},
"GhostsSeeModifierText": {
"0": "Ghosts Can Additionally See Modifier",
"13": "\u7075\u9b42\u53ef\u89c1\u9644\u52a0\u804c\u4e1a"
},
"ShowRoleSummaryText": {
"0": "Show Role Summary",
"13": "\u663e\u793a\u804c\u4e1a\u603b\u7ed3"
},
"ShowLighterDarkerText": {
"0": "Show Lighter / Darker",
"13": "\u663e\u793a\u989c\u8272\u6df1\u6d45"
},
"ToggleCursorText": {
"0": "Better Cursor",
"13": "\u542f\u7528\u6a21\u7ec4\u5149\u6807"
},
"EnableSoundEffectsText": {
"0": "Enable Sound Effects",
"13": "\u542f\u7528\u6a21\u7ec4\u97f3\u6548"
},
"ShowVentsOnMapText": {
"0": "Enable Sound Effects",
"13": "\u5728\u5730\u56fe\u4e0a\u663e\u793a\u7ba1\u9053"
},
"EnableDebugLogModeText": {
"0": "Enable Debug Log Mode",
"13": "\u6536\u96c6Debug\u65e5\u5fd7"
},
"medicShowAttemptText": {
"0": "Failed Murder Attempt on Shielded Player",
"13": "\u5c1d\u8bd5\u51fb\u6740\u88ab\u4fdd\u62a4\u73a9\u5bb6"
Expand Down

0 comments on commit c593b9d

Please sign in to comment.