diff --git a/lang/main-es.json b/lang/main-es.json index bb6139e41..57290ef52 100644 --- a/lang/main-es.json +++ b/lang/main-es.json @@ -257,6 +257,9 @@ "passwordNotSupported": "No se soporta $t(lockRoomPassword) en la reunión", "passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) no es compatible", "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.", "popupErrorTitle": "Ventana emergente bloqueada", "readMore": "mas", diff --git a/lang/main.json b/lang/main.json index bd7d70f28..4db1fc9b4 100644 --- a/lang/main.json +++ b/lang/main.json @@ -267,6 +267,9 @@ "passwordNotSupported": "Setting a meeting $t(lockRoomPassword) is not supported.", "passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) not supported", "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.", "popupErrorTitle": "Pop-up blocked", "readMore": "more", diff --git a/react/features/mobile/permissions/middleware.js b/react/features/mobile/permissions/middleware.js index 94ad336f8..735efb7ab 100644 --- a/react/features/mobile/permissions/middleware.js +++ b/react/features/mobile/permissions/middleware.js @@ -2,8 +2,8 @@ import { Alert } from 'react-native'; - import { isRoomValid } from '../../base/conference'; +import { i18next } from '../../base/i18n'; import { MiddlewareRegistry } from '../../base/redux'; import { TRACK_CREATE_ERROR } from '../../base/tracks'; @@ -48,26 +48,20 @@ MiddlewareRegistry.register(store => next => action => { * @returns {void} */ function _alertPermissionErrorWithSettings(trackType) { - // TODO i18n - const deviceType = trackType === 'video' ? 'Camera' : 'Microphone'; - /* eslint-disable indent */ - - const message - = `${deviceType - } permission is required to participate in conferences with ${ - trackType}. Please grant it in Settings.`; - + const message = trackType === 'video' + ? i18next.t('dialog.permissionCameraRequiredError') + : i18next.t('dialog.permissionMicRequiredError'); /* eslint-ensable indent */ Alert.alert( - 'Permission required', + i18next.t('dialog.permissionErrorTitle'), message, [ - { text: 'Cancel' }, + { text: i18next.t('dialog.Cancel') }, { onPress: openSettings, - text: 'Settings' + text: i18next.t('settings.title') } ], { cancelable: false });