中英文翻译问题

This commit is contained in:
Martin 2024-08-07 09:27:02 +08:00
parent 6e08a8db35
commit 8ddaf20e4f
14 changed files with 110 additions and 42 deletions

View File

@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="com.twitter.sdk.android.CONSUMER_KEY" >ZWRrZnRUNlBlcHVxMXpsMzVmb2k6MTpjaQ</string>
<string name="com.twitter.sdk.android.CONSUMER_SECRET">aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws</string>
<string name="com.twitter.sdk.android.CONSUMER_KEY">ZWRrZnRUNlBlcHVxMXpsMzVmb2k6MTpjaQ</string>
<string name="com.twitter.sdk.android.CONSUMER_SECRET">aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws</string>
<string name="dialog_share_title">分享</string>
<string name="dialog_share_info">快來 PDLIVE觀看%s直播認識更多有趣的朋友吧</string>
<string name="dialog_share_app_facebook" >Facebook</string>
<string name="dialog_share_app_line" >Line</string>
<string name="dialog_share_app_twitter">Twitter</string>
<string name="dialog_share_app_whatsapp" >WhatsApp</string>
<string name="dialog_share_app_messenger">Messenger</string>
<string name="dialog_share_app_instagram" >Instagram</string>
<string name="dialog_share_title">分享</string>
<string name="dialog_share_app_internal">站內好友</string>
<string name="dialog_share_info">快來 PDLIVE觀看%s直播認識更多有趣的朋友吧</string>
<string name="dialog_share_app_facebook">Facebook</string>
<string name="dialog_share_app_line">Line</string>
<string name="dialog_share_app_twitter">Twitter</string>
<string name="dialog_share_app_whatsapp">WhatsApp</string>
<string name="dialog_share_app_messenger">Messenger</string>
<string name="dialog_share_app_instagram">Instagram</string>
<string name="dialog_invite_title">邀請好友</string>
<string name="dialog_invite_info">快來 PDLIVE觀看直播認識更多有趣的朋友吧</string>
<string name="dialog_share_copy">複製</string>
<string name="dialog_invite_title">邀請好友</string>
<string name="dialog_invite_info">快來 PDLIVE觀看直播認識更多有趣的朋友吧</string>
<string name="dialog_share_copy">複製</string>
</resources>

View File

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="dialog_share_title">Share</string>
<string name="dialog_share_info">Come and watch %s live on PDLIVE and meet more interesting people!</string>
<string name="dialog_invite_title">Invite Friends</string>
<string name="dialog_invite_info">Come to PDLIVE to discover more and better live streams.</string>
<string name="dialog_share_copy">Copy</string>
<string name="dialog_share_app_internal">Site friends</string>
<string name="dialog_share_internal_title">Share To</string>
<string name="dialog_share_internal_cancel">cancel</string>
<string name="dialog_share_internal_search">Search nickname</string>
<string name="dialog_share_internal_list_btn">Send</string>
<string name="dialog_share_success">Share success</string>
<string name="dialog_share_success_btn">Go chat</string>
<string name="dialog_share_failure_not_select">Please select friends</string>
<string name="dialog_share_title">分享</string>
<string name="dialog_share_info">快來 PDLIVE觀看%s直播認識更多有趣的朋友吧</string>
<string name="dialog_share_app_facebook" translatable="false">Facebook</string>
<string name="dialog_share_app_line" translatable="false">Line</string>
<string name="dialog_share_app_twitter" translatable="false">Twitter</string>
<string name="dialog_share_app_whatsapp" translatable="false">WhatsApp</string>
<string name="dialog_share_app_messenger" translatable="false">Messenger</string>
<string name="dialog_share_app_instagram" translatable="false">Instagram</string>
<string name="dialog_share_app_internal">站內好友</string>
<string name="dialog_invite_title">邀請好友</string>
<string name="dialog_invite_info">快來 PDLIVE觀看直播認識更多有趣的朋友吧</string>
<string name="dialog_share_copy">複製</string>
<string name="dialog_share_internal_title">分享至</string>
<string name="dialog_share_internal_search">搜索昵稱</string>
<string name="dialog_share_internal_list_btn">發送</string>
<string name="dialog_share_success">分享成功</string>
<string name="dialog_share_success_btn">去聊聊</string>
<string name="dialog_share_failure_not_select">请选择好友</string>
<string name="dialog_share_app_facebook" >Facebook</string>
<string name="dialog_share_app_line" >Line</string>
<string name="dialog_share_app_twitter">Twitter</string>
<string name="dialog_share_app_whatsapp" >WhatsApp</string>
<string name="dialog_share_app_messenger">Messenger</string>
<string name="dialog_share_app_instagram" >Instagram</string>
</resources>

