From fb529f52d3d3ac82f3f1abce21f479d8ce0929ce Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 8 Apr 2020 20:32:36 -0400 Subject: [PATCH] Big refactoring of strings Removing some of the unused, removing the prefixes on some strings Cleaning up some of the unused resoures and dialogs --- app/shortcuts.xml | 8 +- .../data/backup/BackupRestoreService.kt | 8 +- .../data/database/models/Category.kt | 14 +- .../tachiyomi/data/database/models/Manga.kt | 12 + .../data/download/DownloadNotifier.kt | 26 +- .../data/download/DownloadProvider.kt | 2 +- .../data/download/DownloadService.kt | 8 +- .../data/library/LibraryUpdateService.kt | 8 +- .../data/notification/NotificationReceiver.kt | 2 +- .../data/notification/Notifications.kt | 12 +- .../tachiyomi/data/track/anilist/Anilist.kt | 2 +- .../data/track/shikimori/Shikimori.kt | 2 +- .../tachiyomi/data/updater/UpdaterJob.kt | 4 +- .../tachiyomi/data/updater/UpdaterNotifier.kt | 14 +- .../tachiyomi/extension/ExtensionUpdateJob.kt | 2 +- .../network/CloudflareInterceptor.kt | 4 +- .../eu/kanade/tachiyomi/source/LocalSource.kt | 4 +- .../kanade/tachiyomi/source/SourceManager.kt | 2 +- .../ui/catalogue/CatalogueController.kt | 6 +- .../browse/BrowseCatalogueController.kt | 8 +- .../catalogue/browse/CatalogueSearchSheet.kt | 2 +- .../ui/category/CategoryController.kt | 15 +- .../ui/category/CategoryCreateDialog.kt | 2 +- .../ui/category/CategoryRenameDialog.kt | 2 +- .../ui/download/DownloadBottomSheet.kt | 4 +- .../ui/extension/ExtensionBottomPresenter.kt | 2 +- .../ui/extension/ExtensionBottomSheet.kt | 2 +- .../extension/ExtensionDetailsController.kt | 8 +- .../tachiyomi/ui/extension/ExtensionHolder.kt | 22 +- .../ui/extension/ExtensionTrustDialog.kt | 4 +- .../extension/SettingsExtensionsController.kt | 2 +- .../ui/library/ChangeMangaCategoriesDialog.kt | 2 +- .../tachiyomi/ui/library/LibraryBadge.kt | 2 +- .../ui/library/LibraryCategoryAdapter.kt | 4 +- .../tachiyomi/ui/library/LibraryController.kt | 41 +- .../tachiyomi/ui/library/LibraryHeaderItem.kt | 14 +- .../tachiyomi/ui/library/LibraryPresenter.kt | 2 +- .../ui/library/filter/FilterBottomSheet.kt | 8 +- .../tachiyomi/ui/manga/ChooseShapeDialog.kt | 8 +- .../tachiyomi/ui/manga/EditMangaDialog.kt | 2 +- .../ui/manga/MangaDetailsController.kt | 55 +- .../ui/manga/MangaDetailsPresenter.kt | 8 +- .../tachiyomi/ui/manga/MangaHeaderHolder.kt | 14 +- .../ui/manga/chapter/BaseChapterHolder.kt | 2 +- .../ui/manga/chapter/ChapterHolder.kt | 4 +- .../tachiyomi/ui/manga/track/TrackHolder.kt | 4 +- .../ui/manga/track/TrackSearchDialog.kt | 2 +- .../ui/manga/track/TrackingBottomSheet.kt | 2 +- .../ui/migration/MigrationController.kt | 4 +- .../ui/migration/MigrationMangaDialog.kt | 6 +- .../ui/migration/SearchController.kt | 4 +- .../tachiyomi/ui/migration/SelectionHeader.kt | 2 +- .../tachiyomi/ui/migration/SourceHolder.kt | 2 +- .../design/MigrationBottomSheetDialog.kt | 2 +- .../manga/process/MigrationListController.kt | 10 +- .../manga/process/MigrationProcessHolder.kt | 4 +- .../tachiyomi/ui/reader/ReaderActivity.kt | 10 +- .../tachiyomi/ui/reader/ReaderPageSheet.kt | 2 +- .../tachiyomi/ui/reader/SaveImageNotifier.kt | 6 +- .../ui/reader/viewer/pager/PagerPageHolder.kt | 6 +- .../viewer/pager/PagerTransitionHolder.kt | 18 +- .../viewer/webtoon/WebtoonPageHolder.kt | 6 +- .../viewer/webtoon/WebtoonTransitionHolder.kt | 18 +- .../ConfirmDeleteChaptersDialog.kt | 32 - .../RecentChaptersController.kt | 6 +- .../recently_read/RecentlyReadController.kt | 4 +- .../ui/recently_read/RecentlyReadHolder.kt | 2 +- .../ui/recently_read/RemoveHistoryDialog.kt | 20 +- .../tachiyomi/ui/recents/RecentMangaHolder.kt | 8 +- .../tachiyomi/ui/recents/RecentsController.kt | 6 +- .../ui/setting/SettingsAboutController.kt | 16 +- .../ui/setting/SettingsAdvancedController.kt | 30 +- .../ui/setting/SettingsBackupController.kt | 42 +- .../ui/setting/SettingsDownloadController.kt | 20 +- .../ui/setting/SettingsGeneralController.kt | 29 +- .../ui/setting/SettingsLibraryController.kt | 97 +- .../ui/setting/SettingsMainController.kt | 18 +- .../ui/setting/SettingsReaderController.kt | 64 +- .../ui/setting/SettingsSourcesController.kt | 4 +- .../ui/setting/SettingsTrackingController.kt | 2 +- .../tachiyomi/ui/webview/WebViewActivity.kt | 3 +- .../tachiyomi/util/system/LocaleHelper.kt | 4 +- .../widget/preference/SourceLoginDialog.kt | 4 +- .../widget/preference/TrackLoginDialog.kt | 12 +- .../res/layout-land/manga_info_controller.xml | 264 ----- app/src/main/res/layout/auto_ext_checkbox.xml | 2 +- .../main/res/layout/catalogue_controller.xml | 2 +- .../res/layout/catalogue_drawer_content.xml | 2 +- .../catalouge_more_extensions_card_item.xml | 2 +- .../main/res/layout/categories_controller.xml | 7 - .../res/layout/chapter_sort_bottom_sheet.xml | 8 +- .../main/res/layout/display_bottom_sheet.xml | 16 +- app/src/main/res/layout/download_item.xml | 8 +- app/src/main/res/layout/edit_manga_dialog.xml | 6 +- .../layout/extension_detail_controller.xml | 2 +- .../main/res/layout/filter_bottom_sheet.xml | 8 +- .../layout/library_category_header_item.xml | 2 +- .../res/layout/manga_details_controller.xml | 2 +- app/src/main/res/layout/manga_header_item.xml | 20 +- .../main/res/layout/manga_info_controller.xml | 328 ----- .../res/layout/migration_bottom_sheet.xml | 2 +- .../res/layout/migration_process_item.xml | 2 +- .../main/res/layout/pref_account_login.xml | 4 +- .../main/res/layout/pref_library_columns.xml | 56 - app/src/main/res/layout/reader_activity.xml | 4 +- .../main/res/layout/reader_color_filter.xml | 14 +- app/src/main/res/layout/reader_page_sheet.xml | 4 +- .../main/res/layout/reader_settings_sheet.xml | 26 +- .../main/res/layout/recently_read_item.xml | 6 +- .../main/res/layout/recents_header_item.xml | 2 +- app/src/main/res/layout/recents_item.xml | 2 +- app/src/main/res/layout/track_controller.xml | 2 +- app/src/main/res/layout/track_search_item.xml | 8 +- app/src/main/res/menu/bottom_navigation.xml | 6 +- app/src/main/res/menu/cat_sort.xml | 10 +- app/src/main/res/menu/catalogue_list.xml | 6 +- app/src/main/res/menu/catalogue_main.xml | 6 +- app/src/main/res/menu/catalogue_new_list.xml | 2 +- app/src/main/res/menu/category_selection.xml | 16 - app/src/main/res/menu/chapter_download.xml | 2 +- app/src/main/res/menu/chapter_recent.xml | 28 - .../res/menu/chapter_recent_selection.xml | 30 - app/src/main/res/menu/chapter_selection.xml | 31 - app/src/main/res/menu/chapter_single.xml | 27 +- app/src/main/res/menu/chapters_mat_single.xml | 6 - app/src/main/res/menu/download_queue.xml | 12 +- app/src/main/res/menu/download_single.xml | 4 +- app/src/main/res/menu/extension_main.xml | 6 +- app/src/main/res/menu/library.xml | 6 +- app/src/main/res/menu/library_selection.xml | 22 +- app/src/main/res/menu/main_sort.xml | 12 +- app/src/main/res/menu/manga_details.xml | 24 +- app/src/main/res/menu/manga_info.xml | 8 +- app/src/main/res/menu/migration_single.xml | 8 +- app/src/main/res/menu/reader.xml | 2 +- app/src/main/res/menu/recent_updates.xml | 2 +- app/src/main/res/menu/recently_read.xml | 2 +- app/src/main/res/menu/recents.xml | 6 +- app/src/main/res/menu/settings_main.xml | 4 +- app/src/main/res/menu/settings_sources.xml | 8 +- app/src/main/res/menu/webview.xml | 8 +- app/src/main/res/values-ar/strings.xml | 521 ++++---- app/src/main/res/values-bg/strings.xml | 521 ++++---- app/src/main/res/values-bn/strings.xml | 521 ++++---- app/src/main/res/values-ca/strings.xml | 523 ++++---- app/src/main/res/values-cs/strings.xml | 497 ++++---- app/src/main/res/values-de/strings.xml | 523 ++++---- app/src/main/res/values-el/strings.xml | 515 ++++---- app/src/main/res/values-es/strings.xml | 523 ++++---- app/src/main/res/values-fi/strings.xml | 521 ++++---- app/src/main/res/values-fr/strings.xml | 525 ++++---- app/src/main/res/values-hi/strings.xml | 523 ++++---- app/src/main/res/values-hu/strings.xml | 242 ++-- app/src/main/res/values-in/strings.xml | 523 ++++---- app/src/main/res/values-it/strings.xml | 523 ++++---- app/src/main/res/values-ja/strings.xml | 308 ++--- app/src/main/res/values-ko/strings.xml | 519 ++++---- app/src/main/res/values-lv/strings.xml | 134 +-- app/src/main/res/values-ms/strings.xml | 521 ++++---- app/src/main/res/values-nb-rNO/strings.xml | 523 ++++---- app/src/main/res/values-nl/strings.xml | 515 ++++---- app/src/main/res/values-pl/strings.xml | 637 +++++----- app/src/main/res/values-pt-rBR/strings.xml | 521 ++++---- app/src/main/res/values-pt/strings.xml | 521 ++++---- app/src/main/res/values-ro/strings.xml | 521 ++++---- app/src/main/res/values-ru/strings.xml | 623 +++++----- app/src/main/res/values-sc/strings.xml | 519 ++++---- app/src/main/res/values-sk/strings.xml | 332 +++--- app/src/main/res/values-sr/strings.xml | 412 +++---- app/src/main/res/values-sv/strings.xml | 521 ++++---- app/src/main/res/values-th/strings.xml | 519 ++++---- app/src/main/res/values-tl/strings.xml | 521 ++++---- app/src/main/res/values-tr/strings.xml | 523 ++++---- app/src/main/res/values-uk/strings.xml | 521 ++++---- app/src/main/res/values-v28/arrays.xml | 12 +- app/src/main/res/values-vi/strings.xml | 517 ++++---- app/src/main/res/values-zh-rCN/strings.xml | 521 ++++---- app/src/main/res/values-zh-rTW/strings.xml | 517 ++++---- app/src/main/res/values/arrays.xml | 50 +- app/src/main/res/values/strings.xml | 1054 ++++++++--------- app/src/main/res/xml/searchable.xml | 2 +- 181 files changed, 9961 insertions(+), 10949 deletions(-) delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/ConfirmDeleteChaptersDialog.kt delete mode 100644 app/src/main/res/layout-land/manga_info_controller.xml delete mode 100644 app/src/main/res/layout/manga_info_controller.xml delete mode 100644 app/src/main/res/layout/pref_library_columns.xml delete mode 100644 app/src/main/res/menu/category_selection.xml delete mode 100644 app/src/main/res/menu/chapter_recent.xml delete mode 100644 app/src/main/res/menu/chapter_recent_selection.xml delete mode 100644 app/src/main/res/menu/chapter_selection.xml delete mode 100644 app/src/main/res/menu/chapters_mat_single.xml diff --git a/app/shortcuts.xml b/app/shortcuts.xml index b0e2fd6c98..f831c257ed 100644 --- a/app/shortcuts.xml +++ b/app/shortcuts.xml @@ -5,8 +5,8 @@ android:icon="@drawable/sc_update_48dp" android:shortcutDisabledMessage="@string/app_not_available" android:shortcutId="show_recently_updated" - android:shortcutLongLabel="@string/label_recent_updates" - android:shortcutShortLabel="@string/short_recent_updates"> + android:shortcutLongLabel="@string/recent_updates" + android:shortcutShortLabel="@string/updates"> + android:shortcutLongLabel="@string/extensions" + android:shortcutShortLabel="@string/extensions"> 0) - content.add(getString(R.string.restore_completed_content_2, cancelled)) + content.add(getString(R.string.restore_content_skipped, cancelled)) val restoreString = content.joinToString("\n") @@ -400,7 +400,7 @@ class BackupRestoreService : Service() { .setColor(ContextCompat.getColor(this, R.color.colorAccent)) if (errors.size > 0 && !path.isNullOrEmpty() && !file.isNullOrEmpty()) { resultNotification.addAction(R.drawable.ic_clear_grey_24dp_img, getString(R.string - .notification_action_error_log), getErrorLogIntent(path, file)) + .view_all_errors), getErrorLogIntent(path, file)) } notificationManager.notify(Notifications.ID_RESTORE_COMPLETE, resultNotification.build()) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt index 4ae78d49c8..632ce67bf7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Category.kt @@ -42,12 +42,12 @@ interface Category : Serializable { fun sortRes(): Int = when (mangaSort) { ALPHA_ASC, ALPHA_DSC -> R.string.title - UPDATED_ASC, UPDATED_DSC -> R.string.action_sort_latest_chapter - UNREAD_ASC, UNREAD_DSC -> R.string.action_filter_unread - LAST_READ_ASC, LAST_READ_DSC -> R.string.action_sort_last_read - TOTAL_ASC, TOTAL_DSC -> R.string.action_sort_total - DATE_ADDED_ASC, DATE_ADDED_DSC -> R.string.action_date_added - else -> R.string.action_sort_drag_and_drop + UPDATED_ASC, UPDATED_DSC -> R.string.latest_chapter + UNREAD_ASC, UNREAD_DSC -> R.string.unread + LAST_READ_ASC, LAST_READ_DSC -> R.string.last_read + TOTAL_ASC, TOTAL_DSC -> R.string.total_chapters + DATE_ADDED_ASC, DATE_ADDED_DSC -> R.string.date_added + else -> R.string.drag_and_drop } fun catSortingMode(): Int? = when (mangaSort) { @@ -92,7 +92,7 @@ interface Category : Serializable { } fun createDefault(context: Context): Category = - create(context.getString(R.string.default_columns)).apply { + create(context.getString(R.string.default_value)).apply { id = 0 isFirst = true } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt index 877f35c2f3..306b3e6376 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt @@ -1,5 +1,7 @@ package eu.kanade.tachiyomi.data.database.models +import android.content.Context +import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.ui.reader.ReaderActivity @@ -45,6 +47,16 @@ interface Manga : SManga { fun showChapterTitle(defaultShow: Boolean): Boolean = chapter_flags and DISPLAY_MASK == DISPLAY_NUMBER + fun mangaType(context: Context): String { + return context.getString(when (mangaType()) { + TYPE_WEBTOON -> R.string.webtoon + TYPE_MANHWA -> R.string.manhwa + TYPE_MANHUA -> R.string.manhua + TYPE_COMIC -> R.string.comic + else -> R.string.manga + }) + } + /** * The type of comic the manga is (ie. manga, manhwa, manhua) */ diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt index 82e2945876..decfb110be 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt @@ -79,7 +79,7 @@ internal class DownloadNotifier(private val context: Context) { isDownloading = true // Pause action addAction(R.drawable.ic_av_pause_grey_24dp_img, - context.getString(R.string.action_pause), + context.getString(R.string.pause), NotificationReceiver.pauseDownloadsPendingBroadcast(context)) } @@ -90,12 +90,12 @@ internal class DownloadNotifier(private val context: Context) { .toRegex(RegexOption.IGNORE_CASE), "") setContentTitle("$title - $chapter".chop(30)) setContentText( - context.getString(R.string.chapter_downloading) + context.getString(R.string.downloading) ) } else { setContentTitle( context.getString( - R.string.chapter_downloading + R.string.downloading ) ) setContentText(null) @@ -125,7 +125,7 @@ internal class DownloadNotifier(private val context: Context) { isDownloading = true // Pause action addAction(R.drawable.ic_av_pause_grey_24dp_img, - context.getString(R.string.action_pause), + context.getString(R.string.pause), NotificationReceiver.pauseDownloadsPendingBroadcast(context)) } @@ -133,7 +133,7 @@ internal class DownloadNotifier(private val context: Context) { val quotedTitle = Pattern.quote(title) val chapter = download.chapter.name.replaceFirst("$quotedTitle[\\s]*[-]*[\\s]*".toRegex(RegexOption.IGNORE_CASE), "") setContentTitle("$title - $chapter".chop(30)) - setContentText(context.getString(R.string.chapter_downloading_progress) + setContentText(context.getString(R.string.downloading_progress) .format(download.downloadedImages, download.pages!!.size)) setStyle(null) setProgress(download.pages!!.size, download.downloadedImages, false) @@ -147,8 +147,8 @@ internal class DownloadNotifier(private val context: Context) { */ fun onDownloadPaused() { with(notification) { - setContentTitle(context.getString(R.string.chapter_paused)) - setContentText(context.getString(R.string.download_notifier_download_paused)) + setContentTitle(context.getString(R.string.paused)) + setContentText(context.getString(R.string.download_paused)) setSmallIcon(R.drawable.ic_av_pause_grey_24dp_img) setAutoCancel(false) setProgress(0, 0, false) @@ -158,13 +158,13 @@ internal class DownloadNotifier(private val context: Context) { // Resume action addAction( R.drawable.ic_av_play_arrow_grey_img, - context.getString(R.string.action_resume), + context.getString(R.string.resume), NotificationReceiver.resumeDownloadsPendingBroadcast(context) ) // Clear action addAction( R.drawable.ic_clear_grey_24dp_img, - context.getString(R.string.action_cancel_all), + context.getString(R.string.cancel_all), NotificationReceiver.clearDownloadsPendingBroadcast(context) ) } @@ -183,7 +183,7 @@ internal class DownloadNotifier(private val context: Context) { */ fun onWarning(reason: String) { with(notification) { - setContentTitle(context.getString(R.string.download_notifier_downloader_title)) + setContentTitle(context.getString(R.string.downloads)) setContentText(reason) setSmallIcon(android.R.drawable.stat_sys_warning) setAutoCancel(true) @@ -207,9 +207,9 @@ internal class DownloadNotifier(private val context: Context) { fun onError(error: String? = null, chapter: String? = null) { // Create notification with(notification) { - setContentTitle(chapter ?: context.getString(R.string.download_notifier_downloader_title)) - setContentText(error ?: context.getString(R.string.download_notifier_unkown_error)) - setStyle(NotificationCompat.BigTextStyle().bigText(error ?: context.getString(R.string.download_notifier_unkown_error))) + setContentTitle(chapter ?: context.getString(R.string.download_error)) + setContentText(error ?: context.getString(R.string.could_not_download_unexpected_error)) + setStyle(NotificationCompat.BigTextStyle().bigText(error ?: context.getString(R.string.could_not_download_unexpected_error))) setSmallIcon(android.R.drawable.stat_sys_warning) setCategory(NotificationCompat.CATEGORY_ERROR) clearActions() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt index 484d952883..8702bbf3e2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt @@ -52,7 +52,7 @@ class DownloadProvider(private val context: Context) { return downloadsDir.createDirectory(getSourceDirName(source)) .createDirectory(getMangaDirName(manga)) } catch (e: NullPointerException) { - throw Exception(context.getString(R.string.invalid_download_dir)) + throw Exception(context.getString(R.string.invalid_download_location)) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt index 0097366bc1..6697f4eafe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt @@ -163,7 +163,7 @@ class DownloadService : Service() { .observeOn(AndroidSchedulers.mainThread()) .subscribe({ state -> onNetworkStateChanged(state) }, { - toast(R.string.download_queue_error) + toast(R.string.could_not_download_chapter_can_try_again) stopSelf() }) } @@ -177,14 +177,14 @@ class DownloadService : Service() { when (connectivity.state) { CONNECTED -> { if (preferences.downloadOnlyOverWifi() && connectivityManager.isActiveNetworkMetered) { - downloadManager.stopDownloads(getString(R.string.download_notifier_text_only_wifi)) + downloadManager.stopDownloads(getString(R.string.no_wifi_connection)) } else { val started = downloadManager.startDownloads() if (!started) stopSelf() } } DISCONNECTED -> { - downloadManager.stopDownloads(getString(R.string.download_notifier_no_network)) + downloadManager.stopDownloads(getString(R.string.no_network_connection)) } else -> { /* Do nothing */ } } @@ -218,7 +218,7 @@ class DownloadService : Service() { private fun getPlaceholderNotification(): Notification { return NotificationCompat.Builder(this, Notifications.CHANNEL_DOWNLOADER) - .setContentTitle(getString(R.string.download_notifier_downloader_title)) + .setContentTitle(getString(R.string.downloading)) .build() } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index fe52b7c376..60190eb126 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -571,14 +571,14 @@ class LibraryUpdateService( ) ) addAction( - R.drawable.ic_glasses_black_24dp, getString(R.string.action_mark_as_read), + R.drawable.ic_glasses_black_24dp, getString(R.string.mark_as_read), NotificationReceiver.markAsReadPendingBroadcast( this@LibraryUpdateService, manga, chapters, Notifications.ID_NEW_CHAPTERS ) ) addAction( - R.drawable.ic_book_white_24dp, getString(R.string.action_view_chapters), + R.drawable.ic_book_white_24dp, getString(R.string.view_chapters), NotificationReceiver.openChapterPendingActivity( this@LibraryUpdateService, manga, Notifications.ID_NEW_CHAPTERS @@ -595,13 +595,13 @@ class LibraryUpdateService( notification(Notifications.CHANNEL_NEW_CHAPTERS) { setSmallIcon(R.drawable.ic_tachi) setLargeIcon(notificationBitmap) - setContentTitle(getString(R.string.notification_new_chapters)) + setContentTitle(getString(R.string.new_chapters_found)) color = ContextCompat.getColor(applicationContext, R.color.colorAccent) if (updates.size > 1) { setContentText( resources.getQuantityString( R.plurals - .notification_new_chapters_text, + .for_n_titles, updates.size, updates.size ) ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt index 8d29945401..e04d8ec4ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt @@ -133,7 +133,7 @@ class NotificationReceiver : BroadcastReceiver() { } context.startActivity(intent) } else { - context.toast(context.getString(R.string.no_next_chapter)) + context.toast(context.getString(R.string.next_chapter_not_found)) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt index 2e5371e280..a07bbad751 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt @@ -60,31 +60,31 @@ object Notifications { val channels = listOf(NotificationChannel( CHANNEL_COMMON, - context.getString(R.string.channel_common), + context.getString(R.string.common), NotificationManager.IMPORTANCE_LOW ), NotificationChannel( CHANNEL_LIBRARY, - context.getString(R.string.channel_library_updates), + context.getString(R.string.updating_library), NotificationManager.IMPORTANCE_LOW ).apply { setShowBadge(false) }, NotificationChannel( CHANNEL_DOWNLOADER, - context.getString(R.string.channel_downloader), + context.getString(R.string.downloads), NotificationManager.IMPORTANCE_LOW ).apply { setShowBadge(false) }, NotificationChannel( CHANNEL_UPDATES_TO_EXTS, - context.getString(R.string.channel_ext_updates), + context.getString(R.string.extension_updates), NotificationManager.IMPORTANCE_DEFAULT ), NotificationChannel( CHANNEL_NEW_CHAPTERS, - context.getString(R.string.channel_new_chapters), + context.getString(R.string.new_chapters), NotificationManager.IMPORTANCE_DEFAULT ), NotificationChannel( CHANNEL_RESTORE, - context.getString(R.string.channel_backup_restore), + context.getString(R.string.restoring_backup), NotificationManager.IMPORTANCE_LOW ).apply { setShowBadge(false) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt index e5849ce7b3..717e315d62 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt @@ -47,7 +47,7 @@ class Anilist(private val context: Context, id: Int) : TrackService(id) { PAUSED -> getString(R.string.paused) DROPPED -> getString(R.string.dropped) PLANNING -> getString(R.string.plan_to_read) - REPEATING -> getString(R.string.repeating) + REPEATING -> getString(R.string.rereading) else -> "" } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt index 0896f22801..029f8c8699 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt @@ -36,7 +36,7 @@ class Shikimori(private val context: Context, id: Int) : TrackService(id) { ON_HOLD -> getString(R.string.on_hold) DROPPED -> getString(R.string.dropped) PLANNING -> getString(R.string.plan_to_read) - REPEATING -> getString(R.string.repeating) + REPEATING -> getString(R.string.rereading) else -> "" } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterJob.kt index de79fccdbb..b0093843ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterJob.kt @@ -29,13 +29,13 @@ class UpdaterJob : Job() { NotificationCompat.Builder(context, Notifications.CHANNEL_COMMON).update { setContentTitle(context.getString(R.string.app_name)) - setContentText(context.getString(R.string.update_check_notification_update_available)) + setContentText(context.getString(R.string.update_available)) setSmallIcon(android.R.drawable.stat_sys_download_done) color = ContextCompat.getColor(context, R.color.colorAccent) // Download action addAction( android.R.drawable.stat_sys_download_done, - context.getString(R.string.action_download), + context.getString(R.string.download), PendingIntent.getService( context, 0, diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterNotifier.kt index 3c8d5d69b4..10a2c64406 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdaterNotifier.kt @@ -41,7 +41,7 @@ internal class UpdaterNotifier(private val context: Context) { fun onDownloadStarted(title: String) { with(notification) { setContentTitle(title) - setContentText(context.getString(R.string.update_check_notification_download_in_progress)) + setContentText(context.getString(R.string.downloading)) setSmallIcon(android.R.drawable.stat_sys_download) setOngoing(true) } @@ -68,18 +68,18 @@ internal class UpdaterNotifier(private val context: Context) { */ fun onDownloadFinished(uri: Uri) { with(notification) { - setContentText(context.getString(R.string.update_check_notification_download_complete)) + setContentText(context.getString(R.string.download_complete)) setSmallIcon(android.R.drawable.stat_sys_download_done) setOnlyAlertOnce(false) setProgress(0, 0, false) // Install action setContentIntent(NotificationHandler.installApkPendingActivity(context, uri)) addAction(R.drawable.ic_system_update_grey_24dp_img, - context.getString(R.string.action_install), + context.getString(R.string.install), NotificationHandler.installApkPendingActivity(context, uri)) // Cancel action addAction(R.drawable.ic_clear_grey_24dp_img, - context.getString(R.string.action_cancel), + context.getString(R.string.cancel), NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_UPDATER)) } notification.show() @@ -92,18 +92,18 @@ internal class UpdaterNotifier(private val context: Context) { */ fun onDownloadError(url: String) { with(notification) { - setContentText(context.getString(R.string.update_check_notification_download_error)) + setContentText(context.getString(R.string.download_error)) setSmallIcon(android.R.drawable.stat_sys_warning) setOnlyAlertOnce(false) setProgress(0, 0, false) color = ContextCompat.getColor(context, R.color.colorAccent) // Retry action addAction(R.drawable.ic_refresh_grey_24dp_img, - context.getString(R.string.action_retry), + context.getString(R.string.retry), UpdaterService.downloadApkPendingService(context, url)) // Cancel action addAction(R.drawable.ic_clear_grey_24dp_img, - context.getString(R.string.action_cancel), + context.getString(R.string.cancel), NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_UPDATER)) } notification.show(Notifications.ID_UPDATER) diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt index c724427dd8..2bcf8c7049 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt @@ -32,7 +32,7 @@ class ExtensionUpdateJob : Job() { context.notification(Notifications.CHANNEL_UPDATES_TO_EXTS) { setContentTitle( context.resources.getQuantityString( - R.plurals.update_check_notification_ext_updates, names + R.plurals.extension_update_available, names .size, names.size ) ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt b/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt index d97df53c38..5f57390e9b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt @@ -158,10 +158,10 @@ class CloudflareInterceptor(private val context: Context) : Interceptor { if (!cloudflareBypassed) { // Prompt user to update WebView if it seems too outdated if (isWebviewOutdated) { - context.toast(R.string.information_webview_outdated, Toast.LENGTH_LONG) + context.toast(R.string.please_update_webview, Toast.LENGTH_LONG) } - throw Exception(context.getString(R.string.information_cloudflare_bypass_failure)) + throw Exception(context.getString(R.string.failed_to_bypass_cloudflare)) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt index ba71fe52b8..9f1aac9e4e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt @@ -63,11 +63,11 @@ class LocalSource(private val context: Context) : CatalogueSource { } override val id = ID - override val name = context.getString(R.string.local_source) + override val name = context.getString(R.string.local_manga) override val lang = "" override val supportsLatest = true - override fun toString() = context.getString(R.string.local_source) + override fun toString() = context.getString(R.string.local_manga) override fun fetchPopularManga(page: Int) = fetchSearchManga(page, "", POPULAR_FILTERS) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt b/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt index c63951811c..83c719428b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt @@ -68,7 +68,7 @@ open class SourceManager(private val context: Context) { } private fun getSourceNotInstalledException(): Exception { - return SourceNotFoundException(context.getString(R.string.source_not_installed, id + return SourceNotFoundException(context.getString(R.string.source_not_installed_, id .toString()), id) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt index 842d191b23..a9fbbde487 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt @@ -91,8 +91,8 @@ class CatalogueController : NucleusController(), */ override fun getTitle(): String? { return if (showingExtenions) - applicationContext?.getString(R.string.label_extensions) - else applicationContext?.getString(R.string.pref_category_sources) + applicationContext?.getString(R.string.extensions) + else applicationContext?.getString(R.string.sources) } /** @@ -312,7 +312,7 @@ class CatalogueController : NucleusController(), val searchView = searchItem.actionView as SearchView // Change hint to show global search. - searchView.queryHint = applicationContext?.getString(R.string.action_global_search_hint) + searchView.queryHint = applicationContext?.getString(R.string.global_search) // Create query listener which opens the global search view. setOnQueryTextChangeListener(searchView, true) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt index 6e81a75421..e33cf9cb3d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt @@ -382,7 +382,7 @@ open class BrowseCatalogueController(bundle: Bundle) : snack?.dismiss() val message = if (error is NoResultsException) catalogue_view.context.getString(R.string.no_results_found) else (error.message ?: "") snack = catalouge_layout?.snack(message, Snackbar.LENGTH_INDEFINITE) { - setAction(R.string.action_retry) { + setAction(R.string.retry) { // If not the first page, show bottom progress bar. if (adapter.mainItemCount > 0) { val item = progressItem ?: return@setAction @@ -511,8 +511,8 @@ open class BrowseCatalogueController(bundle: Bundle) : if (manga.favorite) { presenter.changeMangaFavorite(manga) adapter?.notifyItemChanged(position) - snack = catalouge_layout?.snack(R.string.manga_removed_library, Snackbar.LENGTH_INDEFINITE) { - setAction(R.string.action_undo) { + snack = catalouge_layout?.snack(R.string.removed_from_library, Snackbar.LENGTH_INDEFINITE) { + setAction(R.string.undo) { if (!manga.favorite) addManga(manga, position) } addCallback(object : BaseTransientBottomBar.BaseCallback() { @@ -525,7 +525,7 @@ open class BrowseCatalogueController(bundle: Bundle) : (activity as? MainActivity)?.setUndoSnackBar(snack) } else { addManga(manga, position) - snack = catalouge_layout?.snack(R.string.manga_added_library) + snack = catalouge_layout?.snack(R.string.added_to_library) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueSearchSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueSearchSheet.kt index 7cf208c26a..d3d25b31be 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueSearchSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueSearchSheet.kt @@ -45,7 +45,7 @@ class CatalogueSearchSheet(activity: Activity) : init { val view = activity.layoutInflater.inflate(R.layout.catalogue_drawer_content, null) setContentView(view) - toolbar_title.text = context.getString(R.string.source_search_options) + toolbar_title.text = context.getString(R.string.search_filters) dismiss_button.setOnClickListener { dismiss() } reset_btn.setOnClickListener { onResetClicked() } /*view.search_layout.setOnApplyWindowInsetsListener { v, insets -> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt index 9b8e34f94a..e5b179c39a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt @@ -47,7 +47,7 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle), * Returns the toolbar title to show when this controller is attached. */ override fun getTitle(): String? { - return resources?.getString(R.string.action_edit_categories) + return resources?.getString(R.string.edit_categories) } /** @@ -107,11 +107,6 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle), */ fun setCategories(categories: List) { adapter?.updateDataSet(categories) - if (categories.isNotEmpty()) { - empty_view.hide() - } else { - empty_view.show(R.drawable.ic_shape_black_128dp, R.string.information_empty_category) - } } /** @@ -136,7 +131,7 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle), MaterialDialog(activity!!) .title(R.string.confirm_category_deletion) .message(R.string.confirm_category_deletion_message) - .positiveButton(R.string.action_delete) { + .positiveButton(R.string.delete) { deleteCategory(position) } .negativeButton(android.R.string.no) @@ -146,9 +141,9 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle), private fun deleteCategory(position: Int) { adapter?.removeItem(position) snack = - view?.snack(R.string.snack_category_deleted, Snackbar.LENGTH_INDEFINITE) { + view?.snack(R.string.category_deleted, Snackbar.LENGTH_INDEFINITE) { var undoing = false - setAction(R.string.action_undo) { + setAction(R.string.undo) { adapter?.restoreDeletedItems() undoing = true } @@ -212,6 +207,6 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle), * Called from the presenter when a category with the given name already exists. */ fun onCategoryExistsError() { - activity?.toast(R.string.error_category_exists) + activity?.toast(R.string.category_with_name_exists) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryCreateDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryCreateDialog.kt index 988ed75d3e..1c4681f87a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryCreateDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryCreateDialog.kt @@ -26,7 +26,7 @@ class CategoryCreateDialog(bundle: Bundle? = null) : DialogController(bundle) */ override fun onCreateDialog(savedViewState: Bundle?): Dialog { return MaterialDialog(activity!!) - .title(R.string.action_add_category) + .title(R.string.add_category) .positiveButton(android.R.string.ok) .negativeButton(android.R.string.cancel) .input(hintRes = R.string.name) { _, input -> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryRenameDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryRenameDialog.kt index e97e045a64..8d0940e3bf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryRenameDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryRenameDialog.kt @@ -36,7 +36,7 @@ class CategoryRenameDialog(bundle: Bundle? = null) : DialogController(bundle) */ override fun onCreateDialog(savedViewState: Bundle?): Dialog { return MaterialDialog(activity!!) - .title(R.string.action_rename_category) + .title(R.string.rename_category) .negativeButton(android.R.string.cancel) .input(hintRes = R.string.name, prefill = currentName) { _, input -> currentName = input.toString() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadBottomSheet.kt index 13ec30531a..c0a0d623a0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadBottomSheet.kt @@ -85,7 +85,7 @@ class DownloadBottomSheet @JvmOverloads constructor( private fun updateDLTitle() { val extCount = presenter.downloadQueue.firstOrNull() title_text.text = if (extCount != null) resources.getString( - R.string.downloading_x, extCount.chapter.name + R.string.downloading_, extCount.chapter.name ) else "" } @@ -155,7 +155,7 @@ class DownloadBottomSheet @JvmOverloads constructor( if (presenter.downloadQueue.isEmpty()) { empty_view?.show( R.drawable.ic_file_download_black_128dp, - R.string.nothing_downloading) + R.string.nothing_is_downloading) } else { empty_view?.hide() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomPresenter.kt index 11c2e70d6c..6144cebf40 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomPresenter.kt @@ -90,7 +90,7 @@ class ExtensionBottomPresenter( .sortedBy { it.pkgName } if (installedSorted.isNotEmpty() || untrustedSorted.isNotEmpty()) { - val header = ExtensionGroupItem(context.getString(R.string.ext_installed), installedSorted.size + untrustedSorted.size) + val header = ExtensionGroupItem(context.getString(R.string.installed), installedSorted.size + untrustedSorted.size) items += installedSorted.map { extension -> ExtensionItem(extension, header, currentDownloads[extension.pkgName]) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomSheet.kt index 58f8215b72..1a3517daaa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionBottomSheet.kt @@ -91,7 +91,7 @@ ExtensionAdapter.OnButtonClickListener, fun updateExtTitle() { val extCount = presenter.getExtensionUpdateCount() - title_text.text = if (extCount == 0) context.getString(R.string.label_extensions) + title_text.text = if (extCount == 0) context.getString(R.string.extensions) else resources.getQuantityString(R.plurals.extensions_updates_available, extCount, extCount) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt index 6eb7faf17a..faedb06e1e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt @@ -63,7 +63,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) : } override fun getTitle(): String? { - return resources?.getString(R.string.label_extension_info) + return resources?.getString(R.string.extension_info) } @SuppressLint("PrivateResource") @@ -75,8 +75,8 @@ class ExtensionDetailsController(bundle: Bundle? = null) : val context = view.context extension_title.text = extension.name - extension_version.text = context.getString(R.string.ext_version_info, extension.versionName) - extension_lang.text = context.getString(R.string.ext_language_info, LocaleHelper.getDisplayName(extension.lang, context)) + extension_version.text = context.getString(R.string.version_, extension.versionName) + extension_lang.text = context.getString(R.string.language_, LocaleHelper.getDisplayName(extension.lang, context)) extension_pkg.text = extension.pkgName extension.getApplicationIcon(context)?.let { extension_icon.setImageDrawable(it) } extension_uninstall_button.clicks().subscribeUntilDestroy { @@ -112,7 +112,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) : if (screen.preferenceCount == 0) { extension_prefs_empty_view.show(R.drawable.ic_no_settings, - R.string.ext_empty_preferences) + R.string.empty_preferences_for_extension) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt index 5aabfa50f3..8e4a8039e4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt @@ -43,7 +43,7 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) : lang.text = if (extension !is Extension.Untrusted) { LocaleHelper.getDisplayName(extension.lang, itemView.context) } else { - itemView.context.getString(R.string.ext_untrusted).toUpperCase() + itemView.context.getString(R.string.untrusted).toUpperCase() } GlideApp.with(itemView.context).clear(edit_button) @@ -71,11 +71,11 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) : val installStep = item.installStep if (installStep != null) { setText(when (installStep) { - InstallStep.Pending -> R.string.ext_pending - InstallStep.Downloading -> R.string.ext_downloading - InstallStep.Installing -> R.string.ext_installing - InstallStep.Installed -> R.string.ext_installed - InstallStep.Error -> R.string.action_retry + InstallStep.Pending -> R.string.pending + InstallStep.Downloading -> R.string.downloading + InstallStep.Installing -> R.string.installing + InstallStep.Installed -> R.string.installed + InstallStep.Error -> R.string.retry }) if (installStep != InstallStep.Error) { isEnabled = false @@ -88,22 +88,22 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) : backgroundTintList = ColorStateList.valueOf( context.getResourceColor(R.attr.colorAccent)) strokeColor = ColorStateList.valueOf(Color.TRANSPARENT) - setText(R.string.ext_update) + setText(R.string.update) } extension.isObsolete -> { // Red outline setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error)) - setText(R.string.ext_obsolete) + setText(R.string.obsolete) } else -> { - setText(R.string.ext_details) + setText(R.string.details) } } } else if (extension is Extension.Untrusted) { - setText(R.string.ext_trust) + setText(R.string.trust) } else { - setText(R.string.ext_install) + setText(R.string.install) } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionTrustDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionTrustDialog.kt index f0416eb1d8..fcae6b480d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionTrustDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionTrustDialog.kt @@ -21,10 +21,10 @@ class ExtensionTrustDialog(bundle: Bundle? = null) : DialogController(bundle) return MaterialDialog(activity!!) .title(R.string.untrusted_extension) .message(R.string.untrusted_extension_message) - .positiveButton(R.string.ext_trust) { + .positiveButton(R.string.trust) { listener.trustSignature(args.getString(SIGNATURE_KEY)!!) } - .negativeButton(R.string.ext_uninstall) { + .negativeButton(R.string.uninstall) { listener.uninstallExtension(args.getString(PKGNAME_KEY)!!) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt index a9dfaeed02..bc3c565743 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt @@ -15,7 +15,7 @@ import uy.kohesive.injekt.api.get class SettingsExtensionsController : SettingsController() { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.action_filter + titleRes = R.string.filter val activeLangs = preferences.enabledLanguages().getOrDefault() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt index 4b6bf66abb..ed46df504d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt @@ -34,7 +34,7 @@ class ChangeMangaCategoriesDialog(bundle: Bundle? = null) : override fun onCreateDialog(savedViewState: Bundle?): Dialog { return MaterialDialog(activity!!) - .title(R.string.action_move_category) + .title(R.string.move_to_categories) .listItemsMultiChoice( items = categories.map { it.name }, initialSelection = preselected.toIntArray(), diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt index efe8dbbd57..0e45d9b006 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryBadge.kt @@ -35,7 +35,7 @@ class LibraryBadge @JvmOverloads constructor(context: Context, attrs: AttributeS with(download_text) { visibility = if (downloads == -2 || downloads > 0) View.VISIBLE else View.GONE text = if (downloads == -2) - resources.getString(R.string.local_source_badge) + resources.getString(R.string.local) else downloads.toString() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt index ec27dca1a0..47daeb918c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt @@ -171,7 +171,7 @@ class LibraryCategoryAdapter(val libraryListener: LibraryListener) : } else { val category = db.getCategoriesForManga(iFlexible.manga) .executeAsBlocking().firstOrNull()?.name - category ?: recyclerView.context.getString(R.string.default_columns) + category ?: recyclerView.context.getString(R.string.default_value) } } LibrarySort.LAST_READ -> { @@ -184,7 +184,7 @@ class LibraryCategoryAdapter(val libraryListener: LibraryListener) : LibrarySort.UNREAD -> { val unread = iFlexible.manga.unread if (unread > 0) getRange(unread) - else recyclerView.context.getString(R.string.action_filter_read) + else recyclerView.context.getString(R.string.read) } LibrarySort.TOTAL -> { val total = iFlexible.chapterCount diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 688ec375fb..d25ecd9e81 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -142,8 +142,8 @@ class LibraryController( override fun getTitle(): String? { return if (view != null && presenter.categories.size > 1) presenter.categories.find { it.order == activeCategory - }?.name ?: view?.context?.getString(R.string.label_library) - else view?.context?.getString(R.string.label_library) + }?.name ?: view?.context?.getString(R.string.library) + else view?.context?.getString(R.string.library) } private var scrollListener = object : RecyclerView.OnScrollListener() { @@ -290,7 +290,7 @@ class LibraryController( 0 -> updateLibrary(presenter.allCategories.first()) else -> updateLibrary() } - }).positiveButton(R.string.action_update).show() + }).positiveButton(R.string.update).show() } else -> { when (preferences.updateOnRefresh().getOrDefault()) { @@ -437,8 +437,8 @@ class LibraryController( } else { empty_view?.show( R.drawable.ic_book_black_128dp, - if (bottom_sheet.hasActiveFilters()) R.string.information_empty_library_filtered - else R.string.information_empty_library + if (bottom_sheet.hasActiveFilters()) R.string.no_matches_for_filters + else R.string.library_is_empty_add_from_browse ) } adapter.setItems(mangaMap) @@ -731,10 +731,10 @@ class LibraryController( presenter.moveMangaToCategory(manga, category.id, mangaIds) snack?.dismiss() snack = view?.snack( - resources!!.getString(R.string.moved_to_category, category.name) + resources!!.getString(R.string.moved_to_, category.name) ) { anchorView = bottom_sheet - setAction(R.string.action_undo) { + setAction(R.string.undo) { manga.category = category.id!! presenter.moveMangaToCategory(manga, oldCatId, mangaIds) } @@ -748,9 +748,9 @@ class LibraryController( snack = view?.snack( resources!!.getString( when { - inQueue -> R.string.category_already_in_queue + inQueue -> R.string._already_in_queue LibraryUpdateService.isRunning() -> R.string.adding_category_to_queue - else -> R.string.updating_category_x + else -> R.string.updating_ }, category.name ), Snackbar.LENGTH_LONG ) { @@ -869,18 +869,9 @@ class LibraryController( override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean { val count = selectedMangas.size - if (count == 0) { - // Destroy action mode if there are no items selected. - destroyActionModeIfNeeded() - } else { - mode.title = resources?.getString(R.string.label_selected, count) - if (preferences.librarySortingMode().getOrDefault() == LibrarySort.DRAG_AND_DROP) { - val catId = (selectedMangas.first() as? LibraryManga)?.category - val sameCat = /*(adapter?.categories?.getOrNull(library_pager.currentItem)?.id - == catId) &&*/ selectedMangas.all { (it as? LibraryManga)?.category == catId } - menu.findItem(R.id.action_move_manga).isVisible = sameCat - } else menu.findItem(R.id.action_move_manga).isVisible = false - } + // Destroy action mode if there are no items selected. + if (count == 0) destroyActionModeIfNeeded() + else mode.title = resources?.getString(R.string.selected_, count) return false } //endregion @@ -889,8 +880,8 @@ class LibraryController( when (item.itemId) { R.id.action_move_to_category -> showChangeMangaCategoriesDialog() R.id.action_delete -> { - MaterialDialog(activity!!).message(R.string.confirm_manga_deletion) - .positiveButton(R.string.action_remove) { + MaterialDialog(activity!!).message(R.string.remove_from_library_question) + .positiveButton(R.string.remove) { deleteMangasFromLibrary() }.negativeButton(android.R.string.no).show() } @@ -918,11 +909,11 @@ class LibraryController( destroyActionModeIfNeeded() snack?.dismiss() snack = view?.snack( - activity?.getString(R.string.manga_removed_library) ?: "", Snackbar.LENGTH_INDEFINITE + activity?.getString(R.string.removed_from_library) ?: "", Snackbar.LENGTH_INDEFINITE ) { anchorView = bottom_sheet var undoing = false - setAction(R.string.action_undo) { + setAction(R.string.undo) { presenter.addMangas(mangas) undoing = true } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt index e7044ce456..9eda76a068 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt @@ -105,16 +105,16 @@ class LibraryHeaderItem( sortText.text = itemView.context.getString(R.string.sort_by_, itemView.context.getString( when (category.sortingMode()) { - LibrarySort.LATEST_CHAPTER -> R.string.action_sort_latest_chapter + LibrarySort.LATEST_CHAPTER -> R.string.latest_chapter LibrarySort.DRAG_AND_DROP -> if (category.id == -1) R.string.category - else R.string.action_sort_drag_and_drop - LibrarySort.TOTAL -> R.string.action_sort_total - LibrarySort.UNREAD -> R.string.action_filter_unread - LibrarySort.LAST_READ -> R.string.action_sort_last_read + else R.string.drag_and_drop + LibrarySort.TOTAL -> R.string.total_chapters + LibrarySort.UNREAD -> R.string.unread + LibrarySort.LAST_READ -> R.string.last_read LibrarySort.ALPHA -> R.string.title - LibrarySort.DATE_ADDED -> R.string.action_date_added - else -> R.string.action_sort_drag_and_drop + LibrarySort.DATE_ADDED -> R.string.date_added + else -> R.string.drag_and_drop } )) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index ebf5ed8df8..5552d2371d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -516,7 +516,7 @@ class LibraryPresenter( categories.add(0, createDefaultCategory()) if (categories.size == 1 && showCategories) - categories.first().name = context.getString(R.string.label_library) + categories.first().name = context.getString(R.string.library) this.allCategories = categories this.categories = if (!showCategories) arrayListOf(categoryAll) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt index b89eb9a1b1..98d281a521 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/FilterBottomSheet.kt @@ -177,17 +177,17 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri } downloaded = inflate(R.layout.filter_buttons) as FilterTagGroup - downloaded.setup(this, R.string.action_filter_downloaded, R.string.action_filter_not_downloaded) + downloaded.setup(this, R.string.downloaded, R.string.not_downloaded) completed = inflate(R.layout.filter_buttons) as FilterTagGroup completed.setup(this, R.string.completed, R.string.ongoing) unread = inflate(R.layout.filter_buttons) as FilterTagGroup - unread.setup(this, R.string.action_filter_not_started, R.string.action_filter_in_progress, - R.string.action_filter_read) + unread.setup(this, R.string.not_started, R.string.in_progress, + R.string.read) tracked = inflate(R.layout.filter_buttons) as FilterTagGroup - tracked.setup(this, R.string.action_filter_tracked, R.string.action_filter_not_tracked) + tracked.setup(this, R.string.tracked, R.string.not_tracked) reSortViews() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChooseShapeDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChooseShapeDialog.kt index 6f5a5836ab..642293e6f3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChooseShapeDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChooseShapeDialog.kt @@ -18,10 +18,10 @@ class ChooseShapeDialog(bundle: Bundle? = null) : DialogController(bundle) { override fun onCreateDialog(savedViewState: Bundle?): Dialog { val modes = intArrayOf( - R.string.circular_icon, - R.string.rounded_icon, - R.string.square_icon, - R.string.star_icon) + R.string.circular, + R.string.rounded, + R.string.square, + R.string.star) return MaterialDialog(activity!!) .title(R.string.icon_shape) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt index 4bceb362d0..922732f5bb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt @@ -48,7 +48,7 @@ class EditMangaDialog : DialogController { val dialog = MaterialDialog(activity!!).apply { customView(viewRes = R.layout.edit_manga_dialog, scrollable = true) negativeButton(android.R.string.cancel) - positiveButton(R.string.action_save) { onPositiveButtonClick() } + positiveButton(R.string.save) { onPositiveButtonClick() } } dialogView = dialog.view onViewCreated(dialog.view) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt index cba600b32d..f8f39d5cc0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt @@ -115,6 +115,7 @@ import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.io.File import java.io.IOException +import java.util.Locale import kotlin.math.abs import kotlin.math.max @@ -581,7 +582,7 @@ class MangaDetailsController : BaseController, val popup = PopupMenu(itemView.context, itemView) // Inflate our menu resource into the PopupMenu's Menu - popup.menuInflater.inflate(R.menu.chapters_mat_single, popup.menu) + popup.menuInflater.inflate(R.menu.chapter_single, popup.menu) popup.setOnMenuItemClickListener { menuItem -> val chapters = listOf(item) @@ -614,7 +615,7 @@ class MangaDetailsController : BaseController, if (bookmarked) R.string.removed_bookmark else R.string.bookmarked, Snackbar.LENGTH_INDEFINITE ) { - setAction(R.string.action_undo) { + setAction(R.string.undo) { bookmarkChapters(listOf(item), bookmarked) } } @@ -634,7 +635,7 @@ class MangaDetailsController : BaseController, else R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE ) { var undoing = false - setAction(R.string.action_undo) { + setAction(R.string.undo) { presenter.markChaptersRead(listOf(item), read, true, lastRead, pagesLeft) undoing = true } @@ -681,7 +682,7 @@ class MangaDetailsController : BaseController, val editItem = menu.findItem(R.id.action_edit) editItem.isVisible = presenter.manga.favorite && !presenter.isLockedFromSearch editItem.title = view?.context?.getString(if (manga?.source == LocalSource.ID) - R.string.action_edit else R.string.action_edit_cover) + R.string.edit else R.string.edit_cover) menu.findItem(R.id.action_download).isVisible = !presenter.isLockedFromSearch && manga?.source != LocalSource.ID menu.findItem(R.id.action_add_to_home_screen).isVisible = !presenter.isLockedFromSearch @@ -697,7 +698,7 @@ class MangaDetailsController : BaseController, val searchItem = menu.findItem(R.id.action_search) val searchView = searchItem.actionView as SearchView - searchView.queryHint = resources?.getString(R.string.chapter_search_hint) + searchView.queryHint = resources?.getString(R.string.search_chapters) searchItem.icon?.mutate()?.setTint(iconPrimary) searchItem.collapseActionView() if (query.isNotEmpty()) { @@ -731,9 +732,9 @@ class MangaDetailsController : BaseController, if (manga?.hasCustomCover() == true) { MaterialDialog(activity!!).listItems(items = listOf( view!!.context.getString( - R.string.action_edit_cover + R.string.edit_cover ), view!!.context.getString( - R.string.action_reset_cover + R.string.reset_cover ) ), waitForPositiveButton = false, selection = { _, index, _ -> when (index) { @@ -751,8 +752,8 @@ class MangaDetailsController : BaseController, R.id.action_add_to_home_screen -> addToHomeScreen() R.id.action_refresh_tracking -> presenter.refreshTrackers() R.id.action_mark_all_as_read -> { - MaterialDialog(view!!.context).message(R.string.mark_all_as_read_message) - .positiveButton(R.string.action_mark_as_read) { + MaterialDialog(view!!.context).message(R.string.mark_all_chapters_as_read) + .positiveButton(R.string.mark_as_read) { markAsRead(presenter.chapters) }.negativeButton(android.R.string.cancel).show() } @@ -803,7 +804,7 @@ class MangaDetailsController : BaseController, clipData = ClipData.newRawUri(null, stream) } } - startActivity(Intent.createChooser(intent, context.getString(R.string.action_share))) + startActivity(Intent.createChooser(intent, context.getString(R.string.share))) } catch (e: Exception) { context.toast(e.message) } @@ -847,12 +848,14 @@ class MangaDetailsController : BaseController, } private fun downloadChapters(chapters: List) { - val view = view + val view = view ?: return presenter.downloadChapters(chapters) - if (view != null && !presenter.manga.favorite && (snack == null || - snack?.getText() != view.context.getString(R.string.snack_add_to_library))) { - snack = view.snack(view.context.getString(R.string.snack_add_to_library), Snackbar.LENGTH_INDEFINITE) { - setAction(R.string.action_add) { + val text = view.context.getString(R.string.add_x_to_library, presenter.manga.mangaType + (view.context).toLowerCase(Locale.ROOT)) + if (!presenter.manga.favorite && (snack == null || + snack?.getText() != text)) { + snack = view.snack(text, Snackbar.LENGTH_INDEFINITE) { + setAction(R.string.add) { presenter.setFavorite(true) } addCallback(object : BaseTransientBottomBar.BaseCallback() { @@ -906,7 +909,7 @@ class MangaDetailsController : BaseController, override fun onLoadCleared(placeholder: Drawable?) { } override fun onLoadFailed(errorDrawable: Drawable?) { - activity?.toast(R.string.icon_creation_fail) + activity?.toast(R.string.could_not_create_shortcut) } }) } @@ -973,8 +976,8 @@ class MangaDetailsController : BaseController, if (item != null) { openChapter(item.chapter) } else if (snack == null || snack?.getText() != view?.context?.getString( - R.string.no_next_chapter)) { - snack = view?.snack(R.string.no_next_chapter, Snackbar.LENGTH_LONG) { + R.string.next_chapter_not_found)) { + snack = view?.snack(R.string.next_chapter_not_found, Snackbar.LENGTH_LONG) { addCallback(object : BaseTransientBottomBar.BaseCallback() { override fun onDismissed(transientBottomBar: Snackbar?, event: Int) { super.onDismissed(transientBottomBar, event) @@ -1091,17 +1094,17 @@ class MangaDetailsController : BaseController, private fun showAddedSnack() { val view = view ?: return snack?.dismiss() - snack = view.snack(view.context.getString(R.string.manga_added_library)) + snack = view.snack(view.context.getString(R.string.added_to_library)) } private fun showRemovedSnack() { val view = view ?: return snack?.dismiss() snack = view.snack( - view.context.getString(R.string.manga_removed_library), + view.context.getString(R.string.removed_from_library), Snackbar.LENGTH_INDEFINITE ) { - setAction(R.string.action_undo) { + setAction(R.string.undo) { presenter.setFavorite(true) } addCallback(object : BaseTransientBottomBar.BaseCallback() { @@ -1139,7 +1142,7 @@ class MangaDetailsController : BaseController, val clipboard = activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager clipboard.setPrimaryClip(ClipData.newPlainText(contentType, content)) - snack = view.snack(view.context.getString(R.string.copied_to_clipboard, contentType)) + snack = view.snack(view.context.getString(R.string._copied_to_clipboard, contentType)) } override fun handleBack(): Boolean { @@ -1254,7 +1257,7 @@ class MangaDetailsController : BaseController, override fun onPrepareActionMode(mode: ActionMode?, menu: Menu?): Boolean { mode?.title = view?.context?.getString(if (startingDLChapterPos == null) - R.string.select_start_chapter else R.string.select_end_chapter) + R.string.select_starting_chapter else R.string.select_ending_chapter) return false } @@ -1264,11 +1267,11 @@ class MangaDetailsController : BaseController, intent.type = "image/*" startActivityForResult( Intent.createChooser(intent, - resources?.getString(R.string.file_select_cover)), + resources?.getString(R.string.select_cover_image)), 101 ) } else { - activity?.toast(R.string.notification_first_add_to_library) + activity?.toast(R.string.must_be_in_library_to_edit) } } @@ -1284,7 +1287,7 @@ class MangaDetailsController : BaseController, setPaletteColor() } } catch (error: IOException) { - activity.toast(R.string.notification_cover_update_failed) + activity.toast(R.string.failed_to_update_cover) Timber.e(error) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt index ed70804b3e..a9cdcbbdce 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt @@ -549,10 +549,10 @@ class MangaDetailsPresenter( fun currentFilters(): String { val filtersId = mutableListOf() - filtersId.add(if (onlyRead()) R.string.action_filter_read else null) - filtersId.add(if (onlyUnread()) R.string.action_filter_unread else null) - filtersId.add(if (onlyDownloaded()) R.string.action_filter_downloaded else null) - filtersId.add(if (onlyBookmarked()) R.string.action_filter_bookmarked else null) + filtersId.add(if (onlyRead()) R.string.read else null) + filtersId.add(if (onlyUnread()) R.string.unread else null) + filtersId.add(if (onlyDownloaded()) R.string.downloaded else null) + filtersId.add(if (onlyBookmarked()) R.string.bookmarked else null) return filtersId.filterNotNull().joinToString(", ") { preferences.context.getString(it) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt index 21e4ad0972..5506ba440d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaHeaderHolder.kt @@ -76,11 +76,11 @@ class MangaHeaderHolder( true } manga_full_title.setOnLongClickListener { - adapter.delegate.copyToClipboard(manga_full_title.text.toString(), R.string.manga_info_full_title_label) + adapter.delegate.copyToClipboard(manga_full_title.text.toString(), R.string.title) true } manga_author.setOnLongClickListener { - adapter.delegate.copyToClipboard(manga_author.text.toString(), R.string.manga_info_author_label) + adapter.delegate.copyToClipboard(manga_author.text.toString(), R.string.author) true } manga_cover.setOnClickListener { adapter.delegate.zoomImageFromThumb(cover_card) } @@ -137,7 +137,7 @@ class MangaHeaderHolder( else expand() } manga_summary_label.text = itemView.context.getString( - R.string.about_this, itemView.context.getString( + R.string.about_this_, itemView.context.getString( when { manga.mangaType() == Manga.TYPE_MANHWA -> R.string.manhwa manga.mangaType() == Manga.TYPE_MANHUA -> R.string.manhua @@ -174,7 +174,7 @@ class MangaHeaderHolder( with(track_button) { visibleIf(presenter.hasTrackers()) text = itemView.context.getString( - if (tracked) R.string.action_filter_tracked + if (tracked) R.string.tracked else R.string.tracking ) @@ -192,8 +192,8 @@ class MangaHeaderHolder( text = if (nextChapter != null) { val number = adapter.decimalFormat.format(nextChapter.chapter_number.toDouble()) if (nextChapter.chapter_number > 0) resources.getString( - if (nextChapter.last_page_read > 0) R.string.continue_reading_chapter - else R.string.start_reading_chapter, number + if (nextChapter.last_page_read > 0) R.string.continue_reading_chapter_ + else R.string.start_reading_chapter_, number ) else { resources.getString( @@ -268,7 +268,7 @@ class MangaHeaderHolder( val presenter = adapter.delegate.mangaPresenter() val tracked = presenter.isTracked() with(track_button) { - text = itemView.context.getString(if (tracked) R.string.action_filter_tracked + text = itemView.context.getString(if (tracked) R.string.tracked else R.string.tracking) icon = ContextCompat.getDrawable(itemView.context, if (tracked) R.drawable diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/BaseChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/BaseChapterHolder.kt index 685ca4a4ce..48da5324ad 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/BaseChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/BaseChapterHolder.kt @@ -32,7 +32,7 @@ open class BaseChapterHolder( // Hide download and show delete if the chapter is downloaded if (chapter.status != Download.DOWNLOADED) popup.menu.findItem(R.id.action_delete).title = download_button.context.getString( - R.string.action_cancel + R.string.cancel ) // Set a listener so we are notified if a menu item is clicked diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt index 0917c367de..c74f8aed03 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt @@ -33,7 +33,7 @@ class ChapterHolder( chapter_title.text = when (manga.displayMode) { Manga.DISPLAY_NUMBER -> { val number = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) - itemView.context.getString(R.string.display_mode_chapter, number) + itemView.context.getString(R.string.chapter_, number) } else -> chapter.name } @@ -68,7 +68,7 @@ class ChapterHolder( } else if (!chapter.read && chapter.last_page_read > 0 && !isLocked) { statuses.add( itemView.context.getString( - R.string.chapter_progress, chapter.last_page_read + 1 + R.string.page_, chapter.last_page_read + 1 ) ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt index ca7bb1453f..472a60cd99 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt @@ -42,9 +42,9 @@ class TrackHolder(view: View, adapter: TrackAdapter) : BaseViewHolder(view) { R.string.chapter_x_of_y, track.last_chapter_read, track.total_chapters ) track.last_chapter_read > 0 -> context.getString( - R.string.chapter_x, track.last_chapter_read + R.string.chapter_, track.last_chapter_read ) - else -> context.getString(R.string.action_filter_not_started) + else -> context.getString(R.string.not_started) } } val status = item.service.getStatus(track.status) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt index e902367eb2..0a555cbab5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt @@ -63,7 +63,7 @@ class TrackSearchDialog : DialogController { val dialog = MaterialDialog(activity!!).apply { customView(viewRes = R.layout.track_search_dialog, scrollable = false) negativeButton(android.R.string.cancel) - positiveButton(R.string.action_clear) { onPositiveButtonClick() } + positiveButton(R.string.clear) { onPositiveButtonClick() } setActionButtonEnabled(WhichButton.POSITIVE, wasPreviouslyTracked) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt index 6eaecfe638..2302f24009 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackingBottomSheet.kt @@ -110,7 +110,7 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) : Bott val track = adapter?.getItem(position)?.track ?: return if (track.tracking_url.isBlank()) { - activity.toast(R.string.url_not_set) + activity.toast(R.string.url_not_set_click_again) } else { activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(track.tracking_url))) controller.refreshTracker = position diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt index e3cfd09881..5dd5f4bddd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt @@ -86,14 +86,14 @@ class MigrationController : NucleusController(), fun render(state: ViewState) { if (state.selectedSource == null) { - title = resources?.getString(R.string.label_migration) + title = resources?.getString(R.string.source_migration) if (adapter !is SourceAdapter) { adapter = SourceAdapter(this) migration_recycler.adapter = adapter } adapter?.updateDataSet(state.sourcesWithManga) } else { - val switching = title == resources?.getString(R.string.label_migration) + val switching = title == resources?.getString(R.string.source_migration) title = state.selectedSource.toString() if (adapter !is MangaAdapter) { adapter = MangaAdapter(this) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationMangaDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationMangaDialog.kt index e84c57800f..965c09cb99 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationMangaDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationMangaDialog.kt @@ -22,14 +22,14 @@ class MigrationMangaDialog(bundle: Bundle? = null) : DialogController(bundle) } override fun onCreateDialog(savedViewState: Bundle?): Dialog { - val confirmRes = if (copy) R.plurals.confirm_copy else R.plurals.confirm_migration + val confirmRes = if (copy) R.plurals.copy_manga else R.plurals.migrate_manga val confirmString = applicationContext?.resources?.getQuantityString(confirmRes, mangaSet, mangaSet, ( - if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_x, mangaSkipped) + if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_, mangaSkipped) else "")) ?: "" return MaterialDialog(activity!!).show { message(text = confirmString) - positiveButton(if (copy) R.string.copy else R.string.migrate) { + positiveButton(if (copy) R.string.copy_value else R.string.migrate) { if (copy) (targetController as? MigrationListController)?.copyMangas() else (targetController as? MigrationListController)?.migrateMangas() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt index 96559f728a..fe607e436d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SearchController.kt @@ -138,7 +138,7 @@ class SearchController( val preselected = MigrationFlags.getEnabledFlagsPositions(prefValue) return MaterialDialog(activity!!) - .message(R.string.migration_dialog_what_to_include) + .message(R.string.select_data_to_include) .listItemsMultiChoice(items = MigrationFlags.titles.map { resources?.getString(it) as CharSequence }, initialSelection = preselected.toIntArray()) { _, positions, _ -> @@ -148,7 +148,7 @@ class SearchController( .positiveButton(R.string.migrate) { (targetController as? SearchController)?.migrateManga() } - .negativeButton(R.string.copy) { + .negativeButton(R.string.copy_value) { (targetController as? SearchController)?.copyManga() } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt index 36418730fa..9d3131e02f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt @@ -42,7 +42,7 @@ class SelectionHeader : AbstractHeaderItem() { class Holder(view: View, adapter: FlexibleAdapter>) : BaseFlexibleViewHolder(view, adapter) { init { - title.text = view.context.getString(R.string.migration_selection_prompt) + title.text = view.context.getString(R.string.select_a_source_to_migrate_from) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt index ba125cedff..b25fd604af 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SourceHolder.kt @@ -21,7 +21,7 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) : get() = card init { - source_latest.text = view.context.getString(R.string.action_auto) + source_latest.text = view.context.getString(R.string.auto) source_browse.setText(R.string.select) source_browse.setOnClickListener { adapter.selectClickListener?.onSelectClick(adapterPosition) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt index db113acf4b..060f10cfc2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/design/MigrationBottomSheetDialog.kt @@ -114,7 +114,7 @@ class MigrationBottomSheetDialog( skip_step.isChecked = preferences.skipPreMigration().getOrDefault() skip_step.setOnCheckedChangeListener { _, isChecked -> if (isChecked) (listener as? Controller)?.activity?.toast( - R.string.pre_migration_skip_toast, Toast.LENGTH_LONG + R.string.to_show_again_setting_library, Toast.LENGTH_LONG ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt index a6706ec2a8..b74637de56 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt @@ -374,7 +374,7 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle), adapter?.notifyDataSetChanged() } else { migratingManga.manga.migrationStatus = MigrationStatus.MANGA_NOT_FOUND - activity?.toast(R.string.error_fetching_migration, Toast.LENGTH_LONG) + activity?.toast(R.string.no_chapters_found_for_migration, Toast.LENGTH_LONG) adapter?.notifyDataSetChanged() } } @@ -397,8 +397,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle), override fun handleBack(): Boolean { activity?.let { MaterialDialog(it).show { - title(R.string.stop_migration) - positiveButton(R.string.action_stop) { + title(R.string.stop_migrating) + positiveButton(R.string.stop) { router.popCurrentController() migrationsJob?.cancel() } @@ -465,8 +465,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle), if (migrationsJob?.isCancelled == false || adapter?.allMangasDone() == true) { activity?.let { MaterialDialog(it).show { - title(R.string.stop_migration) - positiveButton(R.string.action_stop) { + title(R.string.stop_migrating) + positiveButton(R.string.stop) { block() migrationsJob?.cancel() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt index d5402c5969..31d6bffac6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt @@ -164,10 +164,10 @@ class MigrationProcessHolder( val latestChapter = mangaChapters.maxBy { it.chapter_number }?.chapter_number ?: -1f if (latestChapter > 0f) { - subtitle.text = context.getString(R.string.latest_x, + subtitle.text = context.getString(R.string.latest_, DecimalFormat("#.#").format(latestChapter)) } else { - subtitle.text = context.getString(R.string.latest_x, + subtitle.text = context.getString(R.string.latest_, context.getString(R.string.unknown)) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 1b9ad25cda..4c033b809f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -386,7 +386,7 @@ class ReaderActivity : BaseRxActivity(), if (noDefault && presenter.manga?.viewer!! > 0) { snackbar = reader_layout.snack( getString( - R.string.reading_mode, getString( + R.string.reading_, getString( when (mangaViewer) { RIGHT_TO_LEFT -> R.string.right_to_left_viewer VERTICAL -> R.string.vertical_viewer @@ -396,7 +396,7 @@ class ReaderActivity : BaseRxActivity(), ).toLowerCase(Locale.getDefault()) ), 8000 ) { - setAction(R.string.action_use_default) { + setAction(R.string.use_default) { presenter.setMangaViewer(0) } } @@ -564,7 +564,7 @@ class ReaderActivity : BaseRxActivity(), clipData = ClipData.newRawUri(null, stream) type = "image/*" } - startActivity(Intent.createChooser(intent, getString(R.string.action_share))) + startActivity(Intent.createChooser(intent, getString(R.string.share))) } /** @@ -605,8 +605,8 @@ class ReaderActivity : BaseRxActivity(), fun onSetAsCoverResult(result: ReaderPresenter.SetAsCoverResult) { toast(when (result) { Success -> R.string.cover_updated - AddToLibraryFirst -> R.string.notification_first_add_to_library - Error -> R.string.notification_cover_update_failed + AddToLibraryFirst -> R.string.must_be_in_library_to_edit + Error -> R.string.failed_to_update_cover }) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt index 60b8c3196f..1bb05c92ea 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt @@ -63,7 +63,7 @@ class ReaderPageSheet( if (page.status != Page.READY) return MaterialDialog(activity) - .title(R.string.confirm_set_image_as_cover) + .title(R.string.use_image_as_cover) .positiveButton(android.R.string.yes) { activity.setAsCover(page) dismiss() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt index 6c38a5e66b..4f35424802 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt @@ -66,11 +66,11 @@ class SaveImageNotifier(private val context: Context) { setContentIntent(NotificationHandler.openImagePendingActivity(context, file)) // Share action addAction(R.drawable.ic_share_grey_24dp, - context.getString(R.string.action_share), + context.getString(R.string.share), NotificationReceiver.shareImagePendingBroadcast(context, file.absolutePath, notificationId)) // Delete action addAction(R.drawable.ic_delete_grey_24dp, - context.getString(R.string.action_delete), + context.getString(R.string.delete), NotificationReceiver.deleteImagePendingBroadcast(context, file.absolutePath, notificationId)) updateNotification() @@ -96,7 +96,7 @@ class SaveImageNotifier(private val context: Context) { fun onError(error: String?) { // Create notification with(notificationBuilder) { - setContentTitle(context.getString(R.string.download_notifier_title_error)) + setContentTitle(context.getString(R.string.download_error)) setContentText(error ?: context.getString(R.string.unknown_error)) setSmallIcon(android.R.drawable.ic_menu_report_image) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt index 6a8ce3f6a5..6c9f7c0cc9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt @@ -407,7 +407,7 @@ class PagerPageHolder( layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { gravity = Gravity.CENTER } - setText(R.string.action_retry) + setText(R.string.retry) setOnClickListener { page.chapter.pageLoader?.retryPage(page) } @@ -444,7 +444,7 @@ class PagerPageHolder( layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { setMargins(margins, margins, margins, margins) } - setText(R.string.action_retry) + setText(R.string.retry) setOnClickListener { page.chapter.pageLoader?.retryPage(page) } @@ -458,7 +458,7 @@ class PagerPageHolder( layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { setMargins(margins, margins, margins, margins) } - setText(R.string.action_open_in_browser) + setText(R.string.open_in_browser) setOnClickListener { val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl)) context.startActivity(intent) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt index ad0a7a92fb..da50e94ace 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt @@ -93,16 +93,16 @@ class PagerTransitionHolder( textView.text = if (nextChapter != null) { SpannableStringBuilder().apply { - append(context.getString(R.string.transition_finished)) + append(context.getString(R.string.finished)) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${transition.from.chapter.name}\n\n") val currSize = length - append(context.getString(R.string.transition_next)) + append(context.getString(R.string.next)) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${nextChapter.chapter.name}\n\n") } } else { - context.getString(R.string.transition_no_next) + context.getString(R.string.theres_no_next_chapter) } if (nextChapter != null) { @@ -118,16 +118,16 @@ class PagerTransitionHolder( textView.text = if (prevChapter != null) { SpannableStringBuilder().apply { - append(context.getString(R.string.transition_current)) + append(context.getString(R.string.current)) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${transition.from.chapter.name}\n\n") val currSize = length - append(context.getString(R.string.transition_previous)) + append(context.getString(R.string.previous)) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${prevChapter.chapter.name}\n\n") } } else { - context.getString(R.string.transition_no_previous) + context.getString(R.string.theres_no_previous_chapter) } if (prevChapter != null) { @@ -162,7 +162,7 @@ class PagerTransitionHolder( val textView = AppCompatTextView(context).apply { wrapContent() - setText(R.string.transition_pages_loading) + setText(R.string.loading_pages) } pagesContainer.addView(progress) @@ -182,12 +182,12 @@ class PagerTransitionHolder( private fun setError(error: Throwable) { val textView = AppCompatTextView(context).apply { wrapContent() - text = context.getString(R.string.transition_pages_error, error.message) + text = context.getString(R.string.failed_to_load_pages_, error.message) } val retryBtn = PagerButton(context, viewer).apply { wrapContent() - setText(R.string.action_retry) + setText(R.string.retry) setOnClickListener { val toChapter = transition.to if (toChapter != null) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt index 26a3fb193f..5187566b12 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt @@ -391,7 +391,7 @@ class WebtoonPageHolder( gravity = Gravity.CENTER_HORIZONTAL setMargins(0, parentHeight / 4, 0, 0) } - setText(R.string.action_retry) + setText(R.string.retry) setOnClickListener { page?.let { it.chapter.pageLoader?.retryPage(it) } } @@ -432,7 +432,7 @@ class WebtoonPageHolder( layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { setMargins(0, margins, 0, margins) } - setText(R.string.action_retry) + setText(R.string.retry) setOnClickListener { page?.let { it.chapter.pageLoader?.retryPage(it) } } @@ -446,7 +446,7 @@ class WebtoonPageHolder( layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { setMargins(0, margins, 0, margins) } - setText(R.string.action_open_in_browser) + setText(R.string.open_in_browser) setOnClickListener { val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl)) context.startActivity(intent) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt index af615f0273..3604274903 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt @@ -93,16 +93,16 @@ class WebtoonTransitionHolder( textView.text = if (nextChapter != null) { SpannableStringBuilder().apply { - append(context.getString(R.string.transition_finished)) + append(context.getString(R.string.finished)) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${transition.from.chapter.name}\n\n") val currSize = length - append(context.getString(R.string.transition_next)) + append(context.getString(R.string.next)) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${nextChapter.chapter.name}\n\n") } } else { - context.getString(R.string.transition_no_next) + context.getString(R.string.theres_no_next_chapter) } if (nextChapter != null) { @@ -118,16 +118,16 @@ class WebtoonTransitionHolder( textView.text = if (prevChapter != null) { SpannableStringBuilder().apply { - append(context.getString(R.string.transition_current)) + append(context.getString(R.string.current)) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${transition.from.chapter.name}\n\n") val currSize = length - append(context.getString(R.string.transition_previous)) + append(context.getString(R.string.previous)) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) append("\n${prevChapter.chapter.name}\n\n") } } else { - context.getString(R.string.transition_no_previous) + context.getString(R.string.theres_no_previous_chapter) } if (prevChapter != null) { @@ -174,7 +174,7 @@ class WebtoonTransitionHolder( val textView = AppCompatTextView(context).apply { wrapContent() - setText(R.string.transition_pages_loading) + setText(R.string.loading_pages) } pagesContainer.addView(progress) @@ -194,12 +194,12 @@ class WebtoonTransitionHolder( private fun setError(error: Throwable, transition: ChapterTransition) { val textView = AppCompatTextView(context).apply { wrapContent() - text = context.getString(R.string.transition_pages_error, error.message) + text = context.getString(R.string.failed_to_load_pages_, error.message) } val retryBtn = AppCompatButton(context).apply { wrapContent() - setText(R.string.action_retry) + setText(R.string.retry) setOnClickListener { val toChapter = transition.to if (toChapter != null) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/ConfirmDeleteChaptersDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/ConfirmDeleteChaptersDialog.kt deleted file mode 100644 index e8721b7b0c..0000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/ConfirmDeleteChaptersDialog.kt +++ /dev/null @@ -1,32 +0,0 @@ -package eu.kanade.tachiyomi.ui.recent_updates - -import android.app.Dialog -import android.os.Bundle -import com.afollestad.materialdialogs.MaterialDialog -import com.bluelinelabs.conductor.Controller -import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.ui.base.controller.DialogController - -class ConfirmDeleteChaptersDialog(bundle: Bundle? = null) : DialogController(bundle) - where T : Controller, T : ConfirmDeleteChaptersDialog.Listener { - - private var chaptersToDelete = emptyList() - - constructor(target: T, chaptersToDelete: List) : this() { - this.chaptersToDelete = chaptersToDelete - targetController = target - } - - override fun onCreateDialog(savedViewState: Bundle?): Dialog { - return MaterialDialog(activity!!) - .message(R.string.confirm_delete_chapters) - .positiveButton(android.R.string.yes) { - (targetController as? Listener)?.deleteChapters(chaptersToDelete) - } - .negativeButton(android.R.string.no) - } - - interface Listener { - fun deleteChapters(chaptersToDelete: List) - } -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt index 584d15d556..cd908985f2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt @@ -53,7 +53,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle), private var lastChapterId: Long? = null override fun getTitle(): String? { - return resources?.getString(R.string.label_recent_updates) + return resources?.getString(R.string.recent_updates) } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { @@ -161,7 +161,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle), if (size > 0) { empty_view?.hide() } else { - empty_view?.show(R.drawable.ic_update_black_128dp, R.string.information_no_recent) + empty_view?.show(R.drawable.ic_update_black_128dp, R.string.no_recent_chapters) } } @@ -203,7 +203,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle), if (!read) { snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) { var undoing = false - setAction(R.string.action_undo) { + setAction(R.string.undo) { presenter.markChapterRead(item, read, lastRead, pagesLeft) undoing = true } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt index a1f0c939e7..9d4358d9d7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt @@ -129,7 +129,7 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle), empty_view?.hide() } else { empty_view.show(R.drawable.ic_history_white_128dp, R.string - .information_no_recent_manga) + .no_recently_read_manga) } } @@ -163,7 +163,7 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle), val intent = ReaderActivity.newIntent(activity, manga, nextChapter) startActivity(intent) } else { - activity.toast(R.string.no_next_chapter) + activity.toast(R.string.next_chapter_not_found) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt index d991e82b66..ae8e726143 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt @@ -52,7 +52,7 @@ class RecentlyReadHolder( // Set source + chapter title val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) - manga_source.text = itemView.context.getString(R.string.recent_manga_source) + manga_source.text = itemView.context.getString(R.string.source_dash_chapter_) .format(adapter.sourceManager.getOrStub(manga.source).toString(), formattedNumber) // Set last read timestamp title diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RemoveHistoryDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RemoveHistoryDialog.kt index 72757b8b58..e8fa08b18e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RemoveHistoryDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RemoveHistoryDialog.kt @@ -10,6 +10,7 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.History import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.ui.base.controller.DialogController +import java.util.Locale class RemoveHistoryDialog(bundle: Bundle? = null) : DialogController(bundle) where T : Controller, T : RemoveHistoryDialog.Listener { @@ -27,14 +28,17 @@ class RemoveHistoryDialog(bundle: Bundle? = null) : DialogController(bundle) override fun onCreateDialog(savedViewState: Bundle?): Dialog { val activity = activity!! - return MaterialDialog(activity) - .title(R.string.action_remove) - .message(R.string.dialog_with_checkbox_remove_description) - .checkBoxPrompt(res = R.string.dialog_with_checkbox_reset) {} - .negativeButton(android.R.string.cancel) - .positiveButton(R.string.action_remove) { - onPositive(it.isCheckPromptChecked()) - } + return MaterialDialog(activity).title(R.string.remove) + .message(R.string.this_will_reomve_the_read_date_question).checkBoxPrompt( + text = activity.getString( + R.string.reset_all_chapters_for_this_, + (manga?.mangaType(activity) ?: activity.getString(R.string.manga)).toLowerCase( + Locale.ROOT + ) + ) + ) {}.negativeButton(android.R.string.cancel).positiveButton(R.string.remove) { + onPositive(it.isCheckPromptChecked()) + } } private fun onPositive(checked: Boolean) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt index 0ee54ce9e7..f21f3b6f6a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt @@ -43,17 +43,17 @@ class RecentMangaHolder( val notValidNum = item.mch.chapter.chapter_number <= 0 body.text = when { item.mch.chapter.id == null -> body.context.getString( - R.string.added_x, DateUtils.getRelativeTimeSpanString( + R.string.added_, DateUtils.getRelativeTimeSpanString( item.mch.manga.date_added, Date().time, DateUtils.MINUTE_IN_MILLIS ).toString() ) item.mch.history.id == null -> body.context.getString( - R.string.updated_x, DateUtils.getRelativeTimeSpanString( + R.string.updated_, DateUtils.getRelativeTimeSpanString( item.chapter.date_upload, Date().time, DateUtils.HOUR_IN_MILLIS ).toString() ) item.chapter.id != item.mch.chapter.id -> body.context.getString( - if (notValidNum) R.string.last_read_x else R.string.last_read_chapter_x, + if (notValidNum) R.string.last_read_ else R.string.last_read_chapter_, if (notValidNum) item.mch.chapter.name else adapter.decimalFormat.format(item.mch.chapter.chapter_number) + " (${DateUtils.getRelativeTimeSpanString( item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS @@ -66,7 +66,7 @@ class RecentMangaHolder( item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS )})" isSearch -> body.context.getString( - R.string.read_x, DateUtils.getRelativeTimeSpanString( + R.string.read_, DateUtils.getRelativeTimeSpanString( item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS ).toString() ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt index f9bc614860..6e18381dce 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt @@ -77,8 +77,8 @@ class RecentsController(bundle: Bundle? = null) : BaseController(bundle), override fun getTitle(): String? { return if (showingDownloads) - resources?.getString(R.string.label_download_queue) - else resources?.getString(R.string.short_recents) + resources?.getString(R.string.download_queue) + else resources?.getString(R.string.recents) } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { @@ -296,7 +296,7 @@ class RecentsController(bundle: Bundle? = null) : BaseController(bundle), snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) { anchorView = activity?.bottom_nav var undoing = false - setAction(R.string.action_undo) { + setAction(R.string.undo) { presenter.markChapterRead(chapter, false, lastRead, pagesLeft) undoing = true } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt index 39666b1e01..fde8943613 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt @@ -49,12 +49,12 @@ class SettingsAboutController : SettingsController() { private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.pref_category_about + titleRes = R.string.about switchPreference { key = "acra.enable" - titleRes = R.string.pref_enable_acra - summaryRes = R.string.pref_acra_summary + titleRes = R.string.send_crash_report + summaryRes = R.string.helps_fix_bugs defaultValue = true } preference { @@ -102,7 +102,7 @@ class SettingsAboutController : SettingsController() { private fun checkVersion() { if (activity == null) return - activity?.toast(R.string.update_check_look_for_updates) + activity?.toast(R.string.searching_for_updates) scope.launch { val result = try { updateChecker.checkForUpdate() @@ -122,7 +122,7 @@ class SettingsAboutController : SettingsController() { } is UpdateResult.NoNewUpdate -> { withContext(Dispatchers.Main) { - activity?.toast(R.string.update_check_no_new_updates) + activity?.toast(R.string.no_new_updates_available) } } } @@ -138,9 +138,9 @@ class SettingsAboutController : SettingsController() { override fun onCreateDialog(savedViewState: Bundle?): Dialog { return MaterialDialog(activity!!) - .title(R.string.update_check_title) + .title(R.string.new_version_available) .message(text = args.getString(BODY_KEY) ?: "") - .positiveButton(R.string.update_check_confirm) { + .positiveButton(R.string.download) { val appContext = applicationContext if (appContext != null) { // Start download @@ -148,7 +148,7 @@ class SettingsAboutController : SettingsController() { UpdaterService.downloadUpdate(appContext, url) } } - .negativeButton(R.string.update_check_ignore) + .negativeButton(R.string.ignore) } private companion object { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index f3003dcf31..37a360f27d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -37,17 +37,17 @@ class SettingsAdvancedController : SettingsController() { private val db: DatabaseHelper by injectLazy() override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.pref_category_advanced + titleRes = R.string.advanced preference { key = CLEAR_CACHE_KEY - titleRes = R.string.pref_clear_chapter_cache - summary = context.getString(R.string.used_cache, chapterCache.readableSize) + titleRes = R.string.clear_chapter_cache + summary = context.getString(R.string.used_, chapterCache.readableSize) onClick { clearChapterCache() } } preference { - titleRes = R.string.pref_clear_cookies + titleRes = R.string.clear_cookies onClick { network.cookieManager.removeAll() @@ -55,8 +55,8 @@ class SettingsAdvancedController : SettingsController() { } } preference { - titleRes = R.string.pref_clear_database - summaryRes = R.string.pref_clear_database_summary + titleRes = R.string.clear_database + summaryRes = R.string.clear_database_summary onClick { val ctrl = ClearDatabaseDialogController() @@ -65,21 +65,21 @@ class SettingsAdvancedController : SettingsController() { } } preference { - titleRes = R.string.pref_refresh_library_metadata - summaryRes = R.string.pref_refresh_library_metadata_summary + titleRes = R.string.refresh_library_metadata + summaryRes = R.string.updates_covers_genres_desc onClick { LibraryUpdateService.start(context, target = Target.DETAILS) } } preference { - titleRes = R.string.pref_refresh_library_tracking - summaryRes = R.string.pref_refresh_library_tracking_summary + titleRes = R.string.refresh_tracking_metadata + summaryRes = R.string.updates_tracking_details onClick { LibraryUpdateService.start(context, target = Target.TRACKING) } } preference { - titleRes = R.string.pref_clean_downloads + titleRes = R.string.clean_up_downloaded_chapters - summaryRes = R.string.pref_clean_downloads_summary + summaryRes = R.string.delete_unused_chapters onClick { cleanupDownloads() } } @@ -101,7 +101,7 @@ class SettingsAdvancedController : SettingsController() { launchUI { val activity = activity ?: return@launchUI val cleanupString = - if (foldersCleared == 0) activity.getString(R.string.no_cleanup_done) + if (foldersCleared == 0) activity.getString(R.string.no_folders_to_cleanup) else resources!!.getQuantityString( R.plurals.cleanup_done, foldersCleared, @@ -130,10 +130,10 @@ class SettingsAdvancedController : SettingsController() { }, { activity?.toast(R.string.cache_delete_error) }, { - activity?.toast(resources?.getQuantityString(R.plurals.cache_deleted, + activity?.toast(resources?.getQuantityString(R.plurals.cache_cleared, deletedFiles, deletedFiles)) findPreference(CLEAR_CACHE_KEY)?.summary = - resources?.getString(R.string.used_cache, chapterCache.readableSize) + resources?.getString(R.string.used_, chapterCache.readableSize) }) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt index f8dd7f89f0..f861fd5e60 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt @@ -58,8 +58,8 @@ class SettingsBackupController : SettingsController() { titleRes = R.string.backup preference { - titleRes = R.string.pref_create_backup - summaryRes = R.string.pref_create_backup_summ + titleRes = R.string.create_backup + summaryRes = R.string.can_be_used_to_restore onClick { val ctrl = CreateBackupDialog() @@ -68,27 +68,27 @@ class SettingsBackupController : SettingsController() { } } preference { - titleRes = R.string.pref_restore_backup - summaryRes = R.string.pref_restore_backup_summ + titleRes = R.string.restore_backup + summaryRes = R.string.restore_from_backup_file onClick { val intent = Intent(Intent.ACTION_GET_CONTENT) intent.addCategory(Intent.CATEGORY_OPENABLE) intent.type = "application/*" - val title = resources?.getString(R.string.file_select_backup) + val title = resources?.getString(R.string.select_backup_file) val chooser = Intent.createChooser(intent, title) startActivityForResult(chooser, CODE_BACKUP_RESTORE) } } preferenceCategory { - titleRes = R.string.pref_backup_service_category + titleRes = R.string.service intListPreference(activity) { key = Keys.backupInterval - titleRes = R.string.pref_backup_interval - entriesRes = arrayOf(R.string.update_never, R.string.update_6hour, - R.string.update_12hour, R.string.update_24hour, - R.string.update_48hour, R.string.update_weekly) + titleRes = R.string.backup_frequency + entriesRes = arrayOf(R.string.manual, R.string.every_6_hours, + R.string.every_12_hours, R.string.daily, + R.string.every_2_days, R.string.weekly) entryValues = listOf(0, 6, 12, 24, 48, 168) defaultValue = 0 @@ -105,7 +105,7 @@ class SettingsBackupController : SettingsController() { } val backupDir = preference { key = Keys.backupDirectory - titleRes = R.string.pref_backup_directory + titleRes = R.string.backup_location onClick { val currentDir = preferences.backupsDirectory().getOrDefault() @@ -126,7 +126,7 @@ class SettingsBackupController : SettingsController() { } val backupNumber = intListPreference(activity) { key = Keys.numberOfBackups - titleRes = R.string.pref_backup_slots + titleRes = R.string.max_auto_backups entries = listOf("1", "2", "3", "4", "5") entryRange = 1..5 defaultValue = 1 @@ -210,8 +210,8 @@ class SettingsBackupController : SettingsController() { .map { activity.getString(it) } return MaterialDialog(activity) - .title(R.string.pref_create_backup) - .message(R.string.backup_choice) + .title(R.string.create_backup) + .message(R.string.what_should_backup) .listItemsMultiChoice(items = options, disabledIndices = intArrayOf(0), initialSelection = intArrayOf(0)) { _, positions, _ -> var flags = 0 @@ -226,7 +226,7 @@ class SettingsBackupController : SettingsController() { (targetController as? SettingsBackupController)?.createBackup(flags) } - .positiveButton(R.string.action_create) + .positiveButton(R.string.create) .negativeButton(android.R.string.cancel) } } @@ -242,9 +242,9 @@ class SettingsBackupController : SettingsController() { return MaterialDialog(activity).apply { title(R.string.backup_created) if (uniFile.filePath != null) - message(text = resources?.getString(R.string.file_saved, uniFile.filePath)) - positiveButton(R.string.action_close) - negativeButton(R.string.action_share) { + message(text = resources?.getString(R.string.file_saved_at_, uniFile.filePath)) + positiveButton(R.string.close) + negativeButton(R.string.share) { val sendIntent = Intent(Intent.ACTION_SEND) sendIntent.type = "application/json" sendIntent.putExtra(Intent.EXTRA_STREAM, uniFile.uri) @@ -265,9 +265,9 @@ class SettingsBackupController : SettingsController() { override fun onCreateDialog(savedViewState: Bundle?): Dialog { return MaterialDialog(activity!!) - .title(R.string.pref_restore_backup) - .message(R.string.backup_restore_content) - .positiveButton(R.string.action_restore) { + .title(R.string.restore_backup) + .message(R.string.restore_message) + .positiveButton(R.string.restore) { val context = applicationContext if (context != null) { activity?.toast(R.string.restoring_backup) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt index 38b2cbd748..7026994eaf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt @@ -29,11 +29,11 @@ class SettingsDownloadController : SettingsController() { private val db: DatabaseHelper by injectLazy() override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.pref_category_downloads + titleRes = R.string.downloads preference { key = Keys.downloadsDirectory - titleRes = R.string.pref_download_directory + titleRes = R.string.download_location onClick { val ctrl = DownloadDirectoriesDialog() ctrl.targetController = this@SettingsDownloadController @@ -48,20 +48,20 @@ class SettingsDownloadController : SettingsController() { } switchPreference { key = Keys.downloadOnlyOverWifi - titleRes = R.string.pref_download_only_over_wifi + titleRes = R.string.only_download_over_wifi defaultValue = true } preferenceCategory { - titleRes = R.string.pref_remove_after_read + titleRes = R.string.remove_after_read switchPreference { key = Keys.removeAfterMarkedAsRead - titleRes = R.string.pref_remove_after_marked_as_read + titleRes = R.string.remove_when_marked_as_read defaultValue = false } intListPreference(activity) { key = Keys.removeAfterReadSlots - titleRes = R.string.pref_remove_after_read + titleRes = R.string.remove_after_read entriesRes = arrayOf(R.string.disabled, R.string.last_read_chapter, R.string.second_to_last, R.string.third_to_last, R.string.fourth_to_last, R.string.fifth_to_last) @@ -73,16 +73,16 @@ class SettingsDownloadController : SettingsController() { val dbCategories = db.getCategories().executeAsBlocking() preferenceCategory { - titleRes = R.string.pref_download_new + titleRes = R.string.download_new_chapters switchPreference { key = Keys.downloadNew - titleRes = R.string.pref_download_new + titleRes = R.string.download_new_chapters defaultValue = false } multiSelectListPreferenceMat(activity) { key = Keys.downloadNewCategories - titleRes = R.string.pref_download_new_categories + titleRes = R.string.categories_to_include_in_download entries = dbCategories.map { it.name } entryValues = dbCategories.map { it.id.toString() } allSelectionRes = R.string.all @@ -145,7 +145,7 @@ class SettingsDownloadController : SettingsController() { override fun onCreateDialog(savedViewState: Bundle?): Dialog { val activity = activity!! val currentDir = preferences.downloadsDirectory().getOrDefault() - val externalDirs = getExternalDirs() + File(activity.getString(R.string.custom_dir)) + val externalDirs = getExternalDirs() + File(activity.getString(R.string.custom_location)) val selectedIndex = externalDirs.map(File::toString).indexOfFirst { it in currentDir } return MaterialDialog(activity) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt index 3e1d126f86..f6e611dd78 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt @@ -16,11 +16,11 @@ class SettingsGeneralController : SettingsController() { private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.pref_category_general + titleRes = R.string.general listPreference(activity) { key = Keys.lang - titleRes = R.string.pref_language + titleRes = R.string.language entryValues = listOf("", "ar", "bg", "bn", "ca", "cs", "de", "el", "en-US", "en-GB", "es", "fr", "hi", "hu", "in", "it", "ja", "ko", "lv", "ms", "nb-rNO", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sc", "sr", "sv", "th", "tl", "tr", "uk", "vi", "zh-rCN") @@ -44,10 +44,11 @@ class SettingsGeneralController : SettingsController() { intListPreference(activity) { key = Keys.theme - titleRes = R.string.pref_theme - entriesRes = arrayOf(R.string.white_theme, R.string.light_theme, R.string.dark_theme, - R.string.amoled_theme, R.string.darkblue_theme, R.string.system_theme, R.string.system_amoled_theme, - R.string.system_darkblue_theme) + titleRes = R.string.app_theme + entriesRes = arrayOf(R.string.white_theme, R.string.light_blue, R.string.dark, + R.string.amoled_black, R.string.dark_blue, R.string.system_default, R.string + .system_default_amoled, + R.string.system_default_all_blue) entryValues = listOf(1, 8, 2, 3, 4, 5, 6, 7) defaultValue = 5 @@ -59,7 +60,7 @@ class SettingsGeneralController : SettingsController() { listPreference(activity) { key = Keys.dateFormat - titleRes = R.string.pref_date_format + titleRes = R.string.date_format entryValues = listOf("", "MM/dd/yy", "dd/MM/yy", "yyyy-MM-dd") entries = entryValues.map { value -> if (value == "") { @@ -74,8 +75,8 @@ class SettingsGeneralController : SettingsController() { switchPreference { key = Keys.automaticUpdates - titleRes = R.string.pref_enable_automatic_updates - summaryRes = R.string.pref_enable_automatic_updates_summary + titleRes = R.string.check_for_updates + summaryRes = R.string.auto_check_for_app_versions defaultValue = true if (isUpdaterEnabled) { @@ -94,7 +95,7 @@ class SettingsGeneralController : SettingsController() { } preferenceCategory { - titleRes = R.string.pref_category_security + titleRes = R.string.security val biometricManager = BiometricManager.from(context) if (biometricManager.canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS) { @@ -116,8 +117,8 @@ class SettingsGeneralController : SettingsController() { val values = listOf(0, 2, 5, 10, 20, 30, 60, 90, 120, -1) entries = values.mapNotNull { when (it) { - 0 -> context.getString(R.string.lock_always) - -1 -> context.getString(R.string.lock_never) + 0 -> context.getString(R.string.always) + -1 -> context.getString(R.string.never) else -> resources?.getQuantityString( R.plurals.lock_after_mins, it.toInt(), it ) @@ -130,8 +131,8 @@ class SettingsGeneralController : SettingsController() { switchPreference { key = Keys.secureScreen - titleRes = R.string.pref_secure_screen - summaryRes = R.string.pref_secure_screen_summary + titleRes = R.string.secure_screen + summaryRes = R.string.hide_tachi_from_recents defaultValue = false onChange { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt index 63fb2ed2bb..22c68d819d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt @@ -1,22 +1,14 @@ package eu.kanade.tachiyomi.ui.setting -import android.app.Dialog -import android.os.Bundle import android.os.Handler -import android.view.View import androidx.preference.PreferenceScreen -import com.afollestad.materialdialogs.MaterialDialog -import com.afollestad.materialdialogs.customview.customView import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.DatabaseHelper import eu.kanade.tachiyomi.data.database.models.Category import eu.kanade.tachiyomi.data.library.LibraryUpdateJob -import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault -import eu.kanade.tachiyomi.ui.base.controller.DialogController import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction import eu.kanade.tachiyomi.ui.category.CategoryController -import kotlinx.android.synthetic.main.pref_library_columns.view.* import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys @@ -26,9 +18,9 @@ class SettingsLibraryController : SettingsController() { private val db: DatabaseHelper = Injekt.get() override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.pref_category_library + titleRes = R.string.library preferenceCategory { - titleRes = R.string.pref_category_library_display + titleRes = R.string.display switchPreference { key = Keys.removeArticles titleRes = R.string.pref_remove_articles @@ -40,9 +32,9 @@ class SettingsLibraryController : SettingsController() { val dbCategories = db.getCategories().executeAsBlocking() preferenceCategory { - titleRes = R.string.pref_category_library_categories + titleRes = R.string.categories preference { - titleRes = R.string.action_edit_categories + titleRes = R.string.edit_categories val catCount = db.getCategories().executeAsBlocking().size summary = context.resources.getQuantityString(R.plurals.category, catCount, catCount) onClick { router.pushController(CategoryController().withFadeTransaction()) } @@ -53,24 +45,24 @@ class SettingsLibraryController : SettingsController() { val categories = listOf(Category.createDefault(context)) + dbCategories entries = - listOf(context.getString(R.string.default_category_summary)) + categories.map { it.name }.toTypedArray() + listOf(context.getString(R.string.always_ask)) + categories.map { it.name }.toTypedArray() entryValues = listOf(-1) + categories.mapNotNull { it.id }.toList() defaultValue = "-1" val selectedCategory = categories.find { it.id == preferences.defaultCategory() } summary = - selectedCategory?.name ?: context.getString(R.string.default_category_summary) + selectedCategory?.name ?: context.getString(R.string.always_ask) onChange { newValue -> summary = categories.find { it.id == newValue as Int - }?.name ?: context.getString(R.string.default_category_summary) + }?.name ?: context.getString(R.string.always_ask) true } } } preferenceCategory { - titleRes = R.string.pref_category_library_update + titleRes = R.string.updates intListPreference(activity) { key = Keys.updateOnRefresh titleRes = R.string.categories_on_manual @@ -85,14 +77,14 @@ class SettingsLibraryController : SettingsController() { key = Keys.libraryUpdateInterval titleRes = R.string.pref_library_update_interval entriesRes = arrayOf( - R.string.update_never, - R.string.update_1hour, - R.string.update_2hour, - R.string.update_3hour, - R.string.update_6hour, - R.string.update_12hour, - R.string.update_24hour, - R.string.update_48hour + R.string.manual, + R.string.hourly, + R.string.every_2_hours, + R.string.every_3_hours, + R.string.every_6_hours, + R.string.every_12_hours, + R.string.daily, + R.string.every_2_days ) entryValues = listOf(0, 1, 2, 3, 6, 12, 24, 48) defaultValue = 0 @@ -110,10 +102,10 @@ class SettingsLibraryController : SettingsController() { } multiSelectListPreferenceMat(activity) { key = Keys.libraryUpdateRestriction - titleRes = R.string.pref_library_update_restriction + titleRes = R.string.library_update_restriction entriesRes = arrayOf(R.string.wifi, R.string.charging) entryValues = listOf("wifi", "ac") - customSummaryRes = R.string.pref_library_update_restriction_summary + customSummaryRes = R.string.library_update_restriction_summary preferences.libraryUpdateInterval().asObservable() .subscribeUntilDestroy { isVisible = it > 0 } @@ -132,12 +124,12 @@ class SettingsLibraryController : SettingsController() { intListPreference(activity) { key = Keys.libraryUpdatePrioritization - titleRes = R.string.pref_library_update_prioritization + titleRes = R.string.library_update_order // The following array lines up with the list rankingScheme in: // ../../data/library/LibraryUpdateRanker.kt entriesRes = arrayOf( - R.string.action_sort_alpha, R.string.action_sort_last_updated + R.string.alphabetically, R.string.last_updated ) entryRange = 0..1 defaultValue = 0 @@ -146,8 +138,8 @@ class SettingsLibraryController : SettingsController() { switchPreference { key = Keys.refreshCoversToo - titleRes = R.string.pref_refresh_covers_too - summaryRes = R.string.pref_refresh_covers_too_summary + titleRes = R.string.auto_refresh_covers + summaryRes = R.string.auto_refresh_covers_summary defaultValue = true } @@ -171,7 +163,7 @@ class SettingsLibraryController : SettingsController() { } if (preferences.skipPreMigration().getOrDefault() || preferences.migrationSources().getOrDefault().isNotEmpty()) { preferenceCategory { - titleRes = R.string.pref_category_library_migration + titleRes = R.string.migration // Only show this if someone has mass migrated manga once switchPreference { @@ -183,47 +175,4 @@ class SettingsLibraryController : SettingsController() { } } } - - class LibraryColumnsDialog : DialogController() { - - private val preferences: PreferencesHelper = Injekt.get() - - private var portrait = preferences.portraitColumns().getOrDefault() - private var landscape = preferences.landscapeColumns().getOrDefault() - - override fun onCreateDialog(savedViewState: Bundle?): Dialog { - val dialog = MaterialDialog(activity!!) - .title(R.string.pref_library_columns) - .customView(viewRes = R.layout.pref_library_columns, scrollable = false) - .positiveButton(android.R.string.ok) { - preferences.portraitColumns().set(portrait) - preferences.landscapeColumns().set(landscape) - } - .negativeButton(android.R.string.cancel) - - onViewCreated(dialog.view) - return dialog - } - - fun onViewCreated(view: View) { - with(view.portrait_columns) { - displayedValues = arrayOf(context.getString(R.string.default_columns)) + - IntRange(1, 10).map(Int::toString) - value = portrait - - setOnValueChangedListener { _, _, newValue -> - portrait = newValue - } - } - with(view.landscape_columns) { - displayedValues = arrayOf(context.getString(R.string.default_columns)) + - IntRange(1, 10).map(Int::toString) - value = landscape - - setOnValueChangedListener { _, _, newValue -> - landscape = newValue - } - } - } - } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt index bb0e1f9d12..0d7e03b020 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt @@ -19,44 +19,44 @@ class SettingsMainController : SettingsController() { } override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.label_settings + titleRes = R.string.settings val tintColor = context.getResourceColor(R.attr.colorAccent) preference { iconRes = R.drawable.ic_tune_white_24dp iconTint = tintColor - titleRes = R.string.pref_category_general + titleRes = R.string.general onClick { navigateTo(SettingsGeneralController()) } } preference { iconRes = R.drawable.ic_book_black_24dp iconTint = tintColor - titleRes = R.string.pref_category_library + titleRes = R.string.library onClick { navigateTo(SettingsLibraryController()) } } preference { iconRes = R.drawable.ic_read_24dp iconTint = tintColor - titleRes = R.string.pref_category_reader + titleRes = R.string.reader onClick { navigateTo(SettingsReaderController()) } } preference { iconRes = R.drawable.ic_file_download_black_24dp iconTint = tintColor - titleRes = R.string.pref_category_downloads + titleRes = R.string.downloads onClick { navigateTo(SettingsDownloadController()) } } preference { iconRes = R.drawable.ic_swap_calls_white_24dp iconTint = tintColor - titleRes = R.string.label_migration + titleRes = R.string.source_migration onClick { navigateTo(MigrationController()) } } preference { iconRes = R.drawable.ic_sync_black_24dp iconTint = tintColor - titleRes = R.string.pref_category_tracking + titleRes = R.string.tracking onClick { navigateTo(SettingsTrackingController()) } } preference { @@ -68,13 +68,13 @@ class SettingsMainController : SettingsController() { preference { iconRes = R.drawable.ic_code_black_24dp iconTint = tintColor - titleRes = R.string.pref_category_advanced + titleRes = R.string.advanced onClick { navigateTo(SettingsAdvancedController()) } } preference { iconRes = R.drawable.ic_info_black_24dp iconTint = tintColor - titleRes = R.string.pref_category_about + titleRes = R.string.about onClick { navigateTo(SettingsAboutController()) } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt index 33f6771394..416f7a75d8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt @@ -8,11 +8,11 @@ import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys class SettingsReaderController : SettingsController() { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.pref_category_reader + titleRes = R.string.reader intListPreference(activity) { key = Keys.defaultViewer - titleRes = R.string.pref_viewer_type + titleRes = R.string.default_viewer entriesRes = arrayOf(R.string.left_to_right_viewer, R.string.right_to_left_viewer, R.string.vertical_viewer, R.string.webtoon) entryRange = 1..4 @@ -20,76 +20,76 @@ class SettingsReaderController : SettingsController() { } intListPreference(activity) { key = Keys.imageScaleType - titleRes = R.string.pref_image_scale_type - entriesRes = arrayOf(R.string.scale_type_fit_screen, R.string.scale_type_stretch, - R.string.scale_type_fit_width, R.string.scale_type_fit_height, - R.string.scale_type_original_size, R.string.scale_type_smart_fit) + titleRes = R.string.scale_type + entriesRes = arrayOf(R.string.fit_screen, R.string.stretch, + R.string.fit_width, R.string.fit_height, + R.string.original_size, R.string.smart_fit) entryRange = 1..6 defaultValue = 1 } intListPreference(activity) { key = Keys.zoomStart - titleRes = R.string.pref_zoom_start - entriesRes = arrayOf(R.string.zoom_start_automatic, R.string.zoom_start_left, - R.string.zoom_start_right, R.string.zoom_start_center) + titleRes = R.string.zoom_start_position + entriesRes = arrayOf(R.string.automatic, R.string.left, + R.string.right, R.string.center) entryRange = 1..4 defaultValue = 1 } intListPreference(activity) { key = Keys.rotation - titleRes = R.string.pref_rotation_type - entriesRes = arrayOf(R.string.rotation_free, R.string.rotation_lock, - R.string.rotation_force_portrait, R.string.rotation_force_landscape) + titleRes = R.string.rotation + entriesRes = arrayOf(R.string.free, R.string.lock, + R.string.force_portrait, R.string.force_landscape) entryRange = 1..4 defaultValue = 1 } intListPreference(activity) { key = Keys.readerTheme - titleRes = R.string.pref_reader_theme - entriesRes = arrayOf(R.string.white_background, R.string.black_background, R.string - .reader_theme_smart, R.string.reader_theme_smart_theme) + titleRes = R.string.background_color + entriesRes = arrayOf(R.string.white, R.string.black, R.string + .smart_based_on_page, R.string.smart_based_on_page_and_theme) entryRange = 0..3 defaultValue = 2 } intListPreference(activity) { key = Keys.doubleTapAnimationSpeed - titleRes = R.string.pref_double_tap_anim_speed - entries = listOf(context.getString(R.string.double_tap_anim_speed_0), context.getString(R - .string.double_tap_anim_speed_fast), context.getString(R.string.double_tap_anim_speed_normal)) + titleRes = R.string.double_tap_anim_speed + entries = listOf(context.getString(R.string.no_animation), context.getString(R + .string.fast), context.getString(R.string.normal)) entryValues = listOf(1, 250, 500) // using a value of 0 breaks the image viewer, so // min is 1 defaultValue = 500 } switchPreference { key = Keys.skipRead - titleRes = R.string.pref_skip_read_chapters + titleRes = R.string.skip_read_chapters defaultValue = false } switchPreference { key = Keys.fullscreen - titleRes = R.string.pref_fullscreen + titleRes = R.string.fullscreen defaultValue = true } switchPreference { key = Keys.keepScreenOn - titleRes = R.string.pref_keep_screen_on + titleRes = R.string.keep_screen_on defaultValue = true } switchPreference { key = Keys.showPageNumber - titleRes = R.string.pref_show_page_number + titleRes = R.string.show_page_number defaultValue = true } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { switchPreference { key = Keys.trueColor - titleRes = R.string.pref_true_color + titleRes = R.string.true_32bit_color defaultValue = false } } switchPreference { key = Keys.alwaysShowChapterTransition - titleRes = R.string.pref_always_show_chapter_transition + titleRes = R.string.always_show_chapter_transition defaultValue = true } @@ -98,12 +98,12 @@ class SettingsReaderController : SettingsController() { switchPreference { key = Keys.enableTransitions - titleRes = R.string.pref_page_transitions + titleRes = R.string.page_transitions defaultValue = true } switchPreference { key = Keys.cropBorders - titleRes = R.string.pref_crop_borders + titleRes = R.string.crop_borders defaultValue = false } } @@ -112,31 +112,31 @@ class SettingsReaderController : SettingsController() { switchPreference { key = Keys.cropBordersWebtoon - titleRes = R.string.pref_crop_borders + titleRes = R.string.crop_borders defaultValue = false } } preferenceCategory { - titleRes = R.string.pref_reader_navigation + titleRes = R.string.navigation switchPreference { key = Keys.readWithTapping - titleRes = R.string.pref_read_with_tapping + titleRes = R.string.tapping defaultValue = true } switchPreference { key = Keys.readWithLongTap - titleRes = R.string.pref_read_with_long_tap + titleRes = R.string.long_tap_dialog defaultValue = true } switchPreference { key = Keys.readWithVolumeKeys - titleRes = R.string.pref_read_with_volume_keys + titleRes = R.string.volume_keys defaultValue = false } switchPreference { key = Keys.readWithVolumeKeysInverted - titleRes = R.string.pref_read_with_volume_keys_inverted + titleRes = R.string.invert_volume_keys defaultValue = false }.apply { dependency = Keys.readWithVolumeKeys } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt index 61e1505e8a..40ecc4186a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt @@ -39,7 +39,7 @@ class SettingsSourcesController : SettingsController(), private var sorting = SourcesSort.Alpha override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.action_filter + titleRes = R.string.filter sorting = SourcesSort.from(preferences.sourceSorting().getOrDefault()) ?: SourcesSort.Alpha activity?.invalidateOptionsMenu() // Get the list of active language codes. @@ -93,7 +93,7 @@ class SettingsSourcesController : SettingsController(), val selectAllPreference = CheckBoxPreference(group.context).apply { - title = "\t\t${context.getString(R.string.pref_category_all_sources)}" + title = "\t\t${context.getString(R.string.all_sources)}" key = "all_${sources.first().lang}" isPersistent = false isChecked = sources.all { it.id.toString() !in hiddenCatalogues } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt index 86678216b3..6b42ada737 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt @@ -22,7 +22,7 @@ class SettingsTrackingController : SettingsController(), private val trackManager: TrackManager by injectLazy() override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.pref_category_tracking + titleRes = R.string.tracking switchPreference { key = Keys.autoUpdateTrack diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index 4c570bb291..91fd2df6a6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -31,7 +31,6 @@ import eu.kanade.tachiyomi.util.view.setStyle import eu.kanade.tachiyomi.util.view.updateLayoutParams import eu.kanade.tachiyomi.util.view.updatePadding import eu.kanade.tachiyomi.util.view.visible -import kotlinx.android.synthetic.main.library_list_controller.* import kotlinx.android.synthetic.main.webview_activity.* import kotlinx.android.synthetic.main.webview_activity.swipe_refresh import uy.kohesive.injekt.injectLazy @@ -277,7 +276,7 @@ class WebViewActivity : BaseActivity() { type = "text/plain" putExtra(Intent.EXTRA_TEXT, webview.url) } - startActivity(Intent.createChooser(intent, getString(R.string.action_share))) + startActivity(Intent.createChooser(intent, getString(R.string.share))) } catch (e: Exception) { toast(e.message) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/LocaleHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/LocaleHelper.kt index e9e1826656..ad515f830e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/LocaleHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/LocaleHelper.kt @@ -55,8 +55,8 @@ object LocaleHelper { fun getDisplayName(lang: String?, context: Context): String { return when (lang) { null -> "" - "" -> context.getString(R.string.other_source) - "all" -> context.getString(R.string.all_lang) + "" -> context.getString(R.string.other) + "all" -> context.getString(R.string.all) else -> { val locale = getLocale(lang) locale.getDisplayName(locale).capitalize() diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt index 0773adf5fe..15ef30b8b2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt @@ -20,7 +20,7 @@ class SourceLoginDialog(bundle: Bundle? = null) : LoginDialogPreference(bundle = constructor(source: Source) : this(Bundle().apply { putLong("key", source.id) }) override fun setCredentialsOnView(view: View) = with(view) { - dialog_title.text = context.getString(R.string.login_title, source.toString()) + dialog_title.text = context.getString(R.string.log_in_to_, source.toString()) username.setText(preferences.sourceUsername(source)) password.setText(preferences.sourcePassword(source)) } @@ -44,7 +44,7 @@ class SourceLoginDialog(bundle: Bundle? = null) : LoginDialogPreference(bundle = password.text.toString()) dialog?.dismiss() - context.toast(R.string.login_success) + context.toast(R.string.successfully_logged_in) } else { preferences.setSourceCredentials(source, "", "") login.progress = -1 diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt index 397b6c52d8..8555d1f4eb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt @@ -24,7 +24,7 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) : this(usernameLabel, Bundle().apply { putInt("key", service.id) }) override fun setCredentialsOnView(view: View) = with(view) { - dialog_title.text = context.getString(R.string.login_title, service.name) + dialog_title.text = context.getString(R.string.log_in_to_, service.name) username.setText(service.getUsername()) password.setText(service.getPassword()) } @@ -44,19 +44,19 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) : val result = service.login(user, pass) if (result) { dialog?.dismiss() - context.toast(R.string.login_success) + context.toast(R.string.successfully_logged_in) } else { - errorResult(this@apply) + errorResult() } } catch (error: Exception) { - errorResult(this@apply) + errorResult() error.message?.let { context.toast(it) } } } } } - fun errorResult(view: View?) { + private fun errorResult() { v?.apply { login.progress = -1 login.setText(R.string.unknown_error) @@ -66,7 +66,7 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) : override fun logout() { if (service.isLogged) { service.logout() - activity?.toast(R.string.logout_success) + activity?.toast(R.string.successfully_logged_out) } } diff --git a/app/src/main/res/layout-land/manga_info_controller.xml b/app/src/main/res/layout-land/manga_info_controller.xml deleted file mode 100644 index 70cb3325c0..0000000000 --- a/app/src/main/res/layout-land/manga_info_controller.xml +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/auto_ext_checkbox.xml b/app/src/main/res/layout/auto_ext_checkbox.xml index 1b4720ef93..876882efcd 100644 --- a/app/src/main/res/layout/auto_ext_checkbox.xml +++ b/app/src/main/res/layout/auto_ext_checkbox.xml @@ -4,6 +4,6 @@ android:layout_marginStart="8dp" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/action_auto_check_extensions"> + android:text="@string/notify_extension_updates"> \ No newline at end of file diff --git a/app/src/main/res/layout/catalogue_controller.xml b/app/src/main/res/layout/catalogue_controller.xml index 5b2071c959..76582f5d8e 100644 --- a/app/src/main/res/layout/catalogue_controller.xml +++ b/app/src/main/res/layout/catalogue_controller.xml @@ -28,7 +28,7 @@ android:id="@+id/fab" android:layout_width="wrap_content" app:backgroundTint="?colorAccent" - android:text="@string/action_filter" + android:text="@string/filter" android:layout_gravity="bottom|end" app:icon="@drawable/ic_filter_list_white_24dp" app:iconTint="@color/md_white_1000" diff --git a/app/src/main/res/layout/catalogue_drawer_content.xml b/app/src/main/res/layout/catalogue_drawer_content.xml index 390a696e23..8936e405ef 100644 --- a/app/src/main/res/layout/catalogue_drawer_content.xml +++ b/app/src/main/res/layout/catalogue_drawer_content.xml @@ -34,7 +34,7 @@ android:layout_width="wrap_content" android:textColor="?attr/tabBarIconColor" android:layout_height="match_parent" - android:text="@string/action_reset" + android:text="@string/reset" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/catalouge_more_extensions_card_item.xml b/app/src/main/res/layout/catalouge_more_extensions_card_item.xml index 855ef67e13..975a581be7 100644 --- a/app/src/main/res/layout/catalouge_more_extensions_card_item.xml +++ b/app/src/main/res/layout/catalouge_more_extensions_card_item.xml @@ -33,7 +33,7 @@ style="@style/Theme.Widget.Button.Borderless.Small" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/update_check_look_for_updates" + android:text="@string/searching_for_updates" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toTopOf="parent"/> diff --git a/app/src/main/res/layout/categories_controller.xml b/app/src/main/res/layout/categories_controller.xml index d56e80f506..63b80ac35e 100644 --- a/app/src/main/res/layout/categories_controller.xml +++ b/app/src/main/res/layout/categories_controller.xml @@ -16,11 +16,4 @@ android:clipToPadding="false" tools:listitem="@layout/categories_item" /> - - diff --git a/app/src/main/res/layout/chapter_sort_bottom_sheet.xml b/app/src/main/res/layout/chapter_sort_bottom_sheet.xml index eebe4bf885..4a07afab9c 100644 --- a/app/src/main/res/layout/chapter_sort_bottom_sheet.xml +++ b/app/src/main/res/layout/chapter_sort_bottom_sheet.xml @@ -31,14 +31,14 @@ android:layout_height="wrap_content" android:paddingStart="16dp" android:paddingEnd="12dp" - android:text="@string/action_sort" /> + android:text="@string/sort" /> + android:text="@string/set_as_default_for_all" /> + android:text="@string/filter" /> diff --git a/app/src/main/res/layout/display_bottom_sheet.xml b/app/src/main/res/layout/display_bottom_sheet.xml index a112dd34bc..1e2887beb8 100644 --- a/app/src/main/res/layout/display_bottom_sheet.xml +++ b/app/src/main/res/layout/display_bottom_sheet.xml @@ -39,19 +39,19 @@ + android:text="@string/list" /> + android:text="@string/compact_grid" /> + android:text="@string/comfortable_grid" /> + android:text="@string/uniform_covers" /> + android:text="@string/unread_badges" /> + android:text="@string/download_badge" /> + android:text="@string/start_with_filters_hidden" /> @@ -179,7 +179,7 @@ android:layout_marginEnd="12dp" android:background="@drawable/round_ripple" android:clickable="true" - android:contentDescription="@string/action_close" + android:contentDescription="@string/close" android:focusable="true" android:src="@drawable/ic_close_white_24dp" android:tint="@color/gray_button" /> diff --git a/app/src/main/res/layout/download_item.xml b/app/src/main/res/layout/download_item.xml index 343aea35f8..5be0c5404c 100644 --- a/app/src/main/res/layout/download_item.xml +++ b/app/src/main/res/layout/download_item.xml @@ -18,7 +18,7 @@ android:layout_height="24dp" android:tint="@color/md_white_1000" android:layout_gravity="end|center" - android:contentDescription="@string/action_cancel" + android:contentDescription="@string/cancel" android:layout_marginEnd="21dp" android:src="@drawable/ic_close_white_24dp" /> @@ -34,7 +34,7 @@ android:id="@+id/close_left" android:layout_width="24dp" android:layout_height="24dp" - android:contentDescription="@string/action_cancel" + android:contentDescription="@string/cancel" android:layout_gravity="start|center" android:layout_marginStart="21dp" android:tint="@color/md_white_1000" @@ -53,7 +53,7 @@ android:layout_height="0dp" android:layout_alignParentStart="true" android:layout_gravity="start" - android:contentDescription="@string/action_reorganize_by" + android:contentDescription="@string/reorder" android:scaleType="center" android:tint="?android:attr/textColorPrimary" app:layout_constraintBottom_toBottomOf="parent" @@ -120,7 +120,7 @@ android:layout_width="44dp" android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_toEndOf="@id/download_progress_text" - android:contentDescription="@string/description_cover" + android:contentDescription="@string/cover_of_image" android:paddingStart="10dp" android:paddingEnd="10dp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/app/src/main/res/layout/edit_manga_dialog.xml b/app/src/main/res/layout/edit_manga_dialog.xml index 8e1428865c..05c517a868 100644 --- a/app/src/main/res/layout/edit_manga_dialog.xml +++ b/app/src/main/res/layout/edit_manga_dialog.xml @@ -17,7 +17,7 @@ android:layout_width="wrap_content" android:adjustViewBounds="true" android:layout_height="150dp" - android:contentDescription="@string/description_cover" + android:contentDescription="@string/cover_of_image" android:background="@drawable/image_border_background" android:src="@mipmap/ic_launcher"/> @@ -35,7 +35,7 @@ android:id="@+id/manga_author" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/manga_info_author_label" + android:hint="@string/author" android:layout_marginEnd="16dp" android:layout_marginStart="16dp" android:inputType="text" @@ -45,7 +45,7 @@ android:id="@+id/manga_artist" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/manga_info_artist_label" + android:hint="@string/artist" android:layout_marginEnd="16dp" android:layout_marginStart="16dp" android:inputType="text" diff --git a/app/src/main/res/layout/extension_detail_controller.xml b/app/src/main/res/layout/extension_detail_controller.xml index bfc4468009..d846c7937d 100644 --- a/app/src/main/res/layout/extension_detail_controller.xml +++ b/app/src/main/res/layout/extension_detail_controller.xml @@ -85,7 +85,7 @@ android:layout_marginStart="16dp" android:layout_marginTop="16dp" android:textColor="@android:color/white" - android:text="@string/ext_uninstall" + android:text="@string/uninstall" style="@style/Theme.Widget.Button.Colored" app:layout_constraintStart_toStartOf="@id/guideline" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/filter_bottom_sheet.xml b/app/src/main/res/layout/filter_bottom_sheet.xml index 3719e22851..07805c0c54 100644 --- a/app/src/main/res/layout/filter_bottom_sheet.xml +++ b/app/src/main/res/layout/filter_bottom_sheet.xml @@ -53,7 +53,7 @@ android:layout_marginEnd="10dp" android:background="@drawable/round_clear_border" android:clickable="true" - android:contentDescription="@string/action_clear" + android:contentDescription="@string/clear" android:focusable="true" android:padding="3dp" android:src="@drawable/ic_close_white_24dp" @@ -73,14 +73,14 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="20dp" - android:text="@string/action_hide_categories" /> + android:text="@string/hide_categories" /> + android:text="@string/start_with_filters_hidden" /> diff --git a/app/src/main/res/layout/library_category_header_item.xml b/app/src/main/res/layout/library_category_header_item.xml index fad3615318..e81ff5a80a 100644 --- a/app/src/main/res/layout/library_category_header_item.xml +++ b/app/src/main/res/layout/library_category_header_item.xml @@ -14,7 +14,7 @@ tools:visibility="visible" tools:tint="?attr/colorAccent" android:layout_width="wrap_content" - android:contentDescription="@string/action_select_all" + android:contentDescription="@string/select_all" android:clickable="true" android:focusable="true" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/manga_details_controller.xml b/app/src/main/res/layout/manga_details_controller.xml index 28288f0ada..c16ee681a5 100644 --- a/app/src/main/res/layout/manga_details_controller.xml +++ b/app/src/main/res/layout/manga_details_controller.xml @@ -87,6 +87,6 @@ android:elevation="10dp" android:translationZ="20dp" android:layout_marginBottom="16dp" - android:contentDescription="@string/description_cover" + android:contentDescription="@string/cover_of_image" android:visibility="invisible" /> \ No newline at end of file diff --git a/app/src/main/res/layout/manga_header_item.xml b/app/src/main/res/layout/manga_header_item.xml index d77bbb9f44..1b892154ce 100644 --- a/app/src/main/res/layout/manga_header_item.xml +++ b/app/src/main/res/layout/manga_header_item.xml @@ -72,7 +72,7 @@ android:layout_height="wrap_content" android:adjustViewBounds="true" android:clickable="true" - android:contentDescription="@string/description_cover" + android:contentDescription="@string/cover_of_image" android:focusable="true" android:foreground="?android:attr/selectableItemBackground" android:maxHeight="300dp" @@ -90,7 +90,7 @@ android:layout_marginEnd="16dp" android:ellipsize="end" android:maxLines="4" - android:text="@string/manga_info_full_title_label" + android:text="@string/title" android:textIsSelectable="false" android:textSize="20sp" app:layout_constraintEnd_toEndOf="parent" @@ -105,7 +105,7 @@ android:layout_marginEnd="16dp" android:ellipsize="end" android:maxLines="2" - android:text="@string/manga_info_author_label" + android:text="@string/author" android:textAppearance="@style/TextAppearance.Regular.Body1.SemiBold" android:textColor="?android:attr/textColorSecondary" android:textIsSelectable="false" @@ -119,7 +119,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4dp" - android:text="@string/manga_info_latest_data_label" + android:text="@string/updated" android:textIsSelectable="false" app:layout_constraintStart_toStartOf="@id/manga_full_title" app:layout_constraintTop_toBottomOf="@+id/manga_author" @@ -171,7 +171,7 @@ android:id="@+id/track_button" style="@style/Theme.Widget.Button.RounededOutline" android:layout_marginStart="6dp" - android:text="@string/manga_tracking_tab" + android:text="@string/tracking" app:icon="@drawable/ic_sync_black_24dp" /> @@ -183,10 +183,10 @@ android:layout_gravity="center" android:layout_marginStart="6dp" android:layout_marginEnd="6dp" - android:contentDescription="@string/action_open_in_web_view" + android:contentDescription="@string/open_in_web_view" android:padding="5dp" android:src="@drawable/ic_open_in_webview_white_24dp" - android:tooltipText="@string/action_open_in_web_view" /> + android:tooltipText="@string/open_in_web_view" /> + android:tooltipText="@string/share" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/migration_bottom_sheet.xml b/app/src/main/res/layout/migration_bottom_sheet.xml index fba186983e..6365c9f9d5 100644 --- a/app/src/main/res/layout/migration_bottom_sheet.xml +++ b/app/src/main/res/layout/migration_bottom_sheet.xml @@ -118,7 +118,7 @@ android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:ems="10" - android:hint="@string/search_parameter" + android:hint="@string/search_parameter_ex" android:importantForAutofill="no" android:inputType="textPersonName" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/migration_process_item.xml b/app/src/main/res/layout/migration_process_item.xml index d309418744..ed3c00910e 100644 --- a/app/src/main/res/layout/migration_process_item.xml +++ b/app/src/main/res/layout/migration_process_item.xml @@ -48,7 +48,7 @@ android:id="@+id/migration_menu" android:layout_width="48dp" android:layout_height="wrap_content" - android:contentDescription="@string/description_cover" + android:contentDescription="@string/cover_of_image" android:paddingTop="30dp" android:paddingBottom="30dp" android:layout_marginBottom="45dp" diff --git a/app/src/main/res/layout/pref_account_login.xml b/app/src/main/res/layout/pref_account_login.xml index b489a2f364..bc62c5a5d2 100644 --- a/app/src/main/res/layout/pref_account_login.xml +++ b/app/src/main/res/layout/pref_account_login.xml @@ -59,8 +59,8 @@ android:layout_marginTop="20dp" android:text="@string/login" android:textColor="@android:color/white" - app:pb_textComplete="@string/login_success" - app:pb_textError="@string/invalid_login" + app:pb_textComplete="@string/successfully_logged_in" + app:pb_textError="@string/could_not_log_in" app:pb_textProgress="@string/loading"/> \ No newline at end of file diff --git a/app/src/main/res/layout/pref_library_columns.xml b/app/src/main/res/layout/pref_library_columns.xml deleted file mode 100644 index ca5fa23f55..0000000000 --- a/app/src/main/res/layout/pref_library_columns.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/reader_activity.xml b/app/src/main/res/layout/reader_activity.xml index 747eb68ab5..21d44db551 100644 --- a/app/src/main/res/layout/reader_activity.xml +++ b/app/src/main/res/layout/reader_activity.xml @@ -64,7 +64,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackgroundBorderless" - android:contentDescription="@string/action_previous_chapter" + android:contentDescription="@string/previous_chapter" android:padding="@dimen/material_layout_keylines_screen_edge_margin" app:srcCompat="@drawable/ic_skip_previous_white_24dp" /> @@ -101,7 +101,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackgroundBorderless" - android:contentDescription="@string/action_next_chapter" + android:contentDescription="@string/next_chapter" android:padding="@dimen/material_layout_keylines_screen_edge_margin" app:srcCompat="@drawable/ic_skip_next_white_24dp" /> diff --git a/app/src/main/res/layout/reader_color_filter.xml b/app/src/main/res/layout/reader_color_filter.xml index 2daba8120f..cc6cd0b754 100644 --- a/app/src/main/res/layout/reader_color_filter.xml +++ b/app/src/main/res/layout/reader_color_filter.xml @@ -19,7 +19,7 @@ android:id="@+id/switch_color_filter" android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/pref_custom_color_filter" + android:text="@string/use_custom_color_filter" app:layout_constraintTop_toTopOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> @@ -42,7 +42,7 @@ android:id="@+id/txt_color_filter_red_symbol" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/color_filter_r_value" + android:text="@string/red_initial" android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_red" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_red" @@ -76,7 +76,7 @@ android:id="@+id/txt_color_filter_green_symbol" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/color_filter_g_value" + android:text="@string/green_initial" android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_green" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_green" @@ -110,7 +110,7 @@ android:id="@+id/txt_color_filter_blue_symbol" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/color_filter_b_value" + android:text="@string/blue_initial" android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_blue" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_blue" @@ -144,7 +144,7 @@ android:id="@+id/txt_color_filter_alpha_symbol" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/color_filter_a_value" + android:text="@string/alpha_initial" android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_alpha" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_alpha" @@ -166,7 +166,7 @@ android:id="@+id/color_filter_mode_text" android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/pref_color_filter_mode" + android:text="@string/color_filter_blend_mode" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@id/color_filter_mode" app:layout_constraintBaseline_toBaselineOf="@id/color_filter_mode"/> @@ -188,7 +188,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/pref_custom_brightness" + android:text="@string/use_custom_brightness" app:layout_constraintTop_toBottomOf="@id/color_filter_mode_text"/> diff --git a/app/src/main/res/layout/reader_page_sheet.xml b/app/src/main/res/layout/reader_page_sheet.xml index 955a01e19f..b944fb840e 100644 --- a/app/src/main/res/layout/reader_page_sheet.xml +++ b/app/src/main/res/layout/reader_page_sheet.xml @@ -53,7 +53,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="32dp" - android:text="@string/action_share"/> + android:text="@string/share"/> @@ -78,7 +78,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="32dp" - android:text="@string/action_save"/> + android:text="@string/save"/> diff --git a/app/src/main/res/layout/reader_settings_sheet.xml b/app/src/main/res/layout/reader_settings_sheet.xml index 7023658b3a..4100e6c55f 100644 --- a/app/src/main/res/layout/reader_settings_sheet.xml +++ b/app/src/main/res/layout/reader_settings_sheet.xml @@ -21,7 +21,7 @@ android:id="@+id/general_prefs" android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/pref_category_general" + android:text="@string/general" android:textColor="?attr/colorAccent" android:textStyle="bold" app:layout_constraintEnd_toStartOf="@id/close_button" @@ -69,7 +69,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/pref_rotation_type" + android:text="@string/rotation" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@id/bottom_line" app:layout_constraintBaseline_toBaselineOf="@id/rotation_mode" /> @@ -87,7 +87,7 @@ @@ -107,7 +107,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/pref_show_page_number" + android:text="@string/show_page_number" android:textColor="?android:attr/textColorSecondary" app:layout_constraintTop_toBottomOf="@id/background_color" /> @@ -116,7 +116,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="0dp" - android:text="@string/pref_true_color" + android:text="@string/true_32bit_color" android:textColor="?android:attr/textColorSecondary" android:visibility="gone" tools:visibility="visible" @@ -127,7 +127,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="0dp" - android:text="@string/pref_fullscreen" + android:text="@string/fullscreen" android:textColor="?android:attr/textColorSecondary" app:layout_constraintTop_toBottomOf="@id/true_color" /> @@ -136,7 +136,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="0dp" - android:text="@string/pref_keep_screen_on" + android:text="@string/keep_screen_on" android:textColor="?android:attr/textColorSecondary" app:layout_constraintTop_toBottomOf="@id/fullscreen" /> @@ -144,7 +144,7 @@ android:id="@+id/always_show_chapter_transition" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/pref_always_show_chapter_transition" + android:text="@string/always_show_chapter_transition" android:textColor="?android:attr/textColorSecondary" app:layout_constraintTop_toBottomOf="@id/keepscreen" /> @@ -171,7 +171,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:id="@+id/zoom_start_text" - android:text="@string/pref_image_scale_type" + android:text="@string/scale_type" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@id/bottom_line" app:layout_constraintBaseline_toBaselineOf="@id/scale_type"/> @@ -190,7 +190,7 @@ android:id="@+id/scale_type_text" android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/pref_zoom_start" + android:text="@string/zoom_start_position" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@id/bottom_line" app:layout_constraintBaseline_toBaselineOf="@id/zoom_start"/> @@ -210,7 +210,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/pref_crop_borders" + android:text="@string/crop_borders" android:textColor="?android:attr/textColorSecondary" app:layout_constraintTop_toBottomOf="@id/zoom_start" /> @@ -219,7 +219,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="0dp" - android:text="@string/pref_page_transitions" + android:text="@string/page_transitions" android:textColor="?android:attr/textColorSecondary" app:layout_constraintTop_toBottomOf="@id/crop_borders" app:layout_constraintBottom_toBottomOf="parent"/> @@ -242,7 +242,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/pref_crop_borders" + android:text="@string/crop_borders" android:textColor="?android:attr/textColorSecondary" app:layout_constraintTop_toBottomOf="@id/webtoon_prefs" app:layout_constraintBottom_toBottomOf="parent" /> diff --git a/app/src/main/res/layout/recently_read_item.xml b/app/src/main/res/layout/recently_read_item.xml index bdd14d3cee..122fb8d874 100644 --- a/app/src/main/res/layout/recently_read_item.xml +++ b/app/src/main/res/layout/recently_read_item.xml @@ -13,7 +13,7 @@ android:layout_width="100dp" android:layout_height="match_parent" android:clickable="true" - android:contentDescription="@string/description_cover" + android:contentDescription="@string/cover_of_image" android:scaleType="centerCrop" /> + android:text="@string/remove" />