Merge pull request #4032 from ebraminio/puzzle

Localize digits in queue episodes and parallel downloads numbers
This commit is contained in:
H. Lehmann 2020-04-10 00:08:38 +02:00 committed by GitHub
commit de3985e1ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -58,6 +58,7 @@ import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.List;
import java.util.Locale;
import static de.danoeh.antennapod.dialog.EpisodesApplyActionFragment.ACTION_DELETE;
import static de.danoeh.antennapod.dialog.EpisodesApplyActionFragment.ACTION_DOWNLOAD;
@ -578,7 +579,8 @@ public class QueueFragment extends Fragment {
}
private void refreshInfoBar() {
String info = queue.size() + getString(R.string.episodes_suffix);
String info = String.format(Locale.getDefault(), "%d%s",
queue.size(), getString(R.string.episodes_suffix));
if (queue.size() > 0) {
long timeLeft = 0;
for (FeedItem item : queue) {

View File

@ -15,6 +15,7 @@ import org.apache.commons.lang3.ArrayUtils;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
public class NetworkPreferencesFragment extends PreferenceFragmentCompat {
@ -96,7 +97,8 @@ public class NetworkPreferencesFragment extends PreferenceFragmentCompat {
private void setParallelDownloadsText(int downloads) {
final Resources res = getActivity().getResources();
String s = downloads + res.getString(R.string.parallel_downloads_suffix);
String s = String.format(Locale.getDefault(), "%d%s",
downloads, res.getString(R.string.parallel_downloads_suffix));
findPreference(UserPreferences.PREF_PARALLEL_DOWNLOADS).setSummary(s);
}