feat: 安装自定义汉化文件

This commit is contained in:
xkeyC 2024-05-05 20:58:58 +08:00
parent 90f254b1d8
commit 2c744cc5bd
17 changed files with 393 additions and 242 deletions

View File

@ -107,70 +107,68 @@ class MessageLookup extends MessageLookupByLibrary {
static String m36(v0) => "Channel: ${v0}";
static String m37(v0) => "Custom_ ${v0}";
static String m37(v0) => "Enable (${v0}):";
static String m38(v0) => "Enable (${v0}):";
static String m38(v0) => "Install an error!\n\n ${v0}";
static String m39(v0) => "Install an error!\n\n ${v0}";
static String m39(v0) => "The installed version: ${v0}";
static String m40(v0) => "The installed version: ${v0}";
static String m40(v0) => "Update Time: ${v0}";
static String m41(v0) => "Update Time: ${v0}";
static String m41(v0) => "Version number: ${v0}";
static String m42(v0) => "Version number: ${v0}";
static String m42(v0) => "Current status: ${v0}";
static String m43(v0) => "Current status: ${v0}";
static String m44(v0, v1, v2) =>
static String m43(v0, v1, v2) =>
"${v0} minimum value: ${v1} / maximum value: ${v2}";
static String m45(v0) => "Performance Optimization -> ${v0}";
static String m44(v0) => "Performance Optimization -> ${v0}";
static String m46(v0) =>
static String m45(v0) =>
"The cache size ${v0} MB, clean up the Localization -based file cache of the download of the box, will not affect the installed Localization";
static String m47(v0) =>
static String m46(v0) =>
"Core quantity that has been set: ${v0} (This function is suitable for the box -click startup or RSI starter manager mode on the homepage, which is not enabled when it is 0)";
static String m48(v0) =>
static String m47(v0) =>
"Failure to clean up, please remove manually, file location: ${v0}";
static String m49(v0) => "Error: ${v0}";
static String m48(v0) => "Error: ${v0}";
static String m50(v0) =>
static String m49(v0) =>
"Initialization failed, please take a screenshot report to the developer. ${v0}";
static String m51(v0) =>
static String m50(v0) =>
"If you have a problem with the NVME patch, run this tool. (It may cause game installation/update to be unavailable.)\n\nCurrent patch status: ${v0}";
static String m52(v0) =>
static String m51(v0) =>
"In some cases, the LOG file of the RSI promoter will be damaged, causing the problem to be scanned, and using this tool to clean up the damaged log file.\n\nCurrent log file size: ${v0} MB";
static String m53(v0) =>
static String m52(v0) =>
"If the game screen appears abnormal or the version is updated, you can use the tool to clean the expired color (when it is greater than 500m, it is recommended to clean it)\n\nCache size: ${v0} MB";
static String m54(v0, v1, v2, v3, v4) =>
static String m53(v0, v1, v2, v3, v4) =>
"System: ${v0}\n\nProcessor: ${v1}\n\nMemory size: ${v2} gb\n\nGraphics card information:\n${v3}\n\nStorage information:\n${v4}\n\n";
static String m55(v0) => "Failure to handle! : ${v0}";
static String m54(v0) => "Failure to handle! : ${v0}";
static String m56(v0) => "Read the starter information failure: ${v0}";
static String m55(v0) => "Read the starter information failure: ${v0}";
static String m57(v0) => "Patch status: ${v0}";
static String m56(v0) => "Patch status: ${v0}";
static String m58(v0) => "Internal version information of the starter: ${v0}";
static String m57(v0) => "Internal version information of the starter: ${v0}";
static String m59(v0) => "Open the file: ${v0}";
static String m58(v0) => "Open the file: ${v0}";
static String m60(v0, v1) => "After loading: ${v0} a file, time: ${v1} ms";
static String m59(v0, v1) => "After loading: ${v0} a file, time: ${v1} ms";
static String m61(v0) => "Read file: ${v0} ...";
static String m60(v0) => "Read file: ${v0} ...";
static String m62(v0, v1) => "Processing files (${v0}/${v1}) ...";
static String m61(v0, v1) => "Processing files (${v0}/${v1}) ...";
static String m63(v0) => "Unknown file type\n${v0}";
static String m62(v0) => "Unknown file type\n${v0}";
static String m64(v0) => "P4k viewer -> ${v0}";
static String m63(v0) => "P4k viewer -> ${v0}";
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@ -676,17 +674,16 @@ class MessageLookup extends MessageLookupByLibrary {
"localization_info_corrupted_file":
MessageLookupByLibrary.simpleMessage(
"The file is damaged, please download again"),
"localization_info_custom_file": m37,
"localization_info_custom_files":
MessageLookupByLibrary.simpleMessage("Custom file"),
"localization_info_enabled": m38,
"localization_info_enabled": m37,
"localization_info_incompatible_translation_params_warning":
MessageLookupByLibrary.simpleMessage(
"User.cfg contains incompatible Localization parameters, which may be the residual information of the previous Localization file.\n\nThis may lead to ineffective or garbled Localization, click to confirm that you are removed with one click (it will not affect other configuration)."),
"localization_info_installation_error": m39,
"localization_info_installation_error": m38,
"localization_info_installed":
MessageLookupByLibrary.simpleMessage("Installed"),
"localization_info_installed_version": m40,
"localization_info_installed_version": m39,
"localization_info_language":
MessageLookupByLibrary.simpleMessage("Language: "),
"localization_info_machine_translation_warning":
@ -704,8 +701,8 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Localization status"),
"localization_info_unavailable":
MessageLookupByLibrary.simpleMessage("Unavailable"),
"localization_info_update_time": m41,
"localization_info_version_number": m42,
"localization_info_update_time": m40,
"localization_info_version_number": m41,
"performance_action_apply":
MessageLookupByLibrary.simpleMessage("Apply"),
"performance_action_apply_and_clear_shaders":
@ -729,7 +726,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Super"),
"performance_info_applied":
MessageLookupByLibrary.simpleMessage("Applied"),
"performance_info_current_status": m43,
"performance_info_current_status": m42,
"performance_info_delete_config_file":
MessageLookupByLibrary.simpleMessage(
"Delete the configuration file ..."),
@ -744,7 +741,7 @@ class MessageLookup extends MessageLookupByLibrary {
"This function is very helpful for optimizing the bottleneck of the graphics card, but it may have a reverse effect on the CPU bottleneck. If your graphics card performance is strong, you can try to use better picture quality to obtain higher graphics card utilization."),
"performance_info_graphics":
MessageLookupByLibrary.simpleMessage("Graphic"),
"performance_info_min_max_values": m44,
"performance_info_min_max_values": m43,
"performance_info_not_applied":
MessageLookupByLibrary.simpleMessage("Unused"),
"performance_info_shader_clearing_warning":
@ -879,7 +876,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Water effect"),
"performance_json_text_water_info":
MessageLookupByLibrary.simpleMessage("Grade of various water"),
"performance_title_performance_optimization": m45,
"performance_title_performance_optimization": m44,
"setting_action_clear_translation_file_cache":
MessageLookupByLibrary.simpleMessage(
"Clean up the Localization file cache"),
@ -894,7 +891,7 @@ class MessageLookup extends MessageLookupByLibrary {
"setting_action_info_autofill_data_cleared":
MessageLookupByLibrary.simpleMessage(
"Automatic filling data has been cleaned up"),
"setting_action_info_cache_clearing_info": m46,
"setting_action_info_cache_clearing_info": m45,
"setting_action_info_clear_cache_warning":
MessageLookupByLibrary.simpleMessage(
"This will not affect the installed Localization."),
@ -942,7 +939,7 @@ class MessageLookup extends MessageLookupByLibrary {
"setting_action_reset_auto_password_fill":
MessageLookupByLibrary.simpleMessage(
"Reset automatic password filling"),
"setting_action_set_core_count": m47,
"setting_action_set_core_count": m46,
"setting_action_set_game_file": MessageLookupByLibrary.simpleMessage(
"Set the game file (StarCitizen.exe)"),
"setting_action_set_launcher_file":
@ -970,13 +967,13 @@ class MessageLookup extends MessageLookupByLibrary {
"Hosts acceleration (experimental)"),
"tools_action_info_cleanup_complete": MessageLookupByLibrary.simpleMessage(
"After cleaning up, complete the installation / game startup operation once."),
"tools_action_info_cleanup_failed": m48,
"tools_action_info_cleanup_failed": m47,
"tools_action_info_config_file_not_exist":
MessageLookupByLibrary.simpleMessage(
"The configuration file does not exist, please try to run the game once"),
"tools_action_info_eac_file_removed": MessageLookupByLibrary.simpleMessage(
"Remove the EAC file for you, and then open the RSI startup for you. Please go to Settings-> Verify to reinstall EAC."),
"tools_action_info_error_occurred": m49,
"tools_action_info_error_occurred": m48,
"tools_action_info_fix_success_restart":
MessageLookupByLibrary.simpleMessage(
"If the repair is successful, please try to restart the computer and continue to install the game! If the registry modification operation causes compatibility problems with other software, please use the NVMe registry in the tool to clean up."),
@ -986,7 +983,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_info_hosts_acceleration_experimental_tip":
MessageLookupByLibrary.simpleMessage(
"Write the IP information into the hosts file to solve problems such as DNS pollution in some regions that cannot log in to the official website.\nThis function is undergoing the first stage of testing. Please report it in time when you encounter problems."),
"tools_action_info_init_failed": m50,
"tools_action_info_init_failed": m49,
"tools_action_info_log_file_not_exist":
MessageLookupByLibrary.simpleMessage(
"The log file does not exist, please try to start a game startup or game installation, and exit the starter. If the problem cannot be solved, try to update the launcher to the latest version!"),
@ -997,7 +994,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Manually write the NVM patch, this function is used only when you know what you do"),
"tools_action_info_not_installed":
MessageLookupByLibrary.simpleMessage("Not Installed"),
"tools_action_info_nvme_patch_issue": m51,
"tools_action_info_nvme_patch_issue": m50,
"tools_action_info_one_key_close_lens_shake":
MessageLookupByLibrary.simpleMessage(
"Close the game endoscope shaking to facilitate photography operations.\n\n @Lapernum offers parameter information."),
@ -1021,7 +1018,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_info_rsi_launcher_directory_not_found":
MessageLookupByLibrary.simpleMessage(
"If the RSI starter directory is not found, please try manually."),
"tools_action_info_rsi_launcher_log_issue": m52,
"tools_action_info_rsi_launcher_log_issue": m51,
"tools_action_info_rsi_launcher_not_found":
MessageLookupByLibrary.simpleMessage(
"If the RSI label is not found, try to reinstall it or add it manually in the settings."),
@ -1030,11 +1027,11 @@ class MessageLookup extends MessageLookupByLibrary {
"The RSI starter is running! Please turn off the label first and then use this feature!"),
"tools_action_info_run_rsi_as_admin": MessageLookupByLibrary.simpleMessage(
"Run RSI startups as an administrator may solve some problems.\n\nIf the energy efficiency core shielding parameters are set, it will also be applied here."),
"tools_action_info_shader_cache_issue": m53,
"tools_action_info_shader_cache_issue": m52,
"tools_action_info_star_citizen_not_found":
MessageLookupByLibrary.simpleMessage(
"If the interstellar game installation location is not found, please complete the game startup operation at least once or add it manually in the settings."),
"tools_action_info_system_info_content": m54,
"tools_action_info_system_info_content": m53,
"tools_action_info_system_info_title":
MessageLookupByLibrary.simpleMessage("System message"),
"tools_action_info_valid_game_directory_needed":
@ -1098,7 +1095,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_info_game_install_location":
MessageLookupByLibrary.simpleMessage(
"Game installation location: "),
"tools_info_processing_failed": m55,
"tools_info_processing_failed": m54,
"tools_info_rsi_launcher_location":
MessageLookupByLibrary.simpleMessage("RSI starter position:"),
"tools_info_scanning":
@ -1118,14 +1115,14 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage(
"Reading the starter information failed!"),
"tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args":
m56,
m55,
"tools_rsi_launcher_enhance_msg_error_launcher_notfound":
MessageLookupByLibrary.simpleMessage("No RSI promoter was found"),
"tools_rsi_launcher_enhance_msg_patch_status": m57,
"tools_rsi_launcher_enhance_msg_patch_status": m56,
"tools_rsi_launcher_enhance_msg_uninstall":
MessageLookupByLibrary.simpleMessage(
"* If you need to uninstall the enhanced patch, cover the installation RSI promoter."),
"tools_rsi_launcher_enhance_msg_version": m58,
"tools_rsi_launcher_enhance_msg_version": m57,
"tools_rsi_launcher_enhance_note_msg": MessageLookupByLibrary.simpleMessage(
"RSI starter enhancement is a community function. It will unpack \"RSI LAUNCHER\" on your computer and add additional enhancement functions. What functions are determined by you.\n\nAt present, the official (CIG) only permits us to perform multi -language operations. The launch of the booter download enhancement is an extra function we think of it. Violation of the CIG user protocol (https://robertsspaceindustries.com/eula) may cause serious consequences such as accounts. Whether or not you are determined by yourself, we are not responsible for the possible consequences (game damage, account ban, etc.).\n\nFor the modified content of the starter, we are open from: https://github.com/starcitizentoolbox/rsilauncherenhance. If necessary, you can check it yourself.\n\nIf you need to cancel this enhanced patch for any reason, cover the installation of the official startup directly."),
"tools_rsi_launcher_enhance_note_title":
@ -1151,16 +1148,16 @@ class MessageLookup extends MessageLookupByLibrary {
"Installation patch takes a little time, depending on your computer performance ..."),
"tools_unp4k_msg_init":
MessageLookupByLibrary.simpleMessage("Initialization ..."),
"tools_unp4k_msg_open_file": m59,
"tools_unp4k_msg_read_completed": m60,
"tools_unp4k_msg_read_file": m61,
"tools_unp4k_msg_open_file": m58,
"tools_unp4k_msg_read_completed": m59,
"tools_unp4k_msg_read_file": m60,
"tools_unp4k_msg_reading":
MessageLookupByLibrary.simpleMessage("Reading P4K file ..."),
"tools_unp4k_msg_reading2":
MessageLookupByLibrary.simpleMessage("Treatment files ..."),
"tools_unp4k_msg_reading3": m62,
"tools_unp4k_msg_unknown_file_type": m63,
"tools_unp4k_title": m64,
"tools_unp4k_msg_reading3": m61,
"tools_unp4k_msg_unknown_file_type": m62,
"tools_unp4k_title": m63,
"tools_unp4k_view_file":
MessageLookupByLibrary.simpleMessage("Click the file to preview"),
"webview_localization_finished_invitations":

View File

@ -98,66 +98,64 @@ class MessageLookup extends MessageLookupByLibrary {
static String m36(v0) => "通道:${v0}";
static String m37(v0) => "自定义_${v0}";
static String m37(v0) => "启用(${v0}";
static String m38(v0) => "启用(${v0}";
static String m38(v0) => "安装出错!\n\n ${v0}";
static String m39(v0) => "安装出错!\n\n ${v0}";
static String m39(v0) => "已安装版本:${v0}";
static String m40(v0) => "已安装版本${v0}";
static String m40(v0) => "更新时间${v0}";
static String m41(v0) => "更新时间${v0}";
static String m41(v0) => "版本号${v0}";
static String m42(v0) => "版本号${v0}";
static String m42(v0) => "当前状态${v0}";
static String m43(v0) => "当前状态:${v0}";
static String m43(v0, v1, v2) => "${v0} 最小值: ${v1} / 最大值: ${v2}";
static String m44(v0, v1, v2) => "${v0} 最小值: ${v1} / 最大值: ${v2}";
static String m44(v0) => "性能优化 -> ${v0}";
static String m45(v0) => "性能优化 -> ${v0}";
static String m45(v0) => "缓存大小 ${v0}MB清理盒子下载的汉化文件缓存不会影响已安装的汉化";
static String m46(v0) => "缓存大小 ${v0}MB清理盒子下载的汉化文件缓存不会影响已安装的汉化";
static String m47(v0) =>
static String m46(v0) =>
"已设置的核心数量:${v0} (此功能适用于首页的盒子一键启动 或 工具中的RSI启动器管理员模式当为 0 时不启用此功能 ";
static String m48(v0) => "清理失败,请手动移除,文件位置:${v0}";
static String m47(v0) => "清理失败,请手动移除,文件位置:${v0}";
static String m49(v0) => "出现错误:${v0}";
static String m48(v0) => "出现错误:${v0}";
static String m50(v0) => "初始化失败,请截图报告给开发者。${v0}";
static String m49(v0) => "初始化失败,请截图报告给开发者。${v0}";
static String m51(v0) =>
static String m50(v0) =>
"若您使用 nvme 补丁出现问题,请运行此工具。(可能导致游戏 安装/更新 不可用。)\n\n当前补丁状态:${v0}";
static String m52(v0) =>
static String m51(v0) =>
"在某些情况下 RSI启动器 的 log 文件会损坏,导致无法完成问题扫描,使用此工具清理损坏的 log 文件。\n\n当前日志文件大小:${v0} MB";
static String m53(v0) =>
static String m52(v0) =>
"若游戏画面出现异常或版本更新后可使用本工具清理过期的着色器当大于500M时建议清理 \n\n缓存大小:${v0} MB";
static String m54(v0, v1, v2, v3, v4) =>
static String m53(v0, v1, v2, v3, v4) =>
"系统:${v0}\n\n处理器:${v1}\n\n内存大小:${v2}GB\n\n显卡信息:\n${v3}\n\n硬盘信息:\n${v4}\n\n";
static String m55(v0) => "处理失败!:${v0}";
static String m54(v0) => "处理失败!:${v0}";
static String m56(v0) => "读取启动器信息失败:${v0}";
static String m55(v0) => "读取启动器信息失败:${v0}";
static String m57(v0) => "补丁状态:${v0}";
static String m56(v0) => "补丁状态:${v0}";
static String m58(v0) => "启动器内部版本信息:${v0}";
static String m57(v0) => "启动器内部版本信息:${v0}";
static String m59(v0) => "打开文件:${v0}";
static String m58(v0) => "打开文件:${v0}";
static String m60(v0, v1) => "加载完毕:${v0} 个文件,用时:${v1} ms";
static String m59(v0, v1) => "加载完毕:${v0} 个文件,用时:${v1} ms";
static String m61(v0) => "读取文件:${v0} ...";
static String m60(v0) => "读取文件:${v0} ...";
static String m62(v0, v1) => "正在处理文件 (${v0}/${v1}) ...";
static String m61(v0, v1) => "正在处理文件 (${v0}/${v1}) ...";
static String m63(v0) => "未知文件类型\n${v0}";
static String m62(v0) => "未知文件类型\n${v0}";
static String m64(v0) => "P4K 查看器 -> ${v0}";
static String m63(v0) => "P4K 查看器 -> ${v0}";
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@ -609,17 +607,16 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("社区汉化"),
"localization_info_corrupted_file":
MessageLookupByLibrary.simpleMessage("文件受损,请重新下载"),
"localization_info_custom_file": m37,
"localization_info_custom_files":
MessageLookupByLibrary.simpleMessage("自定义文件"),
"localization_info_enabled": m38,
"localization_info_enabled": m37,
"localization_info_incompatible_translation_params_warning":
MessageLookupByLibrary.simpleMessage(
"USER.cfg 包含不兼容的汉化参数,这可能是以前的汉化文件的残留信息。\n\n这将可能导致汉化无效或乱码,点击确认为您一键移除(不会影响其他配置)。"),
"localization_info_installation_error": m39,
"localization_info_installation_error": m38,
"localization_info_installed":
MessageLookupByLibrary.simpleMessage("已安装"),
"localization_info_installed_version": m40,
"localization_info_installed_version": m39,
"localization_info_language":
MessageLookupByLibrary.simpleMessage("语言: "),
"localization_info_machine_translation_warning":
@ -634,8 +631,8 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("汉化状态"),
"localization_info_unavailable":
MessageLookupByLibrary.simpleMessage("不可用"),
"localization_info_update_time": m41,
"localization_info_version_number": m42,
"localization_info_update_time": m40,
"localization_info_version_number": m41,
"performance_action_apply": MessageLookupByLibrary.simpleMessage("应用"),
"performance_action_apply_and_clear_shaders":
MessageLookupByLibrary.simpleMessage("应用并清理着色器(推荐)"),
@ -655,7 +652,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage(" 恢复默认 "),
"performance_action_super": MessageLookupByLibrary.simpleMessage("超级"),
"performance_info_applied": MessageLookupByLibrary.simpleMessage("已应用"),
"performance_info_current_status": m43,
"performance_info_current_status": m42,
"performance_info_delete_config_file":
MessageLookupByLibrary.simpleMessage("删除配置文件..."),
"performance_info_done": MessageLookupByLibrary.simpleMessage("完成..."),
@ -667,7 +664,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage(
"该功能对优化显卡瓶颈有很大帮助,但对 CPU 瓶颈可能起反效果,如果您显卡性能强劲,可以尝试使用更好的画质来获得更高的显卡利用率。"),
"performance_info_graphics": MessageLookupByLibrary.simpleMessage("图形"),
"performance_info_min_max_values": m44,
"performance_info_min_max_values": m43,
"performance_info_not_applied":
MessageLookupByLibrary.simpleMessage("未应用"),
"performance_info_shader_clearing_warning":
@ -791,7 +788,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("水体效果"),
"performance_json_text_water_info":
MessageLookupByLibrary.simpleMessage("各种水的等级"),
"performance_title_performance_optimization": m45,
"performance_title_performance_optimization": m44,
"setting_action_clear_translation_file_cache":
MessageLookupByLibrary.simpleMessage("清理汉化文件缓存"),
"setting_action_create_desktop_shortcut":
@ -803,7 +800,7 @@ class MessageLookup extends MessageLookupByLibrary {
"启动游戏时忽略能效核心( 适用于Intel 12th+ 处理器 "),
"setting_action_info_autofill_data_cleared":
MessageLookupByLibrary.simpleMessage("已清理自动填充数据"),
"setting_action_info_cache_clearing_info": m46,
"setting_action_info_cache_clearing_info": m45,
"setting_action_info_clear_cache_warning":
MessageLookupByLibrary.simpleMessage("这不会影响已安装的汉化。"),
"setting_action_info_confirm_clear_cache":
@ -843,7 +840,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("查看汉化盒子的 log 文件,以定位盒子的 bug"),
"setting_action_reset_auto_password_fill":
MessageLookupByLibrary.simpleMessage("重置自动密码填充"),
"setting_action_set_core_count": m47,
"setting_action_set_core_count": m46,
"setting_action_set_game_file":
MessageLookupByLibrary.simpleMessage("设置游戏文件 StarCitizen.exe"),
"setting_action_set_launcher_file":
@ -865,13 +862,13 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Hosts 加速(实验性)"),
"tools_action_info_cleanup_complete":
MessageLookupByLibrary.simpleMessage("清理完毕,请完成一次安装 / 游戏启动 操作。"),
"tools_action_info_cleanup_failed": m48,
"tools_action_info_cleanup_failed": m47,
"tools_action_info_config_file_not_exist":
MessageLookupByLibrary.simpleMessage("配置文件不存在,请尝试运行一次游戏"),
"tools_action_info_eac_file_removed":
MessageLookupByLibrary.simpleMessage(
"已为您移除 EAC 文件,接下来将为您打开 RSI 启动器,请您前往 SETTINGS -> VERIFY 重装 EAC。"),
"tools_action_info_error_occurred": m49,
"tools_action_info_error_occurred": m48,
"tools_action_info_fix_success_restart":
MessageLookupByLibrary.simpleMessage(
"修复成功,请尝试重启电脑后继续安装游戏! 若注册表修改操作导致其他软件出现兼容问题,请使用 工具 中的 NVME 注册表清理。"),
@ -880,7 +877,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_info_hosts_acceleration_experimental_tip":
MessageLookupByLibrary.simpleMessage(
"将 IP 信息写入 Hosts 文件,解决部分地区的 DNS 污染导致无法登录官网等问题。\n该功能正在进行第一阶段测试,遇到问题请及时反馈。"),
"tools_action_info_init_failed": m50,
"tools_action_info_init_failed": m49,
"tools_action_info_log_file_not_exist":
MessageLookupByLibrary.simpleMessage(
"日志文件不存在,请尝试进行一次游戏启动或游戏安装,并退出启动器,若无法解决问题,请尝试将启动器更新至最新版本!"),
@ -892,7 +889,7 @@ class MessageLookup extends MessageLookupByLibrary {
"手动写入NVM补丁该功能仅在您知道自己在作什么的情况下使用"),
"tools_action_info_not_installed":
MessageLookupByLibrary.simpleMessage("未安装"),
"tools_action_info_nvme_patch_issue": m51,
"tools_action_info_nvme_patch_issue": m50,
"tools_action_info_one_key_close_lens_shake":
MessageLookupByLibrary.simpleMessage(
"一键关闭游戏内镜头晃动以便于摄影操作。\n\n @拉邦那 Lapernum 提供参数信息。"),
@ -914,7 +911,7 @@ class MessageLookup extends MessageLookupByLibrary {
"还原镜头摇晃效果。\n\n@拉邦那 Lapernum 提供参数信息。"),
"tools_action_info_rsi_launcher_directory_not_found":
MessageLookupByLibrary.simpleMessage("未找到 RSI 启动器目录,请您尝试手动操作。"),
"tools_action_info_rsi_launcher_log_issue": m52,
"tools_action_info_rsi_launcher_log_issue": m51,
"tools_action_info_rsi_launcher_not_found":
MessageLookupByLibrary.simpleMessage(
"未找到 RSI 启动器,请尝试重新安装,或在设置中手动添加。"),
@ -923,11 +920,11 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_info_run_rsi_as_admin":
MessageLookupByLibrary.simpleMessage(
"以管理员身份运行RSI启动器可能会解决一些问题。\n\n若设置了能效核心屏蔽参数,也会在此应用。"),
"tools_action_info_shader_cache_issue": m53,
"tools_action_info_shader_cache_issue": m52,
"tools_action_info_star_citizen_not_found":
MessageLookupByLibrary.simpleMessage(
"未找到星际公民游戏安装位置,请至少完成一次游戏启动操作 或在设置中手动添加。"),
"tools_action_info_system_info_content": m54,
"tools_action_info_system_info_content": m53,
"tools_action_info_system_info_title":
MessageLookupByLibrary.simpleMessage("系统信息"),
"tools_action_info_valid_game_directory_needed":
@ -979,7 +976,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("正在写入 Hosts ..."),
"tools_info_game_install_location":
MessageLookupByLibrary.simpleMessage("游戏安装位置: "),
"tools_info_processing_failed": m55,
"tools_info_processing_failed": m54,
"tools_info_rsi_launcher_location":
MessageLookupByLibrary.simpleMessage("RSI启动器位置"),
"tools_info_scanning": MessageLookupByLibrary.simpleMessage("正在扫描..."),
@ -994,13 +991,13 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_rsi_launcher_enhance_msg_error_get_launcher_info_error":
MessageLookupByLibrary.simpleMessage("读取启动器信息失败!"),
"tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args":
m56,
m55,
"tools_rsi_launcher_enhance_msg_error_launcher_notfound":
MessageLookupByLibrary.simpleMessage("未找到 RSI 启动器"),
"tools_rsi_launcher_enhance_msg_patch_status": m57,
"tools_rsi_launcher_enhance_msg_patch_status": m56,
"tools_rsi_launcher_enhance_msg_uninstall":
MessageLookupByLibrary.simpleMessage("* 如需卸载增强补丁,请覆盖安装 RSI 启动器。"),
"tools_rsi_launcher_enhance_msg_version": m58,
"tools_rsi_launcher_enhance_msg_version": m57,
"tools_rsi_launcher_enhance_note_msg": MessageLookupByLibrary.simpleMessage(
"RSI 启动器增强是一项社区功能,它会在您的电脑上解包 \"RSI Launcher\" 并加入额外的增强功能,具体使用哪些功能由您决定。\n\n目前官方CIG仅许可我们进行多语言操作启动器下载增强是我们认为有用的额外功能违反cig用户协议https://robertsspaceindustries.com/eula可能导致账号被封禁等严重后果是否启用由您自己决定我们不对可能产生的后果游戏损坏账号封禁等承担任何责任。\n\n对于启动器的修改内容我们开源于https://github.com/StarCitizenToolBox/RSILauncherEnhance如有需要您可自行查阅。\n\n如果您因为任何原因需要取消此增强补丁,请直接覆盖安装官方启动器。"),
"tools_rsi_launcher_enhance_note_title":
@ -1021,16 +1018,16 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_rsi_launcher_enhance_working_msg2":
MessageLookupByLibrary.simpleMessage("安装补丁,这需要一点时间,取决于您的计算机性能 ..."),
"tools_unp4k_msg_init": MessageLookupByLibrary.simpleMessage("初始化中..."),
"tools_unp4k_msg_open_file": m59,
"tools_unp4k_msg_read_completed": m60,
"tools_unp4k_msg_read_file": m61,
"tools_unp4k_msg_open_file": m58,
"tools_unp4k_msg_read_completed": m59,
"tools_unp4k_msg_read_file": m60,
"tools_unp4k_msg_reading":
MessageLookupByLibrary.simpleMessage("正在读取P4K 文件 ..."),
"tools_unp4k_msg_reading2":
MessageLookupByLibrary.simpleMessage("正在处理文件 ..."),
"tools_unp4k_msg_reading3": m62,
"tools_unp4k_msg_unknown_file_type": m63,
"tools_unp4k_title": m64,
"tools_unp4k_msg_reading3": m61,
"tools_unp4k_msg_unknown_file_type": m62,
"tools_unp4k_title": m63,
"tools_unp4k_view_file":
MessageLookupByLibrary.simpleMessage("单击文件以预览"),
"webview_localization_finished_invitations":

View File

@ -90,48 +90,46 @@ class MessageLookup extends MessageLookupByLibrary {
static String m36(v0) => "遊戲通道:${v0}";
static String m37(v0) => "自訂_${v0}";
static String m37(v0) => "啟用(${v0}";
static String m38(v0) => "啟用(${v0}";
static String m38(v0) => "安裝錯誤!\n\n ${v0}";
static String m39(v0) => "安裝錯誤!\n\n ${v0}";
static String m39(v0) => "已安裝:${v0}";
static String m40(v0) => "已安裝${v0}";
static String m40(v0) => "更新時間${v0}";
static String m41(v0) => "更新時間${v0}";
static String m41(v0) => "版本${v0}";
static String m42(v0) => "版本${v0}";
static String m42(v0) => "當前狀態${v0}";
static String m43(v0) => "當前狀態:${v0}";
static String m43(v0, v1, v2) => "${v0} 最小值: ${v1} / 最大值: ${v2}";
static String m44(v0, v1, v2) => "${v0} 最小值: ${v1} / 最大值: ${v2}";
static String m44(v0) => "畫面調整 -> ${v0}";
static String m45(v0) => "畫面調整 -> ${v0}";
static String m45(v0) => "快取大小 ${v0}MB清除盒子下載的翻譯文件快取不會影響已安裝的翻譯";
static String m46(v0) => "快取大小 ${v0}MB清除盒子下載的翻譯文件快取不會影響已安裝的翻譯";
static String m47(v0) =>
static String m46(v0) =>
"已設定的核心數量:${v0} (此功能適用於首頁的盒子快速啟動 或 工具中的RSI啟動器管理員模式當為 0 時不啟用此功能 ";
static String m48(v0) => "清理失敗,請手動移除,文件位置:${v0}";
static String m47(v0) => "清理失敗,請手動移除,文件位置:${v0}";
static String m49(v0) => "出現錯誤:${v0}";
static String m48(v0) => "出現錯誤:${v0}";
static String m50(v0) => "初始化失敗,請截圖回報給開發者。${v0}";
static String m49(v0) => "初始化失敗,請截圖回報給開發者。${v0}";
static String m51(v0) =>
static String m50(v0) =>
"若您使用 nvme 補丁出現問題,請執行此工具。(可能導致遊戲 安裝/更新 不可用。)\n\n當前補丁狀態:${v0}";
static String m52(v0) =>
static String m51(v0) =>
"在某些情況下 RSI啟動器的 log 文件會損壞,導致無法完成問題掃描,使用此工具清除損壞的 log 文件。\n\n目前文件大小:${v0} MB";
static String m53(v0) =>
static String m52(v0) =>
"若遊戲畫面出現異常或版本更新後可使用此工具清除著色器快取 \n\n建議清理:快取大於 500 MB\n快取大小:${v0} MB";
static String m54(v0, v1, v2, v3, v4) =>
static String m53(v0, v1, v2, v3, v4) =>
"系統:${v0}\n\n處理器:${v1}\n\n記憶體大小:${v2}GB\n\n顯示卡:\n${v3}\n\n硬碟:\n${v4}\n\n";
static String m55(v0) => "處理失敗!:${v0}";
static String m54(v0) => "處理失敗!:${v0}";
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@ -523,17 +521,16 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("社群翻譯"),
"localization_info_corrupted_file":
MessageLookupByLibrary.simpleMessage("文件已損毀,請重新下載"),
"localization_info_custom_file": m37,
"localization_info_custom_files":
MessageLookupByLibrary.simpleMessage("自訂文件"),
"localization_info_enabled": m38,
"localization_info_enabled": m37,
"localization_info_incompatible_translation_params_warning":
MessageLookupByLibrary.simpleMessage(
"USER.cfg 包含不相容的翻譯參數,這可能是以前的翻譯文件的殘留信息。\n\n這將可能導致翻譯無效或亂碼,點擊確認進行快速刪除(不會影響其他配置)。"),
"localization_info_installation_error": m39,
"localization_info_installation_error": m38,
"localization_info_installed":
MessageLookupByLibrary.simpleMessage("已安裝"),
"localization_info_installed_version": m40,
"localization_info_installed_version": m39,
"localization_info_language":
MessageLookupByLibrary.simpleMessage("語言: "),
"localization_info_machine_translation_warning":
@ -549,8 +546,8 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("翻譯狀態"),
"localization_info_unavailable":
MessageLookupByLibrary.simpleMessage("無法使用"),
"localization_info_update_time": m41,
"localization_info_version_number": m42,
"localization_info_update_time": m40,
"localization_info_version_number": m41,
"performance_action_apply":
MessageLookupByLibrary.simpleMessage("套用設定"),
"performance_action_apply_and_clear_shaders":
@ -571,7 +568,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage(" 恢復預設 "),
"performance_action_super": MessageLookupByLibrary.simpleMessage("超高"),
"performance_info_applied": MessageLookupByLibrary.simpleMessage("已套用"),
"performance_info_current_status": m43,
"performance_info_current_status": m42,
"performance_info_delete_config_file":
MessageLookupByLibrary.simpleMessage("刪除配置文件..."),
"performance_info_done": MessageLookupByLibrary.simpleMessage("完成..."),
@ -583,7 +580,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage(
"此功能對改善因 GPU 造成的瓶頸,但對於因 CPU 造成瓶頸的裝置可能引發負面效果,如果您 GPU 性能強勁,可以嘗試更改為更高的畫質來獲得更高的 GPU 使用率並改善畫面表現。"),
"performance_info_graphics": MessageLookupByLibrary.simpleMessage("圖形"),
"performance_info_min_max_values": m44,
"performance_info_min_max_values": m43,
"performance_info_not_applied":
MessageLookupByLibrary.simpleMessage("未套用"),
"performance_info_shader_clearing_warning":
@ -591,7 +588,7 @@ class MessageLookup extends MessageLookupByLibrary {
"清除著色器快取後首次進入遊戲可能會出現卡頓,請耐心等待著色器載入完畢。"),
"performance_info_write_out_config_file":
MessageLookupByLibrary.simpleMessage("寫出配置文件"),
"performance_title_performance_optimization": m45,
"performance_title_performance_optimization": m44,
"setting_action_clear_translation_file_cache":
MessageLookupByLibrary.simpleMessage("清除文件快取"),
"setting_action_create_desktop_shortcut":
@ -603,7 +600,7 @@ class MessageLookup extends MessageLookupByLibrary {
"啟動遊戲時忽略 E-Core (適用於Intel 12代以上的處理器)"),
"setting_action_info_autofill_data_cleared":
MessageLookupByLibrary.simpleMessage("已清除自動輸入紀錄"),
"setting_action_info_cache_clearing_info": m46,
"setting_action_info_cache_clearing_info": m45,
"setting_action_info_clear_cache_warning":
MessageLookupByLibrary.simpleMessage("這不會影響已安裝的翻譯文件。"),
"setting_action_info_confirm_clear_cache":
@ -642,7 +639,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("查看漢化盒子的 log 文件,用於定位盒子的 Bug"),
"setting_action_reset_auto_password_fill":
MessageLookupByLibrary.simpleMessage("重置自動密碼輸入"),
"setting_action_set_core_count": m47,
"setting_action_set_core_count": m46,
"setting_action_set_game_file":
MessageLookupByLibrary.simpleMessage("更改遊戲文件 StarCitizen.exe"),
"setting_action_set_launcher_file":
@ -664,12 +661,12 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Hosts 加速Beta"),
"tools_action_info_cleanup_complete":
MessageLookupByLibrary.simpleMessage("清理完畢,請完成一次安裝 / 遊戲啟動 操作。"),
"tools_action_info_cleanup_failed": m48,
"tools_action_info_cleanup_failed": m47,
"tools_action_info_config_file_not_exist":
MessageLookupByLibrary.simpleMessage("配置文件不存在,請嘗試運行一次遊戲"),
"tools_action_info_eac_file_removed": MessageLookupByLibrary.simpleMessage(
"已為您移除 EAC 文件,接下來將為您打開 RSI 啟動器,請您前往 SETTINGS -> VERIFY 重新安裝 EAC。"),
"tools_action_info_error_occurred": m49,
"tools_action_info_error_occurred": m48,
"tools_action_info_fix_success_restart":
MessageLookupByLibrary.simpleMessage(
"修復成功,請嘗試重新啟動電腦後繼續安裝遊戲! 若註冊表修改操作導致其他軟體出現相容問題,請使用 工具 中的 NVME 註冊表清理。"),
@ -678,7 +675,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_info_hosts_acceleration_experimental_tip":
MessageLookupByLibrary.simpleMessage(
"將 IP 資訊寫入 Hosts 文件,解決部分地區的 DNS 汙染導致無法登入官網等問題。\n該功能正在進行第一階段測試,遇到問題請及時反饋。"),
"tools_action_info_init_failed": m50,
"tools_action_info_init_failed": m49,
"tools_action_info_log_file_not_exist":
MessageLookupByLibrary.simpleMessage(
"日誌文件不存在,請嘗試進行一次遊戲啟動或遊戲安裝,並退出啟動器,若無法解決問題,請嘗試將啟動器更新至最新版本!"),
@ -690,7 +687,7 @@ class MessageLookup extends MessageLookupByLibrary {
"此功能將手動寫入NVME補丁該功能僅在您知道自己在做什麼的情況下使用"),
"tools_action_info_not_installed":
MessageLookupByLibrary.simpleMessage("未安裝"),
"tools_action_info_nvme_patch_issue": m51,
"tools_action_info_nvme_patch_issue": m50,
"tools_action_info_one_key_close_lens_shake":
MessageLookupByLibrary.simpleMessage(
"關閉遊戲內鏡頭晃動效果以便進行攝影。\n\n @拉邦那 Lapernum 提供參數資訊。"),
@ -712,7 +709,7 @@ class MessageLookup extends MessageLookupByLibrary {
"已開啟攝影模式,再次點擊來關閉並還原鏡頭晃動效果。\n\n@拉邦那 Lapernum 提供參數資訊。"),
"tools_action_info_rsi_launcher_directory_not_found":
MessageLookupByLibrary.simpleMessage("未找到 RSI 啟動器目錄,請您嘗試手動操作。"),
"tools_action_info_rsi_launcher_log_issue": m52,
"tools_action_info_rsi_launcher_log_issue": m51,
"tools_action_info_rsi_launcher_not_found":
MessageLookupByLibrary.simpleMessage(
"未找到 RSI 啟動器,請嘗試重新安裝,或在設定中手動添加。"),
@ -721,11 +718,11 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_action_info_run_rsi_as_admin":
MessageLookupByLibrary.simpleMessage(
"以管理員身份執行RSI啟動器可能會解決一些問題。\n\n若設定了 E-Core 核心忽略參數,也會在此套用。"),
"tools_action_info_shader_cache_issue": m53,
"tools_action_info_shader_cache_issue": m52,
"tools_action_info_star_citizen_not_found":
MessageLookupByLibrary.simpleMessage(
"未找到星際公民遊戲安裝位置,請至少完成一次遊戲啟動操作 或在設定中手動新增。"),
"tools_action_info_system_info_content": m54,
"tools_action_info_system_info_content": m53,
"tools_action_info_system_info_title":
MessageLookupByLibrary.simpleMessage("系統資訊"),
"tools_action_info_valid_game_directory_needed":
@ -772,7 +769,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("正在寫入 Hosts ..."),
"tools_info_game_install_location":
MessageLookupByLibrary.simpleMessage("遊戲安裝位置: "),
"tools_info_processing_failed": m55,
"tools_info_processing_failed": m54,
"tools_info_rsi_launcher_location":
MessageLookupByLibrary.simpleMessage("RSI啟動器位置"),
"tools_info_scanning": MessageLookupByLibrary.simpleMessage("正在掃描..."),

View File

@ -1831,16 +1831,6 @@ class S {
);
}
/// `Custom_ {v0}`
String localization_info_custom_file(Object v0) {
return Intl.message(
'Custom_ $v0',
name: 'localization_info_custom_file',
desc: '',
args: [v0],
);
}
/// `The file is damaged, please download again`
String get localization_info_corrupted_file {
return Intl.message(

View File

@ -359,8 +359,6 @@
"@localization_info_remove_incompatible_translation_params": {},
"localization_info_incompatible_translation_params_warning": "User.cfg contains incompatible Localization parameters, which may be the residual information of the previous Localization file.\n\nThis may lead to ineffective or garbled Localization, click to confirm that you are removed with one click (it will not affect other configuration).",
"@localization_info_incompatible_translation_params_warning": {},
"localization_info_custom_file": "Custom_ {v0}",
"@localization_info_custom_file": {},
"localization_info_corrupted_file": "The file is damaged, please download again",
"@localization_info_corrupted_file": {},
"localization_info_installation_error": "Install an error!\n\n {v0}",

View File

@ -356,8 +356,6 @@
"@localization_info_remove_incompatible_translation_params": {},
"localization_info_incompatible_translation_params_warning": "USER.cfg 包含不兼容的汉化参数,这可能是以前的汉化文件的残留信息。\n\n这将可能导致汉化无效或乱码点击确认为您一键移除不会影响其他配置。",
"@localization_info_incompatible_translation_params_warning": {},
"localization_info_custom_file": "自定义_{v0}",
"@localization_info_custom_file": {},
"localization_info_corrupted_file": "文件受损,请重新下载",
"@localization_info_corrupted_file": {},
"localization_info_installation_error": "安装出错!\n\n {v0}",

View File

@ -357,8 +357,6 @@
"@localization_info_remove_incompatible_translation_params": {},
"localization_info_incompatible_translation_params_warning": "USER.cfg 包含不相容的翻譯參數,這可能是以前的翻譯文件的殘留信息。\n\n這將可能導致翻譯無效或亂碼點擊確認進行快速刪除不會影響其他配置。",
"@localization_info_incompatible_translation_params_warning": {},
"localization_info_custom_file": "自訂_{v0}",
"@localization_info_custom_file": {},
"localization_info_corrupted_file": "文件已損毀,請重新下載",
"@localization_info_corrupted_file": {},
"localization_info_installation_error": "安裝錯誤!\n\n {v0}",

View File

@ -12,6 +12,8 @@ import 'package:starcitizen_doctor/ui/home/localization/advanced_localization_ui
import 'package:starcitizen_doctor/widgets/widgets.dart';
import 'package:super_sliver_list/super_sliver_list.dart';
import 'localization_form_file_dialog_ui.dart';
class AdvancedLocalizationUI extends HookConsumerWidget {
const AdvancedLocalizationUI({super.key});
@ -20,6 +22,17 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
final state = ref.watch(advancedLocalizationUIModelProvider);
final model = ref.read(advancedLocalizationUIModelProvider.notifier);
final homeUIState = ref.watch(homeUIModelProvider);
onSwitchFile() async {
final sb = await showDialog(
context: context,
builder: (BuildContext context) => const LocalizationFromFileDialogUI(),
);
if (sb is StringBuffer) {
model.setCustomizeGlobalIni(sb.toString());
}
}
return makeDefaultPage(
title: S.current.home_localization_advanced_title(
homeUIState.scInstalledPath ?? "-"),
@ -41,10 +54,34 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
children: [
const SizedBox(width: 12),
Expanded(
child: Text(S.current
.home_localization_advanced_msg_version(
state.apiLocalizationData?.versionName ??
"-"))),
child: Row(
children: [
Text(
S.current.home_localization_advanced_msg_version(
state.apiLocalizationData?.versionName ?? "-"),
),
const SizedBox(width: 12),
Button(
onPressed: onSwitchFile,
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 6, vertical: 3),
child: Icon(FluentIcons.switch_widget),
)),
if (state.customizeGlobalIni != null) ...[
const SizedBox(width: 12),
Button(
onPressed: () {
model.setCustomizeGlobalIni(null);
},
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 6, vertical: 3),
child: Icon(FluentIcons.delete),
)),
]
],
)),
Text(S.current.home_localization_advanced_title_msg(
state.serverGlobalIniLines, state.p4kGlobalIniLines)),
const SizedBox(width: 32),

View File

@ -25,6 +25,7 @@ class AdvancedLocalizationUIState with _$AdvancedLocalizationUIState {
Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
String? p4kGlobalIni,
String? serverGlobalIni,
String? customizeGlobalIni,
ScLocalizationData? apiLocalizationData,
@Default(0) int p4kGlobalIniLines,
@Default(0) int serverGlobalIniLines,
@ -81,6 +82,13 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
classMap: m);
}
void setCustomizeGlobalIni(String? data) async {
state = state.copyWith(customizeGlobalIni: data);
final localizationUIState = ref.read(localizationUIModelProvider);
final localizationUIModel = ref.read(localizationUIModelProvider.notifier);
await _init(localizationUIState, localizationUIModel);
}
static Map<String, AppAdvancedLocalizationClassKeysData> _doClassIni(
(
AppAdvancedLocalizationData ald,
@ -180,21 +188,30 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
state = state.copyWith(
workingText: S.current
.home_localization_advanced_msg_reading_server_localization_text);
final apiLocalizationData =
localizationUIState.apiLocalizationData?.values.firstOrNull;
if (apiLocalizationData == null) return ("", "");
final file = File(
"${localizationUIModel.getDownloadDir().absolute.path}\\${apiLocalizationData.versionName}.sclang");
if (!await file.exists()) {
await localizationUIModel.downloadLocalizationFile(
file, apiLocalizationData);
if (state.customizeGlobalIni != null) {
final apiLocalizationData = ScLocalizationData(
versionName: S.current.localization_info_custom_files,
info: "Customize");
state = state.copyWith(apiLocalizationData: apiLocalizationData);
return (p4kGlobalIni, state.customizeGlobalIni!);
} else {
final apiLocalizationData =
localizationUIState.apiLocalizationData?.values.firstOrNull;
if (apiLocalizationData == null) return ("", "");
final file = File(
"${localizationUIModel.getDownloadDir().absolute.path}\\${apiLocalizationData.versionName}.sclang");
if (!await file.exists()) {
await localizationUIModel.downloadLocalizationFile(
file, apiLocalizationData);
}
state = state.copyWith(apiLocalizationData: apiLocalizationData);
final serverGlobalIni =
(await compute(LocalizationUIModel.readArchive, file.absolute.path))
.toString();
dPrint("read serverGlobalIni => ${serverGlobalIni.length}");
return (p4kGlobalIni, serverGlobalIni);
}
state = state.copyWith(apiLocalizationData: apiLocalizationData);
final serverGlobalIni =
(await compute(LocalizationUIModel.readArchive, file.absolute.path))
.toString();
dPrint("read serverGlobalIni => ${serverGlobalIni.length}");
return (p4kGlobalIni, serverGlobalIni);
}
Future<String> readEnglishInI(String gameDir) async {

View File

@ -21,6 +21,7 @@ mixin _$AdvancedLocalizationUIState {
throw _privateConstructorUsedError;
String? get p4kGlobalIni => throw _privateConstructorUsedError;
String? get serverGlobalIni => throw _privateConstructorUsedError;
String? get customizeGlobalIni => throw _privateConstructorUsedError;
ScLocalizationData? get apiLocalizationData =>
throw _privateConstructorUsedError;
int get p4kGlobalIniLines => throw _privateConstructorUsedError;
@ -44,6 +45,7 @@ abstract class $AdvancedLocalizationUIStateCopyWith<$Res> {
Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
String? p4kGlobalIni,
String? serverGlobalIni,
String? customizeGlobalIni,
ScLocalizationData? apiLocalizationData,
int p4kGlobalIniLines,
int serverGlobalIniLines});
@ -67,6 +69,7 @@ class _$AdvancedLocalizationUIStateCopyWithImpl<$Res,
Object? classMap = freezed,
Object? p4kGlobalIni = freezed,
Object? serverGlobalIni = freezed,
Object? customizeGlobalIni = freezed,
Object? apiLocalizationData = freezed,
Object? p4kGlobalIniLines = null,
Object? serverGlobalIniLines = null,
@ -88,6 +91,10 @@ class _$AdvancedLocalizationUIStateCopyWithImpl<$Res,
? _value.serverGlobalIni
: serverGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
customizeGlobalIni: freezed == customizeGlobalIni
? _value.customizeGlobalIni
: customizeGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
apiLocalizationData: freezed == apiLocalizationData
? _value.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
@ -118,6 +125,7 @@ abstract class _$$AdvancedLocalizationUIStateImplCopyWith<$Res>
Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
String? p4kGlobalIni,
String? serverGlobalIni,
String? customizeGlobalIni,
ScLocalizationData? apiLocalizationData,
int p4kGlobalIniLines,
int serverGlobalIniLines});
@ -140,6 +148,7 @@ class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>
Object? classMap = freezed,
Object? p4kGlobalIni = freezed,
Object? serverGlobalIni = freezed,
Object? customizeGlobalIni = freezed,
Object? apiLocalizationData = freezed,
Object? p4kGlobalIniLines = null,
Object? serverGlobalIniLines = null,
@ -161,6 +170,10 @@ class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>
? _value.serverGlobalIni
: serverGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
customizeGlobalIni: freezed == customizeGlobalIni
? _value.customizeGlobalIni
: customizeGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
apiLocalizationData: freezed == apiLocalizationData
? _value.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
@ -187,6 +200,7 @@ class _$AdvancedLocalizationUIStateImpl
final Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
this.p4kGlobalIni,
this.serverGlobalIni,
this.customizeGlobalIni,
this.apiLocalizationData,
this.p4kGlobalIniLines = 0,
this.serverGlobalIniLines = 0})
@ -210,6 +224,8 @@ class _$AdvancedLocalizationUIStateImpl
@override
final String? serverGlobalIni;
@override
final String? customizeGlobalIni;
@override
final ScLocalizationData? apiLocalizationData;
@override
@JsonKey()
@ -220,7 +236,7 @@ class _$AdvancedLocalizationUIStateImpl
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'AdvancedLocalizationUIState(workingText: $workingText, classMap: $classMap, p4kGlobalIni: $p4kGlobalIni, serverGlobalIni: $serverGlobalIni, apiLocalizationData: $apiLocalizationData, p4kGlobalIniLines: $p4kGlobalIniLines, serverGlobalIniLines: $serverGlobalIniLines)';
return 'AdvancedLocalizationUIState(workingText: $workingText, classMap: $classMap, p4kGlobalIni: $p4kGlobalIni, serverGlobalIni: $serverGlobalIni, customizeGlobalIni: $customizeGlobalIni, apiLocalizationData: $apiLocalizationData, p4kGlobalIniLines: $p4kGlobalIniLines, serverGlobalIniLines: $serverGlobalIniLines)';
}
@override
@ -232,6 +248,7 @@ class _$AdvancedLocalizationUIStateImpl
..add(DiagnosticsProperty('classMap', classMap))
..add(DiagnosticsProperty('p4kGlobalIni', p4kGlobalIni))
..add(DiagnosticsProperty('serverGlobalIni', serverGlobalIni))
..add(DiagnosticsProperty('customizeGlobalIni', customizeGlobalIni))
..add(DiagnosticsProperty('apiLocalizationData', apiLocalizationData))
..add(DiagnosticsProperty('p4kGlobalIniLines', p4kGlobalIniLines))
..add(DiagnosticsProperty('serverGlobalIniLines', serverGlobalIniLines));
@ -249,6 +266,8 @@ class _$AdvancedLocalizationUIStateImpl
other.p4kGlobalIni == p4kGlobalIni) &&
(identical(other.serverGlobalIni, serverGlobalIni) ||
other.serverGlobalIni == serverGlobalIni) &&
(identical(other.customizeGlobalIni, customizeGlobalIni) ||
other.customizeGlobalIni == customizeGlobalIni) &&
(identical(other.apiLocalizationData, apiLocalizationData) ||
other.apiLocalizationData == apiLocalizationData) &&
(identical(other.p4kGlobalIniLines, p4kGlobalIniLines) ||
@ -264,6 +283,7 @@ class _$AdvancedLocalizationUIStateImpl
const DeepCollectionEquality().hash(_classMap),
p4kGlobalIni,
serverGlobalIni,
customizeGlobalIni,
apiLocalizationData,
p4kGlobalIniLines,
serverGlobalIniLines);
@ -283,6 +303,7 @@ abstract class _AdvancedLocalizationUIState
final Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
final String? p4kGlobalIni,
final String? serverGlobalIni,
final String? customizeGlobalIni,
final ScLocalizationData? apiLocalizationData,
final int p4kGlobalIniLines,
final int serverGlobalIniLines}) = _$AdvancedLocalizationUIStateImpl;
@ -296,6 +317,8 @@ abstract class _AdvancedLocalizationUIState
@override
String? get serverGlobalIni;
@override
String? get customizeGlobalIni;
@override
ScLocalizationData? get apiLocalizationData;
@override
int get p4kGlobalIniLines;

