소스 검색

Include support for translated string resources at device permission dialog because it contains hardcoded english strings.

j8
Victor de Francisco 3 년 전
부모
커밋
d4c7fc8a72
3개의 변경된 파일13개의 추가작업 그리고 13개의 파일을 삭제
  1. 3
    0
      lang/main-es.json
  2. 3
    0
      lang/main.json
  3. 7
    13
      react/features/mobile/permissions/middleware.js

+ 3
- 0
lang/main-es.json 파일 보기

@@ -257,6 +257,9 @@
257 257
         "passwordNotSupported": "No se soporta $t(lockRoomPassword) en la reunión",
258 258
         "passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) no es compatible",
259 259
         "passwordRequired": "$t(lockRoomPasswordUppercase) necesario",
260
+        "permissionErrorTitle": "Permiso necesario",
261
+        "permissionCameraRequiredError": "El permiso de cámara es necesario para participar en conferencias con vídeo. Por favor, permítelo en Ajustes",
262
+        "permissionMicRequiredError": "El permiso de micrófono es necesario para participar en conferencias con sonido. Por favor, permítelo en Ajustes",
260 263
         "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.",
261 264
         "popupErrorTitle": "Ventana emergente bloqueada",
262 265
         "readMore": "mas",

+ 3
- 0
lang/main.json 파일 보기

@@ -267,6 +267,9 @@
267 267
         "passwordNotSupported": "Setting a meeting $t(lockRoomPassword) is not supported.",
268 268
         "passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) not supported",
269 269
         "passwordRequired": "$t(lockRoomPasswordUppercase) required",
270
+        "permissionErrorTitle": "Permission required",
271
+        "permissionCameraRequiredError": "Camera permission is required to participate in conferences with video. Please grant it in Settings",
272
+        "permissionMicRequiredError": "Microphone permission is required to participate in conferences with audio. Please grant it in Settings",
270 273
         "popupError": "Your browser is blocking pop-up windows from this site. Please enable pop-ups in your browser's security settings and try again.",
271 274
         "popupErrorTitle": "Pop-up blocked",
272 275
         "readMore": "more",

+ 7
- 13
react/features/mobile/permissions/middleware.js 파일 보기

@@ -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 });

Loading…
취소
저장