多语言

This commit is contained in:
czz
2025-07-30 16:48:48 +08:00
parent 92b6896176
commit 300e3b31f6
96 changed files with 3741 additions and 2710 deletions

View File

@@ -75,7 +75,7 @@ class _EditBedPageState extends State<EditBedPage> {
children: [
// 中间居中的标题
Text(
'智能设备名称',
'智能设备名称'.tr,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
@@ -103,9 +103,9 @@ class _EditBedPageState extends State<EditBedPage> {
if (editedData['name'] == null ||
editedData['name'] == '') {
if (device!.type == 2) {
editedData['name'] = '智能电动床';
editedData['name'] = '智能电动床'.tr;
} else {
editedData['name'] = '律动智能床垫';
editedData['name'] = '律动智能床垫'.tr;
}
}
String serviceAddress =
@@ -115,7 +115,7 @@ class _EditBedPageState extends State<EditBedPage> {
String queryUrl =
"$serviceAddress$serviceName$serviceApi";
await requestWithLog(
logTitle: "更新设备信息",
logTitle: "更新设备信息".tr,
method: MyHttpMethod.put,
queryUrl: queryUrl,
data: {
@@ -145,7 +145,7 @@ class _EditBedPageState extends State<EditBedPage> {
height: 60.rpx,
alignment: Alignment.center,
child: Text(
"下一步",
"下一步".tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0XFF011D33),
@@ -201,7 +201,7 @@ class _EditBedPageState extends State<EditBedPage> {
textAlign: TextAlign.center,
maxLength: AppConstants().text_length,
decoration: InputDecoration(
hintText: "请输入设备的名称",
hintText: "请输入设备的名称".tr,
contentPadding:
const EdgeInsetsDirectional
.fromSTEB(10, 0, 10, 0),
@@ -282,13 +282,13 @@ class _EditBedPageState extends State<EditBedPage> {
if (editedData['name'] == null ||
editedData['name'] == '') {
if (editedData['device_type'] == 2) {
editedData['name'] = '智能电动床';
editedData['name'] = '智能电动床'.tr;
} else {
editedData['name'] = '律动智能床垫';
editedData['name'] = '律动智能床垫'.tr;
}
}
await requestWithLog(
logTitle: "更新设备信息",
logTitle: "更新设备信息".tr,
method: MyHttpMethod.put,
queryUrl: queryUrl,
data: {