🌐 Translation of modals and forms to French (120) (#122)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"hello": "Bonjour",
|
||||
"virtual-folder.shared-drive": "Общий Диск",
|
||||
"virtual-folder.my-drive": "Мой Диск",
|
||||
"virtual-folder.trash": "Корзина"
|
||||
"virtual-folder.shared-drive": "Drive Partagé",
|
||||
"virtual-folder.my-drive": "Mon Drive",
|
||||
"virtual-folder.trash": "Corbeille"
|
||||
}
|
||||
@@ -189,6 +189,52 @@
|
||||
"components.locked_features.locked_only_office_popup.text": "Whoops!! Seems like you want to edit the file from Tdrive. You might want to consider upgrading your plan if you want to collaborate around office files. Explore our pricing options and select the best option for your team collaboration needs.",
|
||||
"components.locked_features.locked_drive_popup.title": "You have just reached the drive limit",
|
||||
"components.locked_features.locked_drive_popup.subtitle": "In the free version, you can store only 6GB.",
|
||||
"components.public-link-acess.public_link_acess": "Public link acess",
|
||||
"components.public-link-acess.info_acess_true": "Anyone with this link will have access to this item.",
|
||||
"components.public-link-acess.info_acess_false": "This item is not available by public link.",
|
||||
"components.public-link-acess.info_acess_expired": "Expired",
|
||||
"components.public-link-copied-info" : "Public link copied to clipboard",
|
||||
"components.public-link-copy" : "Copy public link to clip board",
|
||||
"components.public-link-security": "Public link security",
|
||||
"components.public-link-security_password": "Password",
|
||||
"components.public-link-security_password_copied": "Password copied to clipboard",
|
||||
"components.public-link-security_expired": "Expiration",
|
||||
"components.internal-access_access_manage":"General access management",
|
||||
"components.internal-access_inherit_parent":"Inherit parent folder",
|
||||
"components.internal-access_inherit_parent_perm":"Choose to inherit or not the parent folder permissions.",
|
||||
"components.internal-access_company_member":"Every member from the company",
|
||||
"components.internal-access_cannal":"Channel access",
|
||||
"components.internal-access_cannal_info":"channel(s) from Tdrive chat have access to this item.",
|
||||
"components.internal-access_cannal_info_give_back":"You will need to go to Tdrive chat to give back access to this item.",
|
||||
"components.internal-access_specific_rules":"Specific access rules",
|
||||
"components.internal-access_specific_rules_you":"(you)",
|
||||
"components.select-users_search_users":"Search users",
|
||||
"common.access-level_full_acess":"Full access",
|
||||
"common.access-level_read":"Read",
|
||||
"common.access-level_write":"Write",
|
||||
"common.access-level_no_access":"No access",
|
||||
"components.SelectorModalContent_move_to":"Move to",
|
||||
"components.SelectorModalContent_no_items":"No item selected",
|
||||
"components.SelectorModalContent_select":"Selected",
|
||||
"components.SelectorModalContent_files":"files(s)",
|
||||
"compenents.ProprietiesModalContent_rename":"Rename",
|
||||
"compenents.ProprietiesModalContent_name":"Name",
|
||||
"compenents.ProprietiesModalContent_place_holder":"Document or folder name",
|
||||
"compenents.ProprietiesModalContent_update_button":"Update name",
|
||||
"compenents.ConfirmTrashModalContent_move":"Move",
|
||||
"compenents.ConfirmTrashModalContent_to_trash":"to trash",
|
||||
"compenents.ConfirmTrashModalContent_items_to_trash":"items to trash",
|
||||
"compenents.ConfirmTrashModalContent_move_to_trash_desc":"Click 'Move to trash' to move the selected items to the trash folder. You can restore them later from the trash.",
|
||||
"compenents.ConfirmTrashModalContent_move_to_trash":"Move to trash",
|
||||
"compenents.VersionModalContent_version":"Versions of",
|
||||
"compenents.VersionModalContent_version_dec":"Manage your document version here: Download older version of this document or upload a new version now.",
|
||||
"compenents.VersionModalContent_create":"Create version",
|
||||
"compenents.VersionModalContent_donwload":"Download",
|
||||
"hooks.use-drive-actions.unable_load_file":"Unable to load your files.",
|
||||
"hooks.use-drive-actions.unable_create_file":"Unable to create a new file.",
|
||||
"hooks.use-drive-actions.unable_download_file":"Unable to download this files.",
|
||||
"hooks.use-drive-actions.unable_remove_file":"Unable to remove this file.",
|
||||
"hooks.use-drive-actions.unable_update_file":"Unable to update this file.",
|
||||
"general.resume": "Resume",
|
||||
"general.pause": "Pause",
|
||||
"app.state.recoil.hooks.use_current_company_applications.toaster_delete": "Successfully deleted {{$1}} from your company",
|
||||
@@ -211,6 +257,7 @@
|
||||
"molecules.download_banner.download_button": "Download desktop app",
|
||||
"components.side_menu.trash": "Trash",
|
||||
"components.side_menu.home": "Shared Drive",
|
||||
"components.side_menu.shared_with_me": "Shared with me",
|
||||
"components.side_menu.my_drive": "My Drive",
|
||||
"components.side_menu.buttons.upload": "Upload",
|
||||
"components.side_menu.buttons.create": "Create",
|
||||
@@ -239,6 +286,7 @@
|
||||
"components.item_context_menu.download": "Download",
|
||||
"components.item_context_menu.rename": "Rename",
|
||||
"components.item_context_menu.manage_access": "Manage access",
|
||||
"components.item_context_menu.manage_access_to": "Manage access to",
|
||||
"components.item_context_menu.share": "Share",
|
||||
"components.item_context_menu.copy_link": "Copy public link",
|
||||
"components.item_context_menu.copy_link.success": "Public link copied to clipboard",
|
||||
|
||||
@@ -173,6 +173,52 @@
|
||||
"components.locked_features.locked_only_office_popup.text": "Oups !! Vous souhaitez modifier le fichier à partir de Tdrive. Vous voudrez peut-être envisager de mettre à niveau votre plan si vous souhaitez collaborer autour de fichiers bureautiques. Explorez nos options de tarification et sélectionnez la meilleure option pour les besoins de collaboration de votre équipe.",
|
||||
"components.locked_features.locked_drive_popup.title": "Vous venez d'atteindre la limite d'importation",
|
||||
"components.locked_features.locked_drive_popup.subtitle": "Dans la version gratuite, vous ne pouvez stocker que 6 Go.",
|
||||
"components.public-link-acess.public_link_acess": "Lien public d'accès",
|
||||
"components.public-link-acess.info_acess_true": "N'importe qui ayant ce lien aura accès à ce fichier",
|
||||
"components.public-link-acess.info_acess_false": "Ce fichier n'est pas accessible via un lien publique",
|
||||
"components.public-link-acess.info_acess_expired": "Expiré",
|
||||
"components.public-link-copied-info" : "Le lien public a été copié dans le presse-papiers",
|
||||
"components.public-link-copy" : "Copier le lien public dans le presse-papiers",
|
||||
"components.public-link-security": "Sécurité sur le lien public",
|
||||
"components.public-link-security_password": "Mot de passe",
|
||||
"components.public-link-security_password_copied": "Mot de passe copié dans le presse-papiers",
|
||||
"components.public-link-security_expired": "Expiration",
|
||||
"components.internal-access_access_manage":"Propriété générale d'accès",
|
||||
"components.internal-access_inherit_parent":"Hériter du dossier parent",
|
||||
"components.internal-access_inherit_parent_perm":"Hériter des permissions du dossier parent",
|
||||
"components.internal-access_company_member":"Toutes les personnes de l'entreprise",
|
||||
"components.internal-access_cannal":"Cannal d'accès",
|
||||
"components.internal-access_cannal_info":"cannaux depuis Tdrive chat ont accès à ce fichier",
|
||||
"components.internal-access_cannal_info_give_back":"Vous devez aller sur Tdrive chat pour redonner accès à ce fichier",
|
||||
"components.internal-access_specific_rules":"Droit d'accès spécifique",
|
||||
"components.internal-access_specific_rules_you":"(Vous)",
|
||||
"components.select-users_search_users":"Chercher un utilisateur",
|
||||
"common.access-level_full_acess":"Accès Total",
|
||||
"common.access-level_read":"Lecture",
|
||||
"common.access-level_write":"Ecriture",
|
||||
"common.access-level_no_access":"Pas d'accès",
|
||||
"components.SelectorModalContent_move_to":"Déplacer vers",
|
||||
"components.SelectorModalContent_no_items":"Pas de fichier sélectionné",
|
||||
"components.SelectorModalContent_select":"sélectionné(s)",
|
||||
"components.SelectorModalContent_files":"fichier(s)",
|
||||
"compenents.ProprietiesModalContent_rename":"Renommer",
|
||||
"compenents.ProprietiesModalContent_name":"Nom",
|
||||
"compenents.ProprietiesModalContent_place_holder":"Nom du fichier ou du document",
|
||||
"compenents.ProprietiesModalContent_update_button":"Changer le nom",
|
||||
"compenents.ConfirmTrashModalContent_move":"Déplacer",
|
||||
"compenents.ConfirmTrashModalContent_to_trash":"vers la corbeille",
|
||||
"compenents.ConfirmTrashModalContent_items_to_trash":"éléments vers la corbeille",
|
||||
"compenents.ConfirmTrashModalContent_move_to_trash_desc":"Cliquer sur 'Déplacer vers la corbeille' pour déplacer les éléments sélectionnés vers la corbeille. Vous pouvez les restaurer plus tard depuis la corbeille.",
|
||||
"compenents.ConfirmTrashModalContent_move_to_trash":"Déplacer vers la corbeille",
|
||||
"compenents.VersionModalContent_version":"Version de",
|
||||
"compenents.VersionModalContent_version_dec":"Gérer la version de votre document ici : télécharger une ancienne version de votre document ou importer une nouvelle version ici.",
|
||||
"compenents.VersionModalContent_create":"Créer une version",
|
||||
"compenents.VersionModalContent_donwload":"Télécharger",
|
||||
"hooks.use-drive-actions.unable_load_file":"Impossible de charger cet élément",
|
||||
"hooks.use-drive-actions.unable_create_file":"Impossible de créer ce fichier",
|
||||
"hooks.use-drive-actions.unable_download_file":"Impossible de télécharger ce fichier",
|
||||
"hooks.use-drive-actions.unable_remove_file":"Impossible de supprimer ce fichier",
|
||||
"hooks.use-drive-actions.unable_update_file":"Impossible de mettre à jour ce fichier",
|
||||
"general.resume": "Reprendre",
|
||||
"general.pause": "Pause",
|
||||
"app.state.recoil.hooks.use_current_company_applications.toaster_delete": "{{$1}} supprimé avec succès de votre entreprise",
|
||||
@@ -210,6 +256,7 @@
|
||||
"scenes.apps.account.on_console": "Pour modifier les préférences globales de votre compte, cliquez sur Aller à la console.",
|
||||
"components.side_menu.trash": "Poubelle",
|
||||
"components.side_menu.home": "Disque partagé",
|
||||
"components.side_menu.shared_with_me": "Partagé avec moi",
|
||||
"components.side_menu.my_drive": "Mon disque",
|
||||
"components.searchpopup.soon": "Cette fonctionnalité arrive bientôt \uD83D\uDE80",
|
||||
"components.side_menu.buttons.upload": "Télécharger",
|
||||
@@ -239,6 +286,7 @@
|
||||
"components.item_context_menu.download": "Télécharger",
|
||||
"components.item_context_menu.rename": "Renommer",
|
||||
"components.item_context_menu.manage_access": "Gérer l'accès",
|
||||
"components.item_context_menu.manage_access_to": "Gérer l'accès à",
|
||||
"components.item_context_menu.share": "Partager",
|
||||
"components.item_context_menu.copy_link": "Copier le lien public",
|
||||
"components.item_context_menu.copy_link.success": "Lien public copié dans le presse-papiers",
|
||||
|
||||
@@ -173,6 +173,52 @@
|
||||
"components.locked_features.locked_guests_popup.learn_more_button": "Узнать больше",
|
||||
"components.locked_features.locked_guests_popup.or": "Или",
|
||||
"scenes.client.main_view.main_header.search_input": "Поиск",
|
||||
"components.public-link-acess.public_link_acess": "Public link acess",
|
||||
"components.public-link-acess.info_acess_true": "Anyone with this link will have access to this item.",
|
||||
"components.public-link-acess.info_acess_false": "This item is not available by public link.",
|
||||
"components.public-link-acess.info_acess_expired": "Expired",
|
||||
"components.public-link-copied-info" : "Public link copied to clipboard",
|
||||
"components.public-link-copy" : "Copy public link to clip board",
|
||||
"components.public-link-security": "Public link security",
|
||||
"components.public-link-security_password": "Password",
|
||||
"components.public-link-security_password_copied": "Password copied to clipboard",
|
||||
"components.public-link-security_expired": "Expiration",
|
||||
"components.internal-access_access_manage":"General access management",
|
||||
"components.internal-access_inherit_parent":"Inherit parent folder",
|
||||
"components.internal-access_inherit_parent_perm":"Choose to inherit or not the parent folder permissions.",
|
||||
"components.internal-access_company_member":"Every member from the company",
|
||||
"components.internal-access_cannal":"Channel access",
|
||||
"components.internal-access_cannal_info":"channel(s) from Tdrive chat have access to this item.",
|
||||
"components.internal-access_cannal_info_give_back":"You will need to go to Tdrive chat to give back access to this item.",
|
||||
"components.internal-access_specific_rules":"Specific access rules",
|
||||
"components.internal-access_specific_rules_you":"(you)",
|
||||
"components.select-users_search_users":"Search users",
|
||||
"common.access-level_full_acess":"Full access",
|
||||
"common.access-level_read":"Read",
|
||||
"common.access-level_write":"Write",
|
||||
"common.access-level_no_access":"No access",
|
||||
"components.SelectorModalContent_move_to":"Move to",
|
||||
"components.SelectorModalContent_no_items":"No item selected",
|
||||
"components.SelectorModalContent_select":"Selected",
|
||||
"components.SelectorModalContent_files":"files(s)",
|
||||
"compenents.ProprietiesModalContent_rename":"Rename",
|
||||
"compenents.ProprietiesModalContent_name":"Name",
|
||||
"compenents.ProprietiesModalContent_place_holder":"Document or folder name",
|
||||
"compenents.ProprietiesModalContent_update_button":"Update name",
|
||||
"compenents.ConfirmTrashModalContent_move":"Move",
|
||||
"compenents.ConfirmTrashModalContent_to_trash":"to trash",
|
||||
"compenents.ConfirmTrashModalContent_items_to_trash":"items to trash",
|
||||
"compenents.ConfirmTrashModalContent_move_to_trash_desc":"Click 'Move to trash' to move the selected items to the trash folder. You can restore them later from the trash.",
|
||||
"compenents.ConfirmTrashModalContent_move_to_trash":"Move to trash",
|
||||
"compenents.VersionModalContent_version":"Versions of",
|
||||
"compenents.VersionModalContent_version_dec":"Manage your document version here: Download older version of this document or upload a new version now.",
|
||||
"compenents.VersionModalContent_create":"Create version",
|
||||
"compenents.VersionModalContent_donwload":"Download",
|
||||
"hooks.use-drive-actions.unable_load_file":"Unable to load your files.",
|
||||
"hooks.use-drive-actions.unable_create_file":"Unable to create a new file.",
|
||||
"hooks.use-drive-actions.unable_download_file":"Unable to download this files.",
|
||||
"hooks.use-drive-actions.unable_remove_file":"Unable to remove this file.",
|
||||
"hooks.use-drive-actions.unable_update_file":"Unable to update this file.",
|
||||
"general.resume": "Продолжить",
|
||||
"general.pause": "Пауза",
|
||||
"general.user.role.company.member": "Участник",
|
||||
@@ -211,6 +257,7 @@
|
||||
"general.user.deactivated": "Пользователь больше не состоит в этой компании",
|
||||
"components.side_menu.trash": "Корзина",
|
||||
"components.side_menu.home": "Общий диск",
|
||||
"components.side_menu.shared_with_me": "Shared with me",
|
||||
"components.side_menu.my_drive": "Мой диск",
|
||||
"components.side_menu.buttons.upload": "Загрузить",
|
||||
"components.side_menu.buttons.create": "Создать",
|
||||
@@ -239,6 +286,7 @@
|
||||
"components.item_context_menu.download": "Скачать",
|
||||
"components.item_context_menu.rename": "Переименовать",
|
||||
"components.item_context_menu.manage_access": "Управлять доступом",
|
||||
"components.item_context_menu.manage_access_to": "Управлять доступом",
|
||||
"components.item_context_menu.share": "Поделиться",
|
||||
"components.item_context_menu.copy_link": "Скопировать публичную ссылку",
|
||||
"components.item_context_menu.copy_link.success": "Ссылка скопирована в буфер обмена",
|
||||
|
||||
@@ -6,6 +6,8 @@ import { DriveApiClient } from '../api-client/api-client';
|
||||
import { DriveItemAtom, DriveItemChildrenAtom } from '../state/store';
|
||||
import { BrowseFilter, DriveItem, DriveItemVersion } from '../types';
|
||||
import { SharedWithMeFilterState } from '../state/shared-with-me-filter';
|
||||
import Languages from "features/global/services/languages-service";
|
||||
|
||||
/**
|
||||
* Returns the children of a drive item
|
||||
* @param id
|
||||
@@ -36,7 +38,7 @@ export const useDriveActions = () => {
|
||||
}
|
||||
return details;
|
||||
} catch (e) {
|
||||
ToasterService.error('Unable to load your files.');
|
||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_load_file'));
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -51,7 +53,7 @@ export const useDriveActions = () => {
|
||||
driveFile = await DriveApiClient.create(companyId, { item, version });
|
||||
await refresh(item.parent_id!);
|
||||
} catch (e) {
|
||||
ToasterService.error('Unable to create a new file.');
|
||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_create_file'));
|
||||
}
|
||||
return driveFile;
|
||||
},
|
||||
@@ -64,7 +66,7 @@ export const useDriveActions = () => {
|
||||
const url = await DriveApiClient.getDownloadUrl(companyId, id, versionId);
|
||||
(window as any).open(url, '_blank').focus();
|
||||
} catch (e) {
|
||||
ToasterService.error('Unable to download this file.');
|
||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_download_file'));
|
||||
}
|
||||
},
|
||||
[companyId],
|
||||
@@ -76,7 +78,7 @@ export const useDriveActions = () => {
|
||||
const url = await DriveApiClient.getDownloadZipUrl(companyId, ids);
|
||||
(window as any).open(url, '_blank').focus();
|
||||
} catch (e) {
|
||||
ToasterService.error('Unable to download this files.');
|
||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_download_file'));
|
||||
}
|
||||
},
|
||||
[companyId],
|
||||
@@ -88,7 +90,7 @@ export const useDriveActions = () => {
|
||||
await DriveApiClient.remove(companyId, id);
|
||||
await refresh(parentId || '');
|
||||
} catch (e) {
|
||||
ToasterService.error('Unable to remove this file.');
|
||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_remove_file'));
|
||||
}
|
||||
},
|
||||
[refresh],
|
||||
@@ -102,7 +104,7 @@ export const useDriveActions = () => {
|
||||
await refresh(parentId || '');
|
||||
if (update?.parent_id !== parentId) await refresh(update?.parent_id || '');
|
||||
} catch (e) {
|
||||
ToasterService.error('Unable to update this file.');
|
||||
ToasterService.error(Languages.t('hooks.use-drive-actions.unable_update_file'));
|
||||
}
|
||||
},
|
||||
[refresh],
|
||||
|
||||
@@ -10,6 +10,7 @@ import { Info } from '@atoms/text';
|
||||
import Languages from '@features/global/services/languages-service';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
||||
export default (props: {
|
||||
className?: string;
|
||||
onChange: (users: UserType[]) => void;
|
||||
@@ -38,7 +39,7 @@ export default (props: {
|
||||
}
|
||||
}, 200);
|
||||
}}
|
||||
placeholder="Search users"
|
||||
placeholder={Languages.t('components.select-users_search_users')}
|
||||
className={props.className + ' ' + className + ' w-full'}
|
||||
theme="plain"
|
||||
onChange={e => search(e.target.value)}
|
||||
|
||||
@@ -7,6 +7,8 @@ import { DriveItemSelectedList } from '@features/drive/state/store';
|
||||
import { DriveItem } from '@features/drive/types';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { atom, useRecoilState } from 'recoil';
|
||||
import Languages from '@features/global/services/languages-service';
|
||||
|
||||
|
||||
export type ConfirmTrashModalType = {
|
||||
open: boolean;
|
||||
@@ -45,12 +47,11 @@ const ConfirmTrashModalContent = ({ items }: { items: DriveItem[] }) => {
|
||||
return (
|
||||
<ModalContent
|
||||
title={
|
||||
items.length === 1 ? `Move ${item?.name} to trash` : `Move ${items.length} items to trash`
|
||||
items.length === 1 ? Languages.t('compenents.ConfirmTrashModalContent_move') + " '" + item?.name + "' " + Languages.t('compenents.ConfirmTrashModalContent_to_trash') : Languages.t('compenents.ConfirmTrashModalContent_move') + " " + items.length + " " + Languages.t('compenents.ConfirmTrashModalContent_items_to_trash')
|
||||
}
|
||||
>
|
||||
<Base className="block my-3">
|
||||
Click 'Move to trash' to move the selected items to the trash folder. You can restore them
|
||||
later from the trash.
|
||||
{Languages.t('compenents.ConfirmTrashModalContent_move_to_trash_desc')}
|
||||
</Base>
|
||||
<br />
|
||||
<Button
|
||||
@@ -65,7 +66,7 @@ const ConfirmTrashModalContent = ({ items }: { items: DriveItem[] }) => {
|
||||
setState({ ...state, open: false });
|
||||
}}
|
||||
>
|
||||
Move to trash
|
||||
{Languages.t('compenents.ConfirmTrashModalContent_move_to_trash')}
|
||||
</Button>
|
||||
</ModalContent>
|
||||
);
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useDriveActions } from '@features/drive/hooks/use-drive-actions';
|
||||
import { useDriveItem } from '@features/drive/hooks/use-drive-item';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { atom, useRecoilState } from 'recoil';
|
||||
import Languages from '@features/global/services/languages-service';
|
||||
|
||||
export type PropertiesModalType = {
|
||||
open: boolean;
|
||||
@@ -47,15 +48,15 @@ const PropertiesModalContent = ({ id, onClose }: { id: string; onClose: () => vo
|
||||
}, [item?.name]);
|
||||
|
||||
return (
|
||||
<ModalContent title={'Rename ' + item?.name}>
|
||||
<ModalContent title={Languages.t('compenents.ProprietiesModalContent_rename') + " " + item?.name}>
|
||||
<InputLabel
|
||||
className="mt-4"
|
||||
label={'Name'}
|
||||
label={Languages.t('compenents.ProprietiesModalContent_name')}
|
||||
input={
|
||||
<Input
|
||||
value={name}
|
||||
onChange={e => setName(e.target.value)}
|
||||
placeholder="Document or folder name"
|
||||
placeholder={Languages.t('compenents.ProprietiesModalContent_place_holder')}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
@@ -79,7 +80,7 @@ const PropertiesModalContent = ({ id, onClose }: { id: string; onClose: () => vo
|
||||
setLoading(false);
|
||||
}}
|
||||
>
|
||||
Update name
|
||||
{Languages.t('compenents.ProprietiesModalContent_update_button')}
|
||||
</Button>
|
||||
</ModalContent>
|
||||
);
|
||||
|
||||
@@ -7,6 +7,8 @@ import { DriveItem } from '@features/drive/types';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { atom, useRecoilState } from 'recoil';
|
||||
import { PathRender } from '../../header-path';
|
||||
import Languages from '@features/global/services/languages-service';
|
||||
|
||||
|
||||
export type SelectorModalType = {
|
||||
open: boolean;
|
||||
@@ -134,13 +136,13 @@ const SelectorModalContent = () => {
|
||||
}}
|
||||
>
|
||||
{selected.length === 0 ? (
|
||||
<>No item selected</>
|
||||
<>{Languages.t('components.SelectorModalContent_no_items')}</>
|
||||
) : state.mode === 'move' ? (
|
||||
<>Move to '{selected[0]?.name}'</>
|
||||
<>{Languages.t('components.SelectorModalContent_move_to')} '{selected[0]?.name}'</>
|
||||
) : selected.length > 1 ? (
|
||||
<>Select {selected.length} files</>
|
||||
<> {selected.length} {Languages.t('components.SelectorModalContent_select')} {Languages.t('components.SelectorModalContent_files')}</>
|
||||
) : (
|
||||
<>Select '{selected[0]?.name}'</>
|
||||
<>{Languages.t('components.SelectorModalContent_select')} '{selected[0]?.name}'</>
|
||||
)}
|
||||
</Button>
|
||||
</ModalContent>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Select from '@atoms/input/input-select';
|
||||
import { DriveFileAccessLevel } from '@features/drive/types';
|
||||
import Languages from 'features/global/services/languages-service';
|
||||
|
||||
export const AccessLevel = ({
|
||||
disabled,
|
||||
@@ -27,10 +28,10 @@ export const AccessLevel = ({
|
||||
value={level || 'none'}
|
||||
onChange={e => onChange(e.target.value as DriveFileAccessLevel & 'remove')}
|
||||
>
|
||||
{!hiddenLevels?.includes('manage') && <option value={'manage'}>Full access</option>}
|
||||
{!hiddenLevels?.includes('write') && <option value={'write'}>Write</option>}
|
||||
{!hiddenLevels?.includes('read') && <option value={'read'}>Read</option>}
|
||||
{!hiddenLevels?.includes('none') && <option value={'none'}>No access</option>}
|
||||
{!hiddenLevels?.includes('manage') && <option value={'manage'}>{Languages.t('common.access-level_full_acess')}</option>}
|
||||
{!hiddenLevels?.includes('write') && <option value={'write'}>{Languages.t('common.access-level_write')}</option>}
|
||||
{!hiddenLevels?.includes('read') && <option value={'read'}>{Languages.t('common.access-level_read')}</option>}
|
||||
{!hiddenLevels?.includes('none') && <option value={'none'}>{Languages.t('common.access-level_no_access')}</option>}
|
||||
{canRemove && <option value={'remove'}>Remove</option>}
|
||||
</Select>
|
||||
);
|
||||
|
||||
@@ -4,6 +4,8 @@ import { useEffect } from 'react';
|
||||
import { atom, useRecoilState } from 'recoil';
|
||||
import { InternalAccessManager } from './internal-access';
|
||||
import { PublicLinkManager } from './public-link-access';
|
||||
import Languages from 'features/global/services/languages-service';
|
||||
|
||||
|
||||
export type AccessModalType = {
|
||||
open: boolean;
|
||||
@@ -38,7 +40,7 @@ const AccessModalContent = ({ id }: { id: string }) => {
|
||||
console.log(item?.access_info?.public?.level, 'item');
|
||||
|
||||
return (
|
||||
<ModalContent title={'Manage access to ' + item?.name}>
|
||||
<ModalContent title={Languages.t('components.item_context_menu.manage_access_to') + " " + item?.name}>
|
||||
<PublicLinkManager id={id} disabled={access !== 'manage'} />
|
||||
<InternalAccessManager id={id} disabled={access !== 'manage'} />
|
||||
</ModalContent>
|
||||
|
||||
+11
-9
@@ -11,6 +11,8 @@ import { UserType } from '@features/users/types/user';
|
||||
import { useState } from 'react';
|
||||
import SelectUsers from '../../components/select-users';
|
||||
import { AccessLevel } from './common';
|
||||
import Languages from 'features/global/services/languages-service';
|
||||
|
||||
|
||||
export const InternalAccessManager = ({ id, disabled }: { id: string; disabled: boolean }) => {
|
||||
const { item, loading, update } = useDriveItem(id);
|
||||
@@ -26,15 +28,15 @@ export const InternalAccessManager = ({ id, disabled }: { id: string; disabled:
|
||||
|
||||
return (
|
||||
<>
|
||||
<Base className="block mt-4 mb-1">General access management</Base>
|
||||
<Base className="block mt-4 mb-1">{Languages.t('components.internal-access_access_manage')}</Base>
|
||||
|
||||
<div className="rounded-md border overflow-hidden">
|
||||
{folderEntity && (
|
||||
<div className="p-4 border-b flex flex-row items-center justify-center">
|
||||
<div className="grow">
|
||||
<Base>Inherit parent folder</Base>
|
||||
<Base>{Languages.t('components.internal-access_inherit_parent')}</Base>
|
||||
<br />
|
||||
<Info>Choose to inherit or not the parent folder permissions.</Info>
|
||||
<Info>{Languages.t('components.internal-access_inherit_parent_perm')}</Info>
|
||||
</div>
|
||||
<div className="shrink-0 ml-2">
|
||||
<Checkbox
|
||||
@@ -59,7 +61,7 @@ export const InternalAccessManager = ({ id, disabled }: { id: string; disabled:
|
||||
{companyEntity && folderEntity.level === 'none' && (
|
||||
<div className="p-4 border-b flex flex-row items-center justify-center">
|
||||
<div className="grow">
|
||||
<Base>Every member from the company</Base>
|
||||
<Base>{Languages.t('components.internal-access_company_member')}</Base>
|
||||
</div>
|
||||
<div className="shrink-0 ml-2">
|
||||
<AccessLevel
|
||||
@@ -84,10 +86,10 @@ export const InternalAccessManager = ({ id, disabled }: { id: string; disabled:
|
||||
{channelEntities.length > 0 && (
|
||||
<div className="p-4 border-b flex flex-row items-center justify-center">
|
||||
<div className="grow">
|
||||
<Base>Channel access</Base>
|
||||
<Base>{Languages.t('components.internal-access_cannal')}</Base>
|
||||
<br />
|
||||
<Info>
|
||||
{channelEntities.length} channel(s) from Tdrive chat have access to this item.
|
||||
{channelEntities.length} {Languages.t('components.internal-access_cannal_info')}
|
||||
</Info>
|
||||
</div>
|
||||
<div className="shrink-0 ml-2">
|
||||
@@ -112,7 +114,7 @@ export const InternalAccessManager = ({ id, disabled }: { id: string; disabled:
|
||||
//Do nothing
|
||||
},
|
||||
{
|
||||
text: 'You will need to go to Tdrive chat to give back access to this item.',
|
||||
text: Languages.t('components.internal-access_cannal_info_give_back'),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
@@ -139,7 +141,7 @@ export const InternalAccessManager = ({ id, disabled }: { id: string; disabled:
|
||||
<div className="-mb-px" />
|
||||
</div>
|
||||
|
||||
<Base className="block mt-4 mb-1">Specific access rules</Base>
|
||||
<Base className="block mt-4 mb-1">{Languages.t('components.internal-access_specific_rules')}</Base>
|
||||
<div className="rounded-md border mt-2">
|
||||
<UserAccessSelector id={id} disabled={disabled} />
|
||||
|
||||
@@ -219,7 +221,7 @@ const UserAccessLevel = ({
|
||||
</div>
|
||||
<div className="grow ml-2">
|
||||
<Base>{!!user && currentUserService.getFullName(user)}</Base>{' '}
|
||||
{user?.id === currentUser?.id && <Info>(you)</Info>}
|
||||
{user?.id === currentUser?.id && <Info>{Languages.t('components.internal-access_specific_rules_you')}</Info>}
|
||||
</div>
|
||||
<div className="shrink-0 ml-2">
|
||||
<AccessLevel
|
||||
|
||||
+13
-12
@@ -8,6 +8,7 @@ import { Input } from 'app/atoms/input/input-text';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { AccessLevel } from './common';
|
||||
import moment from 'moment';
|
||||
import Languages from 'features/global/services/languages-service';
|
||||
|
||||
export const PublicLinkManager = ({ id, disabled }: { id: string; disabled?: boolean }) => {
|
||||
const { item, loading, update } = useDriveItem(id);
|
||||
@@ -15,15 +16,15 @@ export const PublicLinkManager = ({ id, disabled }: { id: string; disabled?: boo
|
||||
|
||||
return (
|
||||
<>
|
||||
<Base className="block mt-2 mb-1">Public link access</Base>
|
||||
<Base className="block mt-2 mb-1">{Languages.t('components.public-link-acess.public_link_acess')}</Base>
|
||||
<div className="p-4 rounded-md border">
|
||||
<div className="flex flex-row overflow-hidden w-full">
|
||||
<div className="grow">
|
||||
{item?.access_info?.public?.level !== 'none' && (
|
||||
<Info>Anyone with this link will have access to this item.</Info>
|
||||
<Info>{Languages.t('components.public-link-acess.info_acess_true')}</Info>
|
||||
)}
|
||||
{item?.access_info?.public?.level === 'none' && (
|
||||
<Info>This item is not available by public link.</Info>
|
||||
<Info>{Languages.t('components.public-link-acess.info_acess_false')}</Info>
|
||||
)}
|
||||
{item?.access_info?.public?.level !== 'none' && (
|
||||
<>
|
||||
@@ -32,10 +33,10 @@ export const PublicLinkManager = ({ id, disabled }: { id: string; disabled?: boo
|
||||
className="inline-block"
|
||||
onClick={() => {
|
||||
copyToClipboard(publicLink);
|
||||
ToasterService.success('Public link copied to clipboard');
|
||||
ToasterService.success(Languages.t('components.public-link-copied-info'));
|
||||
}}
|
||||
>
|
||||
Copy public link to clip board
|
||||
{Languages.t('components.public-link-copy')}
|
||||
</A>
|
||||
</>
|
||||
)}
|
||||
@@ -116,7 +117,7 @@ const PublicLinkOptions = (props: {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Subtitle className="block mt-4 mb-1">Public link security</Subtitle>
|
||||
<Subtitle className="block mt-4 mb-1">{Languages.t('components.public-link-security')}</Subtitle>
|
||||
<div className="flex items-center justify-center w-full h-10">
|
||||
<Checkbox
|
||||
disabled={props.disabled}
|
||||
@@ -125,7 +126,7 @@ const PublicLinkOptions = (props: {
|
||||
if (!password && s) setPassword(Math.random().toString(36).slice(-8));
|
||||
}}
|
||||
value={!!usePassword}
|
||||
label="Password"
|
||||
label={Languages.t('components.public-link-security_password')}
|
||||
/>
|
||||
<div className="grow mr-2" />
|
||||
{!!usePassword && (
|
||||
@@ -142,14 +143,14 @@ const PublicLinkOptions = (props: {
|
||||
e.preventDefault();
|
||||
if (password) {
|
||||
copyToClipboard(password);
|
||||
ToasterService.success('Password copied to clipboard');
|
||||
ToasterService.success(Languages.t('components.public-link-security_password_copied'));
|
||||
}
|
||||
}
|
||||
}}
|
||||
// saves and copies password
|
||||
onClick={() => {
|
||||
if (password) copyToClipboard(password);
|
||||
ToasterService.success('Password copied to clipboard');
|
||||
ToasterService.success(Languages.t('components.public-link-security_password_copied'));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -162,13 +163,13 @@ const PublicLinkOptions = (props: {
|
||||
if (!expiration && s) setExpiration(Date.now() + 1000 * 60 * 60 * 24 * 7);
|
||||
}}
|
||||
value={!!useExpiration}
|
||||
label="Expiration"
|
||||
label={Languages.t('components.public-link-security_expired')}
|
||||
/>
|
||||
{useExpiration && (expiration || 0) < Date.now() && (
|
||||
<Info className="ml-2 text-red-500">(Expired)</Info>
|
||||
<Info className="ml-2 text-red-500">({Languages.t('components.public-link-security_expired')})</Info>
|
||||
)}
|
||||
{useExpiration && (expiration || 0) > Date.now() && (
|
||||
<Info className="ml-2">({moment(expiration).fromNow(true)})</Info>
|
||||
<Info className="ml-2">({moment(expiration).fromNow(true).toLocaleString()})</Info>
|
||||
)}{' '}
|
||||
<div className="grow mr-2" />
|
||||
{!!useExpiration && (
|
||||
|
||||
@@ -9,6 +9,8 @@ import { formatDate } from '@features/global/utils/format-date';
|
||||
import _ from 'lodash';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { atom, useRecoilState } from 'recoil';
|
||||
import Languages from '@features/global/services/languages-service';
|
||||
|
||||
|
||||
export type VersionsModalType = {
|
||||
open: boolean;
|
||||
@@ -47,7 +49,7 @@ const VersionModalContent = ({ id }: { id: string }) => {
|
||||
if (!item?.last_version_cache) return <></>;
|
||||
|
||||
return (
|
||||
<ModalContent title={'Versions of ' + item?.name}>
|
||||
<ModalContent title={Languages.t('compenents.VersionModalContent_version') + " " + item?.name}>
|
||||
<UploadZone
|
||||
overClassName={'!m-4'}
|
||||
disableClick
|
||||
@@ -68,8 +70,7 @@ const VersionModalContent = ({ id }: { id: string }) => {
|
||||
<div className="flex flex-row">
|
||||
<div className="grow flex items-center">
|
||||
<Base>
|
||||
Manage your document version here: Download older version of this document or
|
||||
upload a new version now.
|
||||
{Languages.t('compenents.VersionModalContent_version_dec')}
|
||||
</Base>
|
||||
</div>
|
||||
<div className="shrink-0 ml-4 flex items-center">
|
||||
@@ -78,7 +79,7 @@ const VersionModalContent = ({ id }: { id: string }) => {
|
||||
onClick={() => uploadZoneRef.current?.open()}
|
||||
loading={loading}
|
||||
>
|
||||
Create version
|
||||
{Languages.t('compenents.VersionModalContent_create')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -108,7 +109,7 @@ const VersionModalContent = ({ id }: { id: string }) => {
|
||||
</div>
|
||||
<div className="shrink-0 ml-4">
|
||||
<Button theme="outline" onClick={() => download(id, version.id)}>
|
||||
Download
|
||||
{Languages.t('compenents.VersionModalContent_donwload')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -84,7 +84,7 @@ export default () => {
|
||||
theme="white"
|
||||
className={'w-full mb-1 ' + (folderType === 'shared' && viewId == ''? activeClass : '')}
|
||||
>
|
||||
<UserGroupIcon className="w-5 h-5 mr-4" /> Shared with me
|
||||
<UserGroupIcon className="w-5 h-5 mr-4" /> {Languages.t('components.side_menu.shared_with_me')}
|
||||
</Button>
|
||||
{false && (
|
||||
<>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user