feat: Google Home相关国际化添加

This commit is contained in:
“DaisyWu” 2024-09-12 11:34:17 +08:00
parent 9ded5b34fc
commit ab1009b9bf
6 changed files with 36 additions and 18 deletions

View File

@ -911,5 +911,12 @@
"支持的国家": "Supported countries",
"支持的国家值":"United States, Canada, United Kingdom, Germany, France, Italy, Spain, Australia, New Zealand, India, Japan",
"操作流程": "Operation process",
"操作流程值": "1. Open the Alexa app and search for the Skye Smart Lock skill\n2. Click Enable Skill and log in to your Skye account\n3. Say 'Alexa, discover devices' to Alexa\n4. After discovering the device, you can use the voice command to control the lock"
"操作流程值": "1. Open the Alexa app and search for the Skye Smart Lock skill\n2. Click Enable Skill and log in to your Skye account\n3. Say 'Alexa, discover devices' to Alexa\n4. After discovering the device, you can use the voice command to control the lock",
"Google Home": "Google Home",
"Action name": "Action name",
"ScienerSmart": "ScienerSmart",
"支持的语言": "Supported languages",
"英语": "English",
"Google Home操作流程的值": "1. Open the Google Home app and click the '+' in the upper left corner\n2. Click 'Set up device' and select 'Works with Google'\n3. Search for 'ScienerSmart' and log in to your Skye account\n4. After discovering the device, you can use the voice command to control the lock",
"开启": "Open"
}

View File

@ -947,5 +947,12 @@
"支持的国家":"支持的国家",
"支持的国家值":"支持的国家值",
"操作流程":"操作流程",
"操作流程值":"操作流程值"
"操作流程值":"操作流程值",
"Google Home":"Google Home",
"Action name":"Action name",
"ScienerSmart":"ScienerSmart",
"支持的语言":"支持的语言",
"英语":"英语",
"Google Home操作流程的值":"Google Home操作流程的值",
"开启":"开启"
}

View File

@ -907,5 +907,12 @@
"支持的国家": "支持的国家",
"支持的国家值": "美国、加拿大、英国、澳大利亚、印度、德国、法国、意大利、西班牙、日本",
"操作流程": "操作流程",
"操作流程值":"1 用智能锁APP添加锁和网关\n\n2 在APP里开启锁的远程开锁功能这个功能默认是关闭的。如果没有这个选项则锁不支持Alexa \n\n3 在Alexa中添加Skill并用智能锁APP的账号和密码进行授权。授权成功后就可以发现账号下的设备\n\n4 在Alexa app里找到锁开启语音开锁的功能并设置语言密码\n\n5 可以通过Alexa操作锁了"
"操作流程值":"1 用智能锁APP添加锁和网关\n\n2 在APP里开启锁的远程开锁功能这个功能默认是关闭的。如果没有这个选项则锁不支持Alexa \n\n3 在Alexa中添加Skill并用智能锁APP的账号和密码进行授权。授权成功后就可以发现账号下的设备\n\n4 在Alexa app里找到锁开启语音开锁的功能并设置语言密码\n\n5 可以通过Alexa操作锁了",
"Google Home": "Google Home",
"Action name": "Action name",
"ScienerSmart": "ScienerSmart",
"支持的语言": "支持的语言",
"英语": "英语",
"Google Home操作流程的值": "1.用智能锁APP添加锁和网关\n\n2.在APP里开启锁的远程开锁功能这个功能默认是关闭的。如果没有这个选项则锁不支持Google Home \n\n3.安装Google Home APP点击左上角的“+”按钮\n\n4.在设置页面选择“与Google协同工作”\n\n5.搜索“ScienerSmart”并用智能锁APP的账号和密码进行授权\n\n6.在智能锁APP里设置安全码使用Google Home开锁时提供此安全码",
"开启": "开启"
}

View File

@ -1,3 +1,4 @@
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
import 'package:star_lock/mine/mineSet/google_home/google_home_state.dart';
import 'package:star_lock/network/api_repository.dart';
@ -16,11 +17,11 @@ class GoogleHomeLogic extends BaseGetXController {
state.isGoogleHome.value = !state.isGoogleHome.value;
state.isGoogleHome.refresh();
if (state.isGoogleHome.value) {
state.isOpenedText.value = '关闭';
state.isOpenedText.value = '关闭'.tr;
} else {
state.isOpenedText.value = '开启';
state.isOpenedText.value = '开启'.tr;
}
showToast('操作成功');
showToast('操作成功'.tr);
}
}
}

View File

@ -49,8 +49,8 @@ class _GoogleHomePageState extends State<GoogleHomePage> {
return Column(
children: [
CommonItem(
leftTitel: 'Action name',
rightTitle: 'ScienerSmart',
leftTitel: 'Action name'.tr,
rightTitle: 'ScienerSmart'.tr,
),
SizedBox(
height: 20.h,
@ -84,10 +84,7 @@ class _GoogleHomePageState extends State<GoogleHomePage> {
children: [
_buildInfoSection('支持的语言'.tr, '英语'.tr),
SizedBox(height: 20.h),
_buildInfoSection(
'操作流程'.tr,
'1.用智能锁APP添加锁和网关\n\n2.在APP里开启锁的远程开锁功能这个功能默认是关闭的。如果没有这个选项则锁不支持Google Home \n\n3.安装Google Home APP点击左上角的“+”按钮\n\n4.在设置页面选择“与Google协同工作”\n\n5.搜索“ScienerSmart”并用智能锁APP的账号和密码进行授权\n\n6.在智能锁APP里设置安全码使用Google Home开锁时提供此安全码'
.tr),
_buildInfoSection('操作流程'.tr, 'Google Home操作流程的值'.tr),
],
),
);

View File

@ -296,10 +296,9 @@ class _MineSetPageState extends State<MineSetPage>
})),
*/
Obx(() => CommonItem(
leftTitel:'隐藏无效开锁权限'.tr,
rightTitle: (state.hideExpiredAccessFlag.value == 1
? '已开启'.tr
: '已关闭'.tr),
leftTitel: '隐藏无效开锁权限'.tr,
rightTitle:
(state.hideExpiredAccessFlag.value == 1 ? '已开启'.tr : '已关闭'.tr),
isHaveLine: true,
isHaveDirection: true,
action: () {
@ -344,7 +343,7 @@ class _MineSetPageState extends State<MineSetPage>
});
}),
CommonItem(
leftTitel: 'Google Home',
leftTitel: 'Google Home'.tr,
rightTitle: '',
isHaveLine: true,
isHaveDirection: true,
@ -369,7 +368,7 @@ class _MineSetPageState extends State<MineSetPage>
leftTitel: '客服'.tr,
isHaveLine: widget.showAbout,
isHaveDirection: true,
action: (){
action: () {
WechatManageTool.getAppInfo(CustomerTool.openCustomerService);
},
),