多语言
This commit is contained in:
@@ -418,7 +418,7 @@ class FindPasswordPage extends GetView<FindPasswordController> {
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '确认新密码',
|
||||
hintText: '确认新密码'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
@@ -527,7 +527,7 @@ class FindPasswordPage extends GetView<FindPasswordController> {
|
||||
BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Text(
|
||||
"提交",
|
||||
"提交".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0XFF003058),
|
||||
|
||||
@@ -123,10 +123,10 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
Future.delayed(const Duration(milliseconds: 300), () {
|
||||
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
|
||||
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
|
||||
String btnName = "同意";
|
||||
String cancelName = "取消";
|
||||
String btnName = "同意".tr;
|
||||
String cancelName = "取消".tr;
|
||||
if (Platform.isAndroid) {
|
||||
cancelName = "退出";
|
||||
cancelName = "退出".tr;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -696,7 +696,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入账号',
|
||||
hintText: '请输入账号'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFFD2D2D2),
|
||||
@@ -778,7 +778,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入密码',
|
||||
hintText: '请输入密码'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -1082,7 +1082,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入验证码',
|
||||
hintText: '请输入验证码'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -1198,7 +1198,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
.countdown
|
||||
.value ==
|
||||
0
|
||||
? '获取验证码'
|
||||
? '获取验证码'.tr
|
||||
: '${countdownController.countdown.value}' +
|
||||
'秒'.tr,
|
||||
style: TextStyle(
|
||||
@@ -1700,7 +1700,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "还没有账号? ".tr,
|
||||
text: "还没有账号?".tr,
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.white, // 设置"还没有账号?"为白色
|
||||
@@ -1731,7 +1731,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
"/findPasswordPage");
|
||||
},
|
||||
child: Text(
|
||||
'找回密码 '.tr,
|
||||
'找回密码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: stringToColor(
|
||||
@@ -1872,7 +1872,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
'合肥眠花糖家具有限责任公司版权所有',
|
||||
'合肥眠花糖家具有限责任公司版权所有'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
|
||||
@@ -49,7 +49,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'用户注册',
|
||||
'用户注册'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@@ -191,7 +191,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入密码',
|
||||
hintText: '请输入密码'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -387,7 +387,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请确认密码',
|
||||
hintText: '请确认密码'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -680,7 +680,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入验证码',
|
||||
hintText: '请输入验证码'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
@@ -786,7 +786,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
||||
.countdown
|
||||
.value ==
|
||||
0
|
||||
? '获取验证码'
|
||||
? '获取验证码'.tr
|
||||
: '${countdownController.countdown.value}' +
|
||||
'秒'.tr,
|
||||
style: TextStyle(
|
||||
|
||||
@@ -23,7 +23,7 @@ class RxhxMht extends StatefulWidget {
|
||||
class _RxhxMhtState extends State<RxhxMht> {
|
||||
get controller => Get.find<SleepingHabitController>();
|
||||
get bedController => Get.find<BedController>();
|
||||
List location = ["床垫全局", "床垫左侧", "床垫右侧"];
|
||||
List location = ["床垫全局".tr, "床垫左侧".tr, "床垫右侧".tr];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -175,7 +175,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
);
|
||||
}
|
||||
|
||||
List weeks = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
||||
List weeks = ["周一".tr, "周二".tr, "周三".tr, "周四".tr, "周五".tr, "周六".tr, "周日".tr];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -204,7 +204,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'柔性唤醒',
|
||||
'柔性唤醒'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@@ -242,7 +242,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'柔性唤醒功能',
|
||||
'柔性唤醒功能'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -301,7 +301,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
onTap: () async {
|
||||
showDayTimeSelectionDialog(context,
|
||||
dayTimeArr: controller.model.rxhxWakeTime,
|
||||
title: "唤醒时间", checkChange: (d) {
|
||||
title: "唤醒时间".tr, checkChange: (d) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxWakeTime = [
|
||||
int.parse("${d[0]}"),
|
||||
@@ -321,7 +321,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'唤醒时间',
|
||||
'唤醒时间'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -362,9 +362,9 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
onTap: () {
|
||||
showOneSelectionDialog(
|
||||
context,
|
||||
arr: ['开', "关"],
|
||||
arr: ['开'.tr, "关".tr],
|
||||
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
|
||||
title: "按摩",
|
||||
title: "按摩".tr,
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxIsAnMo =
|
||||
@@ -383,7 +383,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'按摩',
|
||||
'按摩'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -395,7 +395,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
controller.model.rxhxIsAnMo ? '开' : '关',
|
||||
controller.model.rxhxIsAnMo ? '开'.tr : '关'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -425,7 +425,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
context,
|
||||
arr: location,
|
||||
checkIndex: controller.model.rxhxLocation,
|
||||
title: "唤醒部位",
|
||||
title: "唤醒部位".tr,
|
||||
checkChange: (index) {
|
||||
controller.attr.update((getmodel) {
|
||||
getmodel.model.rxhxLocation = index;
|
||||
@@ -443,7 +443,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'唤醒部位',
|
||||
'唤醒部位'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -493,7 +493,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'自定义',
|
||||
'自定义'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
@@ -622,7 +622,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
width: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Text(
|
||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
|
||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
@@ -652,7 +652,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text("完成",
|
||||
child: Text("完成".tr,
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF003058),
|
||||
fontSize: 26.rpx)),
|
||||
|
||||
@@ -270,7 +270,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入验证码',
|
||||
'输入验证码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -346,7 +346,8 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
0,
|
||||
),
|
||||
hintText:
|
||||
'请输验证码',
|
||||
'请输验证码'
|
||||
.tr,
|
||||
hintStyle:
|
||||
TextStyle(
|
||||
fontFamily:
|
||||
@@ -465,7 +466,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
Text(
|
||||
countdownController.countdown.value ==
|
||||
0
|
||||
? '获取验证码'
|
||||
? '获取验证码'.tr
|
||||
: '${countdownController.countdown.value}秒',
|
||||
style:
|
||||
TextStyle(
|
||||
@@ -497,15 +498,16 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth:
|
||||
158.rpx, // 设置最小宽度为 100
|
||||
),
|
||||
minWidth: 158.rpx,
|
||||
maxWidth:
|
||||
158.rpx // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'输入新密码',
|
||||
'输入新密码'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
@@ -661,15 +663,17 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth:
|
||||
158.rpx, // 设置最小宽度为 100
|
||||
),
|
||||
minWidth: 158.rpx,
|
||||
maxWidth:
|
||||
158.rpx // 设置最小宽度为 100
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'确认新密码',
|
||||
'确认新密码'.tr,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
|
||||
Reference in New Issue
Block a user