From f8caed139ad7b0864ec6f9bebccb4c8e19dd9c31 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 4 Aug 2021 18:55:32 +0200 Subject: [PATCH] Use custom cancel string everywhere to fix missing somali translation for android.R.string.cancel --- .../main/java/org/schabi/newpipe/download/DownloadDialog.java | 2 +- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 4 ++-- app/src/main/res/layout/dialog_feed_group_create.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 628496c01..c24c8f171 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -864,7 +864,7 @@ public class DownloadDialog extends DialogFragment final AlertDialog.Builder askDialog = new AlertDialog.Builder(context) .setTitle(R.string.download_dialog_title) .setMessage(msgBody) - .setNegativeButton(android.R.string.cancel, null); + .setNegativeButton(R.string.cancel, null); final StoredFileHelper finalStorage = storage; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 14d023dc7..bc983fbe6 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -2080,7 +2080,7 @@ public final class VideoDetailFragment private void showClearingQueueConfirmation(final Runnable onAllow) { new AlertDialog.Builder(activity) .setTitle(R.string.clear_queue_confirmation_description) - .setNegativeButton(android.R.string.cancel, null) + .setNegativeButton(R.string.cancel, null) .setPositiveButton(android.R.string.yes, (dialog, which) -> { onAllow.run(); dialog.dismiss(); @@ -2096,7 +2096,7 @@ public final class VideoDetailFragment resolutions[i] = sortedVideoStreams.get(i).getResolution(); } final AlertDialog.Builder builder = new AlertDialog.Builder(activity) - .setNegativeButton(android.R.string.cancel, null) + .setNegativeButton(R.string.cancel, null) .setNeutralButton(R.string.open_in_browser, (dialog, i) -> ShareUtils.openUrlInBrowser(requireActivity(), url) ); diff --git a/app/src/main/res/layout/dialog_feed_group_create.xml b/app/src/main/res/layout/dialog_feed_group_create.xml index e849524b0..cececa434 100644 --- a/app/src/main/res/layout/dialog_feed_group_create.xml +++ b/app/src/main/res/layout/dialog_feed_group_create.xml @@ -205,7 +205,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toStartOf="@+id/confirm_button" - android:text="@android:string/cancel" /> + android:text="@string/cancel" />