added translates

This commit is contained in:
Elyor Djalilov 2024-06-19 17:38:29 +05:00
parent 405879c64d
commit 1d8758f210
4 changed files with 28 additions and 5 deletions

View File

@ -297,6 +297,7 @@
"UseDigits": "Use digits",
"UsedStorage": "Used: {{size}}",
"UseHttp": "Use Http",
"UserAlreadyLoggedOut": "The user {{displayName}} is already logged out",
"UserAgreement": "I confirm and want to proceed",
"UserLimitExceeded": "User limit exceeded. To proceed to the next step, please adjust the number of users or increase the {{productName}} user limit.",
"UsersAreRegistered": "You selected users registered in your {{productName}}, with the roles already set. Please proceed to the next step or go back to select more users.",
@ -306,6 +307,9 @@
"ViewSessions": "View sessions",
"WantToCancelDataImport": "Do you want to cancel data import?",
"LogoutAllSessions": "Logout all sessions",
"LoggedOutByUser": "All active connections were logged out: {{displayName}}",
"LoggedOutByUserExceptThis": "All active connections except this were logged out: {{displayName}}",
"LoggedOutBySelectedUsers": "All active connections of the selected users were logged out",
"WantToCancelUpload": "Do you want to cancel the upload?",
"WhiteLabel": "Logo settings",
"WhiteLabelHelper": "Use images with a transparent background. (PNG, SVG, JPG)",

View File

@ -294,6 +294,7 @@
"UseDigits": "Использовать цифры",
"UsedStorage": "Используемое: {{size}}",
"UseHttp": "Использовать Http",
"UserAlreadyLoggedOut": "Пользователь {{displayName}} уже вышел из системы.",
"UserAgreement": "Я подтверждаю и хочу продолжить",
"UserLimitExceeded": "Превышен лимит пользователя. Чтобы перейти к следующему шагу, измените количество пользователей или увеличьте лимит пользователей {{productName}}.",
"UsersSectionDescription": "Раздел «Пользователи» включает пользователей, которых вы выбрали на предыдущем шаге. По умолчанию он всегда включен, и его нельзя отключить.",
@ -302,6 +303,9 @@
"ViewSessions": "Просмотр сеансов",
"WantToCancelDataImport": "Вы хотите отменить импорт данных?",
"LogoutAllSessions": "Выйти из всех сессий",
"LoggedOutByUser": "Все активные соединения были отключены: {{displayName}}",
"LoggedOutByUserExceptThis": "Все активные соединения, кроме этого, были отключены: {{displayName}}.",
"LoggedOutBySelectedUsers": "Все активные соединения выбранных пользователей были отключены.",
"WantToCancelUpload": "Вы хотите отменить загрузку?",
"WhiteLabel": "Настройки логотипа",
"WhiteLabelHelper": "Используйте изображения с прозрачным фоном (PNG, SVG, JPG).",

View File

@ -3,6 +3,7 @@ import { Avatar } from "@docspace/shared/components/avatar";
import { Box } from "@docspace/shared/components/box";
import { Text } from "@docspace/shared/components/text";
import { ContextMenuButton } from "@docspace/shared/components/context-menu-button";
import { PRODUCT_NAME } from "@docspace/shared/constants";
import styled, { css } from "styled-components";
import LogoutReactSvgUrl from "PUBLIC_DIR/images/logout.react.svg?url";
@ -121,7 +122,7 @@ const LastSessionBlock = (props) => {
const getUserType = () => {
if (isOwner) return t("Common:Owner");
if (isAdmin) return t("Common:PortalAdmin");
if (isAdmin) return t("Common:PortalAdmin", { productName: PRODUCT_NAME });
if (isRoomAdmin) return t("Common:RoomAdmin");
if (isCollaborator) return t("Common:PowerUser");
return t("Common:User");

View File

@ -539,14 +539,21 @@ class SelectionStore {
const userId = userIdFromSelection || userIdFromBufferSelection;
if (!userId) return toastr.error(t("The user is already logged out"));
if (!userId)
return toastr.error(
t("Settings:UserAlreadyLoggedOut", { displayName: this.displayName }),
);
try {
this.setIsLoading(true);
await removeAllActiveSessionsById(userId);
this.setConnections([]);
await this.fetchData();
toastr.success(t("Successfully logout all sessions"));
toastr.success(
t("Settings:LoggedOutByUser", {
displayName: this.displayName,
}),
);
} catch (error) {
toastr.error(error);
} finally {
@ -569,7 +576,10 @@ class SelectionStore {
const exceptId = idFromSelection || idFromBufferSelection;
if (!exceptId) return toastr.error(t("The user is already logged out"));
if (!exceptId)
return toastr.error(
t("Settings:UserAlreadyLoggedOut", { displayName: this.displayName }),
);
try {
this.setIsLoading(true);
@ -580,7 +590,11 @@ class SelectionStore {
);
this.setConnections(filteredConnections);
await this.fetchData();
toastr.success(t("Successfully logout all sessions"));
toastr.success(
t("Settings:LoggedOutByUserExceptThis", {
displayName: this.displayName,
}),
);
} catch (error) {
toastr.error(error);
} finally {