View File

@ -319,3 +319,17 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-keep class com.qiniu.**{*;}
-keep class com.qiniu.**{public <init>();}
-ignorewarnings
#Adjust SDK
-keep class com.adjust.sdk.** { *; }
-keep class com.google.android.gms.common.ConnectionResult {
int SUCCESS;
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
java.lang.String getId();
boolean isLimitAdTrackingEnabled();
}
-keep public class com.android.installreferrer.** { *; }

View File

@ -19,6 +19,7 @@ import com.yunbao.common.interfaces.OnRecyclerListRefreshListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.message.content.MessageChatCardContent;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.ChatMsgTypeUtils;
import com.yunbao.common.utils.DateFormatUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ViewUtils;
@ -39,8 +40,11 @@ import io.rong.imkit.widget.adapter.ViewHolder;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.Message;
import io.rong.message.HQVoiceMessage;
import io.rong.message.ImageMessage;
import io.rong.message.SightMessage;
import io.rong.message.TextMessage;
import io.rong.message.VoiceMessage;
public class MainConversationListAdapter extends ConversationListAdapter {
public static final int TYPE_SEARCH_TITLE = 500;
@ -134,6 +138,7 @@ public class MainConversationListAdapter extends ConversationListAdapter {
Log.i("列表", "bindDefault: 用户名字:" + conversation.mCore.getConversationTitle());
ImgLoader.display(holder.getContext(), conversation.mCore.getPortraitUrl(), holder.getView(R.id.rc_conversation_portrait));
holder.setText(R.id.rc_conversation_title, conversation.mCore.getConversationTitle());
((TextView) holder.getView(R.id.rc_conversation_content)).setText(ChatMsgTypeUtils.getMsg(conversation.mConversationContent.toString()));
if (conversation.mCore.getSentTime() != -1 && holder.getView(R.id.rc_conversation_date) != null) {
holder.setText(R.id.rc_conversation_date, DateFormatUtil.getDateTimeString(conversation.mCore.getSentTime(), true, holder.getContext()));
holder.getView(R.id.rc_conversation_date).setVisibility(View.VISIBLE);
@ -337,10 +342,15 @@ public class MainConversationListAdapter extends ConversationListAdapter {
conversation.mCore.setUnreadMessageCount(integer);
if(bean.getContent() instanceof SightMessage){
conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[小視頻]":"[Video]");
}else{
}else if(bean.getContent() instanceof HQVoiceMessage){
conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[語音]":"[Voice]");
} else if(bean.getContent() instanceof ImageMessage){
conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[圖片]":"[picture]");
}else if(bean.getContent() instanceof MessageChatCardContent){
conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[站內分享]":"[In-app sharing]");
} else{
conversation.mConversationContent = new SpannableString(((TextMessage) bean.getContent()).getContent());
}
mDataList.set(id, conversation);
notifyItemChanged(id);
}

View File

@ -277,7 +277,7 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
void initData() {
adapter.setList_type(list_type);
if (isAnchor) {
if (isAnchor || (isTab2Enter && isStar)) {
if (isStar) {
gift_hall_type = 2;
} else {

View File

@ -14,6 +14,7 @@ import com.yunbao.common.R;
import com.yunbao.common.bean.MessageUserInfoBean;
import com.yunbao.common.custom.RatioRoundImageView;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.ChatMsgTypeUtils;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.StringUtil;
@ -93,7 +94,7 @@ public class MessageChatNotifyDialog extends AbsDialogPositionPopupWindow {
if (StringUtil.isEmpty(liveBean.getExtras())) {
((TextView) findViewById(R.id.description)).setText(liveBean.getUser().getSignature());
} else {
((TextView) findViewById(R.id.description)).setText(liveBean.getExtras());
((TextView) findViewById(R.id.description)).setText(ChatMsgTypeUtils.getMsg(liveBean.getExtras()));
}
new Handler(Looper.getMainLooper()).postDelayed(() -> {
dismiss();

View File

@ -2,6 +2,7 @@ package com.yunbao.common.fragment;
import android.net.Uri;
import android.os.Bundle;
import android.text.SpannableString;
import android.util.Log;
import android.view.View;
@ -23,6 +24,7 @@ import com.yunbao.common.interfaces.OnRecyclerListRefreshListener;
import com.yunbao.common.adapter.MainConversationListAdapter;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.InstructorRemarkManager;
import com.yunbao.common.utils.ChatMsgTypeUtils;
import com.yunbao.common.utils.StringUtil;
import org.greenrobot.eventbus.EventBus;
@ -158,7 +160,7 @@ public abstract class AbsMainMessageChatListFragment extends Fragment {
break;
}
}
srcList.get(i).mConversationContent =new SpannableString(ChatMsgTypeUtils.getMsg(srcList.get(i).mConversationContent.toString()));
}
onRefreshListener.onFinish(srcList);
isNet = false;

View File

@ -3,6 +3,7 @@ package com.yunbao.common.fragment;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.text.SpannableString;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -23,6 +24,7 @@ import com.yunbao.common.interfaces.OnRecyclerListRefreshListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.InstructorRemarkManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ChatMsgTypeUtils;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.StringUtil;
@ -39,6 +41,7 @@ import io.rong.imkit.widget.refresh.listener.OnRefreshListener;
import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.Message;
import io.rong.imlib.model.UserInfo;
import io.rong.message.VoiceMessage;
public class MainMessageChatListFragment extends AbsMainMessageChatListFragment {
private static final String TAG = "MainMessageChatListFragment";
@ -72,6 +75,9 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
@Override
public void onFinish(List<BaseUiConversation> baseUiConversations) {
InstructorRemarkManager.get(mContext).getNetInstructorRemark();
for (int i = 0; i <baseUiConversations.size(); i++) {
baseUiConversations.get(i).mCore.getMessage();
}
loadLiveLookTime(baseUiConversations, new OnRecyclerListRefreshListener<Map<String, Integer>>() {
@Override
public void onFinish(Map<String, Integer> stringIntegerMap) {

View File

@ -0,0 +1,22 @@
package com.yunbao.common.utils;
/**
* 消息类型翻译管理器
*/
public class ChatMsgTypeUtils {
public static String getMsg(String msg) {
String rsult = msg;
switch (msg) {
case "[小视频]":
rsult = WordUtil.isNewZh() ? "[小視頻]" : "[Video]";
break;
case "[语音]":
rsult = WordUtil.isNewZh() ? "[語音]" : "[Voice]";
break;
case "[图片]":
rsult = WordUtil.isNewZh() ? "[圖片]" : "[Image]";
break;
}
return rsult;
}
}

View File

@ -1899,6 +1899,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
.setIcon("https://downs.yaoulive.com/xzs_tab.png")
.setNameColor("#f19ec2")
.setSystemBubble("https://downs.yaoulive.com/xzs_qipao.9.png")
.setIconEn("https://downs.yaoulive.com/Robot_en.png")
.setUserName("")
.setContent(content);
SocketSendBean msg =

View File

@ -836,7 +836,11 @@ public class LiveGiftPopup extends AbsDialogFragment {
@Override
public void onSuccess(GiftNamingInfoModel data) {
if (TextUtils.equals(data.getNamingStatus(), "1")) {
boolean isPageGift = liveGiftModel.isPageGift();
liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class);
liveGiftModel.setPageGift(isPageGift);
liveGiftModel.setGift_id(giftId);
liveGiftModel.setId(giftId);
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&

View File

@ -36,9 +36,9 @@
android:textSize="16sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:layout_weight="1"
android:gravity="end|center"
android:orientation="horizontal">
@ -52,7 +52,9 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="8dp"
android:maxLines="1"
android:ellipsize="end"
android:textSize="14dp"
android:text="@string/live_data_msg2"
android:textColor="#595959" />
</LinearLayout>

View File

@ -46,6 +46,7 @@ import com.yunbao.common.bean.ActiveBean;
import com.yunbao.common.bean.ActiveOtherBean;
import com.yunbao.common.bean.HomeUserExhibitInfoBean;
import com.yunbao.common.bean.HomeUserInfoBean;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LabelBean;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.NewLevelModel;
@ -59,6 +60,7 @@ import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.upload.UploadBean;
import com.yunbao.common.upload.UploadCallback;
@ -803,7 +805,7 @@ public class UserHomeActivity extends AbsActivity {
@Override
public void onClick(View v) {
Constants.myIntoIndex = 2;
String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/RongYuQiang??touid=" + uid;
String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/RongYuQiang?touid=" + uid+"&isZh="+(WordUtil.isNewZh() ? "1" : "0");
WebViewActivity.forward(mContext, url, false);
}
});

View File

@ -470,8 +470,11 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
} else if ("home_page_banner_battle".equals(link)) {
RouteUtil.forwardBattlePass();
} else if ("home_page_banner_giftwall".equals(link)) {
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing()) {
mShowLoadingDialog.dismiss();
}
new GiftWallDialog(mContext, IMLoginManager.get(mContext).getUserInfo().getId() + "",
IMLoginManager.get(mContext).getUserInfo().getUserNicename(),null
IMLoginManager.get(mContext).getUserInfo().getUserNicename(), null
, false).setFullWindows(true).setTab2(true).showDialog();
} else {
gotoLive(link);