💬(frontend) change literal occurances of pad to document
- change urls from /pads to /docs - change part of the litteral occurances of pad to document
This commit is contained in:
@@ -8,12 +8,8 @@ server {
|
||||
try_files $uri index.html $uri/ =404;
|
||||
}
|
||||
|
||||
location /pads/ {
|
||||
error_page 404 /pads/[id]/;
|
||||
}
|
||||
|
||||
location /templates/ {
|
||||
error_page 404 /templates/[id]/;
|
||||
location /docs/ {
|
||||
error_page 404 /docs/[id]/;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
@@ -11,7 +11,7 @@ describe('Page', () => {
|
||||
|
||||
expect(
|
||||
screen.getByRole('button', {
|
||||
name: /Create a new pad/i,
|
||||
name: /Create a new document/i,
|
||||
}),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ export const CardCreatePad = () => {
|
||||
error,
|
||||
} = useCreatePad({
|
||||
onSuccess: (pad) => {
|
||||
router.push(`/pads/${pad.id}`);
|
||||
router.push(`/docs/${pad.id}`);
|
||||
},
|
||||
});
|
||||
const [padName, setPadName] = useState('');
|
||||
@@ -36,7 +36,7 @@ export const CardCreatePad = () => {
|
||||
$width="100%"
|
||||
$maxWidth="24rem"
|
||||
$minWidth="22rem"
|
||||
aria-label={t('Create new pad card')}
|
||||
aria-label={t('Create new document card')}
|
||||
>
|
||||
<Box $gap="1rem">
|
||||
<Box $align="center">
|
||||
@@ -46,11 +46,11 @@ export const CardCreatePad = () => {
|
||||
aria-label={t('icon group')}
|
||||
/>
|
||||
<Text as="h3" $textAlign="center">
|
||||
{t('Name the pad')}
|
||||
{t('Name the document')}
|
||||
</Text>
|
||||
</Box>
|
||||
<InputPadName
|
||||
label={t('Pad name')}
|
||||
label={t('Document name')}
|
||||
{...{ error, isError, isPending, setPadName }}
|
||||
/>
|
||||
<Switch
|
||||
@@ -67,7 +67,7 @@ export const CardCreatePad = () => {
|
||||
onClick={() => createPad({ title: padName, is_public: padPublic })}
|
||||
disabled={!padName}
|
||||
>
|
||||
{t('Create the pad')}
|
||||
{t('Create the document')}
|
||||
</Button>
|
||||
</Box>
|
||||
</Card>
|
||||
|
||||
@@ -99,7 +99,7 @@ export const ModalUpdatePad = ({ onClose, pad }: ModalUpdatePadProps) => {
|
||||
|
||||
<Box $gap="1rem">
|
||||
<InputPadName
|
||||
label={t('Pad name')}
|
||||
label={t('Document name')}
|
||||
defaultValue={title}
|
||||
{...{ error, isError, isPending, setPadName: setTitle }}
|
||||
/>
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('PanelPads', () => {
|
||||
|
||||
expect(
|
||||
await screen.findByText(
|
||||
'Create your first pad by clicking on the "Create a new pad" button.',
|
||||
'Create your first document by clicking on the "Create a new document" button.',
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
@@ -126,7 +126,7 @@ describe('PanelPads', () => {
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders with pad panel open', async () => {
|
||||
it('renders with doc panel open', async () => {
|
||||
fetchMock.mock(`end:/api/documents/?page=1&ordering=-created_at`, {
|
||||
count: 1,
|
||||
results: [],
|
||||
@@ -135,13 +135,13 @@ describe('PanelPads', () => {
|
||||
render(<Panel />, { wrapper: AppWrapper });
|
||||
|
||||
expect(
|
||||
screen.getByRole('button', { name: 'Close the pads panel' }),
|
||||
screen.getByRole('button', { name: 'Close the documents panel' }),
|
||||
).toBeVisible();
|
||||
|
||||
expect(await screen.findByText('Documents')).toBeVisible();
|
||||
});
|
||||
|
||||
it('closes and opens the pad panel', async () => {
|
||||
it('closes and opens the doc panel', async () => {
|
||||
fetchMock.mock(`end:/api/documents/?page=1&ordering=-created_at`, {
|
||||
count: 1,
|
||||
results: [],
|
||||
@@ -153,7 +153,7 @@ describe('PanelPads', () => {
|
||||
|
||||
await userEvent.click(
|
||||
screen.getByRole('button', {
|
||||
name: 'Close the pads panel',
|
||||
name: 'Close the documents panel',
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -161,7 +161,7 @@ describe('PanelPads', () => {
|
||||
|
||||
await userEvent.click(
|
||||
screen.getByRole('button', {
|
||||
name: 'Open the pads panel',
|
||||
name: 'Open the documents panel',
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ export const PadItem = ({ pad }: PadItemProps) => {
|
||||
${isActive ? activeStyle : hoverStyle}
|
||||
`}
|
||||
>
|
||||
<StyledLink className="p-s pt-t pb-t" href={`/pads/${pad.id}`}>
|
||||
<StyledLink className="p-s pt-t pb-t" href={`/docs/${pad.id}`}>
|
||||
<Box $align="center" $direction="row" $gap="0.5rem">
|
||||
{hasMembers ? (
|
||||
<IconGroup
|
||||
|
||||
@@ -50,7 +50,7 @@ const PadListState = ({ isLoading, isError, pads }: PanelTeamsStateProps) => {
|
||||
</Text>
|
||||
<Text as="p" $theme="greyscale" $variation="500">
|
||||
{t(
|
||||
'Create your first pad by clicking on the "Create a new pad" button.',
|
||||
'Create your first document by clicking on the "Create a new document" button.',
|
||||
)}
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
@@ -32,13 +32,15 @@ export const Panel = () => {
|
||||
transition: ${transition};
|
||||
`}
|
||||
$height="inherit"
|
||||
aria-label="Pads panel"
|
||||
aria-label="Documents panel"
|
||||
{...closedOverridingStyles}
|
||||
>
|
||||
<BoxButton
|
||||
className="material-icons"
|
||||
aria-label={
|
||||
isOpen ? t('Close the pads panel') : t('Open the pads panel')
|
||||
isOpen
|
||||
? t('Close the documents panel')
|
||||
: t('Open the documents panel')
|
||||
}
|
||||
$background="white"
|
||||
$color={colorsTokens()['primary-600']}
|
||||
|
||||
@@ -33,22 +33,26 @@ export const PanelActions = () => {
|
||||
<BoxButton
|
||||
aria-label={
|
||||
isSortAsc
|
||||
? t('Sort the pads by creation date descendent')
|
||||
: t('Sort the pads by creation date ascendent')
|
||||
? t('Sort the documents by creation date descendent')
|
||||
: t('Sort the documents by creation date ascendent')
|
||||
}
|
||||
onClick={changeOrdering}
|
||||
$radius="100%"
|
||||
$background={isSortAsc ? colorsTokens()['primary-200'] : 'transparent'}
|
||||
$color={colorsTokens()['primary-600']}
|
||||
>
|
||||
<IconSort width={30} height={30} aria-label={t('Sort pads icon')} />
|
||||
<IconSort
|
||||
width={30}
|
||||
height={30}
|
||||
aria-label={t('Sort documents icon')}
|
||||
/>
|
||||
</BoxButton>
|
||||
<StyledLink href="/pads/create">
|
||||
<StyledLink href="/docs/create">
|
||||
<BoxButton
|
||||
aria-label={t('Add a pad')}
|
||||
aria-label={t('Add a document')}
|
||||
$color={colorsTokens()['primary-600']}
|
||||
>
|
||||
<IconAdd width={30} height={30} aria-label={t('Add pad icon')} />
|
||||
<IconAdd width={30} height={30} aria-label={t('Add document icon')} />
|
||||
</BoxButton>
|
||||
</StyledLink>
|
||||
</Box>
|
||||
|
||||
@@ -3,56 +3,66 @@
|
||||
"fr": {
|
||||
"translation": {
|
||||
"0 group to display.": "0 groupe à afficher.",
|
||||
"Add a pad": "Ajouter un pad",
|
||||
"Add a template": "Ajouter un template",
|
||||
"Add pad icon": "Icône ajout de pad",
|
||||
"Add template icon": "Icône ajout de template",
|
||||
"Accessibility": "Accessibilité",
|
||||
"Add a document": "Ajouter un document",
|
||||
"Add document icon": "Icône ajouter un document",
|
||||
"Are you sure you want to delete the document \"{{title}}\"?": "Êtes-vous sûr de vouloir supprimer le document \"{{title}} \" ?",
|
||||
"Back to home page": "Retour à l'accueil",
|
||||
"Cancel": "Annuler",
|
||||
"Close the pads panel": "Fermer le panneau des pads",
|
||||
"Close the templates panel": "Fermer le panneau des templates",
|
||||
"Create new pad card": "Créer une nouvelle carte pad",
|
||||
"Create new template card": "Carte créer un nouveau template",
|
||||
"Create a new pad": "Créer un nouveau pad",
|
||||
"Create the pad": "Créer le pad",
|
||||
"Create the template": "Créer le template",
|
||||
"Create your first pad by clicking on the \"Create a new pad\" button.": "Créez votre premier pad en cliquant sur le bouton \"Créer un nouveau pad\".",
|
||||
"Create your first template by clicking on the \"Create a new template\" button.": "Créez votre premier template en cliquant sur le bouton \"Créer un nouveau template\".",
|
||||
"Close the docs panel": "Fermer le panneau des docs",
|
||||
"Close the modal": "Fermer la modale",
|
||||
"Coming soon ...": "Coming soon ...",
|
||||
"Confirm deletion": "Confirmer la suppression",
|
||||
"Content modal to delete document": "Contenu modal pour supprimer le document",
|
||||
"Content modal to generate a PDF": "Contenu modal pour générer un PDF",
|
||||
"Content modal to update the document": "Contenu modal pour mettre à jour le groupe",
|
||||
"Create a new document": "Créer un nouveau document",
|
||||
"Create new document card": "Carte créer un nouveau groupe",
|
||||
"Create the document": "Créer le document",
|
||||
"Create your first document by clicking on the \"Create a new document\" button.": "Créez votre premier document en cliquant sur le bouton \"Créer un nouveau document\".",
|
||||
"Delete document": "Supprimer le document",
|
||||
"Deleting the document \"{{title}}\"": "Suppression du document \"{{title}}\"",
|
||||
"Docs": "Docs",
|
||||
"Docs Description": "Description de Docs",
|
||||
"Docs Logo": "Logo Docs",
|
||||
"Document icon": "Icône du document",
|
||||
"Document name": "Nom du document",
|
||||
"Documents": "Documents",
|
||||
"Download": "Télécharger",
|
||||
"Empty pads icon": "Icône des pads vides",
|
||||
"Empty templates icon": "Icône de template vide",
|
||||
"Enter the new name of the selected document.": "Entrez le nouveau nom du document sélectionné.",
|
||||
"Freedom Equality Fraternity Logo": "Logo Liberté Égalité Fraternité",
|
||||
"Generate PDF": "Générer PDF",
|
||||
"Impress": "Impress",
|
||||
"Impress Logo": "Impress logo",
|
||||
"Generate a PDF from your document, it will be inserted in the selected template.": "Générez un PDF à partir de votre document, il sera inséré dans le modèle sélectionné.",
|
||||
"Is it public ?": "Est-ce public?",
|
||||
"It seems that the page you are looking for does not exist or cannot be displayed correctly.": "Il semble que la page que vous cherchez n'existe pas ou ne puisse pas être affichée correctement.",
|
||||
"Language": "Langue",
|
||||
"Language Icon": "Icône de langue",
|
||||
"Legal Notice": "Mentions Legales",
|
||||
"Legal notice": "Mention légale",
|
||||
"Logout": "Se déconnecter",
|
||||
"Marianne Logo": "Logo Marianne",
|
||||
"Name the pad": "Nommer le pad",
|
||||
"Name the template": "Nommer le template",
|
||||
"My account": "Mon compte",
|
||||
"Name the document": "Nommer le document",
|
||||
"No editor found": "Pas d'éditeur trouvé",
|
||||
"Open the pads panel": "Ouvrir le panneau des pads",
|
||||
"Open the templates panel": "Ouvrir le panneau des templates",
|
||||
"Pad": "Pad",
|
||||
"Pad name": "Nom du pad",
|
||||
"Open the docs panel": "Ouvrir le panneau des docs",
|
||||
"Open the document options": "Ouvrir les options du document",
|
||||
"Ouch !": "Aïe !",
|
||||
"Pads icon": "Icône de pads",
|
||||
"Profile picture": "Photo du profil",
|
||||
"Recents": "Récents",
|
||||
"Personal data and cookies": "Données personnelles et cookies",
|
||||
"Something bad happens, please refresh the page.": "Une erreur inattendue s'est produite, rechargez la page.",
|
||||
"Something bad happens, please retry.": "Une erreur inattendue s'est produite, veuillez réessayer.",
|
||||
"Sort pads icon": "Icône trier les pads",
|
||||
"Sort templates icon": "Icône trier les templates",
|
||||
"Sort the pads by creation date ascendent": "Trier les pads par date de création ascendante",
|
||||
"Sort the pads by creation date descendent": "Trier les pads par date de création décroissante",
|
||||
"Sort the templates by creation date ascendent": "Trier les templates par date de création ascendante",
|
||||
"Sort the templates by creation date descendent": "Trier les templates par date de création décroissante",
|
||||
"Sort documents icon": "Icône trier les documents",
|
||||
"Sort the documents by creation date ascendent": "Trier les documents par date de création ascendante",
|
||||
"Sort the documents by creation date descendent": "Trier les documents par date de création descendante",
|
||||
"Template": "Template",
|
||||
"Template name": "Nom du template",
|
||||
"Template save successfully": "Template sauvegardé avec succès",
|
||||
"Templates icon": "Icône des templates",
|
||||
"The document has been deleted.": "Le document a bien été supprimé.",
|
||||
"The document has been updated.": "Le document a été mis à jour.",
|
||||
"Update document": "Mettre à jour le document",
|
||||
"Update document \"{{documentTitle}}\"": "Mettre à jour le document \"{{documentTitle}}\"",
|
||||
"Validate the modification": "Valider les modifications",
|
||||
"Your pdf was downloaded succesfully": "Votre pdf a été téléchargé avec succès",
|
||||
"icon group": "icône groupe",
|
||||
"{{label}} button": "Bouton {{label}}",
|
||||
"{{label}} icon": "Icône {{label}}"
|
||||
"icon group": "icône groupe"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ const Page: NextPageWithLayout = () => {
|
||||
|
||||
return (
|
||||
<Box $align="center" $justify="center" $height="inherit">
|
||||
<StyledLink href="/pads/create">
|
||||
<StyledButton>{t('Create a new pad')}</StyledButton>
|
||||
<StyledLink href="/docs/create">
|
||||
<StyledButton>{t('Create a new document')}</StyledButton>
|
||||
</StyledLink>
|
||||
</Box>
|
||||
);
|
||||
@@ -3,7 +3,7 @@ import type { ReactElement } from 'react';
|
||||
import { PadLayout } from '@/layouts';
|
||||
import { NextPageWithLayout } from '@/types/next';
|
||||
|
||||
import Pads from './pads/';
|
||||
import Pads from './docs';
|
||||
|
||||
const Page: NextPageWithLayout = () => {
|
||||
return <Pads />;
|
||||
|
||||
Reference in New Issue
Block a user