diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 644713b..d727858 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -91,7 +91,7 @@ { val cookieManager = CookieManager.getInstance() - return ApiHelper.buildHttpCall(Bangumi.SERVER, mapOf("User-Agent" to ua)){ + return ApiHelper.buildHttpCall("$SERVER/settings", mapOf("User-Agent" to ua)){ var needReload = false val doc = Jsoup.parse(it.body()?.string()?:"") val user = doc.selectFirst(".idBadgerNeue a.avatar")?: throw Exception("login failed") - val userName = doc.selectFirst("#header a")?.text() + val userName = doc.selectFirst("input[name=nickname]")?.attr("value")//doc.selectFirst("#header a")?.text() val img = HttpUtil.getUrl(Regex("""background-image:url\('([^']*)'\)""").find(user.html()?:"")?.groupValues?.get(1)?:"", URI.create(Bangumi.SERVER)) val id = Regex("""/user/([^/]*)""").find(user.attr("href")?:"")?.groupValues?.get(1) it.headers("set-cookie").forEach { needReload = true cookieManager.setCookie(Bangumi.SERVER, it) } val formhash = doc.selectFirst("input[name=formhash]")?.attr("value") + val inbox = Regex("叮咚叮咚~你有 ([0-9]+) 条新信息!").find(doc.selectFirst("#robot_speech_js")?.text()?:"")?.groupValues?.get(1)?.toIntOrNull()?:0 + val notify = doc.selectFirst("#notify_count")?.text()?.toIntOrNull()?:0 UserInfo(id?.toIntOrNull()?:0, HttpUtil.getUrl(user.attr("href")?:"", URI.create(SERVER)), id, userName, Images(img.replace("/s/", "/l/"), img.replace("/s/", "/l/"), img.replace("/s/", "/m/"), img, - img.replace("/s/", "/m/")), sign = formhash, needReload = needReload) + img.replace("/s/", "/m/")), sign = formhash, needReload = needReload, notify = Pair(inbox, notify)) } } diff --git a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/CollectionStatusType.kt b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/CollectionStatusType.kt index eb7639b..82ba24f 100644 --- a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/CollectionStatusType.kt +++ b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/CollectionStatusType.kt @@ -1,6 +1,7 @@ package soko.ekibun.bangumi.api.bangumi.bean import android.support.annotation.StringDef +import soko.ekibun.bangumi.R object CollectionStatusType{ const val WISH = "wish" @@ -11,4 +12,14 @@ object CollectionStatusType{ @StringDef(WISH, COLLECT, DO, ON_HOLD, DROPPED) annotation class CollectionStatusType val status=arrayOf(WISH, COLLECT, DO, ON_HOLD, DROPPED) + + fun getTypeNamesResId(@SubjectType.SubjectType type: Int): Int{ + return when(type){ + SubjectType.BOOK -> R.array.collection_status_book + SubjectType.MUSIC -> R.array.collection_status_music + SubjectType.GAME -> R.array.collection_status_game + SubjectType.REAL -> R.array.collection_status_real + else -> R.array.collection_status_anime + } + } } \ No newline at end of file diff --git a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Episode.kt b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Episode.kt index 99c3171..650a1e2 100644 --- a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Episode.kt +++ b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Episode.kt @@ -1,7 +1,9 @@ package soko.ekibun.bangumi.api.bangumi.bean import android.annotation.SuppressLint +import android.content.Context import android.support.annotation.IntDef +import soko.ekibun.bangumi.R import java.text.DecimalFormat @@ -37,11 +39,11 @@ data class Episode( * status : Air */ - fun parseSort(): String{ + fun parseSort(context: Context): String{ return if(type == TYPE_MAIN) - "第 ${DecimalFormat("#.##").format(sort)} 话" + context.getString(R.string.parse_sort_ep, DecimalFormat("#.##").format(sort)) else - getTypeName(type) + " ${DecimalFormat("#.##").format(sort)}" + context.getString(getTypeName(type)) + " ${DecimalFormat("#.##").format(sort)}" } companion object { @@ -58,16 +60,16 @@ data class Episode( annotation class EpisodeType @SuppressLint("SwitchIntDef") - fun getTypeName(@EpisodeType type: Int): String{ + fun getTypeName(@EpisodeType type: Int): Int{ return when(type){ - TYPE_MAIN -> "本篇" - TYPE_SP -> "特别篇" - TYPE_OP -> "OP" - TYPE_ED -> "ED" - TYPE_PV -> "PV" - TYPE_MAD -> "MAD" - TYPE_MUSIC -> "曲目" - else -> "其他" + TYPE_MAIN -> R.string.episode_type_main + TYPE_SP -> R.string.episode_type_sp + TYPE_OP -> R.string.episode_type_op + TYPE_ED -> R.string.episode_type_ed + TYPE_PV -> R.string.episode_type_pv + TYPE_MAD -> R.string.episode_type_mad + TYPE_MUSIC -> R.string.episode_type_music + else -> R.string.episode_type_main } } } diff --git a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Images.kt b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Images.kt index 4248f13..7489cc3 100644 --- a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Images.kt +++ b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/Images.kt @@ -13,7 +13,13 @@ data class Images( fun getImage(context: Context): String? { val quality = PreferenceManager.getDefaultSharedPreferences(context).getString("image_quality", "c") - return common?.replace("/c/", "/$quality/") + return when(quality){ + "l" -> large + "m" -> medium + "s" -> small + "g" -> grid + else -> common + } } /** * large : http://lain.bgm.tv/pic/cover/l/e5/ba/6776_bA2h2.jpg diff --git a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/SubjectType.kt b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/SubjectType.kt index 0a0f06f..cccb7c3 100644 --- a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/SubjectType.kt +++ b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/SubjectType.kt @@ -3,6 +3,7 @@ package soko.ekibun.bangumi.api.bangumi.bean import android.annotation.SuppressLint import android.support.annotation.IntDef import android.support.annotation.StringDef +import soko.ekibun.bangumi.R object SubjectType{ const val ALL = 0 @@ -31,15 +32,14 @@ object SubjectType{ ) @SuppressLint("SwitchIntDef") - fun getDescription(@SubjectType type: Int): String{ + fun getDescription(@SubjectType type: Int): Int{ return when (type) { - ALL -> "条目" - BOOK -> "书籍" - ANIME -> "动画" - MUSIC -> "音乐" - GAME -> "游戏" - REAL -> "三次元" - else -> "" + BOOK -> R.string.book + ANIME -> R.string.anime + MUSIC -> R.string.music + GAME -> R.string.game + REAL -> R.string.real + else -> R.string.subject } } } \ No newline at end of file diff --git a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/UserInfo.kt b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/UserInfo.kt index ce0160b..76b2a83 100644 --- a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/UserInfo.kt +++ b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/UserInfo.kt @@ -7,7 +7,8 @@ data class UserInfo( var nickname: String? = null, var avatar: Images? = null, var sign: String? = null, //formhash - var needReload: Boolean = false + var needReload: Boolean = false, + var notify: Pair? = null ): BaseRequest(){ /** * id : 419012 diff --git a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/gson.java b/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/gson.java deleted file mode 100644 index 00338a1..0000000 --- a/app/src/main/java/soko/ekibun/bangumi/api/bangumi/bean/gson.java +++ /dev/null @@ -1,134 +0,0 @@ -package soko.ekibun.bangumi.api.bangumi.bean; - -public class gson { - - /** - * code : success - * data : {"width":1157,"height":680,"filename":"image_2015-08-26_10-54-48.png","storename":"56249afa4e48b.png","size":69525,"path":"/2015/10/19/56249afa4e48b.png","hash":"nLbCw63NheaiJp1","timestamp":1445239546,"url":"https://ooo.0o0.ooo/2015/10/19/56249afa4e48b.png","delete":"https://sm.ms/api/delete/nLbCw63NheaiJp1"} - */ - - private String code; - private DataBean data; - - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public static class DataBean { - /** - * width : 1157 - * height : 680 - * filename : image_2015-08-26_10-54-48.png - * storename : 56249afa4e48b.png - * size : 69525 - * path : /2015/10/19/56249afa4e48b.png - * hash : nLbCw63NheaiJp1 - * timestamp : 1445239546 - * url : https://ooo.0o0.ooo/2015/10/19/56249afa4e48b.png - * delete : https://sm.ms/api/delete/nLbCw63NheaiJp1 - */ - - private int width; - private int height; - private String filename; - private String storename; - private int size; - private String path; - private String hash; - private int timestamp; - private String url; - private String delete; - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public String getFilename() { - return filename; - } - - public void setFilename(String filename) { - this.filename = filename; - } - - public String getStorename() { - return storename; - } - - public void setStorename(String storename) { - this.storename = storename; - } - - public int getSize() { - return size; - } - - public void setSize(int size) { - this.size = size; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getHash() { - return hash; - } - - public void setHash(String hash) { - this.hash = hash; - } - - public int getTimestamp() { - return timestamp; - } - - public void setTimestamp(int timestamp) { - this.timestamp = timestamp; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getDelete() { - return delete; - } - - public void setDelete(String delete) { - this.delete = delete; - } - } -} diff --git a/app/src/main/java/soko/ekibun/bangumi/model/SearchHistoryModel.kt b/app/src/main/java/soko/ekibun/bangumi/model/SearchHistoryModel.kt new file mode 100644 index 0000000..b596d6a --- /dev/null +++ b/app/src/main/java/soko/ekibun/bangumi/model/SearchHistoryModel.kt @@ -0,0 +1,36 @@ +package soko.ekibun.bangumi.model + +import android.content.Context +import android.content.SharedPreferences +import android.preference.PreferenceManager +import com.google.gson.reflect.TypeToken +import soko.ekibun.bangumi.util.JsonUtil + +class SearchHistoryModel(context: Context){ + val sp: SharedPreferences by lazy{ PreferenceManager.getDefaultSharedPreferences(context) } + + fun addHistory(searchKey: String) { + val newList = getHistoryList().toMutableList() + newList.add(0, searchKey) + sp.edit().putString(PREF_SEARCH_HISTORY, JsonUtil.toJson(newList.distinct())).apply() + } + + fun removeHistory(searchKey: String): Boolean { + val newList = getHistoryList().toMutableList() + val removed = newList.remove(searchKey) + sp.edit().putString(PREF_SEARCH_HISTORY, JsonUtil.toJson(newList)).apply() + return removed + } + + fun clearHistory() { + sp.edit().putString(PREF_SEARCH_HISTORY, JsonUtil.toJson(ArrayList())).apply() + } + + fun getHistoryList(): List { + return JsonUtil.toEntity(sp.getString(PREF_SEARCH_HISTORY, JsonUtil.toJson(ArrayList()))!!, object: TypeToken>() {}.type)?:ArrayList() + } + + companion object { + const val PREF_SEARCH_HISTORY="searchHistory" + } +} \ No newline at end of file diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/crash/CrashActivity.kt b/app/src/main/java/soko/ekibun/bangumi/ui/crash/CrashActivity.kt index 6f505eb..0514b6e 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/crash/CrashActivity.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/crash/CrashActivity.kt @@ -28,7 +28,7 @@ class CrashActivity : AppCompatActivity() { uploadCall?.cancel() uploadCall = Xxxlin.createInstance().crashReport(content, AppUtil.getVersionCode(this), AppUtil.getVersionName(this)) uploadCall?.enqueue(ApiHelper.buildCallback(this, { - Snackbar.make(item_upload, if(it.code == 0) "日志上传成功" else "日志上传失败:${it.msg}", Snackbar.LENGTH_SHORT).show() + Snackbar.make(item_upload, if(it.code == 0) getString(R.string.crash_upload_ok) else getString(R.string.crash_upload_failed, it.msg?:""), Snackbar.LENGTH_SHORT).show() item_upload.setOnClickListener{} }, {})) } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/MainActivity.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/MainActivity.kt index 303eb63..a7b2054 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/MainActivity.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/MainActivity.kt @@ -14,6 +14,7 @@ import soko.ekibun.bangumi.model.ThemeModel import soko.ekibun.bangumi.ui.search.SearchActivity import android.support.v4.view.MenuItemCompat import android.support.v7.app.AlertDialog +import android.support.v7.widget.PopupMenu import android.view.KeyEvent import android.webkit.WebView import android.widget.Toast @@ -38,32 +39,28 @@ class MainActivity : AppCompatActivity() { if(sp.getBoolean("check_update", true)){ Github.createInstance().releases().enqueue(ApiHelper.buildCallback(this, { val release = it.firstOrNull()?:return@buildCallback - if(release.tag_name?.compareTo(packageManager?.getPackageInfo(packageName, 0)?.versionName?:"")?:0 > 0 && sp.getString("ignore_tag", "") != release.tag_name) + val current = packageManager?.getPackageInfo(packageName, 0)?.versionName?:"" + if(release.tag_name?.compareTo(current)?:0 > 0 && sp.getString("ignore_tag", "") != release.tag_name) AlertDialog.Builder(this) - .setTitle("新版本:${release.tag_name}") - .setMessage(release.body) - .setPositiveButton("下载"){_, _ -> + .setTitle( getString(R.string.parse_new_version, release.tag_name)) + .setMessage( it.filter { it.tag_name?.compareTo(current)?:0 > 0 }.map { "${it.tag_name}\n${it.body}" }.reduce { acc, s -> "$acc\n$s" } ) + .setPositiveButton(R.string.download){_, _ -> WebActivity.launchUrl(this@MainActivity, release.assets?.firstOrNull()?.browser_download_url, "") - }.setNegativeButton("忽略"){_, _ -> + }.setNegativeButton(R.string.ignore){_, _ -> sp.edit().putString("ignore_tag", release.tag_name).apply() }.show() }) {}) } - mainPresenter.refreshUser{ - mainPresenter.reload() - Bangumi.getNotify(ua).enqueue(ApiHelper.buildCallback(this, { - notifyMenu?.badge = it.count() - },{})) - } + } val ua by lazy { WebView(this).settings.userAgentString } override fun onStart() { super.onStart() - Bangumi.getNotify(ua).enqueue(ApiHelper.buildCallback(this, { - notifyMenu?.badge = it.count() - },{})) + mainPresenter.refreshUser{ + mainPresenter.reload() + } } var notifyMenu: NotifyActionProvider? = null @@ -73,7 +70,20 @@ class MainActivity : AppCompatActivity() { val menuItem = menu.findItem(R.id.action_notify) notifyMenu = MenuItemCompat.getActionProvider(menuItem) as NotifyActionProvider notifyMenu?.onClick = { - WebActivity.launchUrl(this, "${Bangumi.SERVER}/notify") + val inbox = mainPresenter.user?.notify?.first?:0 + val notify = mainPresenter.user?.notify?.second?:0 + val popup = PopupMenu(this, menuItem.actionView) + popup.menuInflater.inflate(R.menu.list_notify, popup.menu) + popup.menu.findItem(R.id.notify_type_inbox)?.title = "${getString(R.string.notify_inbox)}${if(inbox != 0) " (+$inbox)" else ""}" + popup.menu.findItem(R.id.notify_type_notify)?.title = "${getString(R.string.notify_notify)}${if(notify != 0) " (+$notify)" else ""}" + popup.setOnMenuItemClickListener{ + when(it.itemId){ + R.id.notify_type_inbox -> WebActivity.launchUrl(this, "${Bangumi.SERVER}/pm") + R.id.notify_type_notify -> WebActivity.launchUrl(this, "${Bangumi.SERVER}/notify") + } + true + } + popup.show() } return true @@ -85,7 +95,7 @@ class MainActivity : AppCompatActivity() { if(mainPresenter.processBack()){ return true }else if((System.currentTimeMillis()-exitTime) > 2000){ - Toast.makeText(applicationContext, "再按一次退出程序", Toast.LENGTH_SHORT).show() + Toast.makeText(applicationContext, R.string.hint_back_to_close, Toast.LENGTH_SHORT).show() exitTime = System.currentTimeMillis() return true } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/MainPresenter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/MainPresenter.kt index 184e41b..11f4a30 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/MainPresenter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/MainPresenter.kt @@ -70,6 +70,7 @@ class MainPresenter(private val context: MainActivity){ fun refreshUser(reload: ()->Unit = {}){ Bangumi.getUserInfo(context.ua).enqueue(ApiHelper.buildCallback(null, { updateUser(it) + context.notifyMenu?.badge = it.notify?.let{ it.first + it.second}?:0 if(it.needReload) reload() }, { if((it as? Exception)?.message == "login failed") updateUser(null) })) } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/UserView.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/UserView.kt index dae1ef3..ad521fb 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/UserView.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/UserView.kt @@ -25,7 +25,7 @@ class UserView(private val context: MainActivity, onUserFigureClickListener: Vie .into(headerView.user_figure) //val token = UserModel(context).getToken() headerView.user_id.text = if(user?.username == null) "" else "@${user.username}" - headerView.user_name.text = user?.nickname?:context.getString(R.string.login_hint) + headerView.user_name.text = user?.nickname?:context.getString(R.string.hint_login) } } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/cache/CacheAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/cache/CacheAdapter.kt index b9e92aa..e08d3d6 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/cache/CacheAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/cache/CacheAdapter.kt @@ -14,7 +14,7 @@ class CacheAdapter(data: MutableList? = null) : override fun convert(helper: BaseViewHolder, item: PlayerBridge.VideoCache) { helper.setText(R.id.item_title, item.bangumi.getPrettyName()) helper.setText(R.id.item_name_jp, item.bangumi.name) - helper.setText(R.id.item_summary, "已缓存 ${item.videoList.size} 话") + helper.setText(R.id.item_summary, helper.itemView.context.getString(R.string.parse_cache_eps, item.videoList.size)) Glide.with(helper.itemView.item_cover) .load(item.bangumi.images?.getImage(helper.itemView.context)) .apply(RequestOptions.errorOf(R.drawable.ic_404)) diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/calendar/CalendarAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/calendar/CalendarAdapter.kt index b62fb5a..e02d342 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/calendar/CalendarAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/calendar/CalendarAdapter.kt @@ -22,7 +22,7 @@ class CalendarAdapter(data: MutableList? = null) : override fun convert(helper: BaseViewHolder, item: CalendarSection) { helper.addOnClickListener(R.id.item_layout) helper.setText(R.id.item_title, (if(item.t.subject.collect) " " else "")+item.t.subject.getPrettyName()) - helper.setText(R.id.item_ep_name, item.t.episode?.parseSort() + " " + (if(item.t.episode?.name_cn.isNullOrEmpty()) item.t.episode?.name?:"" else item.t.episode?.name_cn)) + helper.setText(R.id.item_ep_name, item.t.episode?.parseSort(helper.itemView.context) + " " + (if(item.t.episode?.name_cn.isNullOrEmpty()) item.t.episode?.name?:"" else item.t.episode?.name_cn)) helper.addOnClickListener(R.id.item_layout) Glide.with(helper.itemView.item_cover) .load(item.t.subject.images?.small) @@ -74,6 +74,7 @@ class CalendarAdapter(data: MutableList? = null) : } companion object { + //TODO val weekJp = listOf("", "月", "火", "水", "木", "金", "土", "日") val weekSmall = listOf("", "周一", "周二", "周三", "周四", "周五", "周六", "周日") diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionFragment.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionFragment.kt index da6f62b..9867e35 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionFragment.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionFragment.kt @@ -21,7 +21,6 @@ class CollectionFragment: HomeTabFragment(R.layout.fragment_collection){ item_pager?.currentItem = this.savedInstanceState?.getInt("CollectionPage", 2) ?: 2 - //TODO item_login_info?.visibility = if((activity as? MainActivity)?.user == null) View.VISIBLE else View.GONE item_login?.setOnClickListener { WebActivity.startActivityForAuth(activity!!) } } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionListAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionListAdapter.kt index 0c54cf5..788718c 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionListAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionListAdapter.kt @@ -24,8 +24,12 @@ class CollectionListAdapter(data: MutableList? = null) : if (watchTo != airTo)R.attr.colorPrimary else android.R.attr.textColorSecondary )) - val watchep = (watchTo?.parseSort()?.let{ "看到$it"}?:"尚未观看") + - if(eps?.any { it.status != "Air" } == true) airTo?.parseSort()?.let{ " / 更新到$it" }?:"" else if(item.subject?.eps_count?:0 > 0) " / 全 ${item.subject?.eps_count} 话" else "" + val watchep = (watchTo?.parseSort(helper.itemView.context)?.let{ helper.itemView.context.getString(R.string.parse_watch_to, it) }?: helper.itemView.context.getString(R.string.hint_watch_nothing)) + + when { + eps?.any { it.status != "Air" } == true -> airTo?.parseSort(helper.itemView.context)?.let{ " / " + helper.itemView.context.getString(R.string.parse_update_to, it) }?:"" + item.subject?.eps_count?:0 > 0 -> " / "+ helper.itemView.context.getString(R.string.phrase_full_eps, item.subject?.eps_count) + else -> "" + } helper.setText(R.id.item_summary, if(item.ep_status == -1) item.subject?.summary else watchep) Glide.with(helper.itemView.item_cover) .load(item.subject?.images?.getImage(helper.itemView.context)) diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionPagerAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionPagerAdapter.kt index 215d6cb..df32b95 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionPagerAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/collection/CollectionPagerAdapter.kt @@ -20,8 +20,8 @@ import soko.ekibun.bangumi.api.bangumi.bean.SubjectCollection import soko.ekibun.bangumi.ui.main.MainActivity import soko.ekibun.bangumi.ui.subject.SubjectActivity -class CollectionPagerAdapter(context: Context, val fragment: CollectionFragment, private val pager: ViewPager) : PagerAdapter(){ - private val tabList = context.resources.getStringArray(R.array.collection_status) +class CollectionPagerAdapter(private val context: Context, val fragment: CollectionFragment, private val pager: ViewPager) : PagerAdapter(){ + private var tabList = context.resources.getStringArray(R.array.collection_status_anime) private val subjectTypeView = SubjectTypeView(fragment.item_type) { reset() } init{ @@ -66,6 +66,9 @@ class CollectionPagerAdapter(context: Context, val fragment: CollectionFragment, } fun reset() { + tabList = context.resources.getStringArray(CollectionStatusType.getTypeNamesResId(subjectTypeView.getType())) + notifyDataSetChanged() + items.forEach { (it.value.second.tag as? RecyclerView)?.tag = null } pageIndex.clear() loadCollectionList() diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineAdapter.kt index 75c4099..e45c3d9 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineAdapter.kt @@ -40,8 +40,8 @@ class TimeLineAdapter(val ua: String, data: MutableList? = null) : //del helper.itemView.item_del.visibility = if(item.t.delUrl.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE helper.itemView.item_del.setOnClickListener { - AlertDialog.Builder(helper.itemView.context).setTitle("删除这条时间线?") - .setNegativeButton("取消") { _, _ -> }.setPositiveButton("确定") { _, _ -> + AlertDialog.Builder(helper.itemView.context).setMessage(R.string.timeline_dialog_remove) + .setNegativeButton(R.string.cancel) { _, _ -> }.setPositiveButton(R.string.ok) { _, _ -> ApiHelper.buildHttpCall("${item.t.delUrl}&ajax=1", mapOf("User-Agent" to ua)) { it.body()?.string()?.contains("\"status\":\"ok\"") == true }.enqueue(ApiHelper.buildCallback(helper.itemView.context, { diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineFragment.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineFragment.kt index a7423c9..b370276 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineFragment.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/home/fragment/timeline/TimeLineFragment.kt @@ -49,7 +49,7 @@ class TimeLineFragment: HomeTabFragment(R.layout.fragment_timeline){ var draft = "" item_new?.setOnClickListener { val dialog = ReplyDialog() - dialog.hint = "添加动态" + dialog.hint = context?.getString(R.string.timeline_dialog_add)?:"" dialog.draft = draft dialog.callback = {string, send -> if(send){ @@ -64,7 +64,7 @@ class TimeLineFragment: HomeTabFragment(R.layout.fragment_timeline){ if(item_pager?.currentItem?:2 !in 0..1) item_pager?.currentItem = 1 adapter.pageIndex[item_pager?.currentItem?:0] = 0 adapter.loadTopicList() - }else Snackbar.make(item_pager, "提交出现了一些问题,请稍后再试", Snackbar.LENGTH_SHORT).show() + }else Snackbar.make(item_pager, R.string.hint_submit_error, Snackbar.LENGTH_SHORT).show() }){ }) }else draft = string } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/index/IndexPagerAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/index/IndexPagerAdapter.kt index 5051568..d59d870 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/index/IndexPagerAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/main/fragment/index/IndexPagerAdapter.kt @@ -25,6 +25,7 @@ class IndexPagerAdapter(private val fragment: IndexFragment, private val pager: } override fun getPageTitle(pos: Int): CharSequence{ + //TODO return "${pos/12 + 1000}\n${pos%12+1}月" } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchAdapter.kt index 4dcdedf..0d297e8 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchAdapter.kt @@ -16,7 +16,7 @@ class SearchAdapter(data: MutableList? = null) : override fun convert(helper: BaseViewHolder, item: Subject) { helper.setText(R.id.item_title, (if(item.collect) " " else "")+ item.getPrettyName()) helper.setText(R.id.item_name_jp, item.name) - helper.setText(R.id.item_summary, SubjectType.getDescription(item.type)) + helper.setText(R.id.item_summary, helper.itemView.context.getString(SubjectType.getDescription(item.type))) helper.itemView.item_chase.visibility = if(item.collect) View.VISIBLE else View.GONE Glide.with(helper.itemView.item_cover) .load(item.images?.getImage(helper.itemView.context)) diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchHistoryAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchHistoryAdapter.kt new file mode 100644 index 0000000..3d8c763 --- /dev/null +++ b/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchHistoryAdapter.kt @@ -0,0 +1,14 @@ +package soko.ekibun.bangumi.ui.search + +import com.chad.library.adapter.base.BaseQuickAdapter +import com.chad.library.adapter.base.BaseViewHolder +import soko.ekibun.bangumi.R + +class SearchHistoryAdapter(data: MutableList? = null) : + BaseQuickAdapter(R.layout.item_search_history, data) { + + override fun convert(helper: BaseViewHolder, item: String) { + helper.setText(R.id.item_search_key, item) + helper.addOnClickListener(R.id.item_remove_key) + } +} diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchPresenter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchPresenter.kt index d003482..715e0c3 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchPresenter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/search/SearchPresenter.kt @@ -1,27 +1,59 @@ package soko.ekibun.bangumi.ui.search +import android.support.v7.app.AlertDialog import android.support.v7.widget.LinearLayoutManager import android.text.Editable import android.text.TextWatcher +import android.view.Gravity +import android.view.KeyEvent +import android.view.View import android.webkit.WebView +import android.widget.TextView import kotlinx.android.synthetic.main.activity_search.* import retrofit2.Call +import soko.ekibun.bangumi.R import soko.ekibun.bangumi.api.ApiHelper import soko.ekibun.bangumi.api.bangumi.Bangumi import soko.ekibun.bangumi.api.bangumi.bean.MonoInfo import soko.ekibun.bangumi.api.bangumi.bean.Subject +import soko.ekibun.bangumi.model.SearchHistoryModel import soko.ekibun.bangumi.ui.subject.SubjectActivity import soko.ekibun.bangumi.ui.web.WebActivity class SearchPresenter(private val context: SearchActivity) { + val searchHistoryModel by lazy { SearchHistoryModel(context) } + val typeView = SearchTypeView(context.item_type) { search(lastKey, true) } val monoAdapter = MonoAdapter() val subjectAdapter = SearchAdapter() + val searchHistoryAdapter = SearchHistoryAdapter() init{ + context.search_history.layoutManager = LinearLayoutManager(context) + context.search_history.adapter = searchHistoryAdapter + val emptyTextView = TextView(context) + emptyTextView.text = context.getString(R.string.search_hint_no_history) + emptyTextView.gravity = Gravity.CENTER + searchHistoryAdapter.emptyView = emptyTextView + searchHistoryAdapter.setNewData(searchHistoryModel.getHistoryList()) + searchHistoryAdapter.setOnItemClickListener { _, _, position -> + context.search_box.setText(searchHistoryAdapter.data[position]) + search(context.search_box.text.toString()) + } + searchHistoryAdapter.setOnItemChildClickListener { _, _, position -> + searchHistoryModel.removeHistory(searchHistoryAdapter.data[position]) + searchHistoryAdapter.remove(position) + } + context.search_history_remove.setOnClickListener { + AlertDialog.Builder(context).setMessage(R.string.search_dialog_history_clear).setNegativeButton(R.string.cancel){ _, _ -> }.setPositiveButton(R.string.ok){ _, _ -> + searchHistoryModel.clearHistory() + searchHistoryAdapter.setNewData(null) + }.show() + } + context.search_list.layoutManager = LinearLayoutManager(context) subjectAdapter.setEnableLoadMore(true) subjectAdapter.setOnLoadMoreListener({ @@ -38,11 +70,22 @@ class SearchPresenter(private val context: SearchActivity) { WebActivity.launchUrl(context, monoAdapter.data[position]?.url, "") } + context.search_box.setOnKeyListener { _, keyCode, _ -> + if(keyCode == KeyEvent.KEYCODE_ENTER) { + search(context.search_box.text.toString()) + true + }else false + } + + context.search_swipe.visibility = View.INVISIBLE context.search_box.addTextChangedListener(object: TextWatcher { override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun afterTextChanged(s: Editable?) {} override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { - search(s.toString()) + lastKey = "" + context.search_swipe.visibility = View.INVISIBLE + searchHistoryAdapter.setNewData(searchHistoryModel.getHistoryList().filter { s.isEmpty() || it.contains(s) }) + context.search_history_remove.visibility = if(s.isEmpty()) View.VISIBLE else View.INVISIBLE } }) @@ -68,6 +111,10 @@ class SearchPresenter(private val context: SearchActivity) { subjectCall?.cancel() monoCall?.cancel() }else{ + context.search_swipe.visibility = View.VISIBLE + searchHistoryModel.addHistory(key) + searchHistoryAdapter.setNewData(searchHistoryModel.getHistoryList()) + if(loadCount == 0) context.search_swipe?.isRefreshing = true subjectCall?.cancel() diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditProgressDialog.kt b/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditProgressDialog.kt index 5921d92..b61a106 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditProgressDialog.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditProgressDialog.kt @@ -46,10 +46,11 @@ class EditProgressDialog: DialogFragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { val view = inflater.inflate(R.layout.dialog_edit_progress, container) + //TODO view.item_eps.setText(subject.ep_status.toString()) - view.item_eps_info.text = "${ if(subject.eps_count == 0) "" else "/${subject.eps_count}" } 话" + view.item_eps_info.text = "${ if(subject.eps_count == 0) "" else "/${subject.eps_count}" } ${view.context.getString(R.string.ep_unit)}" view.item_vol.setText(subject.vol_status.toString()) - view.item_vol_info.text = "${ if(subject.vol_count == 0) "" else "/${subject.vol_count}" } 章" + view.item_vol_info.text = "${ if(subject.vol_count == 0) "" else "/${subject.vol_count}" } ${view.context.getString(R.string.vol_unit)}" view.item_vol_panel.visibility = if(subject.has_vol) View.VISIBLE else View.GONE view.item_outside.setOnClickListener { diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditSubjectDialog.kt b/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditSubjectDialog.kt index e16fe0a..9944844 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditSubjectDialog.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/subject/EditSubjectDialog.kt @@ -47,6 +47,13 @@ class EditSubjectDialog: DialogFragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { val view = inflater.inflate(R.layout.dialog_edit_subject, container) + val collectionStatusNames = inflater.context.resources.getStringArray(CollectionStatusType.getTypeNamesResId(subject.type)) + view.radio_wish.text = collectionStatusNames[0] + view.radio_collect.text = collectionStatusNames[1] + view.radio_do.text = collectionStatusNames[2] + view.radio_hold.text = collectionStatusNames[3] + view.radio_dropped.text = collectionStatusNames[4] + val selectMap = mapOf( CollectionStatusType.WISH to R.id.radio_wish, CollectionStatusType.COLLECT to R.id.radio_collect, @@ -70,8 +77,8 @@ class EditSubjectDialog: DialogFragment() { val editText = EditText(view.context) AlertDialog.Builder(view.context) .setView(editText) - .setTitle("添加标签") - .setPositiveButton("提交"){ _, _ -> + .setTitle(R.string.subject_dialog_add_tag) + .setPositiveButton(R.string.submit){ _, _ -> adapter.addData(editText.text.split(" ").filter { it.isNotEmpty() }) }.show() } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/subject/EpisodeAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/subject/EpisodeAdapter.kt index cf4a228..1bcb7f2 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/subject/EpisodeAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/subject/EpisodeAdapter.kt @@ -31,7 +31,7 @@ class EpisodeAdapter(data: MutableList>? = null } override fun convert(helper: BaseViewHolder, item: SelectableSectionEntity) { - helper.setText(R.id.item_title, item.t.parseSort()) + helper.setText(R.id.item_title, item.t.parseSort(helper.itemView.context)) helper.setText(R.id.item_desc, if(item.t.name_cn.isNullOrEmpty()) item.t.name else item.t.name_cn) val color = ResourceUtil.resolveColorAttr(helper.itemView.context, when { diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/subject/SmallEpisodeAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/subject/SmallEpisodeAdapter.kt index 5323019..8470a70 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/subject/SmallEpisodeAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/subject/SmallEpisodeAdapter.kt @@ -15,7 +15,7 @@ class SmallEpisodeAdapter(data: MutableList? = null) : (R.layout.item_episode_small, data) { override fun convert(helper: BaseViewHolder, item: Episode) { - helper.setText(R.id.item_title, item.parseSort()) + helper.setText(R.id.item_title, item.parseSort(helper.itemView.context)) helper.setText(R.id.item_desc, if(item.name_cn.isNullOrEmpty()) item.name else item.name_cn) val color = ResourceUtil.resolveColorAttr(helper.itemView.context, when { diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectPresenter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectPresenter.kt index 81b26be..049ba96 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectPresenter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectPresenter.kt @@ -182,11 +182,12 @@ class SubjectPresenter(private val context: SubjectActivity){ @SuppressLint("SetTextI18n") private fun openEpisode(episode: Episode, subject: Subject, eps: List){ val view = context.layoutInflater.inflate(R.layout.dialog_epsode, context.item_collect, false) - view.item_episode_title.text = episode.parseSort() + " " + if(episode.name_cn.isNullOrEmpty()) episode.name else episode.name_cn + //TODO + view.item_episode_title.text = episode.parseSort(context) + " " + if(episode.name_cn.isNullOrEmpty()) episode.name else episode.name_cn view.item_episode_desc.text = (if(episode.name_cn.isNullOrEmpty()) "" else episode.name + "\n") + - (if(episode.airdate.isNullOrEmpty()) "" else "首播:" + episode.airdate + "\n") + - (if(episode.duration.isNullOrEmpty()) "" else "时长:" + episode.duration + "\n") + - "讨论 (+" + episode.comment + ")" + (if(episode.airdate.isNullOrEmpty()) "" else context.getString(R.string.phrase_air_date, episode.airdate) + "\n") + + (if(episode.duration.isNullOrEmpty()) "" else context.getString(R.string.phrase_duration, episode.duration) + "\n") + + context.getString(R.string.phrase_comment, episode.comment) view.item_episode_title.setOnClickListener { WebActivity.launchUrl(context, "${Bangumi.SERVER}/m/topic/ep/${episode.id}", "") } @@ -194,7 +195,7 @@ class SubjectPresenter(private val context: SubjectActivity){ val emptyTextView = TextView(context) val dp4 = (context.resources.displayMetrics.density * 4 + 0.5f).toInt() emptyTextView.setPadding(dp4,dp4,dp4,dp4) - emptyTextView.text = "暂无播放源" + emptyTextView.setText(R.string.hint_no_play_source) adapter.emptyView = emptyTextView adapter.setOnItemClickListener { _, _, position -> WebActivity.launchUrl(context, adapter.data[position].url, "") @@ -273,7 +274,7 @@ class SubjectPresenter(private val context: SubjectActivity){ subjectCall?.enqueue(ApiHelper.buildCallback(context, { subject = it refreshLines(it) - refreshCollection(it) + refreshCollection() subjectView.updateSubject(it) }, {})) @@ -354,17 +355,17 @@ class SubjectPresenter(private val context: SubjectActivity){ } private fun removeCollection(subject: Subject){ - AlertDialog.Builder(context).setTitle("删除这个条目收藏?") - .setNegativeButton("取消") { _, _ -> }.setPositiveButton("确定") { _, _ -> + AlertDialog.Builder(context).setTitle(R.string.collection_dialog_remove) + .setNegativeButton(R.string.cancel) { _, _ -> }.setPositiveButton(R.string.ok) { _, _ -> ApiHelper.buildHttpCall("${Bangumi.SERVER}/subject/${subject.id}/remove?gh=${context.formhash}", mapOf("User-Agent" to context.ua)){ it.code() == 200 } .enqueue(ApiHelper.buildCallback(context, { if(it) subject.interest = Collection() - refreshCollection(subject) + refreshCollection() }, {})) }.show() } - private fun refreshCollection(subject: Subject){ + private fun refreshCollection(){ val body = subject.interest?:Collection() val status = body.status context.item_collect_image.setImageDrawable(context.resources.getDrawable( @@ -374,11 +375,11 @@ class SubjectPresenter(private val context: SubjectActivity){ context.item_collect.setOnClickListener{ if(context.formhash.isEmpty()) return@setOnClickListener val popupMenu = PopupMenu(context, context.item_collect) - val statusList = context.resources.getStringArray(R.array.collection_status) + val statusList = context.resources.getStringArray(CollectionStatusType.getTypeNamesResId(subject.type)) statusList.forEachIndexed { index, s -> popupMenu.menu.add(Menu.NONE, Menu.FIRST + index, index, s) } if(status != null) - popupMenu.menu.add(Menu.NONE, Menu.FIRST + statusList.size, statusList.size, "删除") + popupMenu.menu.add(Menu.NONE, Menu.FIRST + statusList.size, statusList.size, R.string.delete) popupMenu.setOnMenuItemClickListener {menu-> if(menu.itemId == Menu.FIRST + statusList.size){ removeCollection(subject) @@ -389,7 +390,7 @@ class SubjectPresenter(private val context: SubjectActivity){ Bangumi.updateCollectionStatus(subject, context.formhash, context.ua, newStatus, newTags, body.comment?:"", body.rating, body.private).enqueue(ApiHelper.buildCallback(context,{ subject.interest = it - refreshCollection(subject) + refreshCollection() },{})) false } @@ -399,7 +400,7 @@ class SubjectPresenter(private val context: SubjectActivity){ context.item_collect.setOnLongClickListener { EditSubjectDialog.showDialog(context, subject, body, context.formhash, context.ua){ if(it) removeCollection(subject) - else refreshCollection(subject) + else refreshCollection() } true } diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectView.kt b/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectView.kt index 23b99ae..8fc2075 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectView.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/subject/SubjectView.kt @@ -185,7 +185,7 @@ class SubjectView(private val context: SubjectActivity){ context.title_collapse.layoutParams = layoutParams (context.item_subject.layoutParams as CollapsingToolbarLayout.LayoutParams).topMargin = context.toolbar_container.height } - context.item_info.text = if(subject.typeString.isNullOrEmpty()) SubjectType.getDescription(subject.type) else subject.typeString + context.item_info.text = if(subject.typeString.isNullOrEmpty()) context.getString(SubjectType.getDescription(subject.type)) else subject.typeString context.item_subject_title.visibility = View.GONE val saleDate = subject.infobox?.firstOrNull { it.first in arrayOf("发售日期", "发售日", "发行日期") } val artist = subject.infobox?.firstOrNull { it.first.substringBefore(" ") in arrayOf("动画制作", "作者", "开发", "游戏制作", "艺术家") } @@ -222,7 +222,7 @@ class SubjectView(private val context: SubjectActivity){ photoView.mLongClickListener = { val systemUiVisibility = popWindow.contentView.systemUiVisibility AlertDialog.Builder(context) - .setItems(arrayOf("分享")) + .setItems(arrayOf(context.getString(R.string.share))) { _, _ -> AppUtil.shareDrawable(context, photoView.drawable) }.setOnDismissListener { @@ -278,18 +278,21 @@ class SubjectView(private val context: SubjectActivity){ } detail.item_progress.visibility = if(subject.formhash?.isNotEmpty() == true && subject.interest?.status?.type == CollectionStatusType.DO && subject.type in listOf(SubjectType.ANIME, SubjectType.REAL, SubjectType.BOOK)) View.VISIBLE else View.GONE - detail.item_progress_info.text = "看到 ${ if(subject.has_vol) "第 ${subject.vol_status}${ if(subject.vol_count == 0) "" else "/${subject.vol_count}" } 章 " else ""}第 ${subject.ep_status}${ if(subject.eps_count == 0) "" else "/${subject.eps_count}" } 话" + detail.item_progress_info.text = context.getString(R.string.phrase_progress, + (if(subject.has_vol) context.getString(R.string.parse_sort_vol, "${subject.vol_status}${ if(subject.vol_count == 0) "" else "/${subject.vol_count}" }") + " " else "") + + context.getString(R.string.parse_sort_ep, "${subject.ep_status}${ if(subject.eps_count == 0) "" else "/${subject.eps_count}"}")) } fun updateEpisode(episodes: List){ if(episodes.none { it.id != 0 }) return val mainEps = episodes.filter { it.type == Episode.TYPE_MAIN || it.type == Episode.TYPE_MUSIC } - val eps = mainEps.filter { (it.status ?: "") in listOf("Air") }.size - detail.episode_detail.text = context.getString(if(eps == mainEps.size) R.string.phrase_full else R.string.phrase_updating, eps) + val eps = mainEps.filter { (it.status ?: "") in listOf("Air") } + detail.episode_detail.text = if(eps.size == mainEps.size) context.getString(R.string.phrase_full_eps, eps.size) else + eps.lastOrNull()?.parseSort(context)?.let { context.getString(R.string.parse_update_to, it)}?: context.getString(R.string.hint_air_nothing) val maps = LinkedHashMap>() episodes.forEach { - val key = it.cat?:Episode.getTypeName(it.type) + val key = it.cat?: context.getString(Episode.getTypeName(it.type)) maps[key] = (maps[key]?:ArrayList()).plus(it) } episodeAdapter.setNewData(null) diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/topic/PhotoPagerAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/topic/PhotoPagerAdapter.kt index afdd3ec..a2874be 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/topic/PhotoPagerAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/topic/PhotoPagerAdapter.kt @@ -5,6 +5,7 @@ import android.support.v7.app.AlertDialog import android.view.View import android.view.ViewGroup import com.bumptech.glide.Glide +import soko.ekibun.bangumi.R import soko.ekibun.bangumi.ui.view.DragPhotoView import soko.ekibun.bangumi.util.AppUtil @@ -20,7 +21,7 @@ class PhotoPagerAdapter(private val items: List, private val onDismiss: photoView.mLongClickListener = { val systemUiVisibility = container.systemUiVisibility AlertDialog.Builder(container.context) - .setItems(arrayOf("分享")) + .setItems(arrayOf(container.context.getString(R.string.share))) { _, _ -> AppUtil.shareDrawable(container.context, photoView.drawable) }.setOnDismissListener { diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/topic/PostAdapter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/topic/PostAdapter.kt index b79b4dc..7112433 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/topic/PostAdapter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/topic/PostAdapter.kt @@ -20,7 +20,6 @@ import soko.ekibun.bangumi.util.HtmlTagHandler import java.net.URI import android.text.style.ClickableSpan import android.text.style.URLSpan -import android.util.Log import android.util.Size import android.widget.TextView import com.chad.library.adapter.base.BaseMultiItemQuickAdapter @@ -57,7 +56,7 @@ class PostAdapter(data: MutableList? = null) : helper.itemView.item_edit.visibility = helper.itemView.item_del.visibility helper.itemView.item_expand.visibility = if (item.hasSubItem()) View.VISIBLE else View.GONE - helper.itemView.item_expand.text = if(item.isExpanded) "收起" else "展开" + helper.itemView.item_expand.setText(if(item.isExpanded) R.string.collapse else R.string.expand) helper.itemView.item_expand.setOnClickListener { val index = data.indexOfFirst { post -> post === item } if(item.isExpanded) collapse(index) else expand(index) diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicPresenter.kt b/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicPresenter.kt index d77e6db..096ee72 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicPresenter.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicPresenter.kt @@ -39,7 +39,7 @@ class TopicPresenter(private val context: TopicActivity) { if(!topic.formhash.isNullOrEmpty()) ResourceUtil.getDrawable(context, R.drawable.ic_send) else null,//right null) context.item_reply.setOnClickListener { - topic.formhash?.let{ formhash -> showReplyPopupWindow(topic.post, FormBody.Builder().add("lastview", topic.lastview!!).add("formhash", formhash),"", "回复 ${topic.title}") }?:{ + topic.formhash?.let{ formhash -> showReplyPopupWindow(topic.post, FormBody.Builder().add("lastview", topic.lastview!!).add("formhash", formhash),"", context.getString(R.string.parse_hint_reply_topic, topic.title)) }?:{ if(!topic.errorLink.isNullOrEmpty()) WebActivity.launchUrl(context, topic.errorLink, "") }() } @@ -58,11 +58,11 @@ class TopicPresenter(private val context: TopicActivity) { .add("formhash", topic.formhash!!) .add("topic_id", post.pst_mid) .add("related", post.relate) - .add("post_uid", post.pst_uid), comment, "回复 ${post.nickname} 的评论", post.pst_id) + .add("post_uid", post.pst_uid), comment, context.getString(R.string.parse_hint_reply_post, post.nickname), post.pst_id) } R.id.item_del -> { - AlertDialog.Builder(context).setTitle("确认删除?") - .setNegativeButton("取消") { _, _ -> }.setPositiveButton("确定") { _, _ -> + AlertDialog.Builder(context).setMessage(R.string.reply_dialog_remove) + .setNegativeButton(R.string.cancel) { _, _ -> }.setPositiveButton(R.string.ok) { _, _ -> if (post.floor == 1) { val url = topic.post.replace(Bangumi.SERVER, "${Bangumi.SERVER}/erase").replace("/new_reply", "?gh=${topic.formhash}&ajax=1") ApiHelper.buildHttpCall(url, mapOf("User-Agent" to ua)) { @@ -109,7 +109,7 @@ class TopicPresenter(private val context: TopicActivity) { WebActivity.launchUrl(context, url) return@buildCallback }else{ - buildPopupWindow("修改主题\"${topic.title}\""+if(post.floor == 1) "" else "的回复", it){inputString, send-> + buildPopupWindow(context.getString(if(post.floor == 1) R.string.parse_hint_modify_topic else R.string.parse_hint_modify_post, topic.title), it){inputString, send-> if(send){ ApiHelper.buildHttpCall(url, mapOf("User-Agent" to ua), body = FormBody.Builder() .add("formhash", topic.formhash!!) diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicView.kt b/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicView.kt index 1142f20..7736241 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicView.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/topic/TopicView.kt @@ -93,10 +93,10 @@ class TopicView(private val context: TopicActivity){ adapter.setOnLoadMoreListener({adapter.loadMoreEnd()}, context.item_list) adapter.setEnableLoadMore(true) context.item_reply.text = when { - !topic.formhash.isNullOrEmpty() -> context.getString(R.string.reply_hint) + !topic.formhash.isNullOrEmpty() -> context.getString(R.string.hint_reply) !topic.error.isNullOrEmpty() -> topic.error - topic.replies.isEmpty() -> "这里什么都没有哟" - else -> "登录后才可以评论哦" + topic.replies.isEmpty() -> context.getString(R.string.hint_empty_topic) + else -> context.getString(R.string.hint_login_topic) } adapter.setOnItemChildClickListener { _, v, position -> diff --git a/app/src/main/java/soko/ekibun/bangumi/ui/web/WebActivity.kt b/app/src/main/java/soko/ekibun/bangumi/ui/web/WebActivity.kt index 40fe070..7a0fb6f 100644 --- a/app/src/main/java/soko/ekibun/bangumi/ui/web/WebActivity.kt +++ b/app/src/main/java/soko/ekibun/bangumi/ui/web/WebActivity.kt @@ -77,7 +77,7 @@ class WebActivity : SwipeBackActivity() { } } }else{ - title = getString(R.string.login_auth) + title = getString(R.string.login) val authUrl = "${Bangumi.SERVER}/login" webview.webChromeClient = object: WebChromeClient() { override fun onProgressChanged(view: WebView, newProgress: Int) { diff --git a/app/src/main/res/drawable/bg_notify_badge.xml b/app/src/main/res/drawable/bg_notify_badge.xml new file mode 100644 index 0000000..f2e1df1 --- /dev/null +++ b/app/src/main/res/drawable/bg_notify_badge.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/action_notify.xml b/app/src/main/res/layout/action_notify.xml index 4f34396..438c481 100644 --- a/app/src/main/res/layout/action_notify.xml +++ b/app/src/main/res/layout/action_notify.xml @@ -11,7 +11,8 @@ android:layout_centerInParent="true" android:tint="@android:color/white" android:scaleType="center" - app:srcCompat="@drawable/ic_notifications"/> + app:srcCompat="@drawable/ic_notifications" + tools:ignore="ContentDescription"/> diff --git a/app/src/main/res/layout/activity_crash.xml b/app/src/main/res/layout/activity_crash.xml index 839513d..3834103 100644 --- a/app/src/main/res/layout/activity_crash.xml +++ b/app/src/main/res/layout/activity_crash.xml @@ -33,7 +33,7 @@ android:clickable="true" android:foreground="?android:attr/selectableItemBackground" android:focusable="true" - android:text="@string/restart_app"/> + android:text="@string/crash_restart_app"/> + android:text="@string/crash_upload_crash"/> diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index fad65d6..a1051d1 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -58,11 +58,43 @@ + + + + + + + + android:text="@string/subject_linked"/> + android:text="@string/subject_commend"/> + android:text="@string/subject_comment"/> @@ -256,7 +256,7 @@ android:clickable="true" android:focusable="true" android:visibility="invisible"> - - + + android:src="@drawable/ic_chevron_right" + tools:ignore="ContentDescription"/> + android:text="@string/subject_dialog_update_progress"/> + android:text="@string/subject_tag"/> + app:layout_constraintRight_toRightOf="@+id/item_tag_list" + android:contentDescription="@string/subject_dialog_add_tag"/> + android:text="@string/subject_collection_remove"/> @@ -164,7 +161,7 @@ android:background="?android:attr/selectableItemBackground" android:layout_height="wrap_content" android:textColor="?colorAccent" - android:text="提交"/> + android:text="@string/submit"/> + app:srcCompat="@drawable/ic_emoji_keyboard" + android:contentDescription="@string/desc_emoji"/> + app:srcCompat="@drawable/ic_image" + android:contentDescription="@string/desc_image"/> + app:srcCompat="@drawable/ic_format" + android:contentDescription="@string/desc_format"/> @@ -75,7 +78,8 @@ android:padding="6dp" android:background="?android:attr/selectableItemBackground" android:layout_height="wrap_content" - app:srcCompat="@drawable/ic_send"/> + app:srcCompat="@drawable/ic_send" + android:contentDescription="@string/desc_send"/> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent"/> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_timeline.xml b/app/src/main/res/layout/fragment_timeline.xml index ad774cd..28e6b6f 100644 --- a/app/src/main/res/layout/fragment_timeline.xml +++ b/app/src/main/res/layout/fragment_timeline.xml @@ -35,12 +35,12 @@ \ No newline at end of file diff --git a/app/src/main/res/layout/item_calendar.xml b/app/src/main/res/layout/item_calendar.xml index 3378e18..c5a286a 100644 --- a/app/src/main/res/layout/item_calendar.xml +++ b/app/src/main/res/layout/item_calendar.xml @@ -96,7 +96,7 @@ android:paddingStart="4dp" android:paddingEnd="4dp" android:background="@drawable/bg_round_rect" - android:text="已追番" + android:text="@string/hint_chased" android:backgroundTint="?colorAccent" app:layout_constraintLeft_toLeftOf="@+id/item_ep_name" app:layout_constraintTop_toTopOf="@+id/item_title" diff --git a/app/src/main/res/layout/item_emoji.xml b/app/src/main/res/layout/item_emoji.xml index 7dd98ed..626985e 100644 --- a/app/src/main/res/layout/item_emoji.xml +++ b/app/src/main/res/layout/item_emoji.xml @@ -1,6 +1,7 @@ @@ -10,5 +11,6 @@ android:padding="8dp" android:scaleType="fitCenter" android:background="?android:attr/selectableItemBackground" - android:layout_height="36dp"/> + android:layout_height="36dp" + tools:ignore="ContentDescription"/> \ No newline at end of file diff --git a/app/src/main/res/layout/item_search_history.xml b/app/src/main/res/layout/item_search_history.xml new file mode 100644 index 0000000..857adb7 --- /dev/null +++ b/app/src/main/res/layout/item_search_history.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_subject.xml b/app/src/main/res/layout/item_subject.xml index be612fa..e85090d 100644 --- a/app/src/main/res/layout/item_subject.xml +++ b/app/src/main/res/layout/item_subject.xml @@ -42,7 +42,7 @@ android:paddingStart="4dp" android:paddingEnd="4dp" android:background="@drawable/bg_round_rect" - android:text="已收藏" + android:text="@string/hint_collected" android:backgroundTint="?colorAccent" app:layout_constraintLeft_toLeftOf="@+id/item_name_jp" app:layout_constraintTop_toTopOf="@+id/item_title" diff --git a/app/src/main/res/layout/item_tag.xml b/app/src/main/res/layout/item_tag.xml index b7e5eee..7bcb249 100644 --- a/app/src/main/res/layout/item_tag.xml +++ b/app/src/main/res/layout/item_tag.xml @@ -33,6 +33,7 @@ android:layout_width="12dp" android:layout_height="12dp" android:layout_gravity="center_vertical" - android:src="@drawable/ic_clear"/> + android:src="@drawable/ic_clear" + android:contentDescription="@string/subject_dialog_remove_tag"/> \ No newline at end of file diff --git a/app/src/main/res/layout/subject_blog.xml b/app/src/main/res/layout/subject_blog.xml index 060c8d6..6665153 100644 --- a/app/src/main/res/layout/subject_blog.xml +++ b/app/src/main/res/layout/subject_blog.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:textAppearance="@android:style/TextAppearance.Material.Subhead" android:padding="12dp" - android:text="@string/blog" + android:text="@string/subject_blog" android:id="@+id/item_title" app:layout_constraintEnd_toStartOf="@+id/blog_detail" app:layout_constraintStart_toStartOf="parent"/> diff --git a/app/src/main/res/layout/subject_buttons.xml b/app/src/main/res/layout/subject_buttons.xml index cfad4fe..8be33ca 100644 --- a/app/src/main/res/layout/subject_buttons.xml +++ b/app/src/main/res/layout/subject_buttons.xml @@ -1,5 +1,6 @@ + tools:ignore="ContentDescription"/> diff --git a/app/src/main/res/layout/view_empty.xml b/app/src/main/res/layout/view_empty.xml index 1b1e1b0..4f12e03 100644 --- a/app/src/main/res/layout/view_empty.xml +++ b/app/src/main/res/layout/view_empty.xml @@ -14,10 +14,10 @@ app:layout_constraintBottom_toTopOf="@+id/item_info" app:layout_constraintVertical_bias="0.4" app:layout_constraintVertical_chainStyle="packed" - android:contentDescription="@string/info_empty"/> + android:contentDescription="@string/hint_empty"/> - \ No newline at end of file diff --git a/app/src/main/res/menu/list_browser_type.xml b/app/src/main/res/menu/list_browser_type.xml index 06e331c..5c93313 100644 --- a/app/src/main/res/menu/list_browser_type.xml +++ b/app/src/main/res/menu/list_browser_type.xml @@ -1,102 +1,100 @@ - + + android:title="@string/anime_all"/> + android:title="@string/anime_tv"/> + android:title="@string/anime_web"/> + android:title="@string/anime_ova"/> + android:title="@string/anime_movie"/> + android:title="@string/anime_misc"/> + android:title="@string/book_all"/> + android:title="@string/book_comic"/> + android:title="@string/book_novel"/> + android:title="@string/book_illustration"/> + android:title="@string/book_misc"/> + android:title="@string/game_all"/> + android:title="@string/game_pc"/> + android:title="@string/game_mac"/> + android:title="@string/game_ps4"/> + android:title="@string/game_xbox_one"/> + android:title="@string/game_ns"/> + android:title="@string/game_wii_u"/> + android:title="@string/game_ps3"/> + android:title="@string/game_xbox360"/> + android:title="@string/game_wii"/> + android:title="@string/game_psv"/> + android:title="@string/game_3ds"/> + android:title="@string/game_iphone"/> + android:title="@string/game_android"/> + android:title="@string/game_arc"/> + android:title="@string/game_nds"/> + android:title="@string/game_psp"/> + android:title="@string/game_ps2"/> + android:title="@string/game_xbox"/> + android:title="@string/game_gamecube"/> + android:title="@string/game_dreamcast"/> + android:title="@string/game_n64"/> + android:title="@string/game_ps"/> + android:title="@string/game_sfc"/> + android:title="@string/game_fc"/> + android:title="@string/game_ws"/> + android:title="@string/game_wsc"/> + android:title="@string/game_ngp"/> + android:title="@string/game_gba"/> + android:title="@string/game_vb"/> + android:title="@string/real_all"/> + android:title="@string/real_jp"/> + android:title="@string/real_en"/> + android:title="@string/real_cn"/> diff --git a/app/src/main/res/menu/list_notify.xml b/app/src/main/res/menu/list_notify.xml new file mode 100644 index 0000000..2bc8fb5 --- /dev/null +++ b/app/src/main/res/menu/list_notify.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/list_search_type.xml b/app/src/main/res/menu/list_search_type.xml index 74f998a..f0bb11b 100644 --- a/app/src/main/res/menu/list_search_type.xml +++ b/app/src/main/res/menu/list_search_type.xml @@ -13,9 +13,9 @@ + android:title="@string/mono"/> + android:title="@string/mono_ctr"/> + android:title="@string/mono_psn"/> \ No newline at end of file diff --git a/app/src/main/res/menu/list_timeline.xml b/app/src/main/res/menu/list_timeline.xml index 3913439..7382393 100644 --- a/app/src/main/res/menu/list_timeline.xml +++ b/app/src/main/res/menu/list_timeline.xml @@ -4,7 +4,7 @@ + android:title="@string/all_site"/> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a5f5bc3..269e472 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,60 +1,57 @@ Bangumi - 搜索… - 番剧海报 - - 全 %1$d 话 - %1$d人 - %1$d 回复 - 更新至第 %1$d 话 - 导航开 - 导航关 - 播放 - - 分享 - 时间表 - 点击头像登录 - 登录 - 夜间模式 - 登录 - 搜索 - 注销 - 状态 - 评分 - 吐槽 - 仅自己可见 - 动画 - 图书 - 游戏 - 音乐 - 三次元 - 章节 - 关联条目 - 讨论版 - 评论 - 更多 - 什么都没有哦 + 收藏 - 在浏览器中打开 - 索引 - 主页 - 超展开 - 时间胶囊 - 回复 - 删除 - 编辑 - 不吐槽一下吗 - 粗体字 - 斜体字 - 删除线 - 下划线 - 马赛克 - 上传崩溃日志 - 重新启动应用 - 离线缓存 - 刷新 - + 条目 + 章节 + + 想看 + 看过 + 在看 + 搁置 + 抛弃 + + + 想读 + 读过 + 在读 + 搁置 + 抛弃 + + + 想听 + 听过 + 在听 + 搁置 + 抛弃 + + + 想玩 + 玩过 + 在玩 + 搁置 + 抛弃 + + + 想看 + 看过 + 在看 + 搁置 + 抛弃 + + 看过 + 看到 + 想看 + 抛弃 + 未看 + + @string/episode_status_watch + @string/episode_status_watch_to + @string/episode_status_wish + @string/episode_status_drop + @string/episode_status_remove + 全部 小组 @@ -62,7 +59,6 @@ 章节 人物 - 全部 吐槽 @@ -77,29 +73,142 @@ 天窗 - - 想看 - 看过 - 在看 - 搁置 - 抛弃 - - - 看过 - 看到 - 想看 - 抛弃 - 未看 - - 设置 - 其他设置 - 相似推荐 - 角色介绍 - 条目 + 动画 + 全部动画 + TV动画 + WEB动画 + OVA动画 + 剧场版动画 + 其他动画 + 书籍 + 全部书籍 + 漫画 + 小说 + 画集 + 其他书籍 + 游戏 + 全部游戏 + PC游戏 + Mac OS游戏 + PS4游戏 + Xbox One游戏 + Nintendo Switch游戏 + Wii U游戏 + PS3游戏 + Xbox360游戏 + Wii游戏 + PS Vita游戏 + 3DS游戏 + iOS游戏 + Android游戏 + 街机游戏 + NDS游戏 + PSP游戏 + PS2游戏 + XBOX游戏 + GameCube游戏 + Dreamcast游戏 + Nintendo 64游戏 + PlayStation游戏 + SFC游戏 + FC游戏 + WonderSwan游戏 + WonderSwan Color游戏 + NEOGEO Pocket Color游戏 + GBA游戏 + Virtual Boy游戏 + 音乐 + 三次元 + 全部剧集 + 日剧 + 欧美剧 + 华语剧 + + 人物 + 虚构角色 + 现实人物 + + 本篇 + 特别篇 + OP + ED + PV + MAD + 曲目 + 其他 + + 取消 + 确定 + 提交 + 更多 + 回复 + 删除 + 编辑 + 刷新 + 收起 + 展开 + 分享 + 在浏览器中打开 + 登录 + + 下载 + 忽略 + + 粗体字 + 斜体字 + 删除线 + 下划线 + 马赛克 + 好友 - 全部 + 全站 自己 + + 主页 + 时间表 + 索引 + 离线缓存 + 搜索 + 设置 + 夜间模式 + 注销 + + 超展开 + 时间胶囊 + + + 上传崩溃日志 + 重新启动应用 + 日志上传成功 + 日志上传失败 %1$s + + + 搜索… + 搜索历史 + 删除搜索历史 + 没有搜索的历史记录 + 删除搜索历史 + + + 番剧海报 + 修改 + 关联条目 + 相似推荐 + 吐槽 + 标签 + 讨论版 + 评论 + 角色介绍 + + 更新 + 添加标签 + 删除标签 + 仅自己可见 + 删除收藏 + + + 其他设置 清晰 普通 @@ -112,4 +221,60 @@ m s + + + 表情 + 图片 + 字体 + 发送 + + + 已追番 + 已收藏 + 什么都没有哦 + 点击头像登录 + 不吐槽一下吗 + 这里什么都没有哟 + 登录后才可以评论哦 + 提交出现了一些问题,请稍后再试 + 再按一次退出程序 + 暂无播放源 + 导航开 + 导航关 + + 删除搜索历史? + 删除这个条目收藏? + 删除这条时间线? + 删除这条回复? + 添加动态 + + 新版本:%1$s + + + + 看到 %1$s + 第 %1$s 话 + 第 %1$s 章 + 已缓存 %1$d 话 + 看到%1$s + 尚未观看 + 尚未开播 + 更新到%1$s + 全 %1$d 话 + + 首播:%1$s + 时长:%1$s + 讨论(+%1$d) + + %1$d人 + %1$d 回复 + + + 回复 %1$s + 回复 %1$s 的评论 + 修改主题 %1$s + 修改主题 %1$s 的回复 + 收件箱 + 电波提醒 +