Skip to content

Commit

Permalink
Merge pull request #3233 from cclauss/codespell
Browse files Browse the repository at this point in the history
Fix typos discovered by codespell
  • Loading branch information
kshepherd authored Sep 7, 2024
2 parents ba05b22 + 1a9d68c commit 8f70d3d
Show file tree
Hide file tree
Showing 66 changed files with 93 additions and 93 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ Frequently asked questions
- What are the naming conventions for Angular?
- See [the official angular style guide](https://angular.io/styleguide)
- Why is the size of my app larger in development?
- The production build uses a whole host of techniques (ahead-of-time compilation, rollup to remove unreachable code, minification, etc.) to reduce the size, that aren't used during development in the intrest of build speed.
- The production build uses a whole host of techniques (ahead-of-time compilation, rollup to remove unreachable code, minification, etc.) to reduce the size, that aren't used during development in the interest of build speed.
- node-pre-gyp ERR in npm install (Windows)
- install Python x86 version between 2.5 and 3.0 on windows. See [this issue](https://github.com/AngularClass/angular2-webpack-starter/issues/626)
- How do I handle merge conflicts in package-lock.json?
Expand Down
2 changes: 1 addition & 1 deletion config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ cache:
# Set to true to see all cache hits/misses/refreshes in your console logs. Useful for debugging SSR caching issues.
debug: false
# When enabled (i.e. max > 0), known bots will be sent pages from a server side cache specific for bots.
# (Keep in mind, bot detection cannot be guarranteed. It is possible some bots will bypass this cache.)
# (Keep in mind, bot detection cannot be guaranteed. It is possible some bots will bypass this cache.)
botCache:
# Maximum number of pages to cache for known bots. Set to zero (0) to disable server side caching for bots.
# Default is 1000, which means the 1000 most recently accessed public pages will be cached.
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/homepage-statistics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Site Statistics Page', () => {

cy.visit('/statistics');

// <ds-site-statistics-page> tag must be visable
// <ds-site-statistics-page> tag must be visible
cy.get('ds-site-statistics-page').should('be.visible');

// Verify / wait until "Total Visits" table's *last* label is non-empty
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/login-modal.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('Login Modal', () => {
page.submitLoginAndPasswordByPressingButton(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
cy.get('ds-log-in').should('not.exist');

// Open user menu, verify user menu accesibility
// Open user menu, verify user menu accessibility
page.openUserMenu();
cy.get('ds-user-menu').should('be.visible');
testA11y('ds-user-menu');
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/pagenotfound.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { testA11y } from 'cypress/support/utils';

describe('PageNotFound', () => {
it('should contain element ds-pagenotfound when navigating to page that doesnt exist', () => {
it('should contain element ds-pagenotfound when navigating to page that does not exist', () => {
// request an invalid page (UUIDs at root path aren't valid)
cy.visit('/e9019a69-d4f1-4773-b6a3-bd362caa46f2', { failOnStatusCode: false });
cy.get('ds-pagenotfound').should('be.visible');
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/submission.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('New Submission page', () => {
// Author & Subject fields have invalid "aria-multiline" attrs.
// See https://github.com/DSpace/dspace-angular/issues/1272
'aria-allowed-attr': { enabled: false },
// All panels are accordians & fail "aria-required-children" and "nested-interactive".
// All panels are accordions & fail "aria-required-children" and "nested-interactive".
// Seem to require updating ng-bootstrap and https://github.com/DSpace/dspace-angular/issues/2216
'aria-required-children': { enabled: false },
'nested-interactive': { enabled: false },
Expand Down Expand Up @@ -192,7 +192,7 @@ describe('New Submission page', () => {
testA11y('ds-submission-edit',
{
rules: {
// All panels are accordians & fail "aria-required-children" and "nested-interactive".
// All panels are accordions & fail "aria-required-children" and "nested-interactive".
// Seem to require updating ng-bootstrap and https://github.com/DSpace/dspace-angular/issues/2216
'aria-required-children': { enabled: false },
'nested-interactive': { enabled: false },
Expand Down
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DSPACE_APP_CONFIG_PATH=/usr/local/dspace/config/config.yml
Configuration options can be overridden by setting environment variables.

## Nodejs server
When you start dspace-angular on node, it spins up an http server on which it listens for incoming connections. You can define the ip address and port the server should bind itsself to, and if ssl should be enabled not. By default it listens on `localhost:4000`. If you want it to listen on all your network connections, configure it to bind itself to `0.0.0.0`.
When you start dspace-angular on node, it spins up an http server on which it listens for incoming connections. You can define the ip address and port the server should bind itself to, and if ssl should be enabled not. By default it listens on `localhost:4000`. If you want it to listen on all your network connections, configure it to bind itself to `0.0.0.0`.

To change this configuration, change the options `ui.host`, `ui.port` and `ui.ssl` in the appropriate configuration file (see above):

Expand Down
2 changes: 1 addition & 1 deletion scripts/merge-i18n-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ parseCliInput();
function parseCliInput() {
program
.option('-d, --output-dir <output-dir>', 'output dir when running script on all language files', projectRoot(LANGUAGE_FILES_LOCATION))
.option('-s, --source-dir <source-dir>', 'source dir of transalations to be merged')
.option('-s, --source-dir <source-dir>', 'source dir of translations to be merged')
.usage('(-s <source-dir> [-d <output-dir>])')
.parse(process.argv);

Expand Down
4 changes: 2 additions & 2 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function app() {
* If production mode is enabled in the environment file:
* - Enable Angular's production mode
* - Initialize caching of SSR rendered pages (if enabled in config.yml)
* - Enable compression for SSR reponses. See [compression](https://github.com/expressjs/compression)
* - Enable compression for SSR responses. See [compression](https://github.com/expressjs/compression)
*/
if (environment.production) {
enableProdMode();
Expand Down Expand Up @@ -428,7 +428,7 @@ function checkCacheForRequest(cacheName: string, cache: LRU<string, any>, req, r
if (environment.cache.serverSide.debug) { console.log(`CACHE EXPIRED FOR ${key} in ${cacheName} cache. Re-rendering...`); }
// Update cached copy by rerendering server-side
// NOTE: In this scenario the currently cached copy will be returned to the current user.
// This re-render is peformed behind the scenes to update cached copy for next user.
// This re-render is performed behind the scenes to update cached copy for next user.
serverSideRender(req, res, next, false);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* List of services statuses
*/
export enum LdnServiceStatus {
UNKOWN,
UNKNOWN,
DISABLED,
ENABLED,
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ describe('BitstreamFormatsComponent', () => {
describe('isSelected', () => {
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should return an observable of true if the provided bistream is in the list returned by the service', () => {
it('should return an observable of true if the provided bitstream is in the list returned by the service', () => {
const result = comp.isSelected(bitstreamFormat1);

expect(result).toBeObservable(cold('b', { b: true }));
});
it('should return an observable of false if the provided bistream is not in the list returned by the service', () => {
it('should return an observable of false if the provided bitstream is not in the list returned by the service', () => {
const format = new BitstreamFormat();
format.uuid = 'new';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class BitstreamFormatsComponent implements OnInit, OnDestroy {
}

/**
* Deselects all selecetd bitstream formats
* Deselects all selected bitstream formats
*/
deselectAll() {
this.bitstreamFormatService.deselectAllBitstreamFormats();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ export class FormatFormComponent implements OnInit {
(fieldModel: DynamicFormControlModel) => {
if (fieldModel.name === 'extensions') {
if (hasValue(this.bitstreamFormat.extensions)) {
const extenstions = this.bitstreamFormat.extensions;
const extensions = this.bitstreamFormat.extensions;
const formArray = (fieldModel as DynamicFormArrayModel);
for (let i = 0; i < extenstions.length; i++) {
for (let i = 0; i < extensions.length; i++) {
formArray.insertGroup(i).group[0] = new DynamicInputModel({
id: `extension-${i}`,
value: extenstions[i],
value: extensions[i],
}, this.arrayInputElementLayout);
}
}
Expand All @@ -172,7 +172,7 @@ export class FormatFormComponent implements OnInit {
}

/**
* Creates an updated bistream format based on the current values in the form
* Creates an updated bitstream format based on the current values in the form
* Emits the updated bitstream format trouhg the updatedFormat emitter
*/
onSubmit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class BrowseByTaxonomyComponent implements OnInit, OnChanges, OnDestroy {
this.facetType = browseDefinition.facetType;
this.vocabularyName = browseDefinition.vocabulary;
this.vocabularyOptions = { name: this.vocabularyName, closed: true };
this.description = this.translate.instant(`browse.metadata.${this.vocabularyName}.tree.descrption`);
this.description = this.translate.instant(`browse.metadata.${this.vocabularyName}.tree.description`);
}));
this.subs.push(this.scope$.subscribe(() => {
this.updateQueryParams();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class CollectionMetadataComponent extends ComcolMetadataComponent<Collect
}

/**
* Cheking if the navigation is done and if so, initialize the collection's item template,
* Checking if the navigation is done and if so, initialize the collection's item template,
* to ensure that the item template is always up to date.
* Check when a NavigationEnd event (URL change) or a Scroll event followed by a NavigationEnd event (refresh event), occurs
*/
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/cache/object-cache.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function addDependentsObjectCacheState(state: ObjectCacheState, action: AddDepen


/**
* Remove all dependent request UUIDs from a cached object, used to clear out-of-date depedencies
* Remove all dependent request UUIDs from a cached object, used to clear out-of-date dependencies
*
* @param state the current state
* @param action an AddDependentsObjectCacheAction
Expand Down
8 changes: 4 additions & 4 deletions src/app/core/data/access-status-data.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ describe('AccessStatusDataService', () => {

/**
* Create an AccessStatusDataService used for testing
* @param reponse$ Supply a RemoteData to be returned by the REST API (optional)
* @param response$ Supply a RemoteData to be returned by the REST API (optional)
*/
function createService(reponse$?: Observable<RemoteData<any>>) {
function createService(response$?: Observable<RemoteData<any>>) {
requestService = getMockRequestService();
let buildResponse$ = reponse$;
if (hasNoValue(reponse$)) {
let buildResponse$ = response$;
if (hasNoValue(response$)) {
buildResponse$ = createSuccessfulRemoteDataObject$({});
}
rdbService = jasmine.createSpyObj('rdbService', {
Expand Down
12 changes: 6 additions & 6 deletions src/app/core/data/bitstream-data.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,27 +138,27 @@ describe('BitstreamDataService', () => {

describe('findPrimaryBitstreamByItemAndName', () => {
it('should return primary bitstream', () => {
const exprected$ = cold('(a|)', { a: bitstream1 } );
const expected$ = cold('(a|)', { a: bitstream1 } );
const bundle = Object.assign(new Bundle(), {
primaryBitstream: observableOf(createSuccessfulRemoteDataObject(bitstream1)),
});
spyOn(bundleDataService, 'findByItemAndName').and.returnValue(observableOf(createSuccessfulRemoteDataObject(bundle)));
expect(service.findPrimaryBitstreamByItemAndName(ItemMock, 'ORIGINAL')).toBeObservable(exprected$);
expect(service.findPrimaryBitstreamByItemAndName(ItemMock, 'ORIGINAL')).toBeObservable(expected$);
});

it('should return null if primary bitstream has not be succeeded ', () => {
const exprected$ = cold('(a|)', { a: null } );
const expected$ = cold('(a|)', { a: null } );
const bundle = Object.assign(new Bundle(), {
primaryBitstream: observableOf(createFailedRemoteDataObject()),
});
spyOn(bundleDataService, 'findByItemAndName').and.returnValue(observableOf(createSuccessfulRemoteDataObject(bundle)));
expect(service.findPrimaryBitstreamByItemAndName(ItemMock, 'ORIGINAL')).toBeObservable(exprected$);
expect(service.findPrimaryBitstreamByItemAndName(ItemMock, 'ORIGINAL')).toBeObservable(expected$);
});

it('should return EMPTY if nothing where found', () => {
const exprected$ = cold('(|)', {} );
const expected$ = cold('(|)', {} );
spyOn(bundleDataService, 'findByItemAndName').and.returnValue(observableOf(createFailedRemoteDataObject<Bundle>()));
expect(service.findPrimaryBitstreamByItemAndName(ItemMock, 'ORIGINAL')).toBeObservable(exprected$);
expect(service.findPrimaryBitstreamByItemAndName(ItemMock, 'ORIGINAL')).toBeObservable(expected$);
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/app/core/data/bitstream-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class BitstreamDataService extends IdentifiableDataService<Bitstream> imp
* @param reRequestOnStale Whether or not the request should automatically be re-
* requested after the response becomes stale
* @return {Observable<Bitstream | null>}
* Return an observable that constains primary bitstream information or null
* Return an observable that contains primary bitstream information or null
*/
public findPrimaryBitstreamByItemAndName(item: Item, bundleName: string, useCachedVersionIfAvailable = true, reRequestOnStale = true): Observable<Bitstream | null> {
return this.bundleService.findByItemAndName(item, bundleName, useCachedVersionIfAvailable, reRequestOnStale, followLink('primaryBitstream')).pipe(
Expand Down
12 changes: 6 additions & 6 deletions src/app/core/data/collection-data.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('CollectionDataService', () => {
expect(service.getAuthorizedCollection).toHaveBeenCalledWith(queryString);
});

it('should return a RemoteData<PaginatedList<Colletion>> for the getAuthorizedCollection', () => {
it('should return a RemoteData<PaginatedList<Collection>> for the getAuthorizedCollection', () => {
const result = service.getAuthorizedCollection(queryString);
const expected = cold('a|', {
a: paginatedListRD,
Expand All @@ -166,7 +166,7 @@ describe('CollectionDataService', () => {
expect(service.getAuthorizedCollectionByCommunity).toHaveBeenCalledWith(communityId, queryString);
});

it('should return a RemoteData<PaginatedList<Colletion>> for the getAuthorizedCollectionByCommunity', () => {
it('should return a RemoteData<PaginatedList<Collection>> for the getAuthorizedCollectionByCommunity', () => {
const result = service.getAuthorizedCollectionByCommunity(communityId, queryString);
const expected = cold('a|', {
a: paginatedListRD,
Expand Down Expand Up @@ -206,12 +206,12 @@ describe('CollectionDataService', () => {

/**
* Create a CollectionDataService used for testing
* @param reponse$ Supply a RemoteData to be returned by the REST API (optional)
* @param response$ Supply a RemoteData to be returned by the REST API (optional)
*/
function createService(reponse$?: Observable<RemoteData<any>>) {
function createService(response$?: Observable<RemoteData<any>>) {
requestService = getMockRequestService();
let buildResponse$ = reponse$;
if (hasNoValue(reponse$)) {
let buildResponse$ = response$;
if (hasNoValue(response$)) {
buildResponse$ = createSuccessfulRemoteDataObject$({});
}
rdbService = jasmine.createSpyObj('rdbService', {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/link-head.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class LinkHeadService {

/**
* Method to create a Link tag in the HEAD of the html.
* @param tag LinkDefition is the paramaters to define a link tag.
* @param tag LinkDefition is the parameters to define a link tag.
* @returns Link tag that was created
*/
addTag(tag: LinkDefinition) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/server-xhr.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const httpAgent = new HttpAgent(agentOptions);
const httpsAgent = new HttpsAgent(agentOptions);

/**
* Contructs the XMLHttpRequest instances used for all HttpClient requests.
* Constructs the XMLHttpRequest instances used for all HttpClient requests.
* Emulated by https://github.com/pwnall/node-xhr2 on the server.
* This class overrides the built-in Angular implementation to set additional configuration.
*
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/shared/metadata-config.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
export class MetadataConfig {
/**
* A unique indentifier
* A unique identifier
*/
id: string;

Expand Down
2 changes: 1 addition & 1 deletion src/app/core/shared/search/search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { SearchConfigurationService } from './search-configuration.service';
* - Overrides {@link BaseDataService.addEmbedParams} in order to make it public
*
* Doesn't use any of the service's dependencies, they are initialized as undefined
* Therefore, equest/response handling methods won't work even though they're defined
* Therefore, request/response handling methods won't work even though they're defined
*/
class SearchDataService extends BaseDataService<any> {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/submission/submission-object-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class SubmissionObjectDataService {
environment.cache.msToLive.default,
now,
RequestEntryState.Error,
'The request couldn\'t be sent. Unable to determine the type of submission object',
'The request could not be sent. Unable to determine the type of submission object',
undefined,
400,
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class DsoEditMetadataComponent implements OnInit, OnDestroy {
/**
* Submit the current changes to the form by retrieving json PATCH operations from the form and sending it to the
* DSpaceObject's data-service
* Display notificiations and reset the form afterwards if successful
* Display notifications and reset the form afterwards if successful
*/
submit(): void {
this.saving$.next(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
[label]="'orgunit.page.city'">
</ds-generic-item-page-field>
<ds-generic-item-page-field [item]="object"
[fields]="['organization.adress.addressCountry']"
[fields]="['organization.address.addressCountry']"
[label]="'orgunit.page.country'">
</ds-generic-item-page-field>
<ds-generic-item-page-field [item]="object"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const mockItem: Item = Object.assign(new Item(), {
value: 'New York',
},
],
'organization.adress.addressCountry': [
'organization.address.addressCountry': [
{
language: 'en_US',
value: 'USA',
Expand Down
4 changes: 2 additions & 2 deletions src/app/init.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { Angulartics2DSpace } from './statistics/angulartics/dspace-provider';
* Performs the initialization of the app.
*
* Should be extended to implement server- & browser-specific functionality.
* Initialization steps shared between the server and brower implementations
* Initialization steps shared between the server and browser implementations
* can be included in this class.
*
* Note that the service cannot (indirectly) depend on injection tokens that are only available _after_ APP_INITIALIZER.
Expand Down Expand Up @@ -134,7 +134,7 @@ export abstract class InitService {
protected static resolveAppConfig(
transferState: TransferState,
): void {
// overriden in subclasses if applicable
// overridden in subclasses if applicable
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class BitstreamRequestACopyPageComponent implements OnInit, OnDestroy {
}

/**
* Retrieves the link to the bistream download page
* Retrieves the link to the bitstream download page
*/
getBitstreamLink() {
return [getBitstreamDownloadRoute(this.bitstream)];
Expand Down
Loading

0 comments on commit 8f70d3d

Please sign in to comment.