From 6b621a8a497f42c2b75c514971e37644b6bef6af Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 14 Nov 2019 20:33:08 +0800 Subject: [PATCH] up --- .../source/edit/BookSourceEditActivity.kt | 32 ++++++------ .../rss/source/edit/RssSourceEditActivity.kt | 38 +++++--------- app/src/main/res/values/strings.xml | 52 ++++++++----------- 3 files changed, 52 insertions(+), 70 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt index 87c7bea39..0fd1fbe2c 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt @@ -151,10 +151,10 @@ class BookSourceEditActivity : //基本信息 sourceEntities.clear() sourceEntities.apply { - add(EditEntity("bookSourceUrl", source?.bookSourceUrl, R.string.book_source_url)) - add(EditEntity("bookSourceName", source?.bookSourceName, R.string.book_source_name)) - add(EditEntity("bookSourceGroup", source?.bookSourceGroup, R.string.book_source_group)) - add(EditEntity("loginUrl", source?.loginUrl, R.string.book_source_login_url)) + add(EditEntity("bookSourceUrl", source?.bookSourceUrl, R.string.source_url)) + add(EditEntity("bookSourceName", source?.bookSourceName, R.string.source_name)) + add(EditEntity("bookSourceGroup", source?.bookSourceGroup, R.string.source_group)) + add(EditEntity("loginUrl", source?.loginUrl, R.string.login_url)) add(EditEntity("bookUrlPattern", source?.bookUrlPattern, R.string.book_url_pattern)) add(EditEntity("header", source?.header, R.string.source_http_header)) } @@ -162,24 +162,24 @@ class BookSourceEditActivity : val sr = source?.getSearchRule() searchEntities.clear() searchEntities.apply { - add(EditEntity("searchUrl", source?.searchUrl, R.string.rule_search_url)) - add(EditEntity("bookList", sr?.bookList, R.string.rule_book_list)) - add(EditEntity("name", sr?.name, R.string.rule_book_name)) - add(EditEntity("author", sr?.author, R.string.rule_book_author)) + add(EditEntity("searchUrl", source?.searchUrl, R.string.r_search_url)) + add(EditEntity("bookList", sr?.bookList, R.string.r_book_list)) + add(EditEntity("name", sr?.name, R.string.r_book_name)) + add(EditEntity("author", sr?.author, R.string.r_author)) add(EditEntity("kind", sr?.kind, R.string.rule_book_kind)) add(EditEntity("wordCount", sr?.wordCount, R.string.rule_word_count)) add(EditEntity("lastChapter", sr?.lastChapter, R.string.rule_last_chapter)) add(EditEntity("intro", sr?.intro, R.string.rule_book_intro)) add(EditEntity("coverUrl", sr?.coverUrl, R.string.rule_cover_url)) - add(EditEntity("bookUrl", sr?.bookUrl, R.string.rule_book_url)) + add(EditEntity("bookUrl", sr?.bookUrl, R.string.r_book_url)) } //详情页 val ir = source?.getBookInfoRule() infoEntities.clear() infoEntities.apply { add(EditEntity("init", ir?.init, R.string.rule_book_info_init)) - add(EditEntity("name", ir?.name, R.string.rule_book_name)) - add(EditEntity("author", ir?.author, R.string.rule_book_author)) + add(EditEntity("name", ir?.name, R.string.r_book_name)) + add(EditEntity("author", ir?.author, R.string.r_author)) add(EditEntity("kind", ir?.kind, R.string.rule_book_kind)) add(EditEntity("wordCount", ir?.wordCount, R.string.rule_word_count)) add(EditEntity("lastChapter", ir?.lastChapter, R.string.rule_last_chapter)) @@ -211,16 +211,16 @@ class BookSourceEditActivity : val er = source?.getExploreRule() findEntities.clear() findEntities.apply { - add(EditEntity("exploreUrl", source?.exploreUrl, R.string.rule_find_url)) - add(EditEntity("bookList", er?.bookList, R.string.rule_book_list)) - add(EditEntity("name", er?.name, R.string.rule_book_name)) - add(EditEntity("author", er?.author, R.string.rule_book_author)) + add(EditEntity("exploreUrl", source?.exploreUrl, R.string.r_find_url)) + add(EditEntity("bookList", er?.bookList, R.string.r_book_list)) + add(EditEntity("name", er?.name, R.string.r_book_name)) + add(EditEntity("author", er?.author, R.string.r_author)) add(EditEntity("kind", er?.kind, R.string.rule_book_kind)) add(EditEntity("wordCount", er?.wordCount, R.string.rule_word_count)) add(EditEntity("lastChapter", er?.lastChapter, R.string.rule_last_chapter)) add(EditEntity("intro", er?.intro, R.string.rule_book_intro)) add(EditEntity("coverUrl", er?.coverUrl, R.string.rule_cover_url)) - add(EditEntity("bookUrl", er?.bookUrl, R.string.rule_book_url)) + add(EditEntity("bookUrl", er?.bookUrl, R.string.r_book_url)) } setEditEntities(0) } diff --git a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt index 2c1d2e066..c993073ef 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt @@ -123,31 +123,19 @@ class RssSourceEditActivity : } sourceEntities.clear() sourceEntities.apply { - add(EditEntity("sourceName", rssSource?.sourceName, R.string.rss_source_name)) - add(EditEntity("sourceUrl", rssSource?.sourceUrl, R.string.rss_source_url)) - add(EditEntity("sourceIcon", rssSource?.sourceIcon, R.string.rss_source_icon)) - add(EditEntity("sourceGroup", rssSource?.sourceGroup, R.string.rss_source_group)) - add(EditEntity("ruleArticles", rssSource?.ruleArticles, R.string.rss_rule_articles)) - add(EditEntity("ruleNextPage", rssSource?.ruleNextPage, R.string.rss_rule_next)) - add(EditEntity("ruleTitle", rssSource?.ruleTitle, R.string.rss_rule_title)) - add(EditEntity("rulePubDate", rssSource?.rulePubDate, R.string.rss_rule_date)) - add( - EditEntity( - "ruleCategories", - rssSource?.ruleCategories, - R.string.rss_rule_categories - ) - ) - add( - EditEntity( - "ruleDescription", - rssSource?.ruleDescription, - R.string.rss_rule_description - ) - ) - add(EditEntity("ruleImage", rssSource?.ruleImage, R.string.rss_rule_image)) - add(EditEntity("ruleLink", rssSource?.ruleLink, R.string.rss_rule_link)) - add(EditEntity("ruleContent", rssSource?.ruleContent, R.string.rss_rule_content)) + add(EditEntity("sourceName", rssSource?.sourceName, R.string.source_name)) + add(EditEntity("sourceUrl", rssSource?.sourceUrl, R.string.source_url)) + add(EditEntity("sourceIcon", rssSource?.sourceIcon, R.string.source_icon)) + add(EditEntity("sourceGroup", rssSource?.sourceGroup, R.string.source_group)) + add(EditEntity("ruleArticles", rssSource?.ruleArticles, R.string.r_articles)) + add(EditEntity("ruleNextPage", rssSource?.ruleNextPage, R.string.r_next)) + add(EditEntity("ruleTitle", rssSource?.ruleTitle, R.string.r_title)) + add(EditEntity("rulePubDate", rssSource?.rulePubDate, R.string.r_date)) + add(EditEntity("ruleCategories", rssSource?.ruleCategories, R.string.r_categories)) + add(EditEntity("ruleDescription", rssSource?.ruleDescription, R.string.r_description)) + add(EditEntity("ruleImage", rssSource?.ruleImage, R.string.r_image)) + add(EditEntity("ruleLink", rssSource?.ruleLink, R.string.r_link)) + add(EditEntity("ruleContent", rssSource?.ruleContent, R.string.r_content)) } adapter.editEntities = sourceEntities } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index be46dfa7e..d54b7c30e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -359,17 +359,17 @@ 成功 当前源没有配置登陆地址 - - 书源名称(bookSourceName) - 书源URL(bookSourceUrl) - 书源分组(bookSourceGroup) - 登录URL(loginUrl) - 搜索地址(url) - 发现地址规则(url) - 书籍列表规则(bookList) - 书名规则(name) - 详情页url规则(bookUrl) - 作者规则(author) + + 书源名称(bookSourceName) + 书源URL(bookSourceUrl) + 书源分组(bookSourceGroup) + 登录URL(loginUrl) + 搜索地址(url) + 发现地址规则(url) + 书籍列表规则(bookList) + 书名规则(name) + 详情页url规则(bookUrl) + 作者规则(author) 分类规则(kind) 简介规则(intro) 封面规则(coverUrl) @@ -388,25 +388,19 @@ 正文下一页URL规则(nextContentUrl) webJs 资源正则(sourceRegex) - - - 名称(sourceName) - url(sourceUrl) - 图标(sourceIcon) - 分组(sourceGroup) - 列表规则(ruleArticles) - 列表下一页规则(ruleArticles) - 标题规则(ruleTitle) - 作者规则(ruleAuthor) - guid规则(ruleGuid) - 时间规则(rulePubDate) - 类别规则(ruleCategories) - 描述规则(ruleDescription) - 图片url规则(ruleImage) - 内容规则(ruleContent) - 链接规则(ruleLink) - + 图标(sourceIcon) + 列表规则(ruleArticles) + 列表下一页规则(ruleArticles) + 标题规则(ruleTitle) + guid规则(ruleGuid) + 时间规则(rulePubDate) + 类别规则(ruleCategories) + 描述规则(ruleDescription) + 图片url规则(ruleImage) + 内容规则(ruleContent) + 链接规则(ruleLink) + 没有书源