UILocaleScreens.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. using UnityEngine;
  2. public static class UILocaleScreens
  3. {
  4. public static void ApplySettings(Transform root)
  5. {
  6. if (root == null)
  7. return;
  8. const string c = "IMG_BG/Scroll View/Viewport/Content";
  9. LocaleUI.SetText(root, "IMG_BG/IMG_Title/TMP_Title", "settings.title");
  10. LocaleUI.SetText(root, "IMG_BG/IMG_PauseModeBadge/TMP_Badge", "settings.about_sections");
  11. LocaleUI.SetText(root, c + "/GRP_Audio/Image/TMP_SectionTitle", "settings.section.audio");
  12. LocaleUI.SetText(root, c + "/GRP_Display/Image/TMP_SectionTitle", "settings.section.display");
  13. LocaleUI.SetText(root, c + "/GRP_Data/Image/TMP_SectionTitle", "settings.section.data");
  14. LocaleUI.SetText(root, c + "/GRP_About/Image/TMP_SectionTitle", "settings.section.about");
  15. LocaleUI.SetText(root, c + "/GRP_Audio/IMG_MusicRow/TMP_RowTitle", "settings.music");
  16. LocaleUI.SetText(root, c + "/GRP_Audio/IMG_MusicRow/TMP_RowDescription", "settings.music_desc");
  17. LocaleUI.SetText(root, c + "/GRP_Audio/IMG_SoundFxRow/TMP_RowTitle", "settings.sound_fx");
  18. LocaleUI.SetText(root, c + "/GRP_Audio/IMG_SoundFxRow/TMP_RowDescription", "settings.sound_fx_desc");
  19. LocaleUI.SetText(root, c + "/GRP_Display/IMG_MusicRow/TMP_RowTitle", "settings.reduce_motion");
  20. LocaleUI.SetText(root, c + "/GRP_Display/IMG_MusicRow/TMP_RowDescription", "settings.motion_desc");
  21. LocaleUI.SetText(root, c + "/GRP_Data/IMG_MusicRow/TMP_RowTitle", "settings.coin_ledger");
  22. LocaleUI.SetText(root, c + "/GRP_Data/IMG_MusicRow/TMP_RowDescription", "settings.ledger_desc");
  23. LocaleUI.SetText(root, c + "/GRP_Data/IMG_MusicRow/Button/TMP_ButtonLabel", "common.open");
  24. LocaleUI.SetText(root, c + "/GRP_Data/IMG_SoundFxRow/TMP_RowTitle", "settings.reset_save");
  25. LocaleUI.SetText(root, c + "/GRP_Data/IMG_SoundFxRow/TMP_RowDescription", "settings.reset_row_desc");
  26. LocaleUI.SetText(root, c + "/GRP_Data/IMG_SoundFxRow/Button/TMP_ButtonLabel", "common.reset");
  27. LocaleUI.SetText(root, c + "/GRP_Data/IMG_SwitchLanuage/TMP_RowTitle", "settings.language.row");
  28. LocaleUI.SetText(root, c + "/GRP_Data/IMG_SwitchLanuage/Button/TMP_ButtonLabel", "common.select");
  29. LocaleUI.SetText(root, c + "/GRP_About/IMG_MusicRow/TMP_RowTitle", "settings.version");
  30. LocaleUI.SetText(root, c + "/GRP_About/IMG_MusicRow/TMP_RowDescription", "settings.version_line");
  31. LocaleUI.SetText(root, c + "/GRP_About/IMG_SoundFxRow/TMP_RowTitle", "settings.local_save");
  32. LocaleUI.SetText(root, "GRP_ResetSave/IMG_BG/IMG_Title/TMP_Title", "settings.reset_title");
  33. LocaleUI.SetText(root, "GRP_ResetSave/IMG_BG/IMG_PauseModeBadge/TMP_Badge", "settings.reset_warning");
  34. LocaleUI.SetText(root, "GRP_ResetSave/IMG_BG/TMP_Message", "settings.reset_body");
  35. LocaleUI.SetText(root, "GRP_ResetSave/IMG_BG/BTN_Cancel/TMP_ButtonLabel", "common.cancel");
  36. LocaleUI.SetText(root, "GRP_ResetSave/IMG_BG/BTN_Confirm/TMP_ButtonLabel", "common.confirm");
  37. LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/IMG_Title/TMP_Title", "settings.section.language");
  38. LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/IMG_PauseModeBadge/TMP_Badge", "settings.language.choose");
  39. LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/Image/TMP_Instruction", "settings.language.hint");
  40. // LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/GRP_Content/GRP_US/TMP_LanguageName", "settings.language.name.en");
  41. // LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/GRP_Content/GRP_ES/TMP_LanguageName", "settings.language.name.es");
  42. // LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/GRP_Content/GRP_BR/TMP_LanguageName", "settings.language.name.pt-BR");
  43. // LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/GRP_Content/GRP_DE/TMP_LanguageName", "settings.language.name.de");
  44. // LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/GRP_Content/GRP_FR/TMP_LanguageName", "settings.language.name.fr");
  45. // LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/GRP_Content/GRP_IT/TMP_LanguageName", "settings.language.name.it");
  46. LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/BTN_Confirm/TMP_ButtonLabel", "common.confirm");
  47. LocaleUI.SetText(root, "GRP_SelectLanuage/IMG_BG/BTN_Cancel/TMP_ButtonLabel", "common.cancel");
  48. ApplySettingsDuplicateDataSection(root);
  49. LocaleUI.ApplyLocalizedTmp(root);
  50. }
  51. static void ApplySettingsDuplicateDataSection(Transform root)
  52. {
  53. const string c = "GRP_Data";
  54. LocaleUI.SetText(root, c + "/Image/TMP_SectionTitle", "settings.section.data");
  55. LocaleUI.SetText(root, c + "/IMG_MusicRow/TMP_RowTitle", "settings.coin_ledger");
  56. LocaleUI.SetText(root, c + "/IMG_MusicRow/TMP_RowDescription", "settings.ledger_desc");
  57. LocaleUI.SetText(root, c + "/IMG_MusicRow/Button/TMP_ButtonLabel", "common.open");
  58. LocaleUI.SetText(root, c + "/IMG_SoundFxRow/TMP_RowTitle", "settings.reset_save");
  59. LocaleUI.SetText(root, c + "/IMG_SoundFxRow/TMP_RowDescription", "settings.reset_row_desc");
  60. LocaleUI.SetText(root, c + "/IMG_SoundFxRow/Button/TMP_ButtonLabel", "common.reset");
  61. }
  62. public static void ApplyLobby(Transform root)
  63. {
  64. if (root == null)
  65. return;
  66. LocaleUI.ApplyLocalizedTmp(root);
  67. }
  68. public static void ApplyCheckIn(Transform root)
  69. {
  70. if (root == null)
  71. return;
  72. LocaleUI.SetText(root, "IMG_BG/IMG_DailyCheckInTitle/TMP_Title", "checkin.title");
  73. LocaleUI.SetText(root, "IMG_BG/TMP_GameTip", "checkin.miss_note");
  74. LocaleUI.ApplyLocalizedTmp(root);
  75. }
  76. public static void ApplyDraw(Transform root)
  77. {
  78. if (root == null)
  79. return;
  80. LocaleUI.SetText(root, "IMG_BG/IMG_DrawTitle/TMP_Title", "draw.title");
  81. LocaleUI.SetText(root, "IMG_BG/TMP_GameTip", "draw.hint");
  82. LocaleUI.ApplyLocalizedTmp(root);
  83. }
  84. public static void ApplyShop(Transform root)
  85. {
  86. if (root == null)
  87. return;
  88. LocaleUI.ApplyLocalizedTmp(root);
  89. }
  90. public static void ApplyProfile(Transform root)
  91. {
  92. if (root == null)
  93. return;
  94. LocaleUI.SetText(root, "IMG_BG/IMG_Title/TMP_Title", "profile.title");
  95. LocaleUI.SetText(root, "IMG_BG/IMG_PauseModeBadge/TMP_PauseModeInfo", "profile.local_save");
  96. LocaleUI.SetText(root, "IMG_BG/GRP_PlayerBar/GRP_PlayerStats/GRP_LevelsCleared/TMP_LevelsClearedLabel", "profile.levels_cleared");
  97. LocaleUI.SetText(root, "IMG_BG/GRP_PlayerBar/GRP_PlayerStats/GRP_SetsServed/TMP_SetsServedLabel", "profile.sets_served");
  98. LocaleUI.SetText(root, "IMG_BG/GRP_PlayerBar/GRP_PlayerStats/GRP_BestScore/TMP_BestScoreLabel", "profile.best_score");
  99. LocaleUI.SetText(root, "IMG_BG/GRP_PlayerBar/GRP_PlayerStats/GRP_CoinsEarned/TMP_CoinsEarnedLabel", "profile.coins_earned");
  100. LocaleUI.SetText(root, "IMG_BG/GRP_ModeProgress/Image/TMP_ModeProgress", "profile.mode_progress");
  101. LocaleUI.SetText(root, "IMG_BG/GRP_ModeProgress/GRP_ClassicStand/TMP_ModeClassic", "defs.mode.classic.name");
  102. LocaleUI.SetText(root, "IMG_BG/GRP_ModeProgress/GRP_RushHour/TMP_ModeRush", "defs.mode.rush.name");
  103. LocaleUI.SetText(root, "IMG_BG/GRP_ModeProgress/GRP_SealedStand/TMP_ModeSealed", "defs.mode.sealed.name");
  104. LocaleUI.SetText(root, "IMG_BG/GRP_EditName/Image (3)/TMP_NameLabel", "profile.name");
  105. LocaleUI.SetText(root, "IMG_BG/GRP_AvatarSelect/Image (3)/TMP_AvatarLabel", "profile.avatar");
  106. LocaleUI.SetText(root, "IMG_BG/GRP_EditName/BTN_Save/TMP_Label", "common.save");
  107. LocaleUI.ApplyLocalizedTmp(root);
  108. }
  109. public static void ApplyHelp(Transform root)
  110. {
  111. if (root == null)
  112. return;
  113. LocaleUI.SetText(root, "IMG_BG/IMG_DailyCheckInTitle/TMP_Title", "help.title");
  114. LocaleUI.SetText(root, "IMG_BG/IMG_PauseModeBadge/TMP_PauseModeInfo", "help.tagline");
  115. LocaleUI.SetText(root, "IMG_BG/GRP_Content/Viewport/Content/TMP_SectionBasics/Image/TMP_Label", "help.basics");
  116. LocaleUI.SetText(root, "IMG_BG/GRP_Content/Viewport/Content/TMP_SectionFaq/Image/TMP_Label", "help.faq");
  117. LocaleUI.SetText(root, "IMG_BG/GRP_Content/Viewport/Content/GRP_BtnReplayIntro/BTN_ReplayIntro/TMP_Label", "help.replay_intro");
  118. LocaleUI.ApplyLocalizedTmp(root);
  119. }
  120. public static void ApplyLoading(Transform root)
  121. {
  122. if (root == null)
  123. return;
  124. LocaleUI.SetText(root, "IMG_EditionBanner/TMP_EditionInfo", "common.retro_edition");
  125. LocaleUI.ApplyLocalizedTmp(root);
  126. }
  127. public static void ApplyStart(Transform root)
  128. {
  129. if (root == null)
  130. return;
  131. LocaleUI.SetText(root, "bg/IMG_FeatureInfoBG/TMP_FeatureInfo", "common.retro_fruit_tagline");
  132. LocaleUI.SetText(root, "bg/IMG_FooterBoard/TMP_FooterInfo", "common.retro_fruit_tagline");
  133. LocaleUI.ApplyLocalizedTmp(root);
  134. }
  135. public static void ApplyPausePanel(Transform panel)
  136. {
  137. if (panel == null)
  138. return;
  139. LocaleUI.SetText(panel, "IMG_BG/IMG_PauseTitle/TMP_Title", "pause.title");
  140. LocaleUI.SetText(panel, "IMG_BG/TMP_ProgressWarning", "pause.hint");
  141. LocaleUI.SetText(panel, "IMG_BG/BTN_Resume/TMP_Label", "common.resume");
  142. LocaleUI.SetText(panel, "IMG_BG/BTN_Quit/TMP_Label", "common.quit");
  143. LocaleUI.ApplyLocalizedTmp(panel.transform);
  144. }
  145. public static void ApplyWinPanel(Transform panel)
  146. {
  147. if (panel == null)
  148. return;
  149. LocaleUI.SetText(panel, "IMG_BG/IMG_Title/TMP_Title", "result.cleared");
  150. LocaleUI.SetText(panel, "IMG_BG/IMG_ClearedScoreBG/GRP_SetsServed/TMP_Label", "result.level_bonus");
  151. LocaleUI.SetText(panel, "IMG_BG/IMG_ClearedScoreBG/GRP_FruitLeft/TMP_Label", "result.leftover_moves");
  152. LocaleUI.SetText(panel, "IMG_BG/IMG_ClearedScoreBG/GRP_MovesLeft/TMP_Label", "result.sets_served");
  153. LocaleUI.SetText(panel, "IMG_BG/BTN_Back/TMP_Label", "common.back");
  154. LocaleUI.ApplyLocalizedTmp(panel.transform);
  155. }
  156. public static void ApplyLosePanel(Transform panel)
  157. {
  158. if (panel == null)
  159. return;
  160. LocaleUI.SetText(panel, "IMG_BG/GRP_TimeUp/IMG_Title/TMP_Title", "result.time_up");
  161. LocaleUI.SetText(panel, "IMG_BG/GRP_NoMoves/IMG_Title/TMP_Title", "result.no_moves");
  162. LocaleUI.SetText(panel, "IMG_BG/IMG_ClearedScoreBG/GRP_SetsServed/TMP_Label", "result.sets_served");
  163. LocaleUI.SetText(panel, "IMG_BG/IMG_ClearedScoreBG/GRP_FruitLeft/TMP_Label", "result.fruit_left");
  164. LocaleUI.SetText(panel, "IMG_BG/IMG_ClearedScoreBG/GRP_MovesLeft/TMP_Label", "result.moves_left");
  165. LocaleUI.SetText(panel, "IMG_BG/BTN_Back/TMP_Label", "common.back");
  166. LocaleUI.ApplyLocalizedTmp(panel.transform);
  167. }
  168. public static void ApplyGameHud(Transform root)
  169. {
  170. if (root == null)
  171. return;
  172. LocaleUI.SetText(root, "IMG_GameBoardFrame/IMG_FruitCounterBG/IMG_Title/TMP_Title", "game.still_no_stand");
  173. LocaleUI.SetText(root, "PowerUpsGroup/BTN_AddMoves/TMP_Name", "defs.item.moves.name");
  174. LocaleUI.SetText(root, "PowerUpsGroup/BTN_Hammer/TMP_Name", "defs.item.hammer.name");
  175. LocaleUI.SetText(root, "PowerUpsGroup/BTN_Key/TMP_Name", "defs.item.key.short");
  176. LocaleUI.SetText(root, "PowerUpsGroup/BTN_Shuffle/TMP_Name", "defs.item.shuffle.name");
  177. LocaleUI.SetText(root, "IMG_GameTip/TMP_GameTip", "game.tip.tap_drag");
  178. LocaleUI.ApplyLocalizedTmp(root);
  179. }
  180. }