Use Translations

This commit is contained in:
Alexandru Branza 2023-05-31 09:51:47 +03:00
parent 10645130b2
commit df675d8624
2 changed files with 6 additions and 3 deletions

View file

@ -2,7 +2,7 @@
const platform = require('./platform');
let options = [{ label: 'Disabled', value: 'internal' }];
let options = [{ label: 'EXTERNAL_PLAYER_DISABLED', value: 'internal' }];
if (platform.name === 'ios') {
options = options.concat([
@ -12,7 +12,7 @@ if (platform.name === 'ios') {
]);
} else if (platform.name === 'android') {
options = options.concat([
{ label: 'Allow Choosing', value: 'choose' },
{ label: 'EXTERNAL_PLAYER_ALLOW_CHOOSING', value: 'choose' },
{ label: 'VLC', value: 'vlc' },
{ label: 'Just Player', value: 'justplayer' },
{ label: 'MX Player', value: 'mxplayer' }

View file

@ -158,7 +158,10 @@ const useProfileSettingsInputs = (profile) => {
}
}), [profile.settings]);
const playInExternalPlayerSelect = React.useMemo(() => ({
options: externalPlayerOptions,
options: externalPlayerOptions.map(opt => {
opt.label = t(opt.label);
return opt;
}),
selected: [`${profile.settings.playerType || 'internal'}`],
onSelect: (event) => {
core.transport.dispatch({