Multiple localization fixes
With the extractor PR, fixes title & description shown in the wrong language. Fixed views / spectators counts possibly in the wrong language Fixed live spectators not showing full count on detail page Fixed LIVE shown on players, it shows translated instead Fixed Videos string in search / three dots not available in Weblate (because it was videos, but there already was a plural string named videos, in Weblate) Subscriber count is always giving the short count. We can't get exact number since this YouTube update: https://support.google.com/youtube/thread/6543166 But only short count (B, M, k), so showing full number, eg for 1.9M: 1,900,000, is wrong because the number could be 1,923,490 or 1,897,789… Added a « sytem default » option to content language and country language selector. It's the one selected by default (not en-GB anymore then), and correspond to the language of the system / country of the system By system I mean phone, tablet, TV… Fixed russian showing - before time ago (eg 19hrs ago) This is a workaround fix, I opened an issue on prettytime library repo. Fixed russian plurals: other was used instead of many for videos and subscribers Fixed seek_duration english only
This commit is contained in:
parent
4db0c82cd1
commit
9020ba6280
16 changed files with 59 additions and 42 deletions
|
|
@ -4,9 +4,9 @@ import android.content.SharedPreferences;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.ListPreference;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
|
|
@ -21,6 +21,16 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
|
|||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
String[] durationsDescriptions = getResources().getStringArray(R.array.seek_duration_description);
|
||||
String[] durationsValues = getResources().getStringArray(R.array.seek_duration_value);
|
||||
int currentDurationValue;
|
||||
for (int i = 0; i < durationsDescriptions.length; i++) {
|
||||
currentDurationValue = Integer.parseInt(durationsValues[i]) / 1000;
|
||||
durationsDescriptions[i] = String.format(durationsDescriptions[i], currentDurationValue);
|
||||
}
|
||||
ListPreference durations = (ListPreference) findPreference(getString(R.string.seek_duration_key));
|
||||
durations.setEntries(durationsDescriptions);
|
||||
|
||||
listener = (sharedPreferences, s) -> {
|
||||
|
||||
// on M and above, if user chooses to minimise to popup player on exit and the app doesn't have
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue