More translations

This commit is contained in:
anrannn
2022-10-01 00:40:37 +08:00
parent 5e2360a71d
commit c56fa51fff
3 changed files with 19 additions and 6 deletions
+7 -6
View File
@@ -11,6 +11,7 @@ import android.os.Message
import android.widget.Toast
import androidx.core.content.FileProvider
import com.bumptech.glide.Glide
import com.lsp.view.R
import com.lsp.view.YandViewApplication
import java.io.File
import kotlin.concurrent.thread
@@ -45,7 +46,7 @@ object Util {
shareIntent.type = "image/*"
shareIntent.putExtra(Intent.EXTRA_STREAM,imageUri)
val intent = Intent.createChooser(shareIntent,"分享")
val intent = Intent.createChooser(shareIntent,R.string.title_share.toString())
val resInfoList: List<ResolveInfo> = context.packageManager
.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)
@@ -65,7 +66,7 @@ object Util {
}
fun download(file_url: String?, file_ext: String?,md5: String?){
Toast.makeText(YandViewApplication.context, "开始保存", Toast.LENGTH_SHORT).show()
Toast.makeText(YandViewApplication.context, R.string.toast_download_start, Toast.LENGTH_SHORT).show()
if (file_url != null) {
if (file_ext != null) {
@@ -79,19 +80,19 @@ object Util {
super.handleMessage(msg)
when(msg.what){
CallBackStatus.OK.ordinal ->{
Toast.makeText(YandViewApplication.context, "保存成功", Toast.LENGTH_SHORT).show()
Toast.makeText(YandViewApplication.context, R.string.toast_download_success, Toast.LENGTH_SHORT).show()
}
CallBackStatus.DOWNLOADERROR.ordinal -> {
Toast.makeText(YandViewApplication.context, "下载异常", Toast.LENGTH_SHORT).show()
Toast.makeText(YandViewApplication.context, R.string.toast_download_fail, Toast.LENGTH_SHORT).show()
}
CallBackStatus.MD5COMPAREERROR.ordinal -> {
Toast.makeText(YandViewApplication.context, "文件下载异常,MD5对比失败", Toast.LENGTH_SHORT).show()
Toast.makeText(YandViewApplication.context, R.string.toast_compar_md5_fail, Toast.LENGTH_SHORT).show()
}
CallBackStatus.FILEEXISTS.ordinal -> {
Toast.makeText(YandViewApplication.context, "文件已经存在", Toast.LENGTH_SHORT).show()
Toast.makeText(YandViewApplication.context, R.string.toast_file_exist, Toast.LENGTH_SHORT).show()
}
}
+6
View File
@@ -22,4 +22,10 @@
<string name="title_setting_load_source">加载源</string>
<string name="toast_tag_add_fav">收藏了新的标签</string>
<string name="toast_tag_exist">收藏过了哦</string>
<string name="toast_download_success">下载成功</string>
<string name="toast_download_fail">下载失败</string>
<string name="toast_compar_md5_fail">MD5对比失败</string>
<string name="toast_file_exist">文件已经存在</string>
<string name="toast_download_start">开始下载</string>
<string name="title_share">分享</string>
</resources>
+6
View File
@@ -23,4 +23,10 @@
<string name="title_setting_load_source">Load source</string>
<string name="toast_tag_add_fav">Add to new favorites</string>
<string name="toast_tag_exist">This tag exist</string>
<string name="toast_download_success">Successfully download</string>
<string name="toast_download_fail">Download failed</string>
<string name="toast_compar_md5_fail">MD5 comparison failed</string>
<string name="toast_file_exist">File exists</string>
<string name="toast_download_start">Start download</string>
<string name="title_share">Share</string>
</resources>