From 882bbdaf7e40b00673fbcd4b224fb142ff07c919 Mon Sep 17 00:00:00 2001 From: ZCM <772112648@qq.com> Date: Tue, 24 Mar 2020 15:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/en-US.json | 5 +++- i18n/ja-JP.json | 5 +++- i18n/ko-KR.json | 5 +++- i18n/vi-VN.json | 5 +++- i18n/zh-CN.json | 5 +++- i18n/zh-HK.json | 5 +++- lib/chat/ChatPageItem.dart | 12 ++++----- lib/chat/gift_msg_item.dart | 5 +++- lib/chat/group_chat_item.dart | 15 ++++++----- lib/generated/i18n.dart | 51 +++++++++++++++++++++++++++++++++++ lib/home/ProfilePage.dart | 8 +++--- 11 files changed, 98 insertions(+), 23 deletions(-) diff --git a/i18n/en-US.json b/i18n/en-US.json index 9023b62..6bfe065 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -1219,5 +1219,8 @@ "translation_input_limit": "还可以输入/s1字", "translation_more_desc": "更多描述", "feedback_assistant": "反馈小助手", - "feedback_tips":"有什么问题都可以反馈给我哦" + "feedback_tips":"有什么问题都可以反馈给我哦", + "man_retranslate":"人工重译", + "robot_retranslate":"机器重译", + "see_original":"查看原文" } \ No newline at end of file diff --git a/i18n/ja-JP.json b/i18n/ja-JP.json index de76b5c..f5714b1 100644 --- a/i18n/ja-JP.json +++ b/i18n/ja-JP.json @@ -1219,5 +1219,8 @@ "translation_input_limit": "还可以输入/s1字", "translation_more_desc": "更多描述", "feedback_assistant": "反馈小助手", - "feedback_tips":"有什么问题都可以反馈给我哦" + "feedback_tips":"有什么问题都可以反馈给我哦", + "man_retranslate":"人工重译", + "robot_retranslate":"机器重译", + "see_original":"查看原文" } \ No newline at end of file diff --git a/i18n/ko-KR.json b/i18n/ko-KR.json index ebe3afe..0f869a3 100644 --- a/i18n/ko-KR.json +++ b/i18n/ko-KR.json @@ -1219,5 +1219,8 @@ "translation_input_limit": "还可以输入/s1字", "translation_more_desc": "更多描述", "feedback_assistant": "反馈小助手", - "feedback_tips": "有什么问题都可以反馈给我哦" + "feedback_tips": "有什么问题都可以反馈给我哦", + "man_retranslate":"人工重译", + "robot_retranslate":"机器重译", + "see_original":"查看原文" } \ No newline at end of file diff --git a/i18n/vi-VN.json b/i18n/vi-VN.json index f25c0c9..bcb1d7e 100644 --- a/i18n/vi-VN.json +++ b/i18n/vi-VN.json @@ -1219,5 +1219,8 @@ "translation_input_limit": "还可以输入/s1字", "translation_more_desc": "更多描述", "feedback_assistant": "反馈小助手", - "feedback_tips":"有什么问题都可以反馈给我哦" + "feedback_tips":"有什么问题都可以反馈给我哦", + "man_retranslate":"人工重译", + "robot_retranslate":"机器重译", + "see_original":"查看原文" } \ No newline at end of file diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json index d7e67f7..c220617 100644 --- a/i18n/zh-CN.json +++ b/i18n/zh-CN.json @@ -1219,5 +1219,8 @@ "file": "文件", "max_file": "文件大于/s1M", "feedback_assistant":"反馈小助手", - "feedback_tips":"有什么问题都可以反馈给我哦" + "feedback_tips":"有什么问题都可以反馈给我哦", + "man_retranslate":"人工重译", + "robot_retranslate":"机器重译", + "see_original":"查看原文" } \ No newline at end of file diff --git a/i18n/zh-HK.json b/i18n/zh-HK.json index d6c91be..af2586d 100644 --- a/i18n/zh-HK.json +++ b/i18n/zh-HK.json @@ -1219,5 +1219,8 @@ "translation_input_limit": "还可以输入/s1字", "translation_more_desc": "更多描述", "feedback_assistant": "反饋小助手", - "feedback_tips":"有什麼問題都可以反饋給我哦" + "feedback_tips":"有什麼問題都可以反饋給我哦", + "man_retranslate":"人工重譯", + "robot_retranslate":"機器重譯", + "see_original":"查看原文" } \ No newline at end of file diff --git a/lib/chat/ChatPageItem.dart b/lib/chat/ChatPageItem.dart index d72f9a5..ed5e9c8 100644 --- a/lib/chat/ChatPageItem.dart +++ b/lib/chat/ChatPageItem.dart @@ -830,14 +830,14 @@ class _ChatPageItemState extends State if (transTag == 1) { //机器翻译中 - userTranslateWidget = _translateItemWidget(0xe670, '人工重译', null); + userTranslateWidget = _translateItemWidget(0xe670, I18n.of(context).man_retranslate, null); machineTranslateWidget = _translateItemWidget(0xe671, I18n.of(context).robotTranslate, null); } else if (transTag == 2) { //人工翻译中 - userTranslateWidget = _translateItemWidget(0xe670, '人工翻译中', null); - machineTranslateWidget = _translateItemWidget(0xe671, '机器重译', () { + userTranslateWidget = _translateItemWidget(0xe670, I18n.of(context).ManTranslate, null); + machineTranslateWidget = _translateItemWidget(0xe671, I18n.of(context).robot_retranslate, () { setState(() { curTextType += 1; curTextType %= textList.length; @@ -847,7 +847,7 @@ class _ChatPageItemState extends State //机器翻译完成 userTranslateWidget = _translateItemWidget( 0xe670, - '人工重译', + I18n.of(context).man_retranslate, isTranslating ? null : () async { @@ -889,7 +889,7 @@ class _ChatPageItemState extends State }); } }); - machineTranslateWidget = _translateItemWidget(0xe671, '机器重译', () { + machineTranslateWidget = _translateItemWidget(0xe671, I18n.of(context).robot_retranslate, () { setState(() { curTextType += 1; curTextType %= textList.length; @@ -944,7 +944,7 @@ class _ChatPageItemState extends State )) ], ))); - machineTranslateWidget = _translateItemWidget(0xe675, '查看原文', () { + machineTranslateWidget = _translateItemWidget(0xe675, I18n.of(context).see_original, () { setState(() { curTextType = textList.length - 1; }); diff --git a/lib/chat/gift_msg_item.dart b/lib/chat/gift_msg_item.dart index c6de421..6a9eac9 100644 --- a/lib/chat/gift_msg_item.dart +++ b/lib/chat/gift_msg_item.dart @@ -30,7 +30,10 @@ class GiftMsgItem extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - fixedText(str, fontSize: 14, color: Colors.white), + Container( + child: fixedText(str, fontSize: 14, color: Colors.white), + constraints: BoxConstraints(maxWidth: Screen.width - 175), + ), SizedBox(width: 10), Image.asset(imgPath, height: 25, width: 25, fit: BoxFit.contain), ], diff --git a/lib/chat/group_chat_item.dart b/lib/chat/group_chat_item.dart index 3fcf3fe..815f647 100644 --- a/lib/chat/group_chat_item.dart +++ b/lib/chat/group_chat_item.dart @@ -816,16 +816,18 @@ class _GroupChatPageItemState extends State if (transTag == 1) { //机器翻译中 - userTranslateWidget = _translateItemWidget(0xe670, '人工重译', null); + userTranslateWidget = + _translateItemWidget(0xe670, I18n.of(context).man_retranslate, null); machineTranslateWidget = _translateItemWidget(0xe671, I18n.of(context).robotTranslate, null); } else if (transTag == 2) { //人工翻译中 - userTranslateWidget = _translateItemWidget(0xe670, '人工翻译中', null); + userTranslateWidget = + _translateItemWidget(0xe670, I18n.of(context).ManTranslate, null); machineTranslateWidget = _translateItemWidget( 0xe671, - '机器重译', + I18n.of(context).robot_retranslate, textList.length <= 1 ? null : () { @@ -838,7 +840,7 @@ class _GroupChatPageItemState extends State //机器翻译完成 userTranslateWidget = _translateItemWidget( 0xe670, - '人工重译', + I18n.of(context).man_retranslate, isTranslating ? null : () async { @@ -882,7 +884,7 @@ class _GroupChatPageItemState extends State }); machineTranslateWidget = _translateItemWidget( 0xe671, - '机器重译', + I18n.of(context).robot_retranslate, textList.length <= 1 ? null : () { @@ -940,7 +942,8 @@ class _GroupChatPageItemState extends State )) ], ))); - machineTranslateWidget = _translateItemWidget(0xe675, '查看原文', () { + machineTranslateWidget = + _translateItemWidget(0xe675, I18n.of(context).see_original, () { setState(() { curTextType = textList.length - 1; }); diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart index 53beeb4..a903d75 100644 --- a/lib/generated/i18n.dart +++ b/lib/generated/i18n.dart @@ -2475,6 +2475,12 @@ class I18n implements WidgetsLocalizations { String get feedback_assistant => "反馈小助手"; /// "有什么问题都可以反馈给我哦" String get feedback_tips => "有什么问题都可以反馈给我哦"; + /// "人工重译" + String get man_retranslate => "人工重译"; + /// "机器重译" + String get robot_retranslate => "机器重译"; + /// "查看原文" + String get see_original => "查看原文"; } class _I18n_en_US extends I18n { @@ -6150,6 +6156,15 @@ class _I18n_vi_VN extends I18n { /// "有什么问题都可以反馈给我哦" @override String get feedback_tips => "有什么问题都可以反馈给我哦"; + /// "人工重译" + @override + String get man_retranslate => "人工重译"; + /// "机器重译" + @override + String get robot_retranslate => "机器重译"; + /// "查看原文" + @override + String get see_original => "查看原文"; @override TextDirection get textDirection => TextDirection.ltr; @@ -9821,6 +9836,15 @@ class _I18n_zh_HK extends I18n { /// "有什麼問題都可以反饋給我哦" @override String get feedback_tips => "有什麼問題都可以反饋給我哦"; + /// "人工重譯" + @override + String get man_retranslate => "人工重譯"; + /// "機器重譯" + @override + String get robot_retranslate => "機器重譯"; + /// "查看原文" + @override + String get see_original => "查看原文"; @override TextDirection get textDirection => TextDirection.ltr; @@ -13492,6 +13516,15 @@ class _I18n_zh_CN extends _I18n_zh_HK { /// "有什么问题都可以反馈给我哦" @override String get feedback_tips => "有什么问题都可以反馈给我哦"; + /// "人工重译" + @override + String get man_retranslate => "人工重译"; + /// "机器重译" + @override + String get robot_retranslate => "机器重译"; + /// "查看原文" + @override + String get see_original => "查看原文"; @override TextDirection get textDirection => TextDirection.ltr; @@ -17163,6 +17196,15 @@ class _I18n_ko_KR extends I18n { /// "有什么问题都可以反馈给我哦" @override String get feedback_tips => "有什么问题都可以反馈给我哦"; + /// "人工重译" + @override + String get man_retranslate => "人工重译"; + /// "机器重译" + @override + String get robot_retranslate => "机器重译"; + /// "查看原文" + @override + String get see_original => "查看原文"; @override TextDirection get textDirection => TextDirection.ltr; @@ -20834,6 +20876,15 @@ class _I18n_ja_JP extends I18n { /// "有什么问题都可以反馈给我哦" @override String get feedback_tips => "有什么问题都可以反馈给我哦"; + /// "人工重译" + @override + String get man_retranslate => "人工重译"; + /// "机器重译" + @override + String get robot_retranslate => "机器重译"; + /// "查看原文" + @override + String get see_original => "查看原文"; @override TextDirection get textDirection => TextDirection.ltr; diff --git a/lib/home/ProfilePage.dart b/lib/home/ProfilePage.dart index 8859233..36918bd 100644 --- a/lib/home/ProfilePage.dart +++ b/lib/home/ProfilePage.dart @@ -1713,8 +1713,8 @@ class _ProfilePageState extends State // return; // } - //自己是女性,且未认证,提示去认证 - if (!UserData().isMan() && !UserData().basicInfo.isAttestation) { + //自己是女性,且未认证,提示去认证(好友除外) + if (!UserData().isMan() && !UserData().basicInfo.isAttestation && !FriendListMgr().isMyFriend(userInfo.userId)){ CustomUI.buildNotTrue(context); return; } @@ -1879,10 +1879,10 @@ class _ProfilePageState extends State heightStr = (userInfo.height == 0.0 || userInfo.height == null) ? I18n.of(context).not_show - : '${userInfo.height}M'; + : '${userInfo.height.toInt()}CM'; weightStr = (userInfo.weight == 0.0 || userInfo.weight == null) ? I18n.of(context).not_show - : '${userInfo.weight}KG'; + : '${userInfo.weight.toInt()}KG'; List basicList = [ userInfo.height != null && userInfo.height != 0