View File

@ -7,7 +7,7 @@ part of 'advanced_localization_ui_model.dart';
// **************************************************************************
String _$advancedLocalizationUIModelHash() =>
r'9fbbeca3af90f992717710633bcf2cd0e1cb06eb';
r'9acfe6624ebce488a8fd0ed13b84d8b4faab058c';
/// See also [AdvancedLocalizationUIModel].
@ProviderFor(AdvancedLocalizationUIModel)

View File

@ -8,6 +8,7 @@ import 'package:starcitizen_doctor/data/sc_localization_data.dart';
import 'package:starcitizen_doctor/ui/tools/tools_ui_model.dart';
import 'package:starcitizen_doctor/widgets/widgets.dart';
import 'localization_form_file_dialog_ui.dart';
import 'localization_ui_model.dart';
class LocalizationDialogUI extends HookConsumerWidget {
@ -483,6 +484,17 @@ class LocalizationDialogUI extends HookConsumerWidget {
case "advanced":
context.push("/index/advanced_localization");
break;
case "custom_files":
final sb = await showDialog(
context: context,
builder: (BuildContext context) =>
const LocalizationFromFileDialogUI(),
);
if (sb is StringBuffer) {
await model.installFormString(
sb, S.current.localization_info_custom_files);
}
break;
}
}
: null,

View File

@ -0,0 +1,130 @@
import 'dart:io';
import 'package:file_picker/file_picker.dart';
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:re_editor/re_editor.dart';
import 'package:starcitizen_doctor/widgets/widgets.dart';
class LocalizationFromFileDialogUI extends HookConsumerWidget {
const LocalizationFromFileDialogUI({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final selectedStringBuffer = useState<StringBuffer?>(null);
final isLoading = useState(false);
void onSelectFile() async {
final result = await FilePicker.platform.pickFiles(
dialogTitle: "请选择 ini 文件",
type: FileType.custom,
allowedExtensions: ["ini"],
allowMultiple: false,
lockParentWindow: true);
if (result == null || result.files.firstOrNull == null) return;
isLoading.value = true;
final file = result.files.first;
final buffer = StringBuffer();
final content = await File(file.path!).readAsString();
for (final line in content.split("\n")) {
if (line.startsWith("_starcitizen_doctor_")) continue;
buffer.writeln(line);
}
selectedStringBuffer.value = buffer;
isLoading.value = false;
}
useEffect(() {
addPostFrameCallback(() => onSelectFile());
return null;
}, const []);
return ContentDialog(
constraints: BoxConstraints(
maxWidth: selectedStringBuffer.value == null
? 420
: MediaQuery.of(context).size.width * .75,
maxHeight: MediaQuery.of(context).size.height * .8,
),
title: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: const Icon(
FluentIcons.back,
size: 22,
),
onPressed: () => context.pop()),
const SizedBox(width: 12),
const Text("请选择自定义汉化文件"),
const Spacer(),
if (selectedStringBuffer.value != null)
FilledButton(
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 6, vertical: 3),
child: Text("确认"),
),
onPressed: () {
Navigator.pop(context, selectedStringBuffer.value);
})
],
),
content: AnimatedSize(
duration: const Duration(milliseconds: 130),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (selectedStringBuffer.value == null)
Center(
child: Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(.05),
borderRadius: BorderRadius.circular(7),
),
padding: const EdgeInsets.all(12),
child: IconButton(
icon: Padding(
padding: const EdgeInsets.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Icon(
FluentIcons.file_code,
size: 32,
color: Colors.white.withOpacity(.6),
),
const SizedBox(height: 12),
const Text("点击选择 ini 文件")
],
),
),
onPressed: onSelectFile,
),
),
)
else if (isLoading.value) ...[
makeLoading(context),
] else ...[
Expanded(
child: Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(.05),
borderRadius: BorderRadius.circular(7),
),
padding: const EdgeInsets.all(6),
child: CodeEditor(
controller: CodeLineEditingController.fromText(
selectedStringBuffer.value.toString()),
readOnly: true,
),
),
),
],
],
),
),
);
}
}

