소스 검색

界面组件语言适配

Frankensteinly 6 달 전
부모
커밋
d1cabed0f9
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      app/src/main/java/com/grkj/iscs/model/Constants.kt

+ 6 - 5
app/src/main/java/com/grkj/iscs/model/Constants.kt

@@ -2,6 +2,7 @@ package com.grkj.iscs.model
 
 import android.content.Context
 import com.grkj.iscs.R
+import com.grkj.iscs.util.CommonUtils
 import com.grkj.iscs.util.SPUtils
 
 object Constants {
@@ -73,11 +74,11 @@ object Constants {
     /*************************  SOP类型  *************************/
     data class SopType(val icon: Int, val type: Int, val title: String)
 
-    val SOP_REPAIR = SopType(R.mipmap.repair, 0, "维修")
-    val SOP_PRE_MAINTENANCE = SopType(R.mipmap.pre_maintenance, 1, "PM")
-    val SOP_CHANGE_SHIFTS = SopType(R.mipmap.change_shifts, 2, "开收班")
-    val SOP_CLEAN = SopType(R.mipmap.clean, 3, "清洗")
-    val SOP_SWITCH_PRODUCT = SopType(R.mipmap.switch_product, 4, "换产")
+    val SOP_REPAIR = SopType(R.mipmap.repair, 0, CommonUtils.getStr(R.string.repair)!!)
+    val SOP_PRE_MAINTENANCE = SopType(R.mipmap.pre_maintenance, 1, CommonUtils.getStr(R.string.pre_maintenance)!!)
+    val SOP_CHANGE_SHIFTS = SopType(R.mipmap.change_shifts, 2, CommonUtils.getStr(R.string.change_shifts)!!)
+    val SOP_CLEAN = SopType(R.mipmap.clean, 3, CommonUtils.getStr(R.string.clean)!!)
+    val SOP_SWITCH_PRODUCT = SopType(R.mipmap.switch_product, 4, CommonUtils.getStr(R.string.switch_product)!!)
 
     val mSopTypeList = mutableListOf(SOP_REPAIR, SOP_PRE_MAINTENANCE, SOP_CHANGE_SHIFTS, SOP_CLEAN, SOP_SWITCH_PRODUCT)