From 33fb15177bee6a9871852ae22620d4d1fde227a8 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 30 Mar 2021 19:50:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/read/config/SpeakEngineDialog.kt | 2 ++ .../legado/app/ui/book/read/config/TocRegexDialog.kt | 5 +---- .../app/ui/book/source/manage/BookSourceActivity.kt | 8 ++++---- .../io/legado/app/ui/replace/ReplaceRuleActivity.kt | 6 +++--- .../app/ui/rss/source/manage/RssSourceActivity.kt | 8 ++++---- app/src/main/res/menu/book_source.xml | 10 +++++----- app/src/main/res/menu/replace_rule.xml | 10 +++++----- app/src/main/res/menu/rss_source.xml | 10 +++++----- app/src/main/res/menu/speak_engine.xml | 10 ++++++++++ app/src/main/res/values-zh-rHK/strings.xml | 4 ++-- app/src/main/res/values-zh-rTW/strings.xml | 4 ++-- app/src/main/res/values-zh/strings.xml | 4 ++-- app/src/main/res/values/strings.xml | 4 ++-- 13 files changed, 47 insertions(+), 38 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt index bb4bde76c..daf6093ce 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt @@ -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 } diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt index 55b1a4ec4..2160a955b 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt @@ -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) diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index 127780d52..b44317e04 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -121,19 +121,19 @@ class BookSourceActivity : VMBaseActivity startActivity() - 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 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) diff --git a/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt b/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt index 03ed50688..6e9f0e6a1 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt @@ -108,14 +108,14 @@ class RssSourceActivity : VMBaseActivity startActivity() - 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 diff --git a/app/src/main/res/menu/replace_rule.xml b/app/src/main/res/menu/replace_rule.xml index f650ab792..9b49c60db 100644 --- a/app/src/main/res/menu/replace_rule.xml +++ b/app/src/main/res/menu/replace_rule.xml @@ -31,19 +31,19 @@ app:showAsAction="never" /> diff --git a/app/src/main/res/menu/rss_source.xml b/app/src/main/res/menu/rss_source.xml index 739b68d58..4425cd424 100644 --- a/app/src/main/res/menu/rss_source.xml +++ b/app/src/main/res/menu/rss_source.xml @@ -31,19 +31,19 @@ app:showAsAction="never" /> diff --git a/app/src/main/res/menu/speak_engine.xml b/app/src/main/res/menu/speak_engine.xml index 9ca269d05..80ba12ff1 100644 --- a/app/src/main/res/menu/speak_engine.xml +++ b/app/src/main/res/menu/speak_engine.xml @@ -15,4 +15,14 @@ android:title="@string/import_default_rule" app:showAsAction="never" /> + + + + \ No newline at end of file diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index c7132dec8..59a6ea723 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -188,8 +188,8 @@ 跟隨系統 添加 導入書源 - 本地導入 - 網絡導入 + 本地導入 + 網絡導入 替換淨化 替換規則編輯 替換規則 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 3c9461915..6ea300b43 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -190,8 +190,8 @@ 跟隨系統 新增 匯入書源 - 本機匯入 - 網路匯入 + 本機匯入 + 網路匯入 取代淨化 取代規則編輯 取代規則 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index a6925aa16..910a08008 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -190,8 +190,8 @@ 跟随系统 添加 导入书源 - 本地导入 - 网络导入 + 本地导入 + 网络导入 替换净化 替换规则编辑 替换规则 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 08b4f8ef6..57077eafb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -191,8 +191,8 @@ Follow system Add Import book sources - Import local sources - Import online sources + Import local + Import online Replacement Edit replacement rule Pattern