SponsorBlock: Made some strings translatable

I forgot to make these translatable...
This commit is contained in:
polymorphicshade 2020-08-23 15:17:09 -06:00
parent 4cadf54bc2
commit 4bfd2b0bd5
4 changed files with 11 additions and 4 deletions

View file

@ -666,10 +666,12 @@ public class VideoPlayerImpl extends VideoPlayer
switch (getSponsorBlockMode()) {
case DISABLED:
Toast.makeText(context, "SponsorBlock disabled", Toast.LENGTH_SHORT).show();
Toast.makeText(context, R.string.sponsor_block_disabled_toast, Toast.LENGTH_SHORT)
.show();
break;
case ENABLED:
Toast.makeText(context, "SponsorBlock enabled", Toast.LENGTH_SHORT).show();
Toast.makeText(context, R.string.sponsor_block_enabled_toast, Toast.LENGTH_SHORT)
.show();
break;
case EXCLUDE:
// ignored

View file

@ -180,7 +180,8 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
.putStringSet(
getString(R.string.sponsor_block_exclusion_list_key), new HashSet<>())
.apply();
Toast.makeText(getContext(), "Exclusion list cleared", Toast.LENGTH_SHORT).show();
Toast.makeText(getContext(), R.string.sponsor_block_exclusion_list_cleared_toast,
Toast.LENGTH_SHORT).show();
return true;
});
}

View file

@ -74,7 +74,7 @@ public class EditColorPreference extends EditTextPreference
return true;
} catch (final Exception e) {
Toast.makeText(getContext(), "Invalid color", Toast.LENGTH_SHORT).show();
Toast.makeText(getContext(), R.string.invalid_color_toast, Toast.LENGTH_SHORT).show();
return false;
}
}

View file

@ -252,6 +252,7 @@
<string name="restore_defaults">Restore defaults</string>
<string name="restore_defaults_confirmation">Do you want to restore defaults?</string>
<string name="permission_display_over_apps">Give permission to display over other apps</string>
<string name="invalid_color_toast">Invalid color</string>
<!-- error activity -->
<string name="sorry_string">Sorry, that should not have happened.</string>
<string name="guru_meditation" translatable="false">Guru Meditation.</string>
@ -708,4 +709,7 @@
<string name="sponsor_block_toggle_skipping">Toggle skipping sponsors</string>
<string name="sponsor_block_clear_exclusion_list_title">Clear Exclusion List</string>
<string name="sponsor_block_clear_exclusion_list_summary">Clear the list of uploaders excluded from SponsorBlock.</string>
<string name="sponsor_block_enabled_toast">SponsorBlock enabled</string>
<string name="sponsor_block_disabled_toast">SponsorBlock disabled</string>
<string name="sponsor_block_exclusion_list_cleared_toast">Exclusion list cleared</string>
</resources>