More Plurals

pull/2497/head
Jay 5 years ago
parent 264f3cd8d3
commit bcd6c33ed8

@ -383,7 +383,8 @@ class BackupRestoreService : Service() {
content.add(resources.getQuantityString(R.plurals.sources_missing,
sourceMissingCount, sourceMissingCount))
if (lincensedManga > 0)
content.add(getString(R.string.x_licensed_manga, lincensedManga))
content.add(resources.getQuantityString(R.plurals.licensed_manga, lincensedManga,
lincensedManga))
val trackingErrors = trackingErrors.distinct()
if (trackingErrors.isNotEmpty()) {
val trackingErrorsString = trackingErrors.distinct().joinToString("\n")

@ -29,7 +29,7 @@ class MigrationMangaDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
else "")) ?: ""
return MaterialDialog(activity!!).show {
message(text = confirmString)
positiveButton(android.R.string.yes) {
positiveButton(if (copy) R.string.copy else R.string.migrate) {
if (copy) (targetController as? MigrationListController)?.copyMangas()
else (targetController as? MigrationListController)?.migrateMangas()
}

@ -274,11 +274,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
val res = resources
if (res != null) {
activity?.toast(
res.getString(
R.string.x_migrations,
if (manaulMigrations == 0) res.getString(R.string.no)
else "$manaulMigrations"
)
res.getQuantityString(R.plurals.manga_migrated,
manaulMigrations, manaulMigrations)
)
}
router.popCurrentController()
@ -373,11 +370,11 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
activity?.let {
MaterialDialog(it).show {
title(R.string.stop_migration)
positiveButton (R.string.yes) {
positiveButton (R.string.action_stop) {
router.popCurrentController()
migrationsJob?.cancel()
}
negativeButton(R.string.no)
negativeButton(android.R.string.cancel)
}
}
return true

@ -329,7 +329,10 @@
<item quantity="one">%d source missing</item>
<item quantity="other">%d sources missing</item>
</plurals>
<string name="x_licensed_manga">%1$d manga are now licensed and could not be restored</string>
<plurals name="licensed_manga">
<item quantity="one">%d manga is now licensed and could not be restored</item>
<item quantity="other">%d manga are now licensed and could not be restored</item>
</plurals>
<string name="not_logged_into">Not logged into %1$s</string>
<!-- Advanced section -->
@ -352,8 +355,8 @@
<string name="pref_refresh_library_tracking">Refresh tracking metadata</string>
<string name="pref_refresh_library_tracking_summary">Updates status, score and last chapter read from the tracking services</string>
<string name="pref_clean_downloads">Clean up downloaded chapters</string>
<string name="pref_clean_downloads_summary">Deletes orphaned, tmp, and read chapter folders
for entire library for each Manga</string>
<string name="pref_clean_downloads_summary">Deletes non-existent, partially downloaded,
and read chapter folders</string>
<!-- About section -->
<string name="version">Version</string>
@ -460,9 +463,10 @@
<string name="confirm_migration">Migrate %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="x_migrations">%1$s manga migrated</string>
<string name="no">No</string>
<string name="yes">Yes</string>
<plurals name="manga_migrated">
<item quantity="one">%d manga migrated</item>
<item quantity="other">%d manga migrated</item>
</plurals>
<string name="error_fetching_migration">No chapters found, this manga cannot be used for
migration</string>
<string name="no_alternatives_found">No Alternatives Found</string>

Loading…
Cancel
Save