diff --git a/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java
index e5f49e2e8..d5f46fb22 100644
--- a/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java
@@ -1,6 +1,7 @@
package org.schabi.newpipe.settings;
import android.content.SharedPreferences;
+import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
@@ -22,12 +23,19 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
super.onCreate(savedInstanceState);
//initializing R.array.seek_duration_description to display the translation of seconds
- String[] durationsDescriptions = getResources().getStringArray(R.array.seek_duration_description);
- String[] durationsValues = getResources().getStringArray(R.array.seek_duration_value);
+ Resources res = getResources();
+ String[] durationsValues = res.getStringArray(R.array.seek_duration_value);
+ String[] durationsDescriptions = res.getStringArray(R.array.seek_duration_description);
int currentDurationValue;
for (int i = 0; i < durationsDescriptions.length; i++) {
currentDurationValue = Integer.parseInt(durationsValues[i]) / 1000;
- durationsDescriptions[i] = String.format(durationsDescriptions[i], currentDurationValue);
+ try {
+ durationsDescriptions[i] = String.format(
+ res.getQuantityString(R.plurals.dynamic_seek_duration_description, currentDurationValue),
+ currentDurationValue);
+ } catch (Resources.NotFoundException ignored) {
+ //if this happens, the translation is missing, and the english string will be displayed instead
+ }
}
ListPreference durations = (ListPreference) findPreference(getString(R.string.seek_duration_key));
durations.setEntries(durationsDescriptions);
diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml
index 8238b13bc..aa34644d1 100644
--- a/app/src/main/res/values-eo/strings.xml
+++ b/app/src/main/res/values-eo/strings.xml
@@ -538,10 +538,12 @@
Forviŝi elŝutitajn dosierojn
%1$s elŝutoj forviŝitaj
Filmetoj
- %s sekundoj
Doni la permeson por afiŝiĝi supre aliaj apoj
Lingvo de la apo
Sistemnormo
Premu « Finita » kiam solvita
Finita
+
+ - %s sekundoj
+
\ No newline at end of file
diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml
index fba5546c1..b5bf738fb 100644
--- a/app/src/main/res/values/settings_keys.xml
+++ b/app/src/main/res/values/settings_keys.xml
@@ -31,12 +31,14 @@
seek_duration
10000
- - @string/dynamic_seek_duration_description
- - @string/dynamic_seek_duration_description
- - @string/dynamic_seek_duration_description
- - @string/dynamic_seek_duration_description
- - @string/dynamic_seek_duration_description
- - @string/dynamic_seek_duration_description
+
+ - 5 seconds
+ - 10 seconds
+ - 15 seconds
+ - 20 seconds
+ - 25 seconds
+ - 30 seconds
- 5000
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 712916449..39b2907ce 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -593,4 +593,9 @@
App language
System default
%s seconds
+
+ - %s seconds
+ - %s seconds
+ - %s seconds
+