update:更新i18N
This commit is contained in:
parent
3da9a26392
commit
4e466a7868
@ -4,6 +4,8 @@ import android.content.res.Resources;
|
|||||||
|
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/10/10.
|
* Created by cxf on 2017/10/10.
|
||||||
* 获取string.xml中的字
|
* 获取string.xml中的字
|
||||||
@ -20,4 +22,10 @@ public class WordUtil {
|
|||||||
public static String getString(int res) {
|
public static String getString(int res) {
|
||||||
return sResources.getString(res);
|
return sResources.getString(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isZh() {
|
||||||
|
Locale locale = sResources.getConfiguration().locale;
|
||||||
|
String language = locale.getLanguage();
|
||||||
|
return language.endsWith("zh");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@
|
|||||||
<string name="live_zg">Tricky</string>
|
<string name="live_zg">Tricky</string>
|
||||||
<string name="live_dr">MultiplayerPK</string>
|
<string name="live_dr">MultiplayerPK</string>
|
||||||
<string name="live_mic">LianmaiVoice</string>
|
<string name="live_mic">LianmaiVoice</string>
|
||||||
<string name="live_wks">ZhouXingbang</string>
|
<string name="live_wks">Start</string>
|
||||||
<string name="live_zslk">LeaveTemporarily</string>
|
<string name="live_zslk">LeaveTemporarily</string>
|
||||||
<string name="live_zslk1">ResumeLive</string>
|
<string name="live_zslk1">ResumeLive</string>
|
||||||
<string name="live_flash">Flash lamp</string>
|
<string name="live_flash">Flash lamp</string>
|
||||||
@ -371,7 +371,7 @@
|
|||||||
<string name="live_choose_live_class">Please select a channel</string>
|
<string name="live_choose_live_class">Please select a channel</string>
|
||||||
<string name="live_follow_anchor">Focus on the anchor</string>
|
<string name="live_follow_anchor">Focus on the anchor</string>
|
||||||
<string name="live_report">Are you sure to report?</string>
|
<string name="live_report">Are you sure to report?</string>
|
||||||
<string name="live_link_mic_2">Interaction between wheat and wheat</string>
|
<string name="live_link_mic_2">Interaction</string>
|
||||||
<string name="live_link_mic_3">End Lian Mai</string>
|
<string name="live_link_mic_3">End Lian Mai</string>
|
||||||
<string name="live_link_mic_4">Allowed even wheat</string>
|
<string name="live_link_mic_4">Allowed even wheat</string>
|
||||||
<string name="live_link_mic_5">Ban Lian Mai</string>
|
<string name="live_link_mic_5">Ban Lian Mai</string>
|
||||||
@ -860,13 +860,13 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="anchor">anchor</string>
|
<string name="anchor">anchor</string>
|
||||||
<string name="anchor_more">More</string>
|
<string name="anchor_more">More</string>
|
||||||
<string name="wonderful_live">Wonderful live</string>
|
<string name="wonderful_live">Wonderful live</string>
|
||||||
<string name="recommended_for_you">recommended for you</string>
|
<string name="recommended_for_you">More</string>
|
||||||
<string name="fun_games">fun games</string>
|
<string name="fun_games">Fun Games</string>
|
||||||
<string name="value_added_benefits">value added benefits</string>
|
<string name="value_added_benefits">Value-added benefits</string>
|
||||||
<string name="fan_club">fan club</string>
|
<string name="fan_club">Fan Club</string>
|
||||||
<string name="activity_center">activity center</string>
|
<string name="activity_center">Activity</string>
|
||||||
<string name="basic_tools">basic tools</string>
|
<string name="basic_tools">Basic tools</string>
|
||||||
<string name="effects_settings">effects settings</string>
|
<string name="effects_settings">Effect settings</string>
|
||||||
<string name="shield_gift_effect">shield gift effect</string>
|
<string name="shield_gift_effect">Shield gift effect</string>
|
||||||
<string name="shield_mount_effect">shield mount effect</string>
|
<string name="shield_mount_effect">Shield car effect</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -875,11 +875,11 @@
|
|||||||
<string name="wonderful_live">精彩直播</string>
|
<string name="wonderful_live">精彩直播</string>
|
||||||
<string name="recommended_for_you">為您推薦</string>
|
<string name="recommended_for_you">為您推薦</string>
|
||||||
<string name="fun_games">趣味游戏</string>
|
<string name="fun_games">趣味游戏</string>
|
||||||
<string name="value_added_benefits">增值权益</string>
|
<string name="value_added_benefits">增值權益</string>
|
||||||
<string name="fan_club">粉絲團</string>
|
<string name="fan_club">粉絲團</string>
|
||||||
<string name="activity_center">活動中心</string>
|
<string name="activity_center">活動中心</string>
|
||||||
<string name="basic_tools">基础工具</string>
|
<string name="basic_tools">基礎工具</string>
|
||||||
<string name="effects_settings">特效設置</string>
|
<string name="effects_settings">特效設置</string>
|
||||||
<string name="shield_gift_effect">屏蔽禮物特效</string>
|
<string name="shield_gift_effect">屏蔽禮物特效</string>
|
||||||
<string name="shield_mount_effect">屏蔽坐騎特效</string>
|
<string name="shield_mount_effect">屏蔽座駕特效</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -136,7 +136,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
LinearLayout gif_view;
|
LinearLayout gif_view;
|
||||||
RelativeLayout chat_view;
|
RelativeLayout chat_view;
|
||||||
private ImageView mAvatar;
|
private ImageView mAvatar;
|
||||||
private ImageView UserMore;
|
private ImageView userMore;
|
||||||
private RoundedImageView userGuard;
|
private RoundedImageView userGuard;
|
||||||
private ImageView mLevelAnchor;
|
private ImageView mLevelAnchor;
|
||||||
public static TextView mName;
|
public static TextView mName;
|
||||||
@ -666,7 +666,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mVotes = (TextView) findViewById(R.id.votes);
|
mVotes = (TextView) findViewById(R.id.votes);
|
||||||
mTvMedalRank = (TextView) findViewById(R.id.medal_rank_num);
|
mTvMedalRank = (TextView) findViewById(R.id.medal_rank_num);
|
||||||
mGuardNum = (TextView) findViewById(R.id.guard_num);
|
mGuardNum = (TextView) findViewById(R.id.guard_num);
|
||||||
UserMore = (ImageView) findViewById(R.id.user_more);
|
userMore = (ImageView) findViewById(R.id.user_more);
|
||||||
userGuard = (RoundedImageView) findViewById(R.id.user_guard);
|
userGuard = (RoundedImageView) findViewById(R.id.user_guard);
|
||||||
gift_svga = (SVGAImageView) findViewById(R.id.gift_svga);
|
gift_svga = (SVGAImageView) findViewById(R.id.gift_svga);
|
||||||
tv_avatarOther_name = (TextView) findViewById(R.id.tv_avatarOther_name);
|
tv_avatarOther_name = (TextView) findViewById(R.id.tv_avatarOther_name);
|
||||||
@ -758,7 +758,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
findViewById(R.id.btn_votes).setOnClickListener(this);
|
findViewById(R.id.btn_votes).setOnClickListener(this);
|
||||||
findViewById(R.id.btn_medal_rank).setOnClickListener(this);
|
findViewById(R.id.btn_medal_rank).setOnClickListener(this);
|
||||||
findViewById(R.id.btn_noble).setOnClickListener(this);
|
findViewById(R.id.btn_noble).setOnClickListener(this);
|
||||||
UserMore.setOnClickListener(this);
|
userMore.setOnClickListener(this);
|
||||||
userGuard.setOnClickListener(this);
|
userGuard.setOnClickListener(this);
|
||||||
|
|
||||||
findViewById(R.id.btn_guard).setOnClickListener(this);
|
findViewById(R.id.btn_guard).setOnClickListener(this);
|
||||||
@ -1100,10 +1100,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mHourRank.setLayoutParams(textParams);
|
mHourRank.setLayoutParams(textParams);
|
||||||
mHotText.setGravity(Gravity.CENTER);
|
mHotText.setGravity(Gravity.CENTER);
|
||||||
mHourRank.setGravity(Gravity.CENTER);
|
mHourRank.setGravity(Gravity.CENTER);
|
||||||
|
|
||||||
setHourRankData(info.get(0).getRank());
|
setHourRankData(info.get(0).getRank());
|
||||||
hotPic.setImageResource(R.drawable.live_tags_hot);
|
hotPic.setImageResource(WordUtil.isZh()?R.drawable.live_tags_hot:R.drawable.live_tags_hot_en);
|
||||||
hourPic.setImageResource(R.drawable.live_tags_hour_list);
|
hourPic.setImageResource(WordUtil.isZh()?R.drawable.live_tags_hour_list:R.drawable.live_tags_hour_list_en);
|
||||||
hotPic.setLayoutParams(params);
|
hotPic.setLayoutParams(params);
|
||||||
hourPic.setLayoutParams(params);
|
hourPic.setLayoutParams(params);
|
||||||
flipper.addView(hotView);
|
flipper.addView(hotView);
|
||||||
@ -1156,7 +1155,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
if (rank == 0) {
|
if (rank == 0) {
|
||||||
mHourRank.setText(R.string.no_rank_data);
|
mHourRank.setText(R.string.no_rank_data);
|
||||||
} else {
|
} else {
|
||||||
mHourRank.setText("第"+formatBigNum.formatBigNum(rank + "")+"名");
|
mHourRank.setText(String.format(WordUtil.getString(R.string.hour_rank),formatBigNum.formatBigNum(rank + "")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
live/src/main/res/drawable/live_tags_hot_en.png
Normal file
BIN
live/src/main/res/drawable/live_tags_hot_en.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
BIN
live/src/main/res/drawable/live_tags_hour_list_en.png
Normal file
BIN
live/src/main/res/drawable/live_tags_hour_list_en.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
@ -56,7 +56,7 @@
|
|||||||
android:paddingLeft="20dp"
|
android:paddingLeft="20dp"
|
||||||
android:paddingRight="5dp"
|
android:paddingRight="5dp"
|
||||||
android:layout_toRightOf="@id/btn_fans"
|
android:layout_toRightOf="@id/btn_fans"
|
||||||
android:text="貴族"
|
android:text="@string/noble"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"/>
|
android:textSize="14sp"/>
|
||||||
<com.yunbao.common.custom.DrawableTextView
|
<com.yunbao.common.custom.DrawableTextView
|
||||||
|
@ -402,8 +402,8 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toStartOf="@id/gift_image"
|
android:layout_toStartOf="@id/gift_image"
|
||||||
android:padding="4dp"
|
android:padding="4dp"
|
||||||
android:visibility="visible"
|
android:src="@mipmap/live_icon_newpeople_en"
|
||||||
android:src="@mipmap/live_icon_newpeople_en" />
|
android:visibility="visible" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,4 +3,11 @@
|
|||||||
<string name="no_more_day_rank">No one is on the list at the moment</string>
|
<string name="no_more_day_rank">No one is on the list at the moment</string>
|
||||||
<string name="no_more_guard">anchor are waiting at your guard!</string>
|
<string name="no_more_guard">anchor are waiting at your guard!</string>
|
||||||
<string name="no_rank_data">Not on the list</string>
|
<string name="no_rank_data">Not on the list</string>
|
||||||
|
<string name="hour_rank">No.%s</string>
|
||||||
|
<string name="hour_rank_not">Not listed</string>
|
||||||
|
<string name="day_rank">Day</string>
|
||||||
|
<string name="week_rank">Weekly</string>
|
||||||
|
<string name="views_rank">Viewers</string>
|
||||||
|
<string name="gurad_rank">Guard</string>
|
||||||
|
<string name="fans">Fans</string>
|
||||||
</resources>
|
</resources>
|
@ -4,4 +4,11 @@
|
|||||||
<string name="no_more_day_rank">暫時無人上榜,快來成為第一位上榜的人吧!</string>
|
<string name="no_more_day_rank">暫時無人上榜,快來成為第一位上榜的人吧!</string>
|
||||||
<string name="no_more_guard">主播正在等待您的守護!</string>
|
<string name="no_more_guard">主播正在等待您的守護!</string>
|
||||||
<string name="no_rank_data">未上榜</string>
|
<string name="no_rank_data">未上榜</string>
|
||||||
|
<string name="hour_rank">第%s名</string>
|
||||||
|
<string name="hour_rank_not">未上榜</string>
|
||||||
|
<string name="day_rank">日榜</string>
|
||||||
|
<string name="week_rank">周榜</string>
|
||||||
|
<string name="views_rank">观众</string>
|
||||||
|
<string name="gurad_rank">观众</string>
|
||||||
|
<string name="fans">粉丝</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user