Browse Source

fix: 开播限制本地化

tongmengxiao 11 months ago
parent
commit
b8c7f04ed4

+ 3 - 3
app/src/main/java/com/swago/app/SwagoApp.kt

@@ -58,9 +58,9 @@ class SwagoApp : Application() {
             .alphaDuration(300)
             .errorIcon(R.mipmap.state_error_empty)
             .emptyIcon(R.mipmap.state_error_empty)
-            .emptyMsg("There is nothing here")
-            .loadingMsg("Loading")
-            .errorMsg("Load data error")
+            .emptyMsg(getString(R.string.There_is_nothing_here))
+            .loadingMsg(getString(R.string.loading))
+            .errorMsg(getString(R.string.Load_data_error))
             .build()
         MultiStatePage.config(config)
 

+ 2 - 3
baseswago/src/main/res/layout/dialog_choice.xml

@@ -66,14 +66,13 @@
             android:layout_width="0dp"
             android:layout_height="48dp"/>
 
-        <TextView
+        <com.swago.baseswago.cusview.BoldTextView
             android:id="@+id/tvSure"
             android:textSize="14dp"
-            android:textColor="#fff"
+            android:textColor="#000"
             android:text="@string/confirm"
             android:gravity="center"
             app:layout_constraintBottom_toBottomOf="parent"
-            android:background="@drawable/shape_ff56b7_right_bottom_20"
             app:layout_constraintTop_toBottomOf="@+id/view"
             app:layout_constraintStart_toEndOf="@+id/tvCancel"
             app:layout_constraintEnd_toEndOf="parent"

+ 1 - 0
baseswago/src/main/res/layout/view_code_textview.xml

@@ -9,6 +9,7 @@
         android:layout_height="80dp"
         android:orientation="horizontal"
         android:weightSum="4"
+        android:layoutDirection="ltr"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent">

+ 13 - 3
baseswago/src/main/res/values-ar/strings.xml

@@ -227,7 +227,7 @@
     <string name="no_send_people">لا يوجد مستخدم يقبل الهدايا</string>
     <string name="change_password">تغيير الباسورد</string>
     <string name="pwd_change_success">تغيير الباسورد</string>
-    <string name="do_you_confirm_change_pwd">هل تتأكد من تغيير الباسورد?</string>
+    <string name="do_you_confirm_change_pwd">هل تتأكد من تغيير الباسورد؟</string>
     <string name="red_bag_detail">تلقي تفاصيل المغلف الأحمر</string>
     <string name="lucky_best">تسليم اكثر</string>
     <string name="red_bg_piao_tiao">أرسل %s مظروفًا أحمر، وسيكون جاهزًا للتسليم في 30 ثانية، يرجى الاستعداد!</string>
@@ -246,7 +246,7 @@
     <string name="_1_1000">الرجاء إدخال عدد صحيح موجب ضمن 1-1000</string>
     <string name="set_success">تعديل بالنجاح</string>
     <string name="mic_locked">تم قفل وضع الميكروفون الحالي</string>
-    <string name="dou_you_want_on_mic">هل تريد اتصال الميكروفون?</string>
+    <string name="dou_you_want_on_mic">هل تريد اتصال الميكروفون؟</string>
     <string name="you_are_on_mic">أنت حاليًا على الميكروفون</string>
     <string name="fan_club_member_rights">فوائد أعضاء نادي المعجبين</string>
     <string name="fan_club_s">نادي المعجبين:%s</string>
@@ -289,7 +289,7 @@
     <string name="total_voice_time_this_week">إجمالي وقت الصوت هذا الأسبوع</string>
     <string name="voice_valid_days_this_week">أيام صالحة صوت هذا الأسبوع</string>
     <string name="live_streaming_restrictions">قيود البث المباشر</string>
-    <string name="conditions_to_start_live_broadcasting">يجب عليك استيفاء أي من الشروط التالية لبدء البث المباشر</string>
+    <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>
@@ -297,4 +297,14 @@
     <string name="system_not_detect_face">لم يكتشف النظام الوجه</string>
     <string name="live_broadcasrt_will_closed_countdown">سيتم إغلاق غرفة البث المباشر بعد العد التنازلي</string>
     <string name="you_been_banned">لقد تم اسكاتك</string>
+    <string name="switch_themee">غير الخلفية</string>
+    <string name="lock_room_on">غرفة مقفلة</string>
+    <string name="lock_room_off">غرفة عامة</string>
+    <string name="wish_gift">هدية الرغبة</string>
+    <string name="audio">صوت</string>
+    <string name="Live">فيديو</string>
+    <string name="There_is_nothing_here">لا يوجد شيء هنا</string>
+    <string name="Load_data_error">خطأ في تحميل البيانات</string>
+    <string name="loading">تحميل...</string>
+    <string name="modify_success">حفظ بنجاح</string>
 </resources>

+ 12 - 1
baseswago/src/main/res/values-in/strings.xml

@@ -293,7 +293,7 @@
     <string name="total_voice_time_this_week">Total durasi audio minggu ini</string>
     <string name="voice_valid_days_this_week">valid hari audio Minggu Ini</string>
     <string name="live_streaming_restrictions">Pembatasan streaming live</string>
-    <string name="conditions_to_start_live_broadcasting">Anda harus memenuhi salah satu ketentuan berikut untuk mulai siaran live</string>
+    <string name="conditions_to_start_live_broadcasting">Anda harus menjadi host resmi jika mau buka live, silakanhubungi agencynya.</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>
@@ -301,4 +301,15 @@
     <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>
     <string name="you_been_banned">Anda telah dilarang berbicara</string>
+    <string name="switch_themee">Ubah tema</string>
+    <string name="lock_room_on">Buka room password</string>
+    <string name="lock_room_off">Tutupi room password</string>
+    <string name="wish_gift">Wish gift</string>
+    <string name="audio">Audio</string>
+    <string name="Live">Live</string>
+    <string name="There_is_nothing_here">Tidak ada apa pun di sini</string>
+    <string name="Load_data_error">Load data error</string>
+    <string name="loading">loading...</string>
+    <string name="modify_success">Berhasil dimodifikasi</string>
+
 </resources>

+ 11 - 1
baseswago/src/main/res/values-ms/strings.xml

@@ -290,7 +290,7 @@
     <string name="total_voice_time_this_week">Total durasi audio minggu ini</string>
     <string name="voice_valid_days_this_week">valid hari audio Minggu Ini</string>
     <string name="live_streaming_restrictions">Pembatasan streaming live</string>
-    <string name="conditions_to_start_live_broadcasting">Anda harus memenuhi salah satu ketentuan berikut untuk mulai siaran live</string>
+    <string name="conditions_to_start_live_broadcasting">Anda harus menjadi host resmi jika mau buka live, silakanhubungi agencynya.</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>
@@ -298,4 +298,14 @@
     <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>
     <string name="you_been_banned">Anda telah dilarang berbicara</string>
+    <string name="switch_themee">Ubah tema</string>
+    <string name="lock_room_on">Buka room password</string>
+    <string name="lock_room_off">Tutupi room password</string>
+    <string name="wish_gift">Wish gift</string>
+    <string name="audio">Audio</string>
+    <string name="Live">Live</string>
+    <string name="There_is_nothing_here">Tidak ada apa pun di sini</string>
+    <string name="Load_data_error">Load data error</string>
+    <string name="loading">loading...</string>
+    <string name="modify_success">Berhasil dimodifikasi</string>
 </resources>

+ 11 - 1
baseswago/src/main/res/values-zh/strings.xml

@@ -289,7 +289,7 @@
     <string name="total_voice_time_this_week">本周语音总时长</string>
     <string name="voice_valid_days_this_week">本周语音有效天</string>
     <string name="live_streaming_restrictions">直播限制</string>
-    <string name="conditions_to_start_live_broadcasting">需要满足以下任一条件可以开始直播</string>
+    <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>
@@ -297,4 +297,14 @@
     <string name="system_not_detect_face">系统未检测到人脸</string>
     <string name="live_broadcasrt_will_closed_countdown">直播间将在倒计时后关闭</string>
     <string name="you_been_banned">你已被禁言</string>
+    <string name="switch_themee">更换主题</string>
+    <string name="lock_room_on">密码房开启</string>
+    <string name="lock_room_off">密码房关闭</string>
+    <string name="wish_gift">心愿礼物</string>
+    <string name="audio">语音</string>
+    <string name="Live">视频</string>
+    <string name="There_is_nothing_here">没有数据</string>
+    <string name="Load_data_error">加载失败</string>
+    <string name="loading">加载中。。。</string>
+    <string name="modify_success">修改成功</string>
 </resources>

+ 11 - 1
baseswago/src/main/res/values/strings.xml

@@ -311,7 +311,7 @@
     <string name="total_voice_time_this_week">Total voice time this week</string>
     <string name="voice_valid_days_this_week">Voice valid days this week</string>
     <string name="live_streaming_restrictions">Live streaming restrictions</string>
-    <string name="conditions_to_start_live_broadcasting">You need to meet any of the following conditions to start live broadcasting</string>
+    <string name="conditions_to_start_live_broadcasting">You need to become a host to start working, please contact your agency</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>
@@ -319,4 +319,14 @@
     <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>
     <string name="you_been_banned">You have been muted</string>
+    <string name="switch_themee">switch theme</string>
+    <string name="lock_room_on">lock room-on</string>
+    <string name="lock_room_off">lock room-off</string>
+    <string name="wish_gift">wish gift</string>
+    <string name="audio">Audio</string>
+    <string name="Live">Live</string>
+    <string name="There_is_nothing_here">There is nothing here</string>
+    <string name="Load_data_error">Load data error</string>
+    <string name="loading">loading...</string>
+    <string name="modify_success">Modify success</string>
 </resources>

+ 1 - 1
room/src/main/java/com/swago/room/anchor/AnchorRoomActivity.kt

@@ -342,7 +342,7 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
             }
         })
         binding.cbPassword.setOnCheckedChangeListener { _, isChecked ->
-            binding.cbPassword.text = if (isChecked)  "Password ·NO" else "Password ·OFF"
+            binding.cbPassword.text = if (isChecked)  getString(R.string.lock_room_on) else getString(R.string.lock_room_off)
             checkPassword = isChecked
         }
         countDownTimer = object : CountDownTimer(liveNoFaceTime, 60000) {

+ 0 - 7
room/src/main/java/com/swago/room/dialog/LiveRestrictionsDialog.kt

@@ -43,13 +43,6 @@ class LiveRestrictionsDialog : BaseXDFragment<DialogLiveRestrictionsBinding>() {
 
     override fun initOther() {
         binding.tvRecharge.setOnClickListener {
-            if (SwagoInfo.isGooglePackage()){
-                ARouter.getInstance().build(ARouteConstant.User.recharge).navigation()
-            }else{
-                ARouter.getInstance().build(ARouteConstant.Base.webView)
-                    .withString("url", UrlConstant.TOP_UP)
-                    .navigation()
-            }
             dismissAllowingStateLoss()
         }
     }

+ 5 - 5
room/src/main/res/layout/activity_anchor_room.xml

@@ -105,7 +105,7 @@
                 android:textColor="#ffffff"
                 android:textSize="14dp"
                 android:button="@null"
-                android:text="Password ·OFF"
+                android:text="@string/lock_room_off"
                 android:drawablePadding="4dp"
                 android:gravity="center_horizontal"
                 android:background="@android:color/transparent"
@@ -119,7 +119,7 @@
                 android:layout_marginBottom="24dp"
                 android:drawableTop="@mipmap/wish_gift"
                 android:drawablePadding="4dp"
-                android:text="Wish Gift"
+                android:text="@string/wish_gift"
                 android:textColor="#ffffff"
                 android:textSize="14dp"
                 android:layout_marginStart="@dimen/dp_10"/>
@@ -149,7 +149,7 @@
 
             <TextView
                 android:textSize="14dp"
-                android:text="Switch theme"
+                android:text="@string/switch_themee"
                 android:textColor="#ffffff"
                 android:layout_gravity="center_vertical"
                 android:layout_width="wrap_content"
@@ -213,7 +213,7 @@
                 android:id="@+id/tvVideo"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="Live"
+                android:text="@string/Live"
                 android:textColor="#fff"
                 android:textSize="16dp" />
 
@@ -242,7 +242,7 @@
                 android:id="@+id/tvAudio"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="Audio"
+                android:text="@string/audio"
                 android:textColor="@color/_d4ffffff"
                 android:textSize="16dp" />
 

+ 2 - 44
room/src/main/res/layout/dialog_live_restrictions.xml

@@ -39,59 +39,17 @@
             android:gravity="center"
             android:text="@string/conditions_to_start_live_broadcasting"/>
 
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/content"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@drawable/shape_f1f4f8_16"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintEnd_toEndOf="parent"
-            android:layout_marginStart="16dp"
-            android:layout_marginEnd="16dp"
-            android:layout_marginTop="23dp"
-            android:paddingBottom="@dimen/dp_10"
-            app:layout_constraintTop_toBottomOf="@+id/tv_hint">
-
-            <com.swago.baseswago.cusview.MediumTextView
-                android:id="@+id/textview1"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textSize="@dimen/sp_14"
-                android:textColor="#0F172A"
-                android:layout_marginTop="@dimen/dp_10"
-                android:drawableStart="@mipmap/ic_user_type"
-                android:layout_marginStart="12dp"
-                android:drawablePadding="12dp"
-                android:text="@string/already_be_a_host_or_agency"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toTopOf="parent"/>
-
-            <com.swago.baseswago.cusview.MediumTextView
-                android:id="@+id/textview2"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textSize="@dimen/sp_14"
-                android:textColor="#0F172A"
-                android:layout_marginTop="@dimen/dp_10"
-                android:drawableStart="@mipmap/ic_wallet"
-                android:layout_marginStart="12dp"
-                android:drawablePadding="12dp"
-                android:text="@string/cumulative_recharge"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/textview1"/>
-        </androidx.constraintlayout.widget.ConstraintLayout>
-
         <com.swago.baseswago.cusview.BoldTextView
             android:id="@+id/tvRecharge"
             android:layout_width="match_parent"
             android:layout_height="44dp"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/content"
+            app:layout_constraintTop_toBottomOf="@+id/tv_hint"
             android:layout_marginTop="23dp"
             android:layout_marginStart="16dp"
             android:layout_marginEnd="16dp"
-            android:text="@string/recharge"
+            android:text="OK"
             android:textColor="@color/_ffffff"
             android:gravity="center"
             android:textSize="16sp"

+ 1 - 0
room/src/main/res/layout/view_user_join_room.xml

@@ -121,6 +121,7 @@
                 android:text="@string/join_room"
                 android:textColor="@color/white"
                 android:layout_width="0dp"
+                android:gravity="start"
                 android:layout_height="wrap_content"/>
 
             <ImageView

+ 1 - 1
user/src/main/java/com/swago/user/EditInfoActivity.kt

@@ -249,7 +249,7 @@ class EditInfoActivity : BaseXActivity<ActivityUserEditBinding>() {
 
     override fun initLiveData() {
         userVm.modifyInfoLiveData.observe(this) {
-            Toast.makeText(AppContext.getContext(), "Modify Success", Toast.LENGTH_SHORT).show()
+            Toast.makeText(AppContext.getContext(), getString(R.string.modify_success), Toast.LENGTH_SHORT).show()
             finish()
         }