Add lokalisation (#3106)
* applied eslint * add locales and lint the project * removed error boundary * updated locales * fix min files * fix locales * fix erorrs * fix errors * fix errors * fix error * add locales
This commit is contained in:
parent
ef897538d1
commit
c8ff481725
6 changed files with 46 additions and 15 deletions
|
|
@ -1437,5 +1437,11 @@
|
|||
"Alert updated": "Alert updated",
|
||||
"Failed to create an alert": "Failed to create an alert",
|
||||
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.",
|
||||
"Alert based on": "Alert based on"
|
||||
"Alert based on": "Alert based on",
|
||||
"Session Replay": "Session Replay",
|
||||
"Developer Tools": "Developer Tools",
|
||||
"Dashboard": "Dashboard",
|
||||
"Assist (Live)": "Assist (Live)",
|
||||
"Assist (Call)": "Assist (Call)",
|
||||
"Change Spot Visibility": "Change Spot Visibility"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1437,5 +1437,11 @@
|
|||
"Alert updated": "Alerta actualizada",
|
||||
"Failed to create an alert": "Error al crear la alerta",
|
||||
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "Ej. Cuando el umbral supere 1ms en los últimos 15 minutos, notifícame a través de Slack #foss-notifications.",
|
||||
"Alert based on": "Alerta basada en"
|
||||
"Alert based on": "Alerta basada en",
|
||||
"Session Replay": "Reproducción de sesión",
|
||||
"Developer Tools": "Herramientas de desarrollador",
|
||||
"Dashboard": "Panel de control",
|
||||
"Assist (Live)": "Asistencia (En vivo)",
|
||||
"Assist (Call)": "Asistencia (Llamada)",
|
||||
"Change Spot Visibility": "Cambiar visibilidad de Spot"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1437,5 +1437,11 @@
|
|||
"Alert updated": "Alerte mise à jour",
|
||||
"Failed to create an alert": "Échec de la création de l'alerte",
|
||||
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "Ex. Lorsque le seuil dépasse 1ms au cours des 15 dernières minutes, notifiez-moi via Slack #foss-notifications.",
|
||||
"Alert based on": "Alerte basée sur"
|
||||
"Alert based on": "Alerte basée sur",
|
||||
"Session Replay": "Relecture de session",
|
||||
"Developer Tools": "Outils développeur",
|
||||
"Dashboard": "Tableau de bord",
|
||||
"Assist (Live)": "Assistance (En direct)",
|
||||
"Assist (Call)": "Assistance (Appel)",
|
||||
"Change Spot Visibility": "Modifier la visibilité du Spot"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1437,5 +1437,11 @@
|
|||
"Alert updated": "Уведомление обновлено",
|
||||
"Failed to create an alert": "Не удалось создать уведомление",
|
||||
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "Например: если порог превышает 1 мс за последние 15 минут, уведомить меня через Slack #foss-notifications.",
|
||||
"Alert based on": "Уведомление на основе"
|
||||
"Alert based on": "Уведомление на основе",
|
||||
"Session Replay": "Воспроизведение сессий",
|
||||
"Developer Tools": "Инструменты разработчика",
|
||||
"Dashboard": "Дашборд",
|
||||
"Assist (Live)": "Assist (Live)",
|
||||
"Assist (Call)": "Assist (Call)",
|
||||
"Change Spot Visibility": "Изменить видимость Spot"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1437,5 +1437,11 @@
|
|||
"Alert updated": "警报已更新",
|
||||
"Failed to create an alert": "创建警报失败",
|
||||
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "例如:当过去15分钟内阈值超过1毫秒时,通过Slack #foss-notifications通知我。",
|
||||
"Alert based on": "警报依据"
|
||||
"Alert based on": "警报依据",
|
||||
"Session Replay": "会话回放",
|
||||
"Developer Tools": "开发者工具",
|
||||
"Dashboard": "仪表板",
|
||||
"Assist (Live)": "Assist(实时协助)",
|
||||
"Assist (Call)": "Assist(通话协助)",
|
||||
"Change Spot Visibility": "更改 Spot 可见性"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,16 +3,17 @@ import { makeAutoObservable } from 'mobx';
|
|||
import { userService } from 'App/services';
|
||||
|
||||
import Role from './types/role';
|
||||
import i18next, { TFunction } from 'i18next';
|
||||
|
||||
const permissions = [
|
||||
{ text: 'Session Replay', value: 'SESSION_REPLAY' },
|
||||
{ text: 'Developer Tools', value: 'DEV_TOOLS' },
|
||||
{ text: 'Dashboard', value: 'METRICS' },
|
||||
{ text: 'Assist (Live)', value: 'ASSIST_LIVE' },
|
||||
{ text: 'Assist (Call)', value: 'ASSIST_CALL' },
|
||||
{ text: 'Feature Flags', value: 'FEATURE_FLAGS' },
|
||||
{ text: 'Spots', value: 'SPOT' },
|
||||
{ text: 'Change Spot Visibility', value: 'SPOT_PUBLIC' },
|
||||
const permissions = (t: TFunction) => [
|
||||
{ text: t('Session Replay'), value: 'SESSION_REPLAY' },
|
||||
{ text: t('Developer Tools'), value: 'DEV_TOOLS' },
|
||||
{ text: t('Dashboard'), value: 'METRICS' },
|
||||
{ text: t('Assist (Live)'), value: 'ASSIST_LIVE' },
|
||||
{ text: t('Assist (Call)'), value: 'ASSIST_CALL' },
|
||||
{ text: t('Feature Flags'), value: 'FEATURE_FLAGS' },
|
||||
{ text: t('Spots'), value: 'SPOT' },
|
||||
{ text: t('Change Spot Visibility'), value: 'SPOT_PUBLIC' },
|
||||
];
|
||||
|
||||
export default class UserStore {
|
||||
|
|
@ -20,7 +21,7 @@ export default class UserStore {
|
|||
|
||||
loading: boolean = false;
|
||||
|
||||
permissions = permissions;
|
||||
permissions = permissions(i18next.t);
|
||||
|
||||
instance = new Role();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue