From 3e15c77a05209b76215fb0ef080930f19cfd62e8 Mon Sep 17 00:00:00 2001 From: pratyaksh1610 Date: Tue, 3 Jan 2023 14:07:28 +0530 Subject: [PATCH] move string to donottranslate.xml and fix nits --- .../java/org/schabi/newpipe/download/DownloadDialog.java | 6 +++--- app/src/main/res/values/donottranslate.xml | 1 + app/src/main/res/values/strings.xml | 1 - 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 7777f87fe..77bb48a81 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -566,8 +566,6 @@ public class DownloadDialog extends DialogFragment } private void onItemSelectedSetFileName() { - final String setSubtitleLanguageCode = subtitleStreamsAdapter.getItem(selectedSubtitleIndex) - .getLanguageTag(); final String fileName = FilenameUtils.createFilename(getContext(), currentInfo.getName()); switch (dialogBinding.videoAudioGroup.getCheckedRadioButtonId()) { @@ -576,7 +574,9 @@ public class DownloadDialog extends DialogFragment dialogBinding.fileName.setText(fileName); break; case R.id.subtitle_button: - dialogBinding.fileName.setText(fileName + getString( + final String setSubtitleLanguageCode = subtitleStreamsAdapter + .getItem(selectedSubtitleIndex).getLanguageTag(); + dialogBinding.fileName.setText(getString( R.string.caption_file_name, fileName, setSubtitleLanguageCode)); break; } diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index d28f794c0..09bf9080c 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -27,4 +27,5 @@ SoundCloud @string/app_name LeakCanary + %1$s-%2$s diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f9d1361a8..3fa37155a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -452,7 +452,6 @@ Zoom Auto-generated - %1$s-%2$s Captions Modify player caption text scale and background styles. Requires app restart to take effect