修改中英文

This commit is contained in:
18401019693 2023-10-16 16:30:54 +08:00
parent 8abf92d42c
commit d8a0427791
14 changed files with 104 additions and 57 deletions

View File

@ -13,6 +13,7 @@ public class AllServerNotifyEvent extends BaseModel {
//礼物名称 //礼物名称
@SerializedName("giftname") @SerializedName("giftname")
private String giftName; private String giftName;
//盲盒名称 //盲盒名称
@SerializedName("box_type_name") @SerializedName("box_type_name")
private String boxTypeName; private String boxTypeName;

View File

@ -91,6 +91,8 @@ public class SendBlindGiftEvent extends BaseModel {
private Object dressId; private Object dressId;
@SerializedName("dress_name") @SerializedName("dress_name")
private String dressName; private String dressName;
@SerializedName("dress_nameen")
private String dress_nameen;
@SerializedName("display_src") @SerializedName("display_src")
private Object displaySrc; private Object displaySrc;
@SerializedName("effect_src") @SerializedName("effect_src")
@ -101,6 +103,8 @@ public class SendBlindGiftEvent extends BaseModel {
private Object nobleDress; private Object nobleDress;
@SerializedName("dress_msg") @SerializedName("dress_msg")
private String dressMsg; private String dressMsg;
@SerializedName("dress_msg_en")
private String dressMsgEN;
@SerializedName("dress_colour") @SerializedName("dress_colour")
private String dressColour; private String dressColour;
@SerializedName("dress_threshold_value") @SerializedName("dress_threshold_value")
@ -139,6 +143,15 @@ public class SendBlindGiftEvent extends BaseModel {
return this; return this;
} }
public String getDress_nameen() {
return dress_nameen;
}
public SendBlindGiftEvent setDress_nameen(String dress_nameen) {
this.dress_nameen = dress_nameen;
return this;
}
public String getUid() { public String getUid() {
return uid; return uid;
} }
@ -545,6 +558,15 @@ public class SendBlindGiftEvent extends BaseModel {
return this; return this;
} }
public String getDressMsgEN() {
return dressMsgEN;
}
public SendBlindGiftEvent setDressMsgEN(String dressMsgEN) {
this.dressMsgEN = dressMsgEN;
return this;
}
public String getDressColour() { public String getDressColour() {
return dressColour; return dressColour;
} }

View File

@ -57,6 +57,8 @@ import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.HttpClient;
import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.IMRTCManager; import com.yunbao.common.manager.IMRTCManager;
@ -87,8 +89,6 @@ import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
import com.yunbao.live.dialog.RandomPkDialogFragment; import com.yunbao.live.dialog.RandomPkDialogFragment;
import com.yunbao.live.event.LinkMicTxMixStreamEvent; import com.yunbao.live.event.LinkMicTxMixStreamEvent;
import com.yunbao.live.event.LiveAudienceEvent; import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.live.interfaces.LiveFunctionClickListener; import com.yunbao.live.interfaces.LiveFunctionClickListener;
import com.yunbao.live.interfaces.LivePushListener; import com.yunbao.live.interfaces.LivePushListener;
import com.yunbao.live.music.LiveMusicDialogFragment; import com.yunbao.live.music.LiveMusicDialogFragment;
@ -1629,6 +1629,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (mLiveRyLinkMicPkPresenter != null) { if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime()); mLiveRyLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime());
} }
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.seisShowGif(true);
}
// if (mLiveRoomViewHolder != null) { // if (mLiveRoomViewHolder != null) {
// mLiveRoomViewHolder.hotAddVisibility(true); // mLiveRoomViewHolder.hotAddVisibility(true);
// } // }
@ -1690,12 +1693,14 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
break; break;
} }
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void GiftWallIlluminateEvent(GiftWallIlluminateEvent event) { public void GiftWallIlluminateEvent(GiftWallIlluminateEvent event) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setGiftWall(String.valueOf(event.getNewNumber()), String.valueOf(event.getMaxNumber())); mLiveRoomViewHolder.setGiftWall(String.valueOf(event.getNewNumber()), String.valueOf(event.getMaxNumber()));
} }
} }
/** /**
* 检查指定直播间连麦人数 * 检查指定直播间连麦人数
* *

View File

@ -1102,10 +1102,10 @@ public class LiveGiftPopup extends AbsDialogFragment {
} }
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) { if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(); SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en(), event.getDressName()); String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en(),WordUtil.isNewZh()? event.getDressName():event.getDress_nameen());
stringBuilder.append(boxBlindMsg); stringBuilder.append(boxBlindMsg);
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName()); int dressNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()? event.getDressName():event.getDress_nameen());
int dressNameSize = event.getDressName().length(); int dressNameSize =(WordUtil.isNewZh()? event.getDressName():event.getDress_nameen()).length();
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()); int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length(); int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())), stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),

View File

@ -2500,6 +2500,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
* 更新Pk分数 * 更新Pk分数
*/ */
public void upDataPkScore(JSONArray pkScores, String uid, int time) { public void upDataPkScore(JSONArray pkScores, String uid, int time) {
String userID1 = (String) imageGrade1.getTag(); String userID1 = (String) imageGrade1.getTag();
String userID2 = (String) imageGrade2.getTag(); String userID2 = (String) imageGrade2.getTag();
String userID4 = (String) imageGrade4.getTag(); String userID4 = (String) imageGrade4.getTag();

View File

@ -23,7 +23,6 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext; import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.bean.AiAutomaticSpeechModel; import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.FansMedalBean;
import com.yunbao.common.bean.FansModel; import com.yunbao.common.bean.FansModel;
import com.yunbao.common.bean.LinkMicUserBean; import com.yunbao.common.bean.LinkMicUserBean;
import com.yunbao.common.bean.LiveUserGiftBean; import com.yunbao.common.bean.LiveUserGiftBean;
@ -391,20 +390,30 @@ public class SocketRyClient {
} else if (action2 == 66) {//购买贵族 } else if (action2 == 66) {//购买贵族
buyVipByNotify(map); buyVipByNotify(map);
} else if (action2 == 88) { } else if (action2 == 88) {
JSONObject mCt = map.getJSONObject("ct");
String boxType = map.getString("box_type");
String boxTypeName = "";
if (TextUtils.equals(boxType, "1")) {
boxTypeName = WordUtil.isNewZh() ? "迷你盲盒" : "Mini blind box";
} else if (TextUtils.equals(boxType, "2")) {
boxTypeName = WordUtil.isNewZh() ? "典藏盲盒" : "Collection blind box";
} else {
boxTypeName = WordUtil.isNewZh() ? "PD盲盒" : "PD blind box";
}
AllServerNotifyEvent allServerNotifyEvent AllServerNotifyEvent allServerNotifyEvent
= new AllServerNotifyEvent() = new AllServerNotifyEvent()
.setBlindBoxId(map.getString("blind_box_id")) .setBlindBoxId(map.getString("blind_box_id"))
.setBoxType(map.getString("box_type")) .setBoxType(boxType)
.setBoxTypeName(map.getString("box_type_name")) .setBoxTypeName(map.getString(boxTypeName))
.setDressName(map.getString("dress_name")) .setDressName(WordUtil.isNewZh() ? map.getString("dress_name") : TextUtils.isEmpty(map.getString("dress_nameen")) ? map.getString("dress_name") : map.getString("dress_nameen"))
.setGiftNotification(map.getString("gift_notification")) .setGiftNotification(map.getString("gift_notification"))
.setGiftName(WordUtil.isNewZh()?map.getString("giftname"):map.getString("giftname_en")) .setGiftName(WordUtil.isNewZh() ? mCt.getString("giftname") : mCt.getString("giftnameen"))
.setUserNiceName(map.getString("uname")) .setUserNiceName(map.getString("uname"))
.setGiftIcon(map.getString("gifticon")) .setGiftIcon(map.getString("gifticon"))
.setAnchorName(map.getString("ancherName")) .setAnchorName(map.getString("ancherName"))
.setDisplaySrc(map.getString("display_src")); .setDisplaySrc(map.getString("display_src"));
Log.e("AllServerNotifyEvent", allServerNotifyEvent.toString()); Log.e("AllServerNotifyEvent", allServerNotifyEvent.toString());
Log.e("AllServerNotifyEvent", map.toJSONString());
Bus.get().post(new LiveAudienceEvent() Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.BLIND_BOX) .setType(LiveAudienceEvent.LiveAudienceType.BLIND_BOX)
.setAllServerNotifyEvent(allServerNotifyEvent)); .setAllServerNotifyEvent(allServerNotifyEvent));
@ -672,7 +681,7 @@ public class SocketRyClient {
break; break;
case Constants.WISH_LIST_PROGRESS: case Constants.WISH_LIST_PROGRESS:
StringBuffer conString = new StringBuffer(); StringBuffer conString = new StringBuffer();
conString.append(map.getString("msg")); conString.append(WordUtil.isNewZh() ? map.getString("msg") : map.getString("msg_en"));
EventBus.getDefault().post(new LiveAudienceEvent() EventBus.getDefault().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.WISH_LIST_PROGRESS) .setType(LiveAudienceEvent.LiveAudienceType.WISH_LIST_PROGRESS)
.setWishListProgress(new WishModel() .setWishListProgress(new WishModel()
@ -1117,7 +1126,7 @@ public class SocketRyClient {
chatBean.setGuardType(map.getInteger("guard_type")); chatBean.setGuardType(map.getInteger("guard_type"));
} }
if (CommonAppContext.lang.equals("chinese")) { if (WordUtil.isNewZh()) {
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName()); chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + receiveGiftBean.getGiftCount() + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftName());
} else { } else {
chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen()); chatBean.setContent(mContext.getString(R.string.live_send_gift_1) + " " + +receiveGiftBean.getGiftCount() + " " + mContext.getString(R.string.live_send_gift_2) + receiveGiftBean.getGiftnameen());

View File

@ -235,6 +235,7 @@ public class AllMsgTextRender {
} }
private void blind(SpannableStringBuilder spannableStringBuilder, TextView textView, AllServerNotifyEvent serverNotifyEvent, int giftNameIndex, int endName) { private void blind(SpannableStringBuilder spannableStringBuilder, TextView textView, AllServerNotifyEvent serverNotifyEvent, int giftNameIndex, int endName) {
if (giftNameIndex>0){
switch (Integer.parseInt(serverNotifyEvent.getBoxType())) { switch (Integer.parseInt(serverNotifyEvent.getBoxType())) {
case 1: case 1:
spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#336DF7")), spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#336DF7")),
@ -255,6 +256,8 @@ public class AllMsgTextRender {
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
break; break;
} }
}
textView.setText(spannableStringBuilder); textView.setText(spannableStringBuilder);
} }

View File

@ -18,6 +18,7 @@ import android.widget.TextView;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.bean.LiveReceiveGiftBean; import com.yunbao.live.bean.LiveReceiveGiftBean;
@ -153,7 +154,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
} }
if (TextUtils.isEmpty(mLastGiftKey) || !mLastGiftKey.equals(bean.getKey())) { if (TextUtils.isEmpty(mLastGiftKey) || !mLastGiftKey.equals(bean.getKey())) {
ImgLoader.display(mContext, bean.getGiftIcon(), mGiftIcon); ImgLoader.display(mContext, bean.getGiftIcon(), mGiftIcon);
mContent.setText(new LiveTextRender().renderGiftInfo2(bean.getGiftName())); mContent.setText(new LiveTextRender().renderGiftInfo2(WordUtil.isNewZh()?bean.getGiftName():bean.getGiftnameen()));
if (bean.getGiftCount() > 1) { if (bean.getGiftCount() > 1) {
mGiftGroupCount.setText("x" + bean.getGiftCount()); mGiftGroupCount.setText("x" + bean.getGiftCount());
mMulSign.setText(R.string.live_gift_send_lian_3); mMulSign.setText(R.string.live_gift_send_lian_3);

View File

@ -717,7 +717,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
RequestOptions options = new RequestOptions().skipMemoryCache(true);//配置 RequestOptions options = new RequestOptions().skipMemoryCache(true);//配置
Glide.with(mContext).asGif() Glide.with(mContext).asGif()
.apply(options)//应用配置 .apply(options)//应用配置
.load(R.mipmap.drpkend) .load(WordUtil.isNewZh()?R.mipmap.drpkend:R.mipmap.drpkend_en)
.listener(new RequestListener<GifDrawable>() { .listener(new RequestListener<GifDrawable>() {
@Override @Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<GifDrawable> target, boolean isFirstResource) { public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<GifDrawable> target, boolean isFirstResource) {
@ -1064,6 +1064,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
changePkTime(); changePkTime();
break; break;
case 1: case 1:
isShowGif = false;
dr_pk_end_gif.setVisibility(View.GONE); dr_pk_end_gif.setVisibility(View.GONE);
break; break;
} }
@ -4824,6 +4825,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
*/ */
private String userId2, userId3 = "", userId4; private String userId2, userId3 = "", userId4;
public void seisShowGif(boolean isShowGif) {
this.isShowGif = isShowGif;
}
public void upDataPkScore(JSONArray pkScores, int time) { public void upDataPkScore(JSONArray pkScores, int time) {
isShowGif = true; isShowGif = true;
if (detailsView == null) { if (detailsView == null) {

View File

@ -201,7 +201,7 @@ public class LuckLiveGiftViewHolder extends AbsViewHolder {
} }
if (TextUtils.isEmpty(mLastGiftKey) || !mLastGiftKey.equals(bean.getKey())) { if (TextUtils.isEmpty(mLastGiftKey) || !mLastGiftKey.equals(bean.getKey())) {
ImgLoader.display(mContext, bean.getGiftIcon(), mGiftIcon); ImgLoader.display(mContext, bean.getGiftIcon(), mGiftIcon);
mContent.setText(new LiveTextRender().renderGiftInfo2(bean.getGiftName())); mContent.setText(new LiveTextRender().renderGiftInfo2(WordUtil.isNewZh()?bean.getGiftName():bean.getGiftnameen()));
if (bean.getGiftCount() > 1) { if (bean.getGiftCount() > 1) {
mGiftGroupCount.setText("x" + bean.getGiftCount()); mGiftGroupCount.setText("x" + bean.getGiftCount());
mMulSign.setText(R.string.live_gift_send_lian_3); mMulSign.setText(R.string.live_gift_send_lian_3);

View File

@ -1199,7 +1199,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
liveChatBean.setUserNiceName(event.getUserNiceName()); liveChatBean.setUserNiceName(event.getUserNiceName());
liveChatBean.setType(LiveChatBean.BLIND_BOX); liveChatBean.setType(LiveChatBean.BLIND_BOX);
liveChatBean.setGiftName(event.getDressName()); liveChatBean.setGiftName(event.getDressName());
liveChatBean.setContent(event.getDressMsg()); liveChatBean.setContent(WordUtil.isNewZh()?event.getDressMsg():event.getDressMsgEN());
} }
//插入盲盒礼物消息 //插入盲盒礼物消息
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX); bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);

View File

@ -2398,8 +2398,8 @@
<pl.droidsonroids.gif.GifImageView <pl.droidsonroids.gif.GifImageView
android:id="@+id/dr_pk_end_gif" android:id="@+id/dr_pk_end_gif"
android:layout_width="140dp" android:layout_width="match_parent"
android:layout_height="140dp" android:layout_height="200dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="false" android:layout_centerVertical="false"
android:layout_marginTop="160dp" android:layout_marginTop="160dp"

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB