Ver código fonte

feat: live and face 本地化

tongmengxiao 5 meses atrás
pai
commit
3e6a9092b1

+ 2 - 2
baseswago/src/main/java/com/swago/baseswago/model/im/HouseOpenLiveData.kt

@@ -5,6 +5,6 @@ data class HouseOpenLiveData(
     val anchorId:String = "",
     val anchorName:String = "",
     val anchorAvatar:String = "",
-    val broadcast_password_status:Int = 0,
-    val user_broadcast_type:Int = 0
+    val userBroadcastPasswordStatus:Int = 0,
+    val userBroadcastType:Int = 0
 )

+ 4 - 0
baseswago/src/main/res/values-ar/strings.xml

@@ -292,4 +292,8 @@
     <string name="conditions_to_start_live_broadcasting">يجب عليك استيفاء أي من الشروط التالية لبدء البث المباشر</string>
     <string name="already_be_a_host_or_agency">أن تكون مضيفًا أو وكالة بالفعل</string>
     <string name="cumulative_recharge">إعادة الشحن التراكمي >=10$</string>
+    <string name="the_host_is_on_living">المضيف هو البث المباشر</string>
+    <string name="go_to_thie_living_now">اذهب إلى غرفة البث المباشر الخاصة بها لرؤيتها</string>
+    <string name="system_not_detect_face">لم يكتشف النظام الوجه</string>
+    <string name="live_broadcasrt_will_closed_countdown">سيتم إغلاق غرفة البث المباشر بعد العد التنازلي</string>
 </resources>

+ 4 - 0
baseswago/src/main/res/values-in/strings.xml

@@ -296,4 +296,8 @@
     <string name="conditions_to_start_live_broadcasting">Anda harus memenuhi salah satu ketentuan berikut untuk mulai siaran live</string>
     <string name="already_be_a_host_or_agency">Sudah menjadi host atau agensi</string>
     <string name="cumulative_recharge">Top up kumulatif>=10$</string>
+    <string name="the_host_is_on_living">Host sedang siaran live</string>
+    <string name="go_to_thie_living_now">Pergi ke ruang livenya untuk menemuinya </string>
+    <string name="system_not_detect_face">Sistem tidak mendeteksi wajah</string>
+    <string name="live_broadcasrt_will_closed_countdown">Ruang live akan ditutup setelah hitungan mundur</string>
 </resources>

+ 4 - 0
baseswago/src/main/res/values-ms/strings.xml

@@ -293,4 +293,8 @@
     <string name="conditions_to_start_live_broadcasting">Anda harus memenuhi salah satu ketentuan berikut untuk mulai siaran live</string>
     <string name="already_be_a_host_or_agency">Sudah menjadi host atau agensi</string>
     <string name="cumulative_recharge">Top up kumulatif>=10$</string>
+    <string name="the_host_is_on_living">Host sedang siaran live</string>
+    <string name="go_to_thie_living_now">Pergi ke ruang livenya untuk menemuinya </string>
+    <string name="system_not_detect_face">Sistem tidak mendeteksi wajah</string>
+    <string name="live_broadcasrt_will_closed_countdown">Ruang live akan ditutup setelah hitungan mundur</string>
 </resources>

+ 4 - 0
baseswago/src/main/res/values-zh/strings.xml

@@ -292,4 +292,8 @@
     <string name="conditions_to_start_live_broadcasting">需要满足以下任一条件可以开始直播</string>
     <string name="already_be_a_host_or_agency">已经是主播或者家族长身份</string>
     <string name="cumulative_recharge">累计充值>=10$</string>
+    <string name="the_host_is_on_living">主播正在直播</string>
+    <string name="go_to_thie_living_now">去她的直播间看看她吧</string>
+    <string name="system_not_detect_face">系统未检测到人脸</string>
+    <string name="live_broadcasrt_will_closed_countdown">直播间将在倒计时后关闭</string>
 </resources>

+ 4 - 0
baseswago/src/main/res/values/strings.xml

