diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index bcf50d7..bbac2b6 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -571,6 +571,9 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("Install custom file"), "home_localization_action_rsi_launcher_localization": MessageLookupByLibrary.simpleMessage("RSILauncher Localization"), + "home_localization_action_rsi_launcher_no_game_path_msg": + MessageLookupByLibrary.simpleMessage( + "You are not currently installed in the game body or the game installation directory is not selected, and you can only use the promoter Chinese function. Please make sure the game is installed or adds the game installation directory in the box settings."), "home_localization_action_select_customize_file": MessageLookupByLibrary.simpleMessage("Click to select INI file"), "home_localization_advanced_action_install": @@ -1099,8 +1102,6 @@ class MessageLookup extends MessageLookupByLibrary { "RSI customer service station"), "tools_hosts_info_rsi_official_website": MessageLookupByLibrary.simpleMessage("RSI official website"), - "tools_hosts_info_rsi_zendesk": MessageLookupByLibrary.simpleMessage( - "RSI ZENDESK Customer Service Station"), "tools_hosts_info_site": MessageLookupByLibrary.simpleMessage("Site"), "tools_hosts_info_status": MessageLookupByLibrary.simpleMessage("Status"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 6fe2794..e95b4c3 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -512,6 +512,9 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("安装自定义文件"), "home_localization_action_rsi_launcher_localization": MessageLookupByLibrary.simpleMessage("RSI 启动器汉化"), + "home_localization_action_rsi_launcher_no_game_path_msg": + MessageLookupByLibrary.simpleMessage( + "您当前未安装游戏本体或未选择游戏安装目录,只可使用启动器汉化功能。请确保游戏安装完毕或在盒子设置中添加游戏安装目录后重试。"), "home_localization_action_select_customize_file": MessageLookupByLibrary.simpleMessage("点击选择 ini 文件"), "home_localization_advanced_action_install": @@ -979,8 +982,6 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("RSI 客服站"), "tools_hosts_info_rsi_official_website": MessageLookupByLibrary.simpleMessage("RSI 官网"), - "tools_hosts_info_rsi_zendesk": - MessageLookupByLibrary.simpleMessage("RSI Zendesk 客服站"), "tools_hosts_info_site": MessageLookupByLibrary.simpleMessage("站点"), "tools_hosts_info_status": MessageLookupByLibrary.simpleMessage("状态"), "tools_hosts_info_writing_hosts": diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 602251b..dfa2d9d 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -513,6 +513,11 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("安裝自訂文件"), "home_localization_action_rsi_launcher_localization": MessageLookupByLibrary.simpleMessage("RSI 啟動器翻譯"), + "home_localization_action_rsi_launcher_no_game_path_msg": + MessageLookupByLibrary.simpleMessage( + "您當前未安裝遊戲本體或未選擇遊戲安裝目錄,只可使用啟動器翻譯功能。請確保遊戲安裝完畢或在工具箱設置中添加遊戲安裝目錄後重試。"), + "home_localization_action_select_customize_file": + MessageLookupByLibrary.simpleMessage("點擊選擇 ini 文件"), "home_localization_advanced_action_install": MessageLookupByLibrary.simpleMessage("安裝翻譯"), "home_localization_advanced_action_mod_change": @@ -570,6 +575,15 @@ class MessageLookup extends MessageLookupByLibrary { "home_localization_new_version_available": MessageLookupByLibrary.simpleMessage("社群翻譯有新的版本"), "home_localization_new_version_installed": m34, + "home_localization_ptu_advanced_localization_tip_title": + MessageLookupByLibrary.simpleMessage("推薦使用高級翻譯"), + "home_localization_ptu_advanced_localization_tip_title_info": + MessageLookupByLibrary.simpleMessage( + "在 PTU/EPTU 等測試頻道 ,當前翻譯文本可能與遊戲不同步,使用高級翻譯可以減少亂碼產生。"), + "home_localization_select_customize_file": + MessageLookupByLibrary.simpleMessage("請選擇自定義翻譯文件"), + "home_localization_select_customize_file_ini": + MessageLookupByLibrary.simpleMessage("請選擇 ini 文件"), "home_localization_title_localization_tools": MessageLookupByLibrary.simpleMessage("翻譯工具"), "home_login_action_title_box_one_click_launch": @@ -971,8 +985,6 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("RSI 客服站"), "tools_hosts_info_rsi_official_website": MessageLookupByLibrary.simpleMessage("RSI 官方網站"), - "tools_hosts_info_rsi_zendesk": - MessageLookupByLibrary.simpleMessage("RSI Zendesk 客服站"), "tools_hosts_info_site": MessageLookupByLibrary.simpleMessage("站點"), "tools_hosts_info_status": MessageLookupByLibrary.simpleMessage("狀態"), "tools_hosts_info_writing_hosts": @@ -983,6 +995,10 @@ class MessageLookup extends MessageLookupByLibrary { "tools_info_rsi_launcher_location": MessageLookupByLibrary.simpleMessage("RSI啟動器位置:"), "tools_info_scanning": MessageLookupByLibrary.simpleMessage("正在掃描..."), + "tools_rsi_launcher_enhance_action_expand": + MessageLookupByLibrary.simpleMessage("展開額外功能"), + "tools_rsi_launcher_enhance_action_fold": + MessageLookupByLibrary.simpleMessage("收起額外功能"), "tools_rsi_launcher_enhance_action_install": MessageLookupByLibrary.simpleMessage("安裝增強補丁"), "tools_rsi_launcher_enhance_init_msg1": @@ -1020,6 +1036,13 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("生成補丁 ..."), "tools_rsi_launcher_enhance_working_msg2": MessageLookupByLibrary.simpleMessage("安裝補丁,這需要一點時間,取決於您的電腦性能 ..."), + "tools_unp4k_missing_runtime": + MessageLookupByLibrary.simpleMessage("缺少運行庫"), + "tools_unp4k_missing_runtime_action_install": + MessageLookupByLibrary.simpleMessage("安裝運行庫"), + "tools_unp4k_missing_runtime_info": + MessageLookupByLibrary.simpleMessage( + "使用此功能需安裝 .NET8 運行庫,請點擊下方按鈕下載安裝,安裝成功後重新打開此頁面即可繼續使用。"), "tools_unp4k_msg_init": MessageLookupByLibrary.simpleMessage("初始化中..."), "tools_unp4k_msg_open_file": m58, "tools_unp4k_msg_read_completed": m59, diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 6d7459b..a42fde5 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -2591,16 +2591,6 @@ class S { ); } - /// `RSI ZENDESK Customer Service Station` - String get tools_hosts_info_rsi_zendesk { - return Intl.message( - 'RSI ZENDESK Customer Service Station', - name: 'tools_hosts_info_rsi_zendesk', - desc: '', - args: [], - ); - } - /// `RSI customer service station` String get tools_hosts_info_rsi_customer_service { return Intl.message( @@ -4853,6 +4843,16 @@ class S { args: [], ); } + + /// `You are not currently installed in the game body or the game installation directory is not selected, and you can only use the promoter Chinese function. Please make sure the game is installed or adds the game installation directory in the box settings.` + String get home_localization_action_rsi_launcher_no_game_path_msg { + return Intl.message( + 'You are not currently installed in the game body or the game installation directory is not selected, and you can only use the promoter Chinese function. Please make sure the game is installed or adds the game installation directory in the box settings.', + name: 'home_localization_action_rsi_launcher_no_game_path_msg', + desc: '', + args: [], + ); + } } class AppLocalizationDelegate extends LocalizationsDelegate { diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index a635754..de3f6ab 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,5 +1,6 @@ { "@@locale": "en", + "@@auto_translate_locale": "en", "app_language_name": "English", "@app_language_name": {}, "app_language_code": "en", @@ -508,8 +509,6 @@ "@app_splash_almost_done": {}, "tools_hosts_info_rsi_official_website": "RSI official website", "@tools_hosts_info_rsi_official_website": {}, - "tools_hosts_info_rsi_zendesk": "RSI ZENDESK Customer Service Station", - "@tools_hosts_info_rsi_zendesk": {}, "tools_hosts_info_rsi_customer_service": "RSI customer service station", "@tools_hosts_info_rsi_customer_service": {}, "tools_hosts_info_dns_query_and_test": "Inquiring about DNS and testing accessibility, please wait patiently ...", @@ -959,5 +958,6 @@ "tools_unp4k_missing_runtime_info": "Use this function to install the .NET8 runtime, please click the button below to download and install it. After the installation is successful, reopen this page to continue to use.", "@tools_unp4k_missing_runtime_info": {}, "tools_unp4k_missing_runtime_action_install": "Install the runtime", - "@tools_unp4k_missing_runtime_action_install": {} -} + "@tools_unp4k_missing_runtime_action_install": {}, + "home_localization_action_rsi_launcher_no_game_path_msg": "You are not currently installed in the game body or the game installation directory is not selected, and you can only use the promoter Chinese function. Please make sure the game is installed or adds the game installation directory in the box settings." +} \ No newline at end of file diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index adf4cb9..11821ef 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -1,5 +1,6 @@ { "@@locale": "ja", + "@@auto_translate_locale": "ja", "app_language_name": "日本語", "@app_language_name": {}, "app_language_code": "ja", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 8521066..af7aa8c 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -1,6 +1,6 @@ { "@@locale": "zh_CN", - "@auto_translate_locale": "zh-cn", + "@@auto_translate_locale": "zh-cn", "app_language_name": "简体中文", "@app_language_name": {}, "app_language_code": "zh_CN", @@ -508,8 +508,6 @@ "@app_splash_almost_done": {}, "tools_hosts_info_rsi_official_website": "RSI 官网", "@tools_hosts_info_rsi_official_website": {}, - "tools_hosts_info_rsi_zendesk": "RSI Zendesk 客服站", - "@tools_hosts_info_rsi_zendesk": {}, "tools_hosts_info_rsi_customer_service": "RSI 客服站", "@tools_hosts_info_rsi_customer_service": {}, "tools_hosts_info_dns_query_and_test": "正在查询 DNS 并测试可访问性 请耐心等待...", @@ -702,6 +700,7 @@ "home_localization_msg_version_advanced": " (高级汉化)", "home_localization_msg_no_note": "该版本没有提供描述", "home_localization_action_rsi_launcher_localization": "RSI 启动器汉化", + "home_localization_action_rsi_launcher_no_game_path_msg": "您当前未安装游戏本体或未选择游戏安装目录,只可使用启动器汉化功能。请确保游戏安装完毕或在盒子设置中添加游戏安装目录后重试。", "home_localization_action_advanced": "高级汉化", "home_localization_action_install_customize": "安装自定义文件", "home_localization_title_localization_tools": "汉化工具", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 03e7b51..ceb7a10 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -1,6 +1,6 @@ { "@@locale": "zh_TW", - "@auto_translate_locale": "zh-cn", + "@@auto_translate_locale": "zh-tw", "app_language_name": "繁體中文", "@app_language_name": {}, "app_language_code": "zh_TW", @@ -508,8 +508,6 @@ "@app_splash_almost_done": {}, "tools_hosts_info_rsi_official_website": "RSI 官方網站", "@tools_hosts_info_rsi_official_website": {}, - "tools_hosts_info_rsi_zendesk": "RSI Zendesk 客服站", - "@tools_hosts_info_rsi_zendesk": {}, "tools_hosts_info_rsi_customer_service": "RSI 客服站", "@tools_hosts_info_rsi_customer_service": {}, "tools_hosts_info_dns_query_and_test": "正在查詢 DNS 並測試可瀏覽性 請耐心等待...", @@ -786,5 +784,16 @@ "tools_action_unp4k_info": "解包星際公民 p4k 文件", "tools_unp4k_title": "P4K 查看器 -> {v0}", "tools_unp4k_view_file": "單擊文件以預覽", - "tools_unp4k_msg_unknown_file_type": "未知文件類型\n{v0}" -} + "tools_unp4k_msg_unknown_file_type": "未知文件類型\n{v0}", + "home_localization_action_rsi_launcher_no_game_path_msg": "您當前未安裝遊戲本體或未選擇遊戲安裝目錄,只可使用啟動器翻譯功能。請確保遊戲安裝完畢或在工具箱設置中添加遊戲安裝目錄後重試。", + "home_localization_select_customize_file_ini": "請選擇 ini 文件", + "home_localization_select_customize_file": "請選擇自定義翻譯文件", + "home_localization_action_select_customize_file": "點擊選擇 ini 文件", + "home_localization_ptu_advanced_localization_tip_title": "推薦使用高級翻譯", + "home_localization_ptu_advanced_localization_tip_title_info": "在 PTU/EPTU 等測試頻道 ,當前翻譯文本可能與遊戲不同步,使用高級翻譯可以減少亂碼產生。", + "tools_rsi_launcher_enhance_action_fold": "收起額外功能", + "tools_rsi_launcher_enhance_action_expand": "展開額外功能", + "tools_unp4k_missing_runtime": "缺少運行庫", + "tools_unp4k_missing_runtime_info": "使用此功能需安裝 .NET8 運行庫,請點擊下方按鈕下載安裝,安裝成功後重新打開此頁面即可繼續使用。", + "tools_unp4k_missing_runtime_action_install": "安裝運行庫" +} \ No newline at end of file diff --git a/lib/ui/home/home_ui.dart b/lib/ui/home/home_ui.dart index eb185b4..6a78ed6 100644 --- a/lib/ui/home/home_ui.dart +++ b/lib/ui/home/home_ui.dart @@ -8,6 +8,7 @@ import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:starcitizen_doctor/api/analytics.dart'; import 'package:starcitizen_doctor/common/helper/system_helper.dart'; +import 'package:starcitizen_doctor/ui/tools/tools_ui_model.dart'; import 'package:starcitizen_doctor/widgets/widgets.dart'; import 'package:url_launcher/url_launcher_string.dart'; @@ -795,15 +796,16 @@ class HomeUI extends HookConsumerWidget { switch (key) { case "localization": if (homeState.scInstalledPath == "not_install") { - showToast(context, gameInstallReqInfo); + ToolsUIModel.rsiEnhance(context, showNotGameInstallMsg: true); break; } final model = ref.watch(homeUIModelProvider.notifier); model.checkLocalizationUpdate(); await showDialog( - context: context, - dismissWithEsc: false, - builder: (BuildContext context) => const LocalizationDialogUI()); + context: context, + dismissWithEsc: false, + builder: (BuildContext context) => const LocalizationDialogUI(), + ); model.checkLocalizationUpdate(skipReload: true); break; case "performance": diff --git a/lib/ui/tools/dialogs/hosts_booster_dialog_ui.dart b/lib/ui/tools/dialogs/hosts_booster_dialog_ui.dart index ead1d40..3177476 100644 --- a/lib/ui/tools/dialogs/hosts_booster_dialog_ui.dart +++ b/lib/ui/tools/dialogs/hosts_booster_dialog_ui.dart @@ -18,9 +18,6 @@ class HostsBoosterDialogUI extends HookConsumerWidget { S.current.tools_hosts_info_rsi_official_website: [ "robertsspaceindustries.com" ], - S.current.tools_hosts_info_rsi_zendesk: [ - "cloudimperiumservicesllc.zendesk.com" - ], S.current.tools_hosts_info_rsi_customer_service: [ "support.robertsspaceindustries.com" ], diff --git a/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart b/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart index 993e580..b350d3a 100644 --- a/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart +++ b/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart @@ -33,7 +33,10 @@ class RSILauncherStateData with _$RSILauncherStateData { } class RsiLauncherEnhanceDialogUI extends HookConsumerWidget { - const RsiLauncherEnhanceDialogUI({super.key}); + final bool showNotGameInstallMsg; + + const RsiLauncherEnhanceDialogUI( + {super.key, this.showNotGameInstallMsg = false}); static const supportLocalizationMap = { "en": NoL10n.langEn, @@ -113,6 +116,23 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ + if (showNotGameInstallMsg) ...[ + InfoBar( + title: const SizedBox(), + content: Text(S.current + .home_localization_action_rsi_launcher_no_game_path_msg), + style: InfoBarThemeData(decoration: (severity) { + return BoxDecoration( + color: Colors.orange, + ); + }, iconColor: (severity) { + return Colors.white; + }), + ), + const SizedBox( + height: 12, + ), + ], if (workingText.value.isNotEmpty) ...[ Center( child: Column( diff --git a/lib/ui/tools/tools_ui_model.dart b/lib/ui/tools/tools_ui_model.dart index f993735..8b40709 100644 --- a/lib/ui/tools/tools_ui_model.dart +++ b/lib/ui/tools/tools_ui_model.dart @@ -593,7 +593,8 @@ class ToolsUIModel extends _$ToolsUIModel { context.push("/tools/unp4kc"); } - static rsiEnhance(BuildContext context) async { + static rsiEnhance(BuildContext context, + {bool showNotGameInstallMsg = false}) async { if ((await SystemHelper.getPID("\"RSI Launcher\"")).isNotEmpty) { if (!context.mounted) return; showToast( @@ -605,6 +606,8 @@ class ToolsUIModel extends _$ToolsUIModel { if (!context.mounted) return; showDialog( context: context, - builder: (BuildContext context) => const RsiLauncherEnhanceDialogUI()); + builder: (BuildContext context) => RsiLauncherEnhanceDialogUI( + showNotGameInstallMsg: showNotGameInstallMsg, + )); } } diff --git a/packages/sct_dev_tools/bin/auto_l10n.dart b/packages/sct_dev_tools/bin/auto_l10n.dart index 6a72fcb..aeab4e3 100644 --- a/packages/sct_dev_tools/bin/auto_l10n.dart +++ b/packages/sct_dev_tools/bin/auto_l10n.dart @@ -95,8 +95,8 @@ class AutoL10nTools { final toMap = json.decode(toFile.readAsStringSync()) as Map; - final formLocaleCode = formMap["@auto_translate_locale"].toString(); - final toLocaleCode = toMap["@auto_translate_locale"].toString(); + final formLocaleCode = formMap["@@auto_translate_locale"].toString(); + final toLocaleCode = toMap["@@auto_translate_locale"].toString(); print("formLocaleCode: $formLocaleCode, toLocaleCode: $toLocaleCode"); final newMap = {};