|
@@ -2,8 +2,8 @@
|
2
|
2
|
|
3
|
3
|
import { Alert } from 'react-native';
|
4
|
4
|
|
5
|
|
-
|
6
|
5
|
import { isRoomValid } from '../../base/conference';
|
|
6
|
+import { i18next } from '../../base/i18n';
|
7
|
7
|
import { MiddlewareRegistry } from '../../base/redux';
|
8
|
8
|
import { TRACK_CREATE_ERROR } from '../../base/tracks';
|
9
|
9
|
|
|
@@ -48,26 +48,20 @@ MiddlewareRegistry.register(store => next => action => {
|
48
|
48
|
* @returns {void}
|
49
|
49
|
*/
|
50
|
50
|
function _alertPermissionErrorWithSettings(trackType) {
|
51
|
|
- // TODO i18n
|
52
|
|
- const deviceType = trackType === 'video' ? 'Camera' : 'Microphone';
|
53
|
|
-
|
54
|
51
|
/* eslint-disable indent */
|
55
|
|
-
|
56
|
|
- const message
|
57
|
|
- = `${deviceType
|
58
|
|
- } permission is required to participate in conferences with ${
|
59
|
|
- trackType}. Please grant it in Settings.`;
|
60
|
|
-
|
|
52
|
+ const message = trackType === 'video'
|
|
53
|
+ ? i18next.t('dialog.permissionCameraRequiredError')
|
|
54
|
+ : i18next.t('dialog.permissionMicRequiredError');
|
61
|
55
|
/* eslint-ensable indent */
|
62
|
56
|
|
63
|
57
|
Alert.alert(
|
64
|
|
- 'Permission required',
|
|
58
|
+ i18next.t('dialog.permissionErrorTitle'),
|
65
|
59
|
message,
|
66
|
60
|
[
|
67
|
|
- { text: 'Cancel' },
|
|
61
|
+ { text: i18next.t('dialog.Cancel') },
|
68
|
62
|
{
|
69
|
63
|
onPress: openSettings,
|
70
|
|
- text: 'Settings'
|
|
64
|
+ text: i18next.t('settings.title')
|
71
|
65
|
}
|
72
|
66
|
],
|
73
|
67
|
{ cancelable: false });
|