Skip to content

✏️fix typo in backend and frontend #947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/backend/core/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class DocumentViewSet(

Example:
- Ascending: GET /api/v1.0/documents/?ordering=created_at
- Desceding: GET /api/v1.0/documents/?ordering=-title
- Descending: GET /api/v1.0/documents/?ordering=-title

### Filtering:
- `is_creator_me=true`: Returns documents created by the current user.
Expand Down Expand Up @@ -576,7 +576,7 @@ def list(self, request, *args, **kwargs):
queryset, filter_data["is_favorite"]
)

# Apply ordering only now that everyting is filtered and annotated
# Apply ordering only now that everything is filtered and annotated
queryset = filters.OrderingFilter().filter_queryset(
self.request, queryset, self
)
Expand Down Expand Up @@ -889,7 +889,7 @@ def tree(self, request, pk, *args, **kwargs):
)

# Compute cache for ancestors links to avoid many queries while computing
# abilties for his documents in the tree!
# abilities for his documents in the tree!
ancestors_links.append(
{"link_reach": ancestor.link_reach, "link_role": ancestor.link_role}
)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def get_links_definitions(self, ancestors_links):
for ancestor in ancestors_links:
links_definitions[ancestor["link_reach"]].add(ancestor["link_role"])

return dict(links_definitions) # Convert defaultdict back to a normal dict
return dict(links_definitions) # Convert default dict back to a normal dict

def compute_ancestors_links(self, user):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/backend/core/services/ai_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

