修正多语言当中的硬编码,更新七国语言
(cherry picked from commit e72e682f526651453dc44b2db78a5df8ba70a733)
This commit is contained in:
@@ -50,7 +50,7 @@ class KRDeleteAccountController extends GetxController {
|
||||
Future<void> kr_sendCode() async {
|
||||
final account = KRAppRunData.getInstance().kr_account.value;
|
||||
if (account == null || account.isEmpty) {
|
||||
KRCommonUtil.kr_showToast('账号不能为空');
|
||||
KRCommonUtil.kr_showToast('account.accountRequired'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class KRDeleteAccountController extends GetxController {
|
||||
KRCommonUtil.kr_showToast(error.msg);
|
||||
},
|
||||
(success) {
|
||||
KRCommonUtil.kr_showToast('删除账号成功');
|
||||
KRCommonUtil.kr_showToast('account.deleteSuccess'.tr);
|
||||
KRAppRunData.getInstance().kr_loginOut();
|
||||
},
|
||||
);
|
||||
|
||||
@@ -46,7 +46,7 @@ class KRSearchAreaView extends GetView<KRSearchAreaController> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'选择其他地区',
|
||||
'login.selectOtherRegion'.tr,
|
||||
style: KrAppTextStyle(
|
||||
fontSize: 15.w,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -57,7 +57,7 @@ class KRSearchAreaView extends GetView<KRSearchAreaController> {
|
||||
onChanged: (value) => controller.searchQuery.value = value,
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: Icon(Icons.search, color: Colors.grey),
|
||||
hintText: '搜索',
|
||||
hintText: 'login.search'.tr,
|
||||
hintStyle: TextStyle(color: Colors.grey),
|
||||
filled: true,
|
||||
// fillColor: Colors.grey.shade200,
|
||||
|
||||
@@ -248,7 +248,7 @@ class KRSettingView extends GetView<KRSettingController> {
|
||||
// 设备登录(游客模式),显示"点击这里登录/注册"
|
||||
return _kr_buildActionTile(
|
||||
context,
|
||||
title: "登录/注册",
|
||||
title: 'userInfo.loginRegister'.tr,
|
||||
trailing: "",
|
||||
onTap: () => Get.toNamed(Routes.MR_LOGIN),
|
||||
);
|
||||
|
||||
@@ -101,7 +101,7 @@ class KRSplashView extends GetView<KRSplashController> {
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
'跳过',
|
||||
'splash.skip'.tr,
|
||||
style: KrAppTextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.grey,
|
||||
|
||||
@@ -154,7 +154,7 @@ class KRStatisticsController extends GetxController {
|
||||
}
|
||||
kr_weeklyData.value = weeklyHours;
|
||||
} catch (e) {
|
||||
KRCommonUtil.kr_showToast('处理流量日志数据失败');
|
||||
KRCommonUtil.kr_showToast('statistics.processTrafficFailed'.tr);
|
||||
KRLogUtil.kr_e('处理流量日志数据失败: $e', tag: 'Statistics');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,17 +916,17 @@ class KRUserInfoView extends GetView<KRUserInfoController> {
|
||||
}
|
||||
|
||||
if (!launched) {
|
||||
KRCommonUtil.kr_showToast("尝试使用浏览器打开");
|
||||
KRCommonUtil.kr_showToast("common.tryBrowser".tr);
|
||||
// 降级使用浏览器打开
|
||||
try {
|
||||
final Uri webUrl = Uri.parse(tgUrl);
|
||||
if (await canLaunchUrl(webUrl)) {
|
||||
await launchUrl(webUrl, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
KRCommonUtil.kr_showToast("无法打开浏览器");
|
||||
KRCommonUtil.kr_showToast("common.cannotOpenBrowser".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
KRCommonUtil.kr_showToast("打开链接失败,请稍后重试");
|
||||
KRCommonUtil.kr_showToast("common.openLinkFailed".tr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -936,10 +936,10 @@ class KRUserInfoView extends GetView<KRUserInfoController> {
|
||||
if (await canLaunchUrl(webUrl)) {
|
||||
await launchUrl(webUrl);
|
||||
} else {
|
||||
KRCommonUtil.kr_showToast("无法打开Telegram链接");
|
||||
KRCommonUtil.kr_showToast("common.cannotOpenTelegram".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
KRCommonUtil.kr_showToast("打开链接失败,请稍后重试");
|
||||
KRCommonUtil.kr_showToast("common.openLinkFailed".tr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -98,7 +98,7 @@ class KRSubscribeService {
|
||||
/// 重置订阅周期
|
||||
Future<void> kr_resetSubscribePeriod() async {
|
||||
if (kr_currentSubscribe.value == null) {
|
||||
KRCommonUtil.kr_showToast('请先选择订阅');
|
||||
KRCommonUtil.kr_showToast('subscribe.pleaseSelectFirst'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user