pull/921/head
gedoor 4 years ago
parent 76bec034cc
commit 33fb15177b
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt
  2. 5
      app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt
  3. 8
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  4. 6
      app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt
  5. 8
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt
  6. 10
      app/src/main/res/menu/book_source.xml
  7. 10
      app/src/main/res/menu/replace_rule.xml
  8. 10
      app/src/main/res/menu/rss_source.xml
  9. 10
      app/src/main/res/menu/speak_engine.xml
  10. 4
      app/src/main/res/values-zh-rHK/strings.xml
  11. 4
      app/src/main/res/values-zh-rTW/strings.xml
  12. 4
      app/src/main/res/values-zh/strings.xml
  13. 4
      app/src/main/res/values/strings.xml

@ -100,6 +100,8 @@ class SpeakEngineDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener
when (item?.itemId) {
R.id.menu_add -> editHttpTTS()
R.id.menu_default -> viewModel.importDefault()
R.id.menu_import_onLine -> {
}
}
return true
}

@ -11,8 +11,6 @@ import androidx.appcompat.widget.Toolbar
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.viewModels
import androidx.lifecycle.LiveData
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.snackbar.Snackbar
import io.legado.app.R
@ -29,7 +27,6 @@ import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.widget.recycler.ItemTouchCallback
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.*
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Dispatchers.IO
@ -137,7 +134,7 @@ class TocRegexDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
if (!cacheUrls.contains(defaultUrl)) {
cacheUrls.add(0, defaultUrl)
}
requireContext().alert(titleResource = R.string.import_book_source_on_line) {
requireContext().alert(titleResource = R.string.import_on_line) {
val alertBinding = DialogEditTextBinding.inflate(layoutInflater)
alertBinding.apply {
editView.setFilterValues(cacheUrls)

@ -121,19 +121,19 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.menu_add_book_source -> startActivity<BookSourceEditActivity>()
R.id.menu_import_source_qr -> qrResult.launch(null)
R.id.menu_import_qr -> qrResult.launch(null)
R.id.menu_share_source -> viewModel.shareSelection(adapter.getSelection()) {
startActivity(Intent.createChooser(it, getString(R.string.share_selected_source)))
}
R.id.menu_group_manage ->
GroupManageDialog().show(supportFragmentManager, "groupManage")
R.id.menu_import_source_local -> importDoc.launch(
R.id.menu_import_local -> importDoc.launch(
FilePickerParam(
mode = FilePicker.FILE,
allowExtensions = arrayOf("txt", "json")
)
)
R.id.menu_import_source_onLine -> showImportDialog()
R.id.menu_import_onLine -> showImportDialog()
R.id.menu_sort_manual -> {
item.isChecked = true
sortCheck(Sort.Default)
@ -402,7 +402,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
.getAsString(importRecordKey)
?.splitNotBlank(",")
?.toMutableList() ?: mutableListOf()
alert(titleResource = R.string.import_book_source_on_line) {
alert(titleResource = R.string.import_on_line) {
val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply {
editView.setFilterValues(cacheUrls)
editView.delCallBack = {

@ -216,14 +216,14 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
GroupManageDialog().show(supportFragmentManager, "groupManage")
R.id.menu_del_selection -> viewModel.delSelection(adapter.getSelection())
R.id.menu_import_source_onLine -> showImportDialog()
R.id.menu_import_source_local -> importDoc.launch(
R.id.menu_import_onLine -> showImportDialog()
R.id.menu_import_local -> importDoc.launch(
FilePickerParam(
mode = FilePicker.FILE,
allowExtensions = arrayOf("txt", "json")
)
)
R.id.menu_import_source_qr -> qrCodeResult.launch(null)
R.id.menu_import_qr -> qrCodeResult.launch(null)
R.id.menu_help -> showHelp()
else -> if (item.groupId == R.id.replace_group) {
searchView.setQuery("group:${item.title}", true)

@ -108,14 +108,14 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.menu_add -> startActivity<RssSourceEditActivity>()
R.id.menu_import_source_local -> importDoc.launch(
R.id.menu_import_local -> importDoc.launch(
FilePickerParam(
mode = FilePicker.FILE,
allowExtensions = arrayOf("txt", "json")
)
)
R.id.menu_import_source_onLine -> showImportDialog()
R.id.menu_import_source_qr -> qrCodeResult.launch(null)
R.id.menu_import_onLine -> showImportDialog()
R.id.menu_import_qr -> qrCodeResult.launch(null)
R.id.menu_group_manage -> GroupManageDialog()
.show(supportFragmentManager, "rssGroupManage")
R.id.menu_share_source -> viewModel.shareSelection(adapter.getSelection()) {
@ -266,7 +266,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
.getAsString(importRecordKey)
?.splitNotBlank(",")
?.toMutableList() ?: mutableListOf()
alert(titleResource = R.string.import_book_source_on_line) {
alert(titleResource = R.string.import_on_line) {
val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply {
editView.setFilterValues(cacheUrls)
editView.delCallBack = {

@ -85,19 +85,19 @@
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_local"
android:id="@+id/menu_import_local"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_local"
android:title="@string/import_local"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_onLine"
android:id="@+id/menu_import_onLine"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_on_line"
android:title="@string/import_on_line"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_qr"
android:id="@+id/menu_import_qr"
android:icon="@drawable/ic_import"
android:title="@string/import_by_qr_code"
app:showAsAction="never" />

@ -31,19 +31,19 @@
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_local"
android:id="@+id/menu_import_local"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_local"
android:title="@string/import_local"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_onLine"
android:id="@+id/menu_import_onLine"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_on_line"
android:title="@string/import_on_line"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_qr"
android:id="@+id/menu_import_qr"
android:icon="@drawable/ic_import"
android:title="@string/import_by_qr_code"
app:showAsAction="never" />

@ -31,19 +31,19 @@
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_local"
android:id="@+id/menu_import_local"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_local"
android:title="@string/import_local"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_onLine"
android:id="@+id/menu_import_onLine"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_on_line"
android:title="@string/import_on_line"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_source_qr"
android:id="@+id/menu_import_qr"
android:icon="@drawable/ic_import"
android:title="@string/import_by_qr_code"
app:showAsAction="never" />

@ -15,4 +15,14 @@
android:title="@string/import_default_rule"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_local"
android:title="@string/import_local"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_onLine"
android:title="@string/import_on_line"
app:showAsAction="never" />
</menu>

@ -188,8 +188,8 @@
<string name="flow_sys">跟隨系統</string>
<string name="add">添加</string>
<string name="import_book_source">導入書源</string>
<string name="import_book_source_local">本地導入</string>
<string name="import_book_source_on_line">網絡導入</string>
<string name="import_local">本地導入</string>
<string name="import_on_line">網絡導入</string>
<string name="replace_rule_title">替換淨化</string>
<string name="replace_rule_edit">替換規則編輯</string>
<string name="replace_rule">替換規則</string>

@ -190,8 +190,8 @@
<string name="flow_sys">跟隨系統</string>
<string name="add">新增</string>
<string name="import_book_source">匯入書源</string>
<string name="import_book_source_local">本機匯入</string>
<string name="import_book_source_on_line">網路匯入</string>
<string name="import_local">本機匯入</string>
<string name="import_on_line">網路匯入</string>
<string name="replace_rule_title">取代淨化</string>
<string name="replace_rule_edit">取代規則編輯</string>
<string name="replace_rule">取代規則</string>

@ -190,8 +190,8 @@
<string name="flow_sys">跟随系统</string>
<string name="add">添加</string>
<string name="import_book_source">导入书源</string>
<string name="import_book_source_local">本地导入</string>
<string name="import_book_source_on_line">网络导入</string>
<string name="import_local">本地导入</string>
<string name="import_on_line">网络导入</string>
<string name="replace_rule_title">替换净化</string>
<string name="replace_rule_edit">替换规则编辑</string>
<string name="replace_rule">替换规则</string>

@ -191,8 +191,8 @@
<string name="flow_sys">Follow system</string>
<string name="add">Add</string>
<string name="import_book_source">Import book sources</string>
<string name="import_book_source_local">Import local sources</string>
<string name="import_book_source_on_line">Import online sources</string>
<string name="import_local">Import local</string>
<string name="import_on_line">Import online</string>
<string name="replace_rule_title">Replacement</string>
<string name="replace_rule_edit">Edit replacement rule</string>
<string name="replace_rule">Pattern</string>

Loading…
Cancel
Save