mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 20:23:18 +02:00
Added more plural strings
This commit is contained in:
parent
5587080c95
commit
81eaf8bb95
@ -492,7 +492,8 @@ class LibraryUpdateService(
|
|||||||
color = ContextCompat.getColor(this@LibraryUpdateService, R.color.colorAccentLight)
|
color = ContextCompat.getColor(this@LibraryUpdateService, R.color.colorAccentLight)
|
||||||
val chaptersNames = if (chapterNames.size > 5) {
|
val chaptersNames = if (chapterNames.size > 5) {
|
||||||
"${chapterNames.take(4).joinToString(", ")}, " +
|
"${chapterNames.take(4).joinToString(", ")}, " +
|
||||||
getString(R.string.notification_and_n_more, (chapterNames.size - 4))
|
resources.getQuantityString(R.plurals.notification_and_n_more,
|
||||||
|
(chapterNames.size - 4), (chapterNames.size - 4))
|
||||||
} else chapterNames.joinToString(", ")
|
} else chapterNames.joinToString(", ")
|
||||||
setContentText(chaptersNames)
|
setContentText(chaptersNames)
|
||||||
setStyle(NotificationCompat.BigTextStyle().bigText(chaptersNames))
|
setStyle(NotificationCompat.BigTextStyle().bigText(chaptersNames))
|
||||||
|
@ -42,8 +42,10 @@ class ExtensionUpdateJob : Job() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
val extNames = if (names.size > 5) {
|
val extNames = if (names.size > 5) {
|
||||||
"${names.take(4).joinToString(", ")}, " + context.getString(
|
"${names.take(4).joinToString(", ")}, " +
|
||||||
R.string.notification_and_n_more, (names.size - 4)
|
context.resources.getQuantityString(
|
||||||
|
R.plurals.notification_and_n_more_ext,
|
||||||
|
(names.size - 4), (names.size - 4)
|
||||||
)
|
)
|
||||||
} else names.joinToString(", ")
|
} else names.joinToString(", ")
|
||||||
setContentText(extNames)
|
setContentText(extNames)
|
||||||
|
@ -22,10 +22,10 @@ class MigrationMangaDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||||
val confirmRes = if (copy) R.string.confirm_copy else R.string.confirm_migration
|
val confirmRes = if (copy) R.plurals.confirm_copy else R.plurals.confirm_migration
|
||||||
val confirmString = applicationContext?.getString(confirmRes, mangaSet, (
|
val confirmString = applicationContext?.resources?.getQuantityString(confirmRes, mangaSet,
|
||||||
if (mangaSkipped > 0)
|
mangaSet, (
|
||||||
" " + applicationContext?.getString(R.string.skipping_x, mangaSkipped) ?: ""
|
if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_x, mangaSkipped)
|
||||||
else "")) ?: ""
|
else "")) ?: ""
|
||||||
return MaterialDialog(activity!!).show {
|
return MaterialDialog(activity!!).show {
|
||||||
message(text = confirmString)
|
message(text = confirmString)
|
||||||
|
@ -474,8 +474,14 @@
|
|||||||
<string name="download_all">All</string>
|
<string name="download_all">All</string>
|
||||||
<string name="download_unread">Unread</string>
|
<string name="download_unread">Unread</string>
|
||||||
<string name="confirm_delete_chapters">Are you sure you want to delete selected chapters?</string>
|
<string name="confirm_delete_chapters">Are you sure you want to delete selected chapters?</string>
|
||||||
<string name="confirm_migration">Migrate %1$d%2$s manga?</string>
|
<plurals name="confirm_migration">
|
||||||
<string name="confirm_copy">Copy %1$d%2$s manga?</string>
|
<item quantity="one">Migrate %1$d%2$s manga?</item>
|
||||||
|
<item quantity="other">Migrate %1$d%2$s manga?</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="confirm_copy">
|
||||||
|
<item quantity="one">Copy %1$d%2$s manga?</item>
|
||||||
|
<item quantity="other">Copy %1$d%2$s manga?</item>
|
||||||
|
</plurals>
|
||||||
<string name="skipping_x">(skipping %1$d)</string>
|
<string name="skipping_x">(skipping %1$d)</string>
|
||||||
<plurals name="manga_migrated">
|
<plurals name="manga_migrated">
|
||||||
<item quantity="one">%d manga migrated</item>
|
<item quantity="one">%d manga migrated</item>
|
||||||
@ -570,11 +576,17 @@
|
|||||||
<string name="notification_update_progress">Update progress: %1$d/%2$d</string>
|
<string name="notification_update_progress">Update progress: %1$d/%2$d</string>
|
||||||
<string name="notification_new_chapters">New chapters found</string>
|
<string name="notification_new_chapters">New chapters found</string>
|
||||||
<plurals name="notification_new_chapters_text">
|
<plurals name="notification_new_chapters_text">
|
||||||
<item quantity="one">For %d titles</item>
|
<item quantity="one">For %d title</item>
|
||||||
<item quantity="other">For %d titles</item>
|
<item quantity="other">For %d titles</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="notification_and_n_more">and %1$d more chapters.</string>
|
<plurals name="notification_and_n_more">
|
||||||
<string name="notification_and_n_more_ext">and %1$d more extensions.</string>
|
<item quantity="one">and %1$d more chapter.</item>
|
||||||
|
<item quantity="other">and %1$d more chapters.</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="notification_and_n_more_ext">
|
||||||
|
<item quantity="one">and %1$d more extension.</item>
|
||||||
|
<item quantity="other">and %1$d more extensions.</item>
|
||||||
|
</plurals>
|
||||||
<string name="notification_cover_update_failed">Failed to update cover</string>
|
<string name="notification_cover_update_failed">Failed to update cover</string>
|
||||||
<string name="notification_first_add_to_library">Please add the manga to your library before doing this</string>
|
<string name="notification_first_add_to_library">Please add the manga to your library before doing this</string>
|
||||||
<string name="notification_not_connected_to_ac_title">Sync canceled</string>
|
<string name="notification_not_connected_to_ac_title">Sync canceled</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user