More Plurals
(cherry picked from commit bcd6c33ed8aaa1cf81c027f88ce4a954e379a545)
This commit is contained in:
parent
50097eef9f
commit
a7e4c1295d
@ -29,7 +29,7 @@ class MigrationMangaDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
|||||||
else "")) ?: ""
|
else "")) ?: ""
|
||||||
return MaterialDialog.Builder(activity!!)
|
return MaterialDialog.Builder(activity!!)
|
||||||
.content(confirmString)
|
.content(confirmString)
|
||||||
.positiveText(android.R.string.yes)
|
.positiveText(if (copy) R.string.copy else R.string.migrate)
|
||||||
.negativeText(android.R.string.no)
|
.negativeText(android.R.string.no)
|
||||||
.onPositive { _, _ ->
|
.onPositive { _, _ ->
|
||||||
if (copy)
|
if (copy)
|
||||||
|
@ -286,11 +286,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
|||||||
val res = resources
|
val res = resources
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
activity?.toast(
|
activity?.toast(
|
||||||
res.getString(
|
res.getQuantityString(R.plurals.manga_migrated,
|
||||||
R.string.x_migrations,
|
manaulMigrations, manaulMigrations)
|
||||||
if (manaulMigrations == 0) res.getString(R.string.no)
|
|
||||||
else "$manaulMigrations"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
router.popCurrentController()
|
router.popCurrentController()
|
||||||
@ -382,8 +379,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
|||||||
override fun handleBack(): Boolean {
|
override fun handleBack(): Boolean {
|
||||||
activity?.let {
|
activity?.let {
|
||||||
MaterialDialog.Builder(it).title(R.string.stop_migration)
|
MaterialDialog.Builder(it).title(R.string.stop_migration)
|
||||||
.positiveText(R.string.yes)
|
.positiveText(R.string.action_stop)
|
||||||
.negativeText(R.string.no)
|
.negativeText(android.R.string.cancel)
|
||||||
.onPositive { _, _ ->
|
.onPositive { _, _ ->
|
||||||
router.popCurrentController()
|
router.popCurrentController()
|
||||||
migrationsJob?.cancel()
|
migrationsJob?.cancel()
|
||||||
|
@ -491,9 +491,10 @@
|
|||||||
<string name="confirm_migration">Migrate %1$d%2$s manga?</string>
|
<string name="confirm_migration">Migrate %1$d%2$s manga?</string>
|
||||||
<string name="confirm_copy">Copy %1$d%2$s manga?</string>
|
<string name="confirm_copy">Copy %1$d%2$s manga?</string>
|
||||||
<string name="skipping_x">(skipping %1$d)</string>
|
<string name="skipping_x">(skipping %1$d)</string>
|
||||||
<string name="x_migrations">%1$s manga migrated</string>
|
<plurals name="manga_migrated">
|
||||||
<string name="no">No</string>
|
<item quantity="one">%d manga migrated</item>
|
||||||
<string name="yes">Yes</string>
|
<item quantity="other">%d manga migrated</item>
|
||||||
|
</plurals>
|
||||||
<string name="error_fetching_migration">No chapters found, this manga cannot be used for
|
<string name="error_fetching_migration">No chapters found, this manga cannot be used for
|
||||||
migration</string>
|
migration</string>
|
||||||
<string name="no_alternatives_found">No Alternatives Found</string>
|
<string name="no_alternatives_found">No Alternatives Found</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user