AI_TRANSLATE = (
"Keep the same html stucture and formatting. "
"Keep the same html structure and formatting. "
"Translate the content in the html to the specified language {language:s}. "
"Check the translation for accuracy and make any necessary corrections. "
"Do not provide any other information."
Expand Down
2 changes: 1 addition & 1 deletion src/backend/core/services/collaboration_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self):
def reset_connections(self, room, user_id=None):
"""
Reset connections of a room in the collaboration server.
Reseting a connection means that the user will be disconnected and will
Resetting a connection means that the user will be disconnected and will
have to reconnect to the collaboration server, with updated rights.
"""
endpoint = "reset-connections"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_api_documents_ai_transform_authenticated_forbidden(reach, role):
@patch("openai.resources.chat.completions.Completions.create")
def test_api_documents_ai_transform_authenticated_success(mock_create, reach, role):
"""
Autenticated who are not related to a document should be able to request AI transform
Authenticated who are not related to a document should be able to request AI transform
if the link reach and role permit it.
"""
user = factories.UserFactory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_api_documents_ai_translate_anonymous_success(mock_create):
{
"role": "system",
"content": (
"Keep the same html stucture and formatting. "
"Keep the same html structure and formatting. "
"Translate the content in the html to the specified language Spanish. "
"Check the translation for accuracy and make any necessary corrections. "
"Do not provide any other information."
Expand Down Expand Up @@ -172,7 +172,7 @@ def test_api_documents_ai_translate_authenticated_forbidden(reach, role):
@patch("openai.resources.chat.completions.Completions.create")
def test_api_documents_ai_translate_authenticated_success(mock_create, reach, role):
"""
Autenticated who are not related to a document should be able to request AI translate
Authenticated who are not related to a document should be able to request AI translate
if the link reach and role permit it.
"""
user = factories.UserFactory()
Expand All @@ -197,7 +197,7 @@ def test_api_documents_ai_translate_authenticated_success(mock_create, reach, ro
{
"role": "system",
"content": (
"Keep the same html stucture and formatting. "
"Keep the same html structure and formatting. "
"Translate the content in the html to the "
"specified language Colombian Spanish. "
"Check the translation for accuracy and make any necessary corrections. "
Expand Down Expand Up @@ -274,7 +274,7 @@ def test_api_documents_ai_translate_success(mock_create, via, role, mock_user_te
{
"role": "system",
"content": (
"Keep the same html stucture and formatting. "
"Keep the same html structure and formatting. "
"Translate the content in the html to the "
"specified language Colombian Spanish. "
"Check the translation for accuracy and make any necessary corrections. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_api_documents_attachment_upload_authenticated_forbidden(reach, role):
)
def test_api_documents_attachment_upload_authenticated_success(reach, role):
"""
Autenticated users who are not related to a document should be able to upload
Authenticated users who are not related to a document should be able to upload
a file when the link reach and role permit it.
"""
user = factories.UserFactory()
Expand Down Expand Up @@ -266,7 +266,7 @@ def test_api_documents_attachment_upload_invalid(client):


def test_api_documents_attachment_upload_size_limit_exceeded(settings):
"""The uploaded file should not exceeed the maximum size in settings."""
"""The uploaded file should not exceed the maximum size in settings."""
settings.DOCUMENT_IMAGE_MAX_SIZE = 1048576 # 1 MB for test

user = factories.UserFactory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def test_api_documents_create_for_owner_existing_user_email_no_sub_with_fallback
"""
It should be possible to create a document on behalf of a pre-existing user for
who the sub was not found if the settings allow it. This edge case should not
happen in a healthy OIDC federation but can be usefull if an OIDC provider modifies
happen in a healthy OIDC federation but can be usefully if an OIDC provider modifies
users sub on each login for example...
"""
user = factories.UserFactory(language="en-us")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def test_api_documents_move_authenticated_deleted_target_as_child(position):
def test_api_documents_move_authenticated_deleted_target_as_sibling(position):
"""
It should not be possible to move a document as a sibling of a deleted target document
if the user has no rigths on its parent.
if the user has no rights on its parent.
"""
user = factories.UserFactory()
client = APIClient()
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/apps/e2e/__tests__/app-impress/config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ test.describe('Config', () => {
});
});

test.describe('Config: Not loggued', () => {
test.describe('Config: Not logged', () => {
test.use({ storageState: { cookies: [], origins: [] } });

test('it checks that theme is configured from config endpoint', async ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test.describe('Doc Create', () => {
});
});

test.describe('Doc Create: Not loggued', () => {
test.describe('Doc Create: Not logged', () => {
test.use({ storageState: { cookies: [], origins: [] } });

test('it creates a doc server way', async ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ test.describe('Doc Editor', () => {

const selectVisibility = page.getByLabel('Visibility', { exact: true });

// When the visibility is changed, the ws should closed the connection (backend signal)
// When the visibility is changed, the ws should close the connection (backend signal)
const wsClosePromise = webSocket.waitForEvent('close');

await selectVisibility.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ test.describe('Doc Export', () => {

/**
* This test tell us that the export to pdf is working with images
* but it does not tell us if the images are beeing displayed correctly
* but it does not tell us if the images are being displayed correctly
* in the pdf.
*
* TODO: Check if the images are displayed correctly in the pdf
Expand Down Expand Up @@ -270,7 +270,7 @@ test.describe('Doc Export', () => {
});

/**
* We cannot assert the line break is visible in the pdf but we can assert the
* We cannot assert the line break is visible in the pdf, but we can assert the
* line break is visible in the editor and that the pdf is generated.
*/
test('it exports the doc with divider', async ({ page, browserName }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test.describe('Doc Routing', () => {
});
});

test.describe('Doc Routing: Not loggued', () => {
test.describe('Doc Routing: Not logged', () => {
test.use({ storageState: { cookies: [], origins: [] } });

test('checks redirect to a doc after login', async ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ test.describe('Doc Visibility: Public', () => {
test.describe('Doc Visibility: Authenticated', () => {
test.use({ storageState: { cookies: [], origins: [] } });

test('A doc is not accessible when unauthentified.', async ({
test('A doc is not accessible when unauthenticated.', async ({
page,
browserName,
}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('fetchAPI', () => {
});
});

it('check the versionning', () => {
it('check the versioning', () => {
fetchMock.mock('http://test.jest/api/v2.0/some/url', 200);

void fetchAPI('some/url', {}, '2.0');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DocsExporterPDF } from '../types';
export const blockMappingParagraphPDF: DocsExporterPDF['mappings']['blockMapping']['paragraph'] =
(block, exporter) => {
/**
* Breakline in the editor are not rendered in the PDF
* Break line in the editor are not rendered in the PDF
* By adding a space if the block is empty we ensure that the block is rendered
*/
if (Array.isArray(block.content)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See:
* https://github.com/TypeCellOS/BlockNote/blob/004c0bf720fe1415c497ad56449015c5f4dd7ba0/packages/xl-pdf-exporter/src/pdf/util/table/Table.tsx
*
* We succeded to manage the colspan, but rowspan is not supported yet.
* We succeeded to manage the colspan, but rowspan is not supported yet.
*/

import { TD, TR, Table } from '@ag-media/react-pdf-table';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const useLanguageSynchronizer = () => {
(userPreferredLanguages.length ? 'toFrontend' : 'toBackend');

if (direction === 'toBackend') {
// Update user's preference from frontends's language
// Update user's preference from frontend's language
const closestBackendLanguage =
getMatchingLocales(
availableBackendLanguages,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class ApiPlugin implements WorkboxPlugin {
};

/**
* When we get an network error.
* When we get a network error.
*/
handlerDidError: WorkboxPlugin['handlerDidError'] = async ({ request }) => {
if (!this.isFetchDidFailed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ registerRoute(
);

/**
* Cache stategy static files images (images / svg)
* Cache strategy static files images (images / svg)
*/
registerRoute(
({ request }) => request.destination === 'image',
Expand All @@ -201,7 +201,7 @@ registerRoute(
);

/**
* Cache stategy static files fonts
* Cache strategy static files fonts
*/
googleFontsCache();
registerRoute(
Expand All @@ -218,7 +218,7 @@ registerRoute(
);

/**
* Cache stategy static files (css, js, workers)
* Cache strategy static files (css, js, workers)
*/
registerRoute(
({ request }) =>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/packages/i18n/format-deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const jsonI18n = {};
// Fetch the files in the locales folder
fs.readdirSync(folderPath).map((language) => {
const languagePath = path.join(folderPath, path.sep, language);
// Crowdin output file in folder, we want to treat only these ones
// Crowdin output file in folder, we want to treat only these
if (!fs.lstatSync(languagePath).isDirectory()) {
return;
}
Expand Down
Loading