修改中英文

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")
private String giftName;
//盲盒名称
@SerializedName("box_type_name")
private String boxTypeName;

View File

@ -91,6 +91,8 @@ public class SendBlindGiftEvent extends BaseModel {
private Object dressId;
@SerializedName("dress_name")
private String dressName;
@SerializedName("dress_nameen")
private String dress_nameen;
@SerializedName("display_src")
private Object displaySrc;
@SerializedName("effect_src")
@ -101,6 +103,8 @@ public class SendBlindGiftEvent extends BaseModel {
private Object nobleDress;
@SerializedName("dress_msg")
private String dressMsg;
@SerializedName("dress_msg_en")
private String dressMsgEN;
@SerializedName("dress_colour")
private String dressColour;
@SerializedName("dress_threshold_value")
@ -139,6 +143,15 @@ public class SendBlindGiftEvent extends BaseModel {
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() {
return uid;
}
@ -545,6 +558,15 @@ public class SendBlindGiftEvent extends BaseModel {
return this;
}
public String getDressMsgEN() {
return dressMsgEN;
}
public SendBlindGiftEvent setDressMsgEN(String dressMsgEN) {
this.dressMsgEN = dressMsgEN;
return this;
}
public String getDressColour() {
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.HttpCallback;
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.manager.IMLoginManager;
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.event.LinkMicTxMixStreamEvent;
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.LivePushListener;
import com.yunbao.live.music.LiveMusicDialogFragment;
@ -1629,6 +1629,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime());
}
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.seisShowGif(true);
}
// if (mLiveRoomViewHolder != null) {
// mLiveRoomViewHolder.hotAddVisibility(true);
// }
@ -1690,12 +1693,14 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
break;
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void GiftWallIlluminateEvent(GiftWallIlluminateEvent event) {
if (mLiveRoomViewHolder != null) {
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())) {
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);
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
int dressNameSize = event.getDressName().length();
int dressNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()? event.getDressName():event.getDress_nameen());
int dressNameSize =(WordUtil.isNewZh()? event.getDressName():event.getDress_nameen()).length();
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),

View File

@ -2500,6 +2500,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
* 更新Pk分数
*/
public void upDataPkScore(JSONArray pkScores, String uid, int time) {
String userID1 = (String) imageGrade1.getTag();
String userID2 = (String) imageGrade2.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.Constants;
import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.FansMedalBean;
import com.yunbao.common.bean.FansModel;
import com.yunbao.common.bean.LinkMicUserBean;
import com.yunbao.common.bean.LiveUserGiftBean;
@ -391,20 +390,30 @@ public class SocketRyClient {
} else if (action2 == 66) {//购买贵族
buyVipByNotify(map);
} 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
= new AllServerNotifyEvent()
.setBlindBoxId(map.getString("blind_box_id"))
.setBoxType(map.getString("box_type"))
.setBoxTypeName(map.getString("box_type_name"))
.setDressName(map.getString("dress_name"))
.setBoxType(boxType)
.setBoxTypeName(map.getString(boxTypeName))
.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"))
.setGiftName(WordUtil.isNewZh()?map.getString("giftname"):map.getString("giftname_en"))
.setGiftName(WordUtil.isNewZh() ? mCt.getString("giftname") : mCt.getString("giftnameen"))
.setUserNiceName(map.getString("uname"))
.setGiftIcon(map.getString("gifticon"))
.setAnchorName(map.getString("ancherName"))
.setDisplaySrc(map.getString("display_src"));
Log.e("AllServerNotifyEvent", allServerNotifyEvent.toString());
Log.e("AllServerNotifyEvent", map.toJSONString());
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.BLIND_BOX)
.setAllServerNotifyEvent(allServerNotifyEvent));
@ -672,7 +681,7 @@ public class SocketRyClient {
break;
case Constants.WISH_LIST_PROGRESS:
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()
.setType(LiveAudienceEvent.LiveAudienceType.WISH_LIST_PROGRESS)
.setWishListProgress(new WishModel()
@ -1117,7 +1126,7 @@ public class SocketRyClient {
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());
} else {
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) {
if (giftNameIndex>0){
switch (Integer.parseInt(serverNotifyEvent.getBoxType())) {
case 1:
spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#336DF7")),
@ -255,6 +256,8 @@ public class AllMsgTextRender {
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
break;
}
}
textView.setText(spannableStringBuilder);
}

View File

@ -18,6 +18,7 @@ import android.widget.TextView;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.live.R;
import com.yunbao.live.bean.LiveReceiveGiftBean;
@ -153,7 +154,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
}
if (TextUtils.isEmpty(mLastGiftKey) || !mLastGiftKey.equals(bean.getKey())) {
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) {
mGiftGroupCount.setText("x" + bean.getGiftCount());
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);//配置
Glide.with(mContext).asGif()
.apply(options)//应用配置
.load(R.mipmap.drpkend)
.load(WordUtil.isNewZh()?R.mipmap.drpkend:R.mipmap.drpkend_en)
.listener(new RequestListener<GifDrawable>() {
@Override
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();
break;
case 1:
isShowGif = false;
dr_pk_end_gif.setVisibility(View.GONE);
break;
}
@ -4824,6 +4825,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
*/
private String userId2, userId3 = "", userId4;
public void seisShowGif(boolean isShowGif) {
this.isShowGif = isShowGif;
}
public void upDataPkScore(JSONArray pkScores, int time) {
isShowGif = true;
if (detailsView == null) {

View File

@ -201,7 +201,7 @@ public class LuckLiveGiftViewHolder extends AbsViewHolder {
}
if (TextUtils.isEmpty(mLastGiftKey) || !mLastGiftKey.equals(bean.getKey())) {
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) {
mGiftGroupCount.setText("x" + bean.getGiftCount());
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.setType(LiveChatBean.BLIND_BOX);
liveChatBean.setGiftName(event.getDressName());
liveChatBean.setContent(event.getDressMsg());
liveChatBean.setContent(WordUtil.isNewZh()?event.getDressMsg():event.getDressMsgEN());
}
//插入盲盒礼物消息
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);

View File

@ -2398,8 +2398,8 @@
<pl.droidsonroids.gif.GifImageView
android:id="@+id/dr_pk_end_gif"
android:layout_width="140dp"
android:layout_height="140dp"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="false"
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