View File

@ -34,7 +34,6 @@ class LocalizationUIState with _$LocalizationUIState {
MapEntry<bool, String>? patchStatus,
bool? isInstalledAdvanced,
List<String>? customizeList,
@Default(false) bool enableCustomize,
}) = _LocalizationUIState;
}
@ -208,31 +207,13 @@ class LocalizationUIModel extends _$LocalizationUIModel {
};
}
void toggleCustomize() {
state = state.copyWith(enableCustomize: !state.enableCustomize);
}
String getCustomizeFileName(String path) {
return path.split("\\").last;
}
VoidCallback? doLocalInstall(String filePath) {
if (state.workingVersion.isNotEmpty) return null;
return () async {
final f = File(filePath);
if (!await f.exists()) return;
state = state.copyWith(workingVersion: filePath);
final str = await f.readAsString();
await installFormString(
StringBuffer(str),
S.current
.localization_info_custom_file(getCustomizeFileName(filePath)));
state = state.copyWith(workingVersion: "");
};
}
installFormString(StringBuffer globalIni, String versionName,
{bool? advanced}) async {
dPrint("LocalizationUIModel -> installFormString $versionName");
final iniFile = File(
"${_scDataDir.absolute.path}\\Localization\\${state.selectedLanguage}\\global.ini");
if (versionName.isNotEmpty) {

View File

@ -23,7 +23,6 @@ mixin _$LocalizationUIState {
MapEntry<bool, String>? get patchStatus => throw _privateConstructorUsedError;
bool? get isInstalledAdvanced => throw _privateConstructorUsedError;
List<String>? get customizeList => throw _privateConstructorUsedError;
bool get enableCustomize => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$LocalizationUIStateCopyWith<LocalizationUIState> get copyWith =>
@ -42,8 +41,7 @@ abstract class $LocalizationUIStateCopyWith<$Res> {
String workingVersion,
MapEntry<bool, String>? patchStatus,
bool? isInstalledAdvanced,
List<String>? customizeList,
bool enableCustomize});
List<String>? customizeList});
}
/// @nodoc
@ -65,7 +63,6 @@ class _$LocalizationUIStateCopyWithImpl<$Res, $Val extends LocalizationUIState>
Object? patchStatus = freezed,
Object? isInstalledAdvanced = freezed,
Object? customizeList = freezed,
Object? enableCustomize = null,
}) {
return _then(_value.copyWith(
selectedLanguage: freezed == selectedLanguage
@ -92,10 +89,6 @@ class _$LocalizationUIStateCopyWithImpl<$Res, $Val extends LocalizationUIState>
? _value.customizeList
: customizeList // ignore: cast_nullable_to_non_nullable
as List<String>?,
enableCustomize: null == enableCustomize
? _value.enableCustomize
: enableCustomize // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}
@ -114,8 +107,7 @@ abstract class _$$LocalizationUIStateImplCopyWith<$Res>
String workingVersion,
MapEntry<bool, String>? patchStatus,
bool? isInstalledAdvanced,
List<String>? customizeList,
bool enableCustomize});
List<String>? customizeList});
}
/// @nodoc
@ -135,7 +127,6 @@ class __$$LocalizationUIStateImplCopyWithImpl<$Res>
Object? patchStatus = freezed,
Object? isInstalledAdvanced = freezed,
Object? customizeList = freezed,
Object? enableCustomize = null,
}) {
return _then(_$LocalizationUIStateImpl(
selectedLanguage: freezed == selectedLanguage
@ -162,10 +153,6 @@ class __$$LocalizationUIStateImplCopyWithImpl<$Res>
? _value._customizeList
: customizeList // ignore: cast_nullable_to_non_nullable
as List<String>?,
enableCustomize: null == enableCustomize
? _value.enableCustomize
: enableCustomize // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
@ -179,8 +166,7 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
this.workingVersion = "",
this.patchStatus,
this.isInstalledAdvanced,
final List<String>? customizeList,
this.enableCustomize = false})
final List<String>? customizeList})
: _apiLocalizationData = apiLocalizationData,
_customizeList = customizeList;
@ -214,13 +200,9 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
return EqualUnmodifiableListView(value);
}
@override
@JsonKey()
final bool enableCustomize;
@override
String toString() {
return 'LocalizationUIState(selectedLanguage: $selectedLanguage, apiLocalizationData: $apiLocalizationData, workingVersion: $workingVersion, patchStatus: $patchStatus, isInstalledAdvanced: $isInstalledAdvanced, customizeList: $customizeList, enableCustomize: $enableCustomize)';
return 'LocalizationUIState(selectedLanguage: $selectedLanguage, apiLocalizationData: $apiLocalizationData, workingVersion: $workingVersion, patchStatus: $patchStatus, isInstalledAdvanced: $isInstalledAdvanced, customizeList: $customizeList)';
}
@override
@ -239,9 +221,7 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
(identical(other.isInstalledAdvanced, isInstalledAdvanced) ||
other.isInstalledAdvanced == isInstalledAdvanced) &&
const DeepCollectionEquality()
.equals(other._customizeList, _customizeList) &&
(identical(other.enableCustomize, enableCustomize) ||
other.enableCustomize == enableCustomize));
.equals(other._customizeList, _customizeList));
}
@override
@ -252,8 +232,7 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
workingVersion,
patchStatus,
isInstalledAdvanced,
const DeepCollectionEquality().hash(_customizeList),
enableCustomize);
const DeepCollectionEquality().hash(_customizeList));
@JsonKey(ignore: true)
@override
@ -270,8 +249,7 @@ abstract class _LocalizationUIState implements LocalizationUIState {
final String workingVersion,
final MapEntry<bool, String>? patchStatus,
final bool? isInstalledAdvanced,
final List<String>? customizeList,
final bool enableCustomize}) = _$LocalizationUIStateImpl;
final List<String>? customizeList}) = _$LocalizationUIStateImpl;
@override
String? get selectedLanguage;
@ -286,8 +264,6 @@ abstract class _LocalizationUIState implements LocalizationUIState {
@override
List<String>? get customizeList;
@override
bool get enableCustomize;
@override
@JsonKey(ignore: true)
_$$LocalizationUIStateImplCopyWith<_$LocalizationUIStateImpl> get copyWith =>
throw _privateConstructorUsedError;

View File

@ -7,7 +7,7 @@ part of 'localization_ui_model.dart';
// **************************************************************************
String _$localizationUIModelHash() =>
r'892a302b28ce4446cab7591f54008fbcc2e5eae0';
r'6aad19a3302d7b5691fc5f6f2cce26ccdf245662';
/// See also [LocalizationUIModel].
@ProviderFor(LocalizationUIModel)

View File

@ -6,7 +6,7 @@ part of 'tools_ui_model.dart';
// RiverpodGenerator
// **************************************************************************
String _$toolsUIModelHash() => r'bef6b6cf35ae13d7100fa8db85b7f6c04f244b27';
String _$toolsUIModelHash() => r'7c446c50a920b43d54a9c8dba1eb437b45ba72fe';
/// See also [ToolsUIModel].
@ProviderFor(ToolsUIModel)