Merge pull request #253 from david082321/master

将两个字串,改用多语言显示
pull/255/head^2
kunfei 4 years ago committed by GitHub
commit cdbb2cabe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt
  2. 2
      app/src/main/res/values-zh-rHK/strings.xml
  3. 2
      app/src/main/res/values-zh-rTW/strings.xml
  4. 2
      app/src/main/res/values/strings.xml

@ -15,6 +15,7 @@ import io.legado.app.help.ReadBookConfig
import io.legado.app.ui.book.read.page.ContentView import io.legado.app.ui.book.read.page.ContentView
import io.legado.app.ui.book.read.page.PageView import io.legado.app.ui.book.read.page.PageView
import kotlin.math.abs import kotlin.math.abs
import io.legado.app.R
abstract class PageDelegate(protected val pageView: PageView) : abstract class PageDelegate(protected val pageView: PageView) :
GestureDetector.SimpleOnGestureListener() { GestureDetector.SimpleOnGestureListener() {
@ -316,7 +317,7 @@ abstract class PageDelegate(protected val pageView: PageView) :
val hasPrev = pageView.pageFactory.hasPrev() val hasPrev = pageView.pageFactory.hasPrev()
if (!hasPrev) { if (!hasPrev) {
if (!snackBar.isShown) { if (!snackBar.isShown) {
snackBar.setText("没有上一页") snackBar.setText(R.string.no_prev_page)
snackBar.show() snackBar.show()
} }
} }
@ -330,7 +331,7 @@ abstract class PageDelegate(protected val pageView: PageView) :
val hasNext = pageView.pageFactory.hasNext() val hasNext = pageView.pageFactory.hasNext()
if (!hasNext) { if (!hasNext) {
if (!snackBar.isShown) { if (!snackBar.isShown) {
snackBar.setText("没有下一页") snackBar.setText(R.string.no_next_page)
snackBar.show() snackBar.show()
} }
} }

@ -375,6 +375,8 @@
<string name="login_source">登錄 %s</string> <string name="login_source">登錄 %s</string>
<string name="success">成功</string> <string name="success">成功</string>
<string name="source_no_login">當前源沒有配置登陸地址</string> <string name="source_no_login">當前源沒有配置登陸地址</string>
<string name="no_prev_page">沒有上一頁</string>
<string name="no_next_page">沒有下一頁</string>
<!-- source start--> <!-- source start-->
<string name="source_name">源名稱 (sourceName)</string> <string name="source_name">源名稱 (sourceName)</string>

@ -376,6 +376,8 @@
<string name="login_source">登入%s</string> <string name="login_source">登入%s</string>
<string name="success">成功</string> <string name="success">成功</string>
<string name="source_no_login">目前源沒有配置登入地址</string> <string name="source_no_login">目前源沒有配置登入地址</string>
<string name="no_prev_page">沒有上一頁</string>
<string name="no_next_page">沒有下一頁</string>
<!-- source start--> <!-- source start-->
<string name="source_name">源名稱(sourceName)</string> <string name="source_name">源名稱(sourceName)</string>

@ -377,6 +377,8 @@
<string name="login_source">登录%s</string> <string name="login_source">登录%s</string>
<string name="success">成功</string> <string name="success">成功</string>
<string name="source_no_login">当前源没有配置登陆地址</string> <string name="source_no_login">当前源没有配置登陆地址</string>
<string name="no_prev_page">没有上一页</string>
<string name="no_next_page">没有下一页</string>
<!-- source start--> <!-- source start-->
<string name="source_name">源名称(sourceName)</string> <string name="source_name">源名称(sourceName)</string>

Loading…
Cancel
Save