Skip to content

Commit

Permalink
update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
yukonisen committed Feb 3, 2024
1 parent 46417da commit a390146
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class LightNovelReaderApplication: Application(){



override fun onCreate() {
super.onCreate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class LightNovelReaderWebAPI @Inject constructor() {
val dataCall: Call<ResponseBody> = service.getUpdateApk()

val data: Response<ResponseBody>? = dataCall.execute()
println("老子tm下好了!")
Log.w("API","老子tm下好了!")
data?.body()
} catch (error: Exception){
error.localizedMessage?.let { Log.e("API", it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import indi.dmzz_yyhyy.lightnovelreader.R

@Composable
fun UpdateAlertDialog(
Expand Down Expand Up @@ -35,7 +37,7 @@ fun UpdateAlertDialog(
onConfirmation()
}
) {
Text("升级")
Text(stringResource(id = R.string.update_confirm))
}
},
dismissButton = {
Expand All @@ -44,7 +46,7 @@ fun UpdateAlertDialog(
onDismissRequest()
}
) {
Text("忽略")
Text(stringResource(id = R.string.update_dismiss))
}
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ class HomeActivity : ComponentActivity() {
}
}}
},
dialogTitle = "有新的更新可用",
dialogText = "服务端上有更新的客户端版本,我们建议恁进行升级.",
dialogTitle = stringResource(id = R.string.new_update_available),
dialogText = stringResource(id = R.string.new_update_available_text),
)
}
if (isDownloadingUpdate.value) {
AlertDialog(
icon = { Icon(Icons.Default.Download, contentDescription = "download") },
title = { Text("正在下载", style = MaterialTheme.typography.headlineSmall) },
text = { Text("正在从客户端获取数据,请稍等...") },
title = { Text(stringResource(id = R.string.downloading), style = MaterialTheme.typography.headlineSmall) },
text = { Text(stringResource(id = R.string.downloading_text)) },
onDismissRequest = {},
confirmButton = {},
dismissButton = {}
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<string name="last_read">上次阅读: %s</string>
<string name="current_reading">当前阅读: %s</string>
<string name="last_reading_time">上次阅读时间: %s</string>
<string name="new_update_available">有新的更新可用</string>
<string name="new_update_available_text">服务端上有更新的客户端版本,我们建议您进行升级。</string>
<string name="contents">目录</string>
<string name="chapters">章节</string>
<string name="volumes">卷</string>
Expand All @@ -29,4 +31,8 @@
<string name="desc_cover">封面</string>
<string name="desc_icon_image">图标</string>
<string name="desc_search">搜索</string>
<string name="downloading">正在下载…</string>
<string name="downloading_text">正在从服务端获取数据,请稍等...</string>
<string name="update_confirm">升级</string>
<string name="update_dismiss">忽略</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,12 @@
<string name="desc_cover">cover</string>
<string name="desc_icon_image">icon image</string>
<string name="desc_search">search</string>
<string name="new_update_available">New update available</string>
<string name="new_update_available_text">A new version of the application is available, we recommend you to
update.
</string>
<string name="downloading">Downloading</string>
<string name="downloading_text">Downloading from server...</string>
<string name="update_confirm">Update</string>
<string name="update_dismiss">Dismiss</string>
</resources>

0 comments on commit a390146

Please sign in to comment.