feat: Optimize UX

This commit is contained in:
xkeyC 2024-07-07 17:49:15 +08:00
parent 6ff0b7c902
commit 8fee9dba05
13 changed files with 96 additions and 40 deletions

View File

@ -571,6 +571,9 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Install custom file"), MessageLookupByLibrary.simpleMessage("Install custom file"),
"home_localization_action_rsi_launcher_localization": "home_localization_action_rsi_launcher_localization":
MessageLookupByLibrary.simpleMessage("RSILauncher 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": "home_localization_action_select_customize_file":
MessageLookupByLibrary.simpleMessage("Click to select INI file"), MessageLookupByLibrary.simpleMessage("Click to select INI file"),
"home_localization_advanced_action_install": "home_localization_advanced_action_install":
@ -1099,8 +1102,6 @@ class MessageLookup extends MessageLookupByLibrary {
"RSI customer service station"), "RSI customer service station"),
"tools_hosts_info_rsi_official_website": "tools_hosts_info_rsi_official_website":
MessageLookupByLibrary.simpleMessage("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_site": MessageLookupByLibrary.simpleMessage("Site"),
"tools_hosts_info_status": "tools_hosts_info_status":
MessageLookupByLibrary.simpleMessage("Status"), MessageLookupByLibrary.simpleMessage("Status"),

View File

@ -512,6 +512,9 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("安装自定义文件"), MessageLookupByLibrary.simpleMessage("安装自定义文件"),
"home_localization_action_rsi_launcher_localization": "home_localization_action_rsi_launcher_localization":
MessageLookupByLibrary.simpleMessage("RSI 启动器汉化"), MessageLookupByLibrary.simpleMessage("RSI 启动器汉化"),
"home_localization_action_rsi_launcher_no_game_path_msg":
MessageLookupByLibrary.simpleMessage(
"您当前未安装游戏本体或未选择游戏安装目录,只可使用启动器汉化功能。请确保游戏安装完毕或在盒子设置中添加游戏安装目录后重试。"),
"home_localization_action_select_customize_file": "home_localization_action_select_customize_file":
MessageLookupByLibrary.simpleMessage("点击选择 ini 文件"), MessageLookupByLibrary.simpleMessage("点击选择 ini 文件"),
"home_localization_advanced_action_install": "home_localization_advanced_action_install":
@ -979,8 +982,6 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("RSI 客服站"), MessageLookupByLibrary.simpleMessage("RSI 客服站"),
"tools_hosts_info_rsi_official_website": "tools_hosts_info_rsi_official_website":
MessageLookupByLibrary.simpleMessage("RSI 官网"), MessageLookupByLibrary.simpleMessage("RSI 官网"),
"tools_hosts_info_rsi_zendesk":
MessageLookupByLibrary.simpleMessage("RSI Zendesk 客服站"),
"tools_hosts_info_site": MessageLookupByLibrary.simpleMessage("站点"), "tools_hosts_info_site": MessageLookupByLibrary.simpleMessage("站点"),
"tools_hosts_info_status": MessageLookupByLibrary.simpleMessage("状态"), "tools_hosts_info_status": MessageLookupByLibrary.simpleMessage("状态"),
"tools_hosts_info_writing_hosts": "tools_hosts_info_writing_hosts":

View File

@ -513,6 +513,11 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("安裝自訂文件"), MessageLookupByLibrary.simpleMessage("安裝自訂文件"),
"home_localization_action_rsi_launcher_localization": "home_localization_action_rsi_launcher_localization":
MessageLookupByLibrary.simpleMessage("RSI 啟動器翻譯"), 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": "home_localization_advanced_action_install":
MessageLookupByLibrary.simpleMessage("安裝翻譯"), MessageLookupByLibrary.simpleMessage("安裝翻譯"),
"home_localization_advanced_action_mod_change": "home_localization_advanced_action_mod_change":
@ -570,6 +575,15 @@ class MessageLookup extends MessageLookupByLibrary {
"home_localization_new_version_available": "home_localization_new_version_available":
MessageLookupByLibrary.simpleMessage("社群翻譯有新的版本"), MessageLookupByLibrary.simpleMessage("社群翻譯有新的版本"),
"home_localization_new_version_installed": m34, "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": "home_localization_title_localization_tools":
MessageLookupByLibrary.simpleMessage("翻譯工具"), MessageLookupByLibrary.simpleMessage("翻譯工具"),
"home_login_action_title_box_one_click_launch": "home_login_action_title_box_one_click_launch":
@ -971,8 +985,6 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("RSI 客服站"), MessageLookupByLibrary.simpleMessage("RSI 客服站"),
"tools_hosts_info_rsi_official_website": "tools_hosts_info_rsi_official_website":
MessageLookupByLibrary.simpleMessage("RSI 官方網站"), MessageLookupByLibrary.simpleMessage("RSI 官方網站"),
"tools_hosts_info_rsi_zendesk":
MessageLookupByLibrary.simpleMessage("RSI Zendesk 客服站"),
"tools_hosts_info_site": MessageLookupByLibrary.simpleMessage("站點"), "tools_hosts_info_site": MessageLookupByLibrary.simpleMessage("站點"),
"tools_hosts_info_status": MessageLookupByLibrary.simpleMessage("狀態"), "tools_hosts_info_status": MessageLookupByLibrary.simpleMessage("狀態"),
"tools_hosts_info_writing_hosts": "tools_hosts_info_writing_hosts":
@ -983,6 +995,10 @@ class MessageLookup extends MessageLookupByLibrary {
"tools_info_rsi_launcher_location": "tools_info_rsi_launcher_location":
MessageLookupByLibrary.simpleMessage("RSI啟動器位置"), MessageLookupByLibrary.simpleMessage("RSI啟動器位置"),
"tools_info_scanning": MessageLookupByLibrary.simpleMessage("正在掃描..."), "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": "tools_rsi_launcher_enhance_action_install":
MessageLookupByLibrary.simpleMessage("安裝增強補丁"), MessageLookupByLibrary.simpleMessage("安裝增強補丁"),
"tools_rsi_launcher_enhance_init_msg1": "tools_rsi_launcher_enhance_init_msg1":
@ -1020,6 +1036,13 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("生成補丁 ..."), MessageLookupByLibrary.simpleMessage("生成補丁 ..."),
"tools_rsi_launcher_enhance_working_msg2": "tools_rsi_launcher_enhance_working_msg2":
MessageLookupByLibrary.simpleMessage("安裝補丁,這需要一點時間,取決於您的電腦性能 ..."), 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_init": MessageLookupByLibrary.simpleMessage("初始化中..."),
"tools_unp4k_msg_open_file": m58, "tools_unp4k_msg_open_file": m58,
"tools_unp4k_msg_read_completed": m59, "tools_unp4k_msg_read_completed": m59,

View File

@ -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` /// `RSI customer service station`
String get tools_hosts_info_rsi_customer_service { String get tools_hosts_info_rsi_customer_service {
return Intl.message( return Intl.message(
@ -4853,6 +4843,16 @@ class S {
args: [], 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<S> { class AppLocalizationDelegate extends LocalizationsDelegate<S> {

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "en", "@@locale": "en",
"@@auto_translate_locale": "en",
"app_language_name": "English", "app_language_name": "English",
"@app_language_name": {}, "@app_language_name": {},
"app_language_code": "en", "app_language_code": "en",
@ -508,8 +509,6 @@
"@app_splash_almost_done": {}, "@app_splash_almost_done": {},
"tools_hosts_info_rsi_official_website": "RSI official website", "tools_hosts_info_rsi_official_website": "RSI official website",
"@tools_hosts_info_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": "RSI customer service station",
"@tools_hosts_info_rsi_customer_service": {}, "@tools_hosts_info_rsi_customer_service": {},
"tools_hosts_info_dns_query_and_test": "Inquiring about DNS and testing accessibility, please wait patiently ...", "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": "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_info": {},
"tools_unp4k_missing_runtime_action_install": "Install the runtime", "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."
} }

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "ja", "@@locale": "ja",
"@@auto_translate_locale": "ja",
"app_language_name": "日本語", "app_language_name": "日本語",
"@app_language_name": {}, "@app_language_name": {},
"app_language_code": "ja", "app_language_code": "ja",

View File

@ -1,6 +1,6 @@
{ {
"@@locale": "zh_CN", "@@locale": "zh_CN",
"@auto_translate_locale": "zh-cn", "@@auto_translate_locale": "zh-cn",
"app_language_name": "简体中文", "app_language_name": "简体中文",
"@app_language_name": {}, "@app_language_name": {},
"app_language_code": "zh_CN", "app_language_code": "zh_CN",
@ -508,8 +508,6 @@
"@app_splash_almost_done": {}, "@app_splash_almost_done": {},
"tools_hosts_info_rsi_official_website": "RSI 官网", "tools_hosts_info_rsi_official_website": "RSI 官网",
"@tools_hosts_info_rsi_official_website": {}, "@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": "RSI 客服站",
"@tools_hosts_info_rsi_customer_service": {}, "@tools_hosts_info_rsi_customer_service": {},
"tools_hosts_info_dns_query_and_test": "正在查询 DNS 并测试可访问性 请耐心等待...", "tools_hosts_info_dns_query_and_test": "正在查询 DNS 并测试可访问性 请耐心等待...",
@ -702,6 +700,7 @@
"home_localization_msg_version_advanced": " (高级汉化)", "home_localization_msg_version_advanced": " (高级汉化)",
"home_localization_msg_no_note": "该版本没有提供描述", "home_localization_msg_no_note": "该版本没有提供描述",
"home_localization_action_rsi_launcher_localization": "RSI 启动器汉化", "home_localization_action_rsi_launcher_localization": "RSI 启动器汉化",
"home_localization_action_rsi_launcher_no_game_path_msg": "您当前未安装游戏本体或未选择游戏安装目录,只可使用启动器汉化功能。请确保游戏安装完毕或在盒子设置中添加游戏安装目录后重试。",
"home_localization_action_advanced": "高级汉化", "home_localization_action_advanced": "高级汉化",
"home_localization_action_install_customize": "安装自定义文件", "home_localization_action_install_customize": "安装自定义文件",
"home_localization_title_localization_tools": "汉化工具", "home_localization_title_localization_tools": "汉化工具",

View File

@ -1,6 +1,6 @@
{ {
"@@locale": "zh_TW", "@@locale": "zh_TW",
"@auto_translate_locale": "zh-cn", "@@auto_translate_locale": "zh-tw",
"app_language_name": "繁體中文", "app_language_name": "繁體中文",
"@app_language_name": {}, "@app_language_name": {},
"app_language_code": "zh_TW", "app_language_code": "zh_TW",
@ -508,8 +508,6 @@
"@app_splash_almost_done": {}, "@app_splash_almost_done": {},
"tools_hosts_info_rsi_official_website": "RSI 官方網站", "tools_hosts_info_rsi_official_website": "RSI 官方網站",
"@tools_hosts_info_rsi_official_website": {}, "@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": "RSI 客服站",
"@tools_hosts_info_rsi_customer_service": {}, "@tools_hosts_info_rsi_customer_service": {},
"tools_hosts_info_dns_query_and_test": "正在查詢 DNS 並測試可瀏覽性 請耐心等待...", "tools_hosts_info_dns_query_and_test": "正在查詢 DNS 並測試可瀏覽性 請耐心等待...",
@ -786,5 +784,16 @@
"tools_action_unp4k_info": "解包星際公民 p4k 文件", "tools_action_unp4k_info": "解包星際公民 p4k 文件",
"tools_unp4k_title": "P4K 查看器 -> {v0}", "tools_unp4k_title": "P4K 查看器 -> {v0}",
"tools_unp4k_view_file": "單擊文件以預覽", "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": "安裝運行庫"
} }

View File

@ -8,6 +8,7 @@ import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:starcitizen_doctor/api/analytics.dart'; import 'package:starcitizen_doctor/api/analytics.dart';
import 'package:starcitizen_doctor/common/helper/system_helper.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:starcitizen_doctor/widgets/widgets.dart';
import 'package:url_launcher/url_launcher_string.dart'; import 'package:url_launcher/url_launcher_string.dart';
@ -795,7 +796,7 @@ class HomeUI extends HookConsumerWidget {
switch (key) { switch (key) {
case "localization": case "localization":
if (homeState.scInstalledPath == "not_install") { if (homeState.scInstalledPath == "not_install") {
showToast(context, gameInstallReqInfo); ToolsUIModel.rsiEnhance(context, showNotGameInstallMsg: true);
break; break;
} }
final model = ref.watch(homeUIModelProvider.notifier); final model = ref.watch(homeUIModelProvider.notifier);
@ -803,7 +804,8 @@ class HomeUI extends HookConsumerWidget {
await showDialog( await showDialog(
context: context, context: context,
dismissWithEsc: false, dismissWithEsc: false,
builder: (BuildContext context) => const LocalizationDialogUI()); builder: (BuildContext context) => const LocalizationDialogUI(),
);
model.checkLocalizationUpdate(skipReload: true); model.checkLocalizationUpdate(skipReload: true);
break; break;
case "performance": case "performance":

View File

@ -18,9 +18,6 @@ class HostsBoosterDialogUI extends HookConsumerWidget {
S.current.tools_hosts_info_rsi_official_website: [ S.current.tools_hosts_info_rsi_official_website: [
"robertsspaceindustries.com" "robertsspaceindustries.com"
], ],
S.current.tools_hosts_info_rsi_zendesk: [
"cloudimperiumservicesllc.zendesk.com"
],
S.current.tools_hosts_info_rsi_customer_service: [ S.current.tools_hosts_info_rsi_customer_service: [
"support.robertsspaceindustries.com" "support.robertsspaceindustries.com"
], ],

View File

@ -33,7 +33,10 @@ class RSILauncherStateData with _$RSILauncherStateData {
} }
class RsiLauncherEnhanceDialogUI extends HookConsumerWidget { class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
const RsiLauncherEnhanceDialogUI({super.key}); final bool showNotGameInstallMsg;
const RsiLauncherEnhanceDialogUI(
{super.key, this.showNotGameInstallMsg = false});
static const supportLocalizationMap = { static const supportLocalizationMap = {
"en": NoL10n.langEn, "en": NoL10n.langEn,
@ -113,6 +116,23 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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) ...[ if (workingText.value.isNotEmpty) ...[
Center( Center(
child: Column( child: Column(

View File

@ -593,7 +593,8 @@ class ToolsUIModel extends _$ToolsUIModel {
context.push("/tools/unp4kc"); 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 ((await SystemHelper.getPID("\"RSI Launcher\"")).isNotEmpty) {
if (!context.mounted) return; if (!context.mounted) return;
showToast( showToast(
@ -605,6 +606,8 @@ class ToolsUIModel extends _$ToolsUIModel {
if (!context.mounted) return; if (!context.mounted) return;
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext context) => const RsiLauncherEnhanceDialogUI()); builder: (BuildContext context) => RsiLauncherEnhanceDialogUI(
showNotGameInstallMsg: showNotGameInstallMsg,
));
} }
} }

View File

@ -95,8 +95,8 @@ class AutoL10nTools {
final toMap = final toMap =
json.decode(toFile.readAsStringSync()) as Map<String, dynamic>; json.decode(toFile.readAsStringSync()) as Map<String, dynamic>;
final formLocaleCode = formMap["@auto_translate_locale"].toString(); final formLocaleCode = formMap["@@auto_translate_locale"].toString();
final toLocaleCode = toMap["@auto_translate_locale"].toString(); final toLocaleCode = toMap["@@auto_translate_locale"].toString();
print("formLocaleCode: $formLocaleCode, toLocaleCode: $toLocaleCode"); print("formLocaleCode: $formLocaleCode, toLocaleCode: $toLocaleCode");
final newMap = <String, dynamic>{}; final newMap = <String, dynamic>{};