Skip to content

Commit

Permalink
Fix typos in UI code (#8583)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpecLad authored Oct 23, 2024
1 parent bcd0627 commit 13fac28
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cvat-core/src/annotations-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ export default class Collection {
const predicate = sign > 0 ? (frame) => frame <= frameTo : (frame) => frame >= frameTo;
const update = sign > 0 ? (frame) => frame + 1 : (frame) => frame - 1;

// if not looking for an emty frame nor frame with annotations, return the next frame
// if not looking for an empty frame nor frame with annotations, return the next frame
// check if deleted frames are allowed additionally
if (!annotationsFilters) {
let frame = frameFrom;
Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/cloud-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Object.defineProperties(CloudStorage.prototype.save, {
}
// update
if (typeof this.id !== 'undefined') {
// provider_type and recource should not change;
// provider_type and resource should not change;
// send to the server only the values that have changed
const initialData: SerializedCloudStorage = {};
if (this.displayName) {
Expand Down
4 changes: 2 additions & 2 deletions cvat-core/src/frames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ export function getContextImage(jobID: number, frame: number): Promise<Record<st
// it might raise multiple server requests for context images
// if the promise was pending before and several requests came for the same frame
// all these requests will stuck on "finally"
// and when the promise fullfilled, it will run all the microtasks
// and when the promise is fulfilled, it will run all the microtasks
// since they all have the same request id, all they will perform in executor()
frameData.activeContextRequest.finally(() => setTimeout(checkAndExecute));
} else {
Expand Down Expand Up @@ -775,7 +775,7 @@ export async function getFrame(
// - getContextImage
// - getCachedChunks
// And from this idea we should call refreshJobCacheIfOutdated from each one
// Hovewer, following from the order, these methods are usually called
// However, following from the order, these methods are usually called
// it may lead to even more confusing behaviour
//
// Usually user first receives frame, then user receives ranges and finally user receives context images
Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/object-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function findAngleDiff(rightAngle: number, leftAngle: number): number {
angleDiff = ((angleDiff + 180) % 360) - 180;
if (Math.abs(angleDiff) >= 180) {
// if the main arc is bigger than 180, go another arc
// to find it, just substract absolute value from 360 and inverse sign
// to find it, just subtract absolute value from 360 and inverse sign
angleDiff = 360 - Math.abs(angleDiff) * Math.sign(angleDiff) * -1;
}
return angleDiff;
Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/requests-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RequestsManager {
const promise = new Promise<Request>((resolve, reject) => {
const timeoutCallback = async (): Promise<void> => {
// We make sure that no more than REQUESTS_COUNT requests are sent simultaneously
// If thats the case, we re-schedule the timeout
// If that's the case, we re-schedule the timeout
const timestamp = Date.now();
if (this.requestStack.length >= REQUESTS_COUNT) {
const timestampToCheck = this.requestStack[this.requestStack.length - 1];
Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/server-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function fetchAll(url, filter = {}): Promise<any> {
}
});

// removing possible dublicates
// removing possible duplicates
const obj = result.results.reduce((acc: Record<string, any>, item: any) => {
acc[item.id] = item;
return acc;
Expand Down
4 changes: 2 additions & 2 deletions cvat-core/src/session-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export function implementJob(Job: typeof JobClass): typeof JobClass {
}

if ('annotationsFilters' in searchParameters && 'generalFilters' in searchParameters) {
throw new ArgumentError('Both annotations filters and general fiters could not be used together');
throw new ArgumentError('Both annotations filters and general filters could not be used together');
}

if (!Number.isInteger(frameFrom) || !Number.isInteger(frameTo)) {
Expand Down Expand Up @@ -1046,7 +1046,7 @@ export function implementTask(Task: typeof TaskClass): typeof TaskClass {
}

if ('annotationsFilters' in searchParameters && 'generalFilters' in searchParameters) {
throw new ArgumentError('Both annotations filters and general fiters could not be used together');
throw new ArgumentError('Both annotations filters and general filters could not be used together');
}

if (!Number.isInteger(frameFrom) || !Number.isInteger(frameTo)) {
Expand Down
4 changes: 2 additions & 2 deletions cvat-data/src/ts/3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ These files are from the [Broadway.js](https://github.com/mbebenita/Broadway) re
Authors don't provide an npm package, so we need to store these components in our repository.
We use this dependency to decode video chunks from a server and split them to frames on client side.

We need to run this package in node environent (for example for debug, or for running unit tests).
But there aren't any ways to do that (even with syntetic environment, provided for example by the package ``browser-env``).
We need to run this package in node environment (for example for debug, or for running unit tests).
But there aren't any ways to do that (even with synthetic environment, provided for example by the package ``browser-env``).
For example there are issues with canvas using (webpack doesn't work with binary canvas package for node-js) and others.
So, we have solved to write patch file for this library.
It modifies source code a little to support our scenario of using.
Expand Down
2 changes: 1 addition & 1 deletion cvat-data/src/ts/unzip_imgs.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ onmessage = (e) => {
.async('blob')
.then((fileData) => {
if (!errored) {
// do not need to read the rest of block if an error already occured
// do not need to read the rest of block if an error already occurred
if (dimension === dimension2D) {
createImageBitmap(fileData).then((img) => {
postMessage({
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/react_nginx.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
root /usr/share/nginx/html;

# Disable server signature to make it slighty harder for
# Disable server signature to make it slightly harder for
# attackers to find known vulnerabilities. See
# https://datatracker.ietf.org/doc/html/rfc9110#name-server
server_tokens off;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function ObjectMapperComponent(props: Props): JSX.Element {
const [rightValue, setRightValue] = useState<object | null>(null);

const setMappingWrapper = (updated: Props['defaultMapping']): void => {
// if we prefer useEffect instead of this approch
// if we prefer useEffect instead of this approach
// component will be rerendered first with extras that depends on parent state
// these extras will use outdated information in this case
onUpdateMapping(updated);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function AutomaticAnnotationProgress(props: Props): JSX.Element |
return (<>Unknown status received</>);
}

return <>Automatic annotation accomplisted</>;
return <>Automatic annotation accomplished</>;
})()}
</Text>
</div>
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/utils/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function customWaViewHit(pageName?: string, queryString?: string, hashInf
waHitFunction(pageName, queryString, hashInfo);
} catch (error: any) {
// eslint-disable-next-line
console.error(`Web analitycs hit function has failed. ${error.toString()}`);
console.error(`Web analytics hit function has failed. ${error.toString()}`);
}
}
}
2 changes: 1 addition & 1 deletion cvat-ui/src/utils/opencv-wrapper/opencv-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class OpenCVWrapper {
cv.findContours(expanded, contours, hierarchy, cv.RETR_EXTERNAL, cv.CHAIN_APPROX_NONE);
for (let i = 0; i < contours.size(); i++) {
const contour = contours.get(i);
// substract offset we created when copied source image
// subtract offset we created when copied source image
jsContours.push(Array.from(contour.data32S as number[]).map((el) => el - 1));
contour.delete();
}
Expand Down

0 comments on commit 13fac28

Please sign in to comment.