Include support for translated string resources at device permission dialog because it contains hardcoded english strings.
This commit is contained in:
parent
5fcd5ff17b
commit
d4c7fc8a72
|
@ -257,6 +257,9 @@
|
||||||
"passwordNotSupported": "No se soporta $t(lockRoomPassword) en la reunión",
|
"passwordNotSupported": "No se soporta $t(lockRoomPassword) en la reunión",
|
||||||
"passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) no es compatible",
|
"passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) no es compatible",
|
||||||
"passwordRequired": "$t(lockRoomPasswordUppercase) necesario",
|
"passwordRequired": "$t(lockRoomPasswordUppercase) necesario",
|
||||||
|
"permissionErrorTitle": "Permiso necesario",
|
||||||
|
"permissionCameraRequiredError": "El permiso de cámara es necesario para participar en conferencias con vídeo. Por favor, permítelo en Ajustes",
|
||||||
|
"permissionMicRequiredError": "El permiso de micrófono es necesario para participar en conferencias con sonido. Por favor, permítelo en Ajustes",
|
||||||
"popupError": "Su navegador está bloqueando las ventanas emergentes de este sitio. Habilite las ventanas emergentes en la configuración de seguridad de su navegador y vuelva a intentarlo.",
|
"popupError": "Su navegador está bloqueando las ventanas emergentes de este sitio. Habilite las ventanas emergentes en la configuración de seguridad de su navegador y vuelva a intentarlo.",
|
||||||
"popupErrorTitle": "Ventana emergente bloqueada",
|
"popupErrorTitle": "Ventana emergente bloqueada",
|
||||||
"readMore": "mas",
|
"readMore": "mas",
|
||||||
|
|
|
@ -267,6 +267,9 @@
|
||||||
"passwordNotSupported": "Setting a meeting $t(lockRoomPassword) is not supported.",
|
"passwordNotSupported": "Setting a meeting $t(lockRoomPassword) is not supported.",
|
||||||
"passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) not supported",
|
"passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) not supported",
|
||||||
"passwordRequired": "$t(lockRoomPasswordUppercase) required",
|
"passwordRequired": "$t(lockRoomPasswordUppercase) required",
|
||||||
|
"permissionErrorTitle": "Permission required",
|
||||||
|
"permissionCameraRequiredError": "Camera permission is required to participate in conferences with video. Please grant it in Settings",
|
||||||
|
"permissionMicRequiredError": "Microphone permission is required to participate in conferences with audio. Please grant it in Settings",
|
||||||
"popupError": "Your browser is blocking pop-up windows from this site. Please enable pop-ups in your browser's security settings and try again.",
|
"popupError": "Your browser is blocking pop-up windows from this site. Please enable pop-ups in your browser's security settings and try again.",
|
||||||
"popupErrorTitle": "Pop-up blocked",
|
"popupErrorTitle": "Pop-up blocked",
|
||||||
"readMore": "more",
|
"readMore": "more",
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
import { Alert } from 'react-native';
|
import { Alert } from 'react-native';
|
||||||
|
|
||||||
|
|
||||||
import { isRoomValid } from '../../base/conference';
|
import { isRoomValid } from '../../base/conference';
|
||||||
|
import { i18next } from '../../base/i18n';
|
||||||
import { MiddlewareRegistry } from '../../base/redux';
|
import { MiddlewareRegistry } from '../../base/redux';
|
||||||
import { TRACK_CREATE_ERROR } from '../../base/tracks';
|
import { TRACK_CREATE_ERROR } from '../../base/tracks';
|
||||||
|
|
||||||
|
@ -48,26 +48,20 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function _alertPermissionErrorWithSettings(trackType) {
|
function _alertPermissionErrorWithSettings(trackType) {
|
||||||
// TODO i18n
|
|
||||||
const deviceType = trackType === 'video' ? 'Camera' : 'Microphone';
|
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
const message = trackType === 'video'
|
||||||
const message
|
? i18next.t('dialog.permissionCameraRequiredError')
|
||||||
= `${deviceType
|
: i18next.t('dialog.permissionMicRequiredError');
|
||||||
} permission is required to participate in conferences with ${
|
|
||||||
trackType}. Please grant it in Settings.`;
|
|
||||||
|
|
||||||
/* eslint-ensable indent */
|
/* eslint-ensable indent */
|
||||||
|
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'Permission required',
|
i18next.t('dialog.permissionErrorTitle'),
|
||||||
message,
|
message,
|
||||||
[
|
[
|
||||||
{ text: 'Cancel' },
|
{ text: i18next.t('dialog.Cancel') },
|
||||||
{
|
{
|
||||||
onPress: openSettings,
|
onPress: openSettings,
|
||||||
text: 'Settings'
|
text: i18next.t('settings.title')
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
{ cancelable: false });
|
{ cancelable: false });
|
||||||
|
|
Loading…
Reference in New Issue