调整中英文

调整开播频道接口
This commit is contained in:
zlzw 2023-09-02 11:16:01 +08:00
parent 2e907bc1ed
commit 57bda40a82
36 changed files with 274 additions and 86 deletions

View File

@ -1,6 +1,7 @@
package com.yunbao.common.bean;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
/**
* Created by cxf on 2018/9/25.
@ -16,6 +17,8 @@ public class LiveClassBean {
private boolean checked;
private String chinese;
private String english;
@SerializedName("channel_show")
private int channel_show;
public String getChinese() {
return chinese;
@ -92,4 +95,12 @@ public class LiveClassBean {
public void setChecked(boolean checked) {
this.checked = checked;
}
public int getChannel_show() {
return channel_show;
}
public void setChannel_show(int channel_show) {
this.channel_show = channel_show;
}
}

View File

@ -134,7 +134,11 @@ public class MicStatusManager {
new Handler(Looper.getMainLooper()).post(new Runnable() {
public void run() {
MicStatusManager.getInstance().clear();
ToastUtil.show("已成功退出語音連麥");
if(WordUtil.isNewZh()) {
ToastUtil.show("已成功退出語音連麥");
}else{
ToastUtil.show("You have successfully exited the voice connection");
}
}
});
}
@ -193,7 +197,11 @@ public class MicStatusManager {
* 显示退出连麦状态对话框
*/
public void showDownMicDialog(Context context) {
DialogUitl.showSimpleDialog(context, "當前正在連麥中", new DialogUitl.SimpleCallback() {
String content="當前正在連麥中";
if(!WordUtil.isNewZh()){
content="Currently connecting the wheat";
}
DialogUitl.showSimpleDialog(context, content, new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
// downMic(); //不做下麦跳转

View File

@ -1,5 +1,6 @@
package com.yunbao.common.utils;
import android.content.res.Configuration;
import android.content.res.Resources;
import com.yunbao.common.CommonAppContext;
@ -31,8 +32,20 @@ public class WordUtil {
String language = locale.getLanguage();
return language.endsWith("zh");
}
public static boolean isNewZh(){
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
public static boolean isNewZh() {
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
}
public static String getNewString(int res) {
Configuration config = new Configuration();
Configuration tmp = sResources.getConfiguration();
config.setToDefaults();
config.locale = IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage();
sResources.updateConfiguration(config, sResources.getDisplayMetrics());
String str = sResources.getString(res);
sResources.updateConfiguration(tmp, sResources.getDisplayMetrics());
return str;
}
/**

View File

@ -15,7 +15,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="主播:"
android:text="@string/live_mic_anchor_to_user_dialog"
android:textColor="#161616"
android:textStyle="bold"
android:textSize="16sp"

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="refresh_header_pulling">Drop down to refresh</string>
<string name="refresh_header_refreshing">Refreshing</string>
<string name="refresh_header_pulling">Pull down to refresh</string>
<string name="refresh_header_refreshing">Loading...</string>
<string name="refresh_header_loading">Loading</string>
<string name="refresh_header_release">Release refresh now</string>
<string name="refresh_header_release">Release to refresh</string>
<string name="refresh_header_finish">Refresh finish</string>
<string name="refresh_header_failed">refresh failed</string>
<string name="refresh_header_update">M-d HH:mm</string>
<string name="refresh_footer_pulling">Pull up to load more</string>
<string name="refresh_footer_release">Release load now</string>
<string name="refresh_footer_loading">Loading</string>
<string name="refresh_footer_refreshing">Refreshing</string>
<string name="refresh_footer_refreshing">Loading...</string>
<string name="refresh_footer_finish">Load complete</string>
<string name="refresh_footer_failed">Failed to load</string>
<string name="edit_one_1">Are you sure to use the data?</string>
@ -181,7 +181,7 @@
<string name="guard_tip_2">You are the current anchor\'s annual guardian \ n the guardian date expires</string>
<string name="guard_gift_tip">Special gift for annual guard</string>
<string name="guard_no_data_2">You haven\'t guarded</string>
<string name="guard_buy_tip">您為當前主播的月守護\n無法開通周守護</string>
<string name="guard_buy_tip">You are the monthly guardian of the current anchor\nUnable to enable weekly guard</string>
<string name="guard_buy_tip_2">You are the monthly guard of the current anchor. Opening the annual guard will cover your monthly guard time. Do you want to open it?</string>
<string name="guard_buy_tip_3">You will spend%1$s%2$s to open%3$s for the anchor</string>
<!-- <string name="guard_name_1">Guardian of the 7 day</string>-->
@ -832,14 +832,14 @@
<string name="live_hot_give">Heat addition</string>
<string name="live_hot_time">Hot &#38; Time</string>
<string name="live_hot_ruletext1"> 熱度可以給主播的房間增加曝光度,熱度越高的直播間,在首頁的排名也越靠前,從而帶來更多的進房用戶,幫助主播在一段時間內迅速提高房間熱度,送出之後立即生效。</string>
<string name="live_hot_ruletext2">熱度卡如何獲得?</string>
<string name="live_hot_ruletext3">1、周星榜主播冠軍的第一名用戶每週可自動獲得;</string>
<string name="live_hot_ruletext4">2、通過參與官方活動,具體活動可留意官方消息。</string>
<string name="live_hot_ruletext21">熱度卡如何使用?</string>
<string name="live_hot_ruletext22">前往「個人中心」-「我的包裹」中,即可使用熱度卡。</string>
<string name="live_hot_ruletext31">熱度卡生效多久?</string>
<string name="live_hot_ruletext32">對指定主播使用熱度卡後將會立即生效效果時長為24小時不管主播是否在線熱度時長都將會持續減少</string>
<string name="live_hot_ruletext1">The popularity can increase the exposure to the anchor\'s room. The higher the live broadcast room, the more popular on the homepage, which will bring more users in the house and help the anchor to quickly increase the room heat in a period of time. Immediately after the delivery Effective.</string>
<string name="live_hot_ruletext2">How to get the heat card?</string>
<string name="live_hot_ruletext3">1. The first user of Zhou Xingbang\'s anchor champion can automatically get it every week;</string>
<string name="live_hot_ruletext4">2. By participating in the official activities, the official news can be paid attention to.</string>
<string name="live_hot_ruletext21">How to use the heat card?</string>
<string name="live_hot_ruletext22">Go to the \"Personal Center\"-\"My Package\" to use the heat card.</string>
<string name="live_hot_ruletext31">How long does the heat card take effect?</string>
<string name="live_hot_ruletext32">After using the hot card for the designated anchor, it will take effect immediately. The effect time is 24 hours. Regardless of whether the anchor is online, the heat time will continue to decrease</string>
<string name="welcome_pd">Rewards coming!</string>
<string name="welcome_pd_tip">Receive free
Limited ride And limited avatar frame</string>
@ -1312,6 +1312,9 @@ Limited ride And limited avatar frame</string>
<string name="cancel_ca">cancel</string>
<string name="settings_ser">settings</string>
<string name="too_many_gifts">Too many gifts</string>
<string name="list_for_lianmai">Current</string>
<string name="user_apply_for_lianmai">Apply for list</string>
<string name="live_mic_anchor_to_user_dialog">Anchor:</string>
</resources>

View File

@ -1308,4 +1308,7 @@
<string name="cancel_ca">不再設置</string>
<string name="settings_ser">去設置</string>
<string name="too_many_gifts">重複添加禮物</string>
<string name="list_for_lianmai">當前連麥</string>
<string name="user_apply_for_lianmai">連麥申請</string>
<string name="live_mic_anchor_to_user_dialog">主播:</string>
</resources>

View File

@ -1307,4 +1307,7 @@
<string name="cancel_ca">不再設置</string>
<string name="settings_ser">去設置</string>
<string name="too_many_gifts">重複添加禮物</string>
<string name="list_for_lianmai">當前連麥</string>
<string name="user_apply_for_lianmai">連麥申請</string>
<string name="live_mic_anchor_to_user_dialog">主播:</string>
</resources>

View File

@ -1307,6 +1307,9 @@
<string name="cancel_ca">不再設置</string>
<string name="settings_ser">去設置</string>
<string name="too_many_gifts">重複添加禮物</string>
<string name="list_for_lianmai">當前連麥</string>
<string name="user_apply_for_lianmai">連麥申請</string>
<string name="live_mic_anchor_to_user_dialog">主播:</string>
</resources>

View File

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="refresh_header_pulling">Drop down to refresh</string>
<string name="refresh_header_refreshing">Refreshing</string>
<string name="refresh_header_pulling">Pull down to refresh</string>
<string name="refresh_header_refreshing">Loading...</string>
<string name="refresh_header_loading">Loading</string>
<string name="refresh_header_release">Release refresh now</string>
<string name="refresh_header_release">Release to refresh</string>
<string name="refresh_header_finish">Refresh finish</string>
<string name="refresh_header_failed">refresh failed</string>
<string name="refresh_header_update">M-d HH:mm</string>
<string name="refresh_footer_pulling">Pull up to load more</string>
<string name="refresh_footer_release">Release load now</string>
<string name="refresh_footer_loading">Loading</string>
<string name="refresh_footer_refreshing">Refreshing</string>
<string name="refresh_footer_refreshing">Loading...</string>
<string name="refresh_footer_finish">Load complete</string>
<string name="refresh_footer_failed">Failed to load</string>
<string name="edit_one_1">Are you sure to use the data?</string>
@ -181,7 +181,7 @@
<string name="guard_tip_2">You are the current anchor\'s annual guardian \ n the guardian date expires</string>
<string name="guard_gift_tip">Special gift for annual guard</string>
<string name="guard_no_data_2">You haven\'t guarded</string>
<string name="guard_buy_tip">您為當前主播的月守護\n無法開通周守護</string>
<string name="guard_buy_tip">You are the monthly guardian of the current anchor\nUnable to enable weekly guard</string>
<string name="guard_buy_tip_2">You are the monthly guard of the current anchor. Opening the annual guard will cover your monthly guard time. Do you want to open it?</string>
<string name="guard_buy_tip_3">You will spend%1$s%2$s to open%3$s for the anchor</string>
<!-- <string name="guard_name_1">Guardian of the 7 day</string>-->
@ -832,14 +832,14 @@
<string name="live_hot_give">Heat addition</string>
<string name="live_hot_time">Hot &#38; Time</string>
<string name="live_hot_ruletext1"> 熱度可以給主播的房間增加曝光度,熱度越高的直播間,在首頁的排名也越靠前,從而帶來更多的進房用戶,幫助主播在一段時間內迅速提高房間熱度,送出之後立即生效。</string>
<string name="live_hot_ruletext2">熱度卡如何獲得?</string>
<string name="live_hot_ruletext3">1、周星榜主播冠軍的第一名用戶每週可自動獲得;</string>
<string name="live_hot_ruletext4">2、通過參與官方活動,具體活動可留意官方消息。</string>
<string name="live_hot_ruletext21">熱度卡如何使用?</string>
<string name="live_hot_ruletext22">前往「個人中心」-「我的包裹」中,即可使用熱度卡。</string>
<string name="live_hot_ruletext31">熱度卡生效多久?</string>
<string name="live_hot_ruletext32">對指定主播使用熱度卡後將會立即生效效果時長為24小時不管主播是否在線熱度時長都將會持續減少</string>
<string name="live_hot_ruletext1">The popularity can increase the exposure to the anchor\'s room. The higher the live broadcast room, the more popular on the homepage, which will bring more users in the house and help the anchor to quickly increase the room heat in a period of time. Immediately after the delivery Effective.</string>
<string name="live_hot_ruletext2">How to get the heat card?</string>
<string name="live_hot_ruletext3">1. The first user of Zhou Xingbang\'s anchor champion can automatically get it every week;</string>
<string name="live_hot_ruletext4">2. By participating in the official activities, the official news can be paid attention to.</string>
<string name="live_hot_ruletext21">How to use the heat card?</string>
<string name="live_hot_ruletext22">Go to the \"Personal Center\"-\"My Package\" to use the heat card.</string>
<string name="live_hot_ruletext31">How long does the heat card take effect?</string>
<string name="live_hot_ruletext32">After using the hot card for the designated anchor, it will take effect immediately. The effect time is 24 hours. Regardless of whether the anchor is online, the heat time will continue to decrease</string>
<string name="welcome_pd">Rewards coming!</string>
<string name="welcome_pd_tip">Receive free
Limited ride And limited avatar frame</string>
@ -1313,5 +1313,8 @@ Limited ride And limited avatar frame</string>
<string name="cancel_ca">cancel</string>
<string name="settings_ser">settings</string>
<string name="too_many_gifts">Too many gifts</string>
<string name="list_for_lianmai">Current</string>
<string name="user_apply_for_lianmai">Apply for list</string>
<string name="live_mic_anchor_to_user_dialog">Anchor:</string>
</resources>

View File

@ -1133,7 +1133,7 @@ public class LiveAudienceActivity extends LiveActivity {
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveUserMoreDialogFragment");
LiveMicUserDialogFragment.activity = ((LiveAudienceActivity) mContext);
} else {
ToastUtil.show(R.string.no_mic_opn);
ToastUtil.show(mContext.getString(R.string.no_mic_opn));
}
}
});

View File

@ -29,6 +29,7 @@ import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.common.bean.LiveRoomTypeBean;
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
@ -208,7 +209,7 @@ public class LiveTRTCAnchorActivity extends TRTCBaseActivity {
*/
private void createRoom() {
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
String title = mEditTitle.getText().toString().trim();

View File

@ -18,6 +18,7 @@ import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.common.http.LiveHttpUtil;
@ -81,10 +82,17 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
public HeadViewHolder(@NonNull View itemView) {
super(itemView);
}
public void setData(RandomPkUserBean bean, int position) {
if (!WordUtil.isNewZh() && itemView.findViewById(R.id.text1)!=null) {
((TextView) itemView.findViewById(R.id.text1)).setText("number");
((TextView) itemView.findViewById(R.id.text2)).setText("user");
((TextView) itemView.findViewById(R.id.text3)).setText("status");
((TextView) itemView.findViewById(R.id.text4)).setText("Controls");
((TextView) itemView.findViewById(R.id.text5)).setText("follow");
}
}
}
@ -115,7 +123,7 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
}
if (freePkNum == 0 && mDrPkNum == -1) {
ToastUtil.show(R.string.free_pk_num_null);
// return;
// return;
}
LiveHttpUtil.getMicList(LiveRyAnchorActivity.mLiveUid, 0, new com.yunbao.common.http.HttpCallback() {
@ -125,7 +133,11 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
//非0认为未开通连麦权限
if (code != 0) {
if (mDrPkNum == -1) {
ToastUtil.show("邀请 " + bean.getUserNiceName() + " 发送成功");
if (WordUtil.isNewZh()) {
ToastUtil.show("邀请 " + bean.getUserNiceName() + " 发送成功");
} else {
ToastUtil.show("invite " + bean.getUserNiceName() + " successful");
}
mOnItemClickListener.onItemClick(bean, -1);
((LiveRyAnchorActivity) mContext).linkMicAnchorApply(bean.getId(), bean.getId(),
((LiveRyAnchorActivity) mContext).buildLinkMicJSON().toString()
@ -133,13 +145,21 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
return;
}
if (mDrPkNum <= 0) {
ToastUtil.show("多人次數已用完");
if (WordUtil.isNewZh()) {
ToastUtil.show("多人次數已用完");
} else {
ToastUtil.show("Multiple times have been used up");
}
return;
}
((LiveRyAnchorActivity) mContext).linkDrMicAnchorApply(bean.getId(), bean.getId());
} else {
ToastUtil.show("請先關閉語言連麥");
if (WordUtil.isNewZh()) {
ToastUtil.show("請先關閉語音連麥");
} else {
ToastUtil.show("Please disable the voice connection first");
}
}
}
});
@ -192,9 +212,15 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
if (bean.isPk()) {
mStatus.setText("PK中");
ImgLoader.display(mContext, R.mipmap.ic_random_pk_pk, mPkStatus);
if (!WordUtil.isNewZh()) {
mStatus.setText("PK");
}
} else {
mStatus.setText("空闲");
ImgLoader.display(mContext, R.mipmap.ic_random_pk_pk_unselect, mPkStatus);
if (!WordUtil.isNewZh()) {
mStatus.setText("free");
}
}
if (bean.isAttention()) {
ImgLoader.display(mContext, R.mipmap.ic_random_pk_like, mFollow);

View File

@ -137,6 +137,9 @@ public class GuardAdapter extends RefreshAdapter<GuardUserBean> {
mSex = (ImageView) itemView.findViewById(R.id.sex);
mLevel = (ImageView) itemView.findViewById(R.id.level);
mVotes = (TextView) itemView.findViewById(R.id.votes);
if(!WordUtil.isNewZh()) {
((TextView) itemView.findViewById(R.id.votesTitle)).setText("Contribution");
}
}
void setData(GuardUserBean bean) {

View File

@ -27,6 +27,7 @@ import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.WordsTypeUtil;
import com.yunbao.live.R;
import com.yunbao.live.adapter.FreePkRecyclerAdapter;
@ -128,8 +129,15 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl
}
});
if(!WordUtil.isNewZh()){
mPkNumText.setText("Free PK remaining number");
((TextView)findViewById(R.id.tmp_text2)).setText("Updated daily at 6am");
}
if (mDrPkNum != -1) {
mPkNumText.setText("多人PK剩余次數");
if(!WordUtil.isNewZh()){
mPkNumText.setText("multi-user PK remaining number");
}
}
initRecycler();
}
@ -183,6 +191,10 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl
searchTag.setText("主播搜索");
listTag.setTag(TAB_STATUS_FOLLOW);
listTag.setText("關注列表");
if (!WordUtil.isNewZh()) {
searchTag.setText("search");
listTag.setText("follow list");
}
tabLayout.addTab(searchTag);
tabLayout.addTab(listTag);
tabStatus = TAB_STATUS_SEARCH;

View File

@ -27,6 +27,7 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.ResponseModel;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.adapter.AnchorUserMicInfoAdapter;
@ -151,7 +152,17 @@ public class LiveMicAnchorDialogFragment extends AbsDialogFragment implements Vi
mOpenMicBtn = mRootView.findViewById(R.id.open_mic);
mNoMoreDesc = mRootView.findViewById(R.id.no_more_desc);
Tips = bundle.getString("By");
requestMicBtn = mRootView.findViewById(R.id.guard_btn);
mDisconnectMic = mRootView.findViewById(R.id.apply_btn);
inviteMicBtn = mRootView.findViewById(R.id.fans_btn);
if (!WordUtil.isNewZh()) {
listMicbtn.setText("connection");
requestMicBtn.setText("apply list");
mDisconnectMic.setText("apply");
inviteMicBtn.setText("invite");
((TextView) mRootView.findViewById(R.id.title)).setText("Open the voice permission");
((TextView) mRootView.findViewById(R.id.des)).setText("fan level 5 or above can apply for voice");
}
listMicbtn.setOnClickListener(view -> {
if (!MicStatusManager.getInstance().isAnchorOpenRoom()) {
return;
@ -161,7 +172,6 @@ public class LiveMicAnchorDialogFragment extends AbsDialogFragment implements Vi
type = "guanzhong";
mRefreshView.initData();
});
requestMicBtn = mRootView.findViewById(R.id.guard_btn);
requestMicBtn.setOnClickListener(view -> {
if (!MicStatusManager.getInstance().isAnchorOpenRoom()) {
return;
@ -171,7 +181,7 @@ public class LiveMicAnchorDialogFragment extends AbsDialogFragment implements Vi
type = "guard";
mRefreshView.initData();
});
inviteMicBtn = mRootView.findViewById(R.id.fans_btn);
inviteMicBtn.setVisibility(View.VISIBLE);
inviteMicBtn.setOnClickListener(view -> {
if (!MicStatusManager.getInstance().isAnchorOpenRoom()) {
@ -202,13 +212,13 @@ public class LiveMicAnchorDialogFragment extends AbsDialogFragment implements Vi
mRefreshView = mRootView.findViewById(R.id.refreshView);
view_no = mRootView.findViewById(R.id.view_no);
mDisconnectMic = mRootView.findViewById(R.id.apply_btn);
mDisconnectMic.setBackgroundResource(R.drawable.background_eb6877);
mDisconnectMic.setText(R.string.close_mic);
mDisconnectMic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DialogUitl.showSimpleDialog(mContext, "是否確認關閉語音連麥", new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh()?"是否確認關閉語音連麥":"Whether to disable the voice", new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
MicStatusManager.getInstance().closeMic(mContext);
@ -340,12 +350,18 @@ public class LiveMicAnchorDialogFragment extends AbsDialogFragment implements Vi
requestMicBtn.setTextColor(Color.parseColor("#fff6f7fb"));
inviteMicBtn.setTextColor(Color.parseColor("#ff646464"));
mNoMoreDesc.setText("當前沒有人申請");
if (!WordUtil.isNewZh()) {
mNoMoreDesc.setText("No one has applied at the moment");
}
type = "guard";
} else if (Tips.equals("3")) {
listMicbtn.setTextColor(Color.parseColor("#ff646464"));
requestMicBtn.setTextColor(Color.parseColor("#ff646464"));
inviteMicBtn.setTextColor(Color.parseColor("#fff6f7fb"));
mNoMoreDesc.setText("當前沒有觀眾");
if (!WordUtil.isNewZh()) {
mNoMoreDesc.setText("No audience at the moment");
}
type = "fans";
}
}

View File

@ -28,6 +28,7 @@ import com.yunbao.common.http.HttpClient;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveAudienceActivity;
@ -150,13 +151,13 @@ public class LiveMicUserDialogFragment extends AbsDialogFragment implements View
apply_btn = mRootView.findViewById(R.id.apply_btn);
if (MicStatusManager.getInstance().getMicStatus() == MicStatusManager.MIC_TYPE_DEFAULT) {
apply_btn.setBackgroundResource(R.drawable.background_0fdab8);
apply_btn.setText(R.string.apply_for_lianmai);
apply_btn.setText(mContext.getString(R.string.apply_for_lianmai));
} else if (MicStatusManager.getInstance().getMicStatus() == MicStatusManager.MIC_TYPE_REQUEST) {
apply_btn.setBackgroundResource(R.drawable.background_00a0e9);
apply_btn.setText(R.string.cancel_application);
apply_btn.setText(mContext.getString(R.string.cancel_application));
} else if (MicStatusManager.getInstance().getMicStatus() == MicStatusManager.MIC_TYPE_OPEN) {
apply_btn.setBackgroundResource(R.drawable.background_eb6877);
apply_btn.setText(R.string.quit_mic);
apply_btn.setText(mContext.getString(R.string.quit_mic));
}
apply_btn.setOnClickListener(new View.OnClickListener() {
@Override
@ -277,8 +278,12 @@ public class LiveMicUserDialogFragment extends AbsDialogFragment implements View
});
} else if (MicStatusManager.getInstance().getMicStatus() == MicStatusManager.MIC_TYPE_OPEN) {
String content="連麥中,退出將斷開語音連麥!";
if(!WordUtil.isNewZh()){
content="Connect, exit will disconnect voice connect!";
}
//退出连麦
DialogUitl.showSimpleDialog(mContext, "連麥中,退出將斷開語音連麥!", new DialogUitl.SimpleCallback() {
DialogUitl.showSimpleDialog(mContext,content , new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
Log.e("ry", "退出112");

View File

@ -64,13 +64,7 @@ public class LiveNewRoomClassDialogFragment extends AbsDialogFragment implements
if (configBean != null) {
List<LiveClassBean> list1 = configBean.getLiveClass();
for (int i = 0; i < list1.size(); i++) {
if (!list1.get(i).getName().equals("New") &&
!list1.get(i).getName().equals("新秀") &&
!list1.get(i).getName().equals("熱門") &&
!list1.get(i).getName().equals("Hot") &&
!list1.get(i).getName().equals("男神") &&
!list1.get(i).getName().equals("Mr.Right")
) {
if(list1.get(i).getChannel_show()==1){
list.add(list1.get(i));
}
}

View File

@ -19,6 +19,7 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.common.manager.RandomPkManager;
import com.yunbao.live.activity.LiveRyAnchorActivity;
@ -223,7 +224,13 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
if (data.getCode() == 0) {
setSwitchBtn(!(boolean) mRandomPkSwitch.getTag());
} else if (data.getCode() == 500) {
DialogUitl.showSimpleDialog(mContext, "您因拒绝随机PK被限制关闭中", "随机PK可打开时间" + data.getMsg(), false, new DialogUitl.SimpleCallback() {
String title="您因拒絕隨機PK被限制關閉中";
String content="隨機PK可打開時間";
if(!WordUtil.isNewZh()){
title="You are restricted for refusing random PK";
content="Random PK can open time:";
}
DialogUitl.showSimpleDialog(mContext,title , content + data.getMsg(), false, new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
dialog.dismiss();
@ -248,7 +255,12 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
*/
private void randomPk() {
if (mRandomPkSwitch.getTag() == null || !(boolean) mRandomPkSwitch.getTag()) {
ToastUtil.show("未开启随机PK开关");
if (WordUtil.isNewZh()) {
ToastUtil.show("未開啟隨機PK開關");
} else {
ToastUtil.show("The random PK switch is not enabled");
}
return;
}
if ((mPkBtn.getTag() != null && (boolean) mPkBtn.getTag()) || RandomPkManager.getInstance().isRequestPk()) {
@ -267,7 +279,11 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
mPkBtn.setTag(true);
}
} else {
ToastUtil.show("請先關閉語言連麥");
if (WordUtil.isNewZh()) {
ToastUtil.show("請先關閉語音連麥");
} else {
ToastUtil.show("Please disable the voice connection first");
}
}
}
});

View File

@ -11,6 +11,7 @@ import com.yunbao.common.bean.UserBean;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.common.http.LiveHttpUtil;
@ -168,7 +169,7 @@ public class SocketRyChatUtil {
.param("medal_name", u.getMedalName())
.param("medal_level", u.getMedalLevel())
.param("good_num", u.getGoodnum())
.param("ct", CommonAppContext.sInstance.getBaseContext().getString(R.string.live_lighted));
.param("ct", WordUtil.getNewString(R.string.live_lighted));
msg.create();
String targetId = "g" + mLiveUid;
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;

View File

@ -46,6 +46,7 @@ import com.yunbao.common.manager.RandomPkManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.activity.LiveRyAnchorActivity;
@ -100,7 +101,11 @@ public class SocketRyClient {
@Override
public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) {
Log.i("tx", "加入" + "失败" + coreErrorCode);
ToastUtil.show("網絡不佳無法連接,請重新進入");
if(WordUtil.isNewZh()) {
ToastUtil.show("網絡不佳無法連接,請重新進入");
}else{
ToastUtil.show("The network is not connected, please re-enter");
}
}
});
@ -194,13 +199,21 @@ public class SocketRyClient {
.setObject(JSONArray.parseArray(mic_data.getJSONArray("userlist").toString(), LinkMicUserBean.class))
);
} else if (actions == 6) {
ToastUtil.show("主播已關閉當前語音連麥功能");
if(WordUtil.isNewZh()) {
ToastUtil.show("主播已關閉當前語音連麥功能");
}else{
ToastUtil.show("The host has disabled the voice connection function");
}
EventBus.getDefault().post("endMic");
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LINK_MIC_CLOSE)
.setObject(map.toJavaObject(LinkMicUserBean.class)));
} else if (actions == 8) {
ToastUtil.show("您已被移出多人語音連麥");
if(WordUtil.isNewZh()) {
ToastUtil.show("您已被移出多人語音連麥");
}else {
ToastUtil.show("You have been removed from Multi-Voice Connection");
}
EventBus.getDefault().post("endMic");
} else if (actions == 3) {
Bus.get().post(new LiveAudienceEvent()
@ -1315,7 +1328,11 @@ public class SocketRyClient {
IMRTCManager.getInstance().requestJoinOtherRoom(map.getString("uid"), true, msg1.toString(), new IRCRTCResultCallback() {
@Override
public void onSuccess() {
ToastUtil.show("邀请 " + map.getString("uid") + " 发送成功");
if(WordUtil.isNewZh()) {
ToastUtil.show("邀请 " + map.getString("uid") + " 发送成功");
}else{
ToastUtil.show("invite " + map.getString("uid") + " successful");
}
runOnUiThread(new Runnable() {
@Override
public void run() {
@ -1334,7 +1351,11 @@ public class SocketRyClient {
});
//todo 安卓端状态码说明文档https://docs.rongcloud.cn/v4/views/rtc/call/code/android.html
Log.e("ry", rtcErrorCode + "aaaaaa" + CommonAppConfig.getInstance().getUid() + "VDSSSS" + map.getString("uid"));
ToastUtil.show("邀请 " + map.getString("uid") + " 发送失败 " + rtcErrorCode);
if(WordUtil.isNewZh()) {
ToastUtil.show("邀请 " + map.getString("uid") + " 发送失败 " + rtcErrorCode);
}else{
ToastUtil.show("invite " + map.getString("uid") + " lose " + rtcErrorCode);
}
}
});
break;

View File

@ -12,6 +12,7 @@ import com.bumptech.glide.Glide;
import com.ms.banner.holder.BannerViewHolder;
import com.yunbao.common.bean.BannerBean;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ProgressView;
import com.yunbao.live.R;
@ -37,6 +38,7 @@ public class CustomViewHolder implements BannerViewHolder<BannerBean> {
TextView targetAssist = contextView.findViewById(R.id.target_assist_num);
TextView currentAssist = contextView.findViewById(R.id.current_assist_num);
TextView title = contextView.findViewById(R.id.title);
if (data.isStart()) {
startContext.setVisibility(View.VISIBLE);
Glide.with(context).load(R.mipmap.start_level).into(bannerBack);
@ -63,6 +65,11 @@ public class CustomViewHolder implements BannerViewHolder<BannerBean> {
targetAssist.setText("/" + targetAssistNum);
currentAssist.setText(String.valueOf(currentAssistNum));
title.setText(String.format(context.getString(R.string.star_change),data.getModel().getTaskNum()));
if(!WordUtil.isNewZh()){
((TextView)contextView.findViewById(R.id.total_star_value)).setText(context.getString(R.string.total_star_value));
((TextView)contextView.findViewById(R.id.number_of_people_assisted)).setText(context.getString(R.string.number_of_people_assisted));
}
} else {
if(data!=null&&!StringUtil.isEmpty(data.getImageUrl())) {
String imagerUrl = data.getImageUrl().replace("qny", "downs");

View File

@ -140,7 +140,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveUserMoreDialogFragment");
LiveMicUserDialogFragment.activity = ((LiveAudienceActivity) mContext);
} else {
ToastUtil.show(R.string.no_mic_opn);
ToastUtil.show(mContext.getString(R.string.no_mic_opn));
}
}
});

View File

@ -46,6 +46,7 @@ import com.yunbao.common.utils.ProcessImageUtil;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.common.views.LiveClarityCustomPopup;
import com.yunbao.common.views.LiveNewWishListPopup;
@ -391,7 +392,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
return;
}
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
// startLive();
@ -890,7 +891,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
// return;
// }
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
createRoom();
@ -905,7 +906,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
if (!isHttpBack) {
isHttpBack = true;
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
String title = mEditTitle.getText().toString().trim();

View File

@ -44,6 +44,7 @@ import com.yunbao.common.utils.MicStatusManager;
import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.LiveClarityCustomPopup;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
@ -688,11 +689,19 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
}
});
} else if ("inviteMic".equals(str)) {
String content="邀請您進行語音連麥";
String confirm="接受";
String cancel="拒絕";
if(!WordUtil.isNewZh()){
content="You are invited to join the voice connection";
confirm="accept";
cancel="cancel";
}
DialogUitl.Builder builder = new DialogUitl.Builder(mContext)
.setContent("邀請您進行語音連麥")
.setContent(content)
.setTitle(mLiveBean.getUserNiceName())
.setConfirmString("接受")
.setCancelString("拒絕")
.setConfirmString(confirm)
.setCancelString(cancel)
.setView(R.layout.dialog_live_mic_invite)
.setClickCallback(new DialogUitl.SimpleCallback() {
@Override
@ -771,7 +780,11 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
onPrepared();
rcrtcRoom = null;
MicStatusManager.getInstance().clear();
ToastUtil.show("已成功退出語音連麥");
if(WordUtil.isNewZh()) {
ToastUtil.show("已成功退出語音連麥");
}else{
ToastUtil.show("You have successfully exited the voice connection");
}
resumePlay();
if (onMicCallback != null) {
onMicCallback.onMikUpdate();
@ -854,8 +867,13 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
}
private void showToast() {
DialogUitl.showToast(mContext, "設置成功\n" +
"正在為你轉換中", 3000);
if(WordUtil.isNewZh()) {
DialogUitl.showToast(mContext, "設置成功\n" +
"正在為你轉換中", 3000);
}else{
DialogUitl.showToast(mContext, "successful\n" +
"It's being converted for you", 3000);
}
}
@Override
@ -1137,7 +1155,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
"timestampNs:" + videoFrame.getTimestampNs() + "\n" +
"分辨率:" + videoFrame.getBuffer().getHeight() + "x" + videoFrame.getBuffer().getWidth() + "\n" +
"当前时间:" + new SimpleDateFormat("HH:mm:ss", Locale.CHINA).format(new Date()) + "\n";
Log.d("ry", "onFrame: " + debugText);
//Log.d("ry", "onFrame: " + debugText);
new Handler(Looper.getMainLooper()).post(() -> {
debugView.setText(debugText);

View File

@ -51,6 +51,7 @@ import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveRyAnchorActivity;
@ -988,6 +989,9 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
return;
}
String ct = "由於" + uname + "退出比賽," + pkname + "獲得勝利";
if(!WordUtil.isNewZh()){
ct= "because" + uname + "To leave a race," + pkname + "win";
}
SocketSendBean seed_msg = new SocketSendBean()
.param("_method_", Constants.SOCKET_SYSTEM)

View File

@ -29,6 +29,7 @@ import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ProcessImageUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
@ -423,7 +424,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
// return;
// }
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
if (mLiveShareAdapter != null) {
@ -466,7 +467,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
if(isHttpBack == false) {
isHttpBack = true;
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
String title = mEditTitle.getText().toString().trim();

View File

@ -41,6 +41,7 @@ import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ProcessImageUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
@ -447,7 +448,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
// return;
// }
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
if (mLiveShareAdapter != null) {
@ -487,7 +488,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
*/
private void createRoom() {
if (mLiveClassID == 0) {
ToastUtil.show(R.string.live_choose_live_class);
ToastUtil.show(WordUtil.getNewString(R.string.live_choose_live_class));
return;
}
String title = mEditTitle.getText().toString().trim();

View File

@ -29,6 +29,7 @@
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -38,6 +39,7 @@
android:textSize="12sp" />
<TextView
android:id="@+id/des"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"

View File

@ -25,7 +25,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="當前連麥"
android:text="@string/list_for_lianmai"
android:textColor="#fff6f7fb"
android:textSize="16sp" />
@ -35,7 +35,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="連麥申請"
android:text="@string/user_apply_for_lianmai"
android:textColor="#ff646464"
android:textSize="16sp" />

View File

@ -25,7 +25,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="當前連麥"
android:text="@string/list_for_lianmai"
android:textColor="#fff6f7fb"
android:textSize="16sp" />
@ -35,7 +35,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="連麥申請"
android:text="@string/user_apply_for_lianmai"
android:textColor="#ff646464"
android:textSize="16sp" />

View File

@ -85,6 +85,7 @@
<TextView
android:id="@+id/votesTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"

View File

@ -9,6 +9,7 @@
android:orientation="horizontal">
<TextView
android:id="@+id/text1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
@ -17,6 +18,7 @@
android:textColor="#B3FFFFFF" />
<TextView
android:id="@+id/text2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
@ -39,6 +41,7 @@
android:orientation="horizontal">
<TextView
android:id="@+id/text3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -47,6 +50,7 @@
android:textColor="#B3FFFFFF" />
<TextView
android:id="@+id/text4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -55,6 +59,7 @@
android:textColor="#B3FFFFFF" />
<TextView
android:id="@+id/text5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"

View File

@ -1036,7 +1036,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
long curTime = System.currentTimeMillis();
if (curTime - mLastClickBackTime > 2000) {
mLastClickBackTime = curTime;
ToastUtil.show(R.string.main_click_next_exit);
ToastUtil.show(WordUtil.getNewString(R.string.main_click_next_exit));
return;
}
APPEasyFloat.getInstance().dismiss(mContext);

View File

@ -48,6 +48,7 @@ import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.ProcessResultUtil;
import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.activity.SystemMessageActivity;
import com.yunbao.live.bean.ImUserBean;
@ -502,7 +503,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
long curTime = System.currentTimeMillis();
if (curTime - mLastClickBackTime > 2000) {
mLastClickBackTime = curTime;
ToastUtil.show(R.string.main_click_next_exit);
ToastUtil.show(WordUtil.getNewString(R.string.main_click_next_exit));
} else {
EventBus.getDefault().post(new PDLiveConversationListEvent().setPage(11));
finish();

View File

@ -29,6 +29,7 @@ import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.PluginManager;
import com.yunbao.common.utils.ProcessResultUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.LiveConfig;
import com.yunbao.live.activity.LiveAnchorActivity;
import com.yunbao.live.activity.LiveRyAnchorActivity;
@ -242,10 +243,14 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
LiveHttpUtil.getLiveSdk(mGetLiveSdkCallback);
});
} else {
DialogUitl.showSimpleDialog(mContext, "需要下载开播插件,是否下载", new DialogUitl.SimpleCallback() {
String tips="需要下载开播插件,是否下载";
if(!WordUtil.isNewZh()){
tips="You need to download the plug-in, whether to download";
}
DialogUitl.showSimpleDialog(mContext, tips, new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
Dialog downloadDialog = DialogUitl.loadingDialog(mContext, "下载中");
Dialog downloadDialog = DialogUitl.loadingDialog(mContext, "Downloading...");
downloadDialog.show();
PluginManager.getInstance().loadAnchorPlugin(it -> {
LiveHttpUtil.getLiveSdk(mGetLiveSdkCallback);