forked from omni/OmniCards
feat: added russian translations
This commit is contained in:
@@ -2,6 +2,7 @@ package ru.omni_devel.cards
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import com.google.android.gms.wearable.Wearable
|
||||
import com.google.zxing.BarcodeFormat
|
||||
import com.google.zxing.MultiFormatWriter
|
||||
@@ -49,13 +50,13 @@ fun sendToWatch(context: Context, path: String, message: String, onResult: (Bool
|
||||
}
|
||||
}
|
||||
|
||||
fun checkCardData(name: String, value: String): String? {
|
||||
fun checkCardData(name: String, value: String): Int? {
|
||||
if (name.isEmpty()) {
|
||||
return "Name should not be empty"
|
||||
return R.string.card_name_should_not_be_empty
|
||||
} else if (value.isEmpty()) {
|
||||
return "Code value should not be empty"
|
||||
return R.string.card_value_should_not_be_empty
|
||||
} else if (name.length > 32) {
|
||||
return "Name must be shorter than 32 symbols"
|
||||
return R.string.name_must_be_shorter_than_32_symbols
|
||||
}
|
||||
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user