@@ -314,4 +314,8 @@
     <string name="conditions_to_start_live_broadcasting">You need to meet any of the following conditions to start live broadcasting</string>
     <string name="already_be_a_host_or_agency">Already be a host or agency</string>
     <string name="cumulative_recharge">Cumulative recharge>=10$</string>
+    <string name="the_host_is_on_living">The host is on living</string>
+    <string name="go_to_thie_living_now">Go to the living room see her now </string>
+    <string name="system_not_detect_face">The system did not detect the face</string>
+    <string name="live_broadcasrt_will_closed_countdown">The live broadcast room will be closed after the countdown</string>
 </resources>

+ 2 - 2
room/src/main/java/com/swago/room/dialog/HouseGoLiveDialog.kt

@@ -33,8 +33,8 @@ class HouseGoLiveDialog : BaseXDFragment<DialogHouseGoLiveBinding>() {
         arguments?.let {
             val avatar = it.getString("avatar", "")
             Glide.with(this).load(avatar)
-                .placeholder(com.swago.room.R.mipmap.default_avatar)
-                .error(com.swago.room.R.mipmap.default_avatar).into(binding.ivAvatar)
+                .placeholder(R.mipmap.default_avatar)
+                .error(R.mipmap.default_avatar).into(binding.ivAvatar)
         }
 
         binding.tvGoLive.setOnClickListener {

+ 2 - 2
room/src/main/java/com/swago/room/user/UserRoomActivity.kt

@@ -242,8 +242,8 @@ class UserRoomActivity : AbsUserActivity<ActivityAbsRoomUserBinding, UserRoomMod
             HouseGoLiveDialog.newInstance(it.anchorAvatar).apply {
                 this.goLive = {
                     data?.get(position)?.user_broadcast_status = 1
-                    data?.get(position)?.user_broadcast_type = it.user_broadcast_type
-                    data?.get(position)?.broadcast_password_status = it.broadcast_password_status
+                    data?.get(position)?.user_broadcast_type = it.userBroadcastType
+                    data?.get(position)?.broadcast_password_status = it.userBroadcastPasswordStatus
                     scrollToPosition(position)
                 }
             }.show(supportFragmentManager,"HouseGoLiveDialog")

+ 3 - 2
room/src/main/res/layout/dialog_house_go_live.xml

@@ -21,7 +21,7 @@
 
     <com.swago.baseswago.cusview.BoldTextView
         android:id="@+id/tv_close_title"
-        android:text="@string/living_room_already_be_closed"
+        android:text="@string/the_host_is_on_living"
         android:textColor="#0F172A"
         android:textSize="18sp"
         android:textStyle="bold"
@@ -34,7 +34,7 @@
 
     <com.swago.baseswago.cusview.MediumTextView
         android:id="@+id/tv_hint"
-        android:text="Please contact customer service if you have any questions."
+        android:text="@string/go_to_thie_living_now"
         android:textColor="#0F172A"
         android:textSize="14sp"
         android:layout_width="wrap_content"
@@ -68,6 +68,7 @@
         android:id="@+id/ivAvatar"
         android:layout_width="80dp"
         android:layout_height="80dp"
+        android:src="@mipmap/default_avatar"
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintEnd_toEndOf="parent"/>

+ 2 - 2
room/src/main/res/layout/dialog_no_face_show.xml

@@ -21,7 +21,7 @@
 
     <com.swago.baseswago.cusview.BoldTextView
         android:id="@+id/tv_close_title"
-        android:text="@string/living_room_already_be_closed"
+        android:text="@string/system_not_detect_face"
         android:textColor="#0F172A"
         android:textSize="18sp"
         android:textStyle="bold"
@@ -34,7 +34,7 @@
 
     <com.swago.baseswago.cusview.MediumTextView
         android:id="@+id/tv_hint"
-        android:text="Please contact customer service if you have any questions."
+        android:text="@string/live_broadcasrt_will_closed_countdown"
         android:textColor="#0F172A"
         android:textSize="14sp"
         android:layout_width="wrap_content"