Skip to content

Commit

Permalink
Fix typos (#7035)
Browse files Browse the repository at this point in the history
* Fix typos

* Rename files with "Github"

* style(): format imports in EditorPreviewPane.js

---------

Co-authored-by: Martin Jagodic <jagodicmartin1@gmail.com>
Co-authored-by: Anze Demsar <anze.demsar@p-m.si>
  • Loading branch information
3 people authored Jan 16, 2024
1 parent cdbf5bc commit 9720a4c
Show file tree
Hide file tree
Showing 77 changed files with 91 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: log versions
run: node --version && npm --version && yarn --version
if: ${{ needs.changes.outputs.cms == 'true' }}
- name: install dependecies
- name: install dependencies
run: yarn --frozen-lockfile --network-timeout 1000000 && yarn bootstrap
if: ${{ needs.changes.outputs.cms == 'true' }}
- name: run unit tests
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Fixes date widget default format, collection load failure when entry fails
## 1.3.1 (March 3, 2018) ([demo](https://1-3-1--cms-demo.netlify.com/))
Fixes editorial workflow failure for unknown collections.

* Report editorial workflow load errors, ignore entries with unkown collections ([@erquhart](https://github.com/erquhart) in [#1153](https://github.com/decaporg/decap-cms/pull/1153))
* Report editorial workflow load errors, ignore entries with unknown collections ([@erquhart](https://github.com/erquhart) in [#1153](https://github.com/decaporg/decap-cms/pull/1153))


## 1.3.0 (February 27, 2018) ([demo](https://1-3-0--cms-demo.netlify.com/))
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Decap CMS uses the [Forking Workflow](https://www.atlassian.com/git/tutorials/co
`yarn start` spawns a development server and uses `dev-test/config.yml` and `dev-test/index.html` to serve the CMS.
In order to debug a specific issue follow the next steps:

1. Replace `dev-test/config.yml` with the relevant `config.yml`. If you want to test the backend, make sure that the `backend` property of the config indicates which backend you use (Github, Gitlab, Bitbucket etc) and path to the repo.
1. Replace `dev-test/config.yml` with the relevant `config.yml`. If you want to test the backend, make sure that the `backend` property of the config indicates which backend you use (GitHub, Gitlab, Bitbucket etc) and path to the repo.

```js
backend:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ New contributors are always welcome! Check out [CONTRIBUTING.md](https://github.
## Change Log

This project adheres to [Semantic Versioning](http://semver.org/).
Every release is documented on the Github [Releases](https://github.com/decaporg/decap-cms/releases) page.
Every release is documented on the GitHub [Releases](https://github.com/decaporg/decap-cms/releases) page.

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { entry1, entry2, entry3 } from './common/entries';

const backend = 'github';

describe('Github Backend Editorial Workflow - GraphQL API', () => {
describe('GitHub Backend Editorial Workflow - GraphQL API', () => {
const taskResult = { data: {} };

before(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { entry1, entry2, entry3 } from './common/entries';

const backend = 'github';

describe('Github Backend Editorial Workflow - GraphQL API - Open Authoring', () => {
describe('GitHub Backend Editorial Workflow - GraphQL API - Open Authoring', () => {
const taskResult = { data: {} };

before(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/editorial_workflow_spec_github_backend_rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { entry1, entry2, entry3 } from './common/entries';

const backend = 'github';

describe('Github Backend Editorial Workflow - REST API', () => {
describe('GitHub Backend Editorial Workflow - REST API', () => {
let taskResult = { data: {} };

before(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { entry1, entry2, entry3 } from './common/entries';

const backend = 'github';

describe('Github Backend Editorial Workflow - REST API - Open Authoring', () => {
describe('GitHub Backend Editorial Workflow - REST API - Open Authoring', () => {
let taskResult = { data: {} };

before(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/markdown_widget_list_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ describe('Markdown widget', () => {
});
});

// while this works on dev environemnt, it will always fail in cypress - has something to do with text selection
// while this works on dev environment, it will always fail in cypress - has something to do with text selection
// it('affects only selected list items', () => {
// cy
// .clickUnorderedListButton()
Expand Down
2 changes: 1 addition & 1 deletion dev-test/backends/test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
_faqs: {
"what-is-decap-cms.md": {
content: "---\ntitle: What is Decap CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Decap CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nDecap CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nDecap CMS integrates with Git and turns normal content editors into git comitters.\n\n"
content: "---\ntitle: What is Decap CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Decap CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nDecap CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nDecap CMS integrates with Git and turns normal content editors into git committers.\n\n"
},
"what-is-jam-stack.md": {
content: "---\ntitle: What is the “JAM Stack”?\ndate: 2015-11-02T00:00.000Z\n---\n\n# The JAM stack is a new way of building websites and apps that are fast, secure and simple to work with.\n\nJAM stands for JavaScript, APIs and Markup. It's the fastest growing new stack for building websites and apps: no more servers, host all your front-end on a CDN and use APIs for any moving parts.\n\n"
Expand Down
2 changes: 1 addition & 1 deletion dev-test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
_faqs: {
"what-is-decap-cms.md": {
content: "---\ntitle: What is Decap CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Decap CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nDecap CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nDecap CMS integrates with Git and turns normal content editors into git comitters.\n\n"
content: "---\ntitle: What is Decap CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Decap CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nDecap CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nDecap CMS integrates with Git and turns normal content editors into git committers.\n\n"
},
"what-is-jam-stack.md": {
content: "---\ntitle: What is the “JAM Stack”?\ndate: 2015-11-02T00:00.000Z\n---\n\n# The JAM stack is a new way of building websites and apps that are fast, secure and simple to work with.\n\nJAM stands for JavaScript, APIs and Markup. It's the fastest growing new stack for building websites and apps: no more servers, host all your front-end on a CDN and use APIs for any moving parts.\n\n"
Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

### Bug Fixes

* **deps:** update color widget dependecy ([#4512](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-app/issues/4512)) ([a0176e4](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-app/commit/a0176e457223da65dddf983707704dd4441553a0))
* **deps:** update color widget dependency ([#4512](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-app/issues/4512)) ([a0176e4](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-app/commit/a0176e457223da65dddf983707704dd4441553a0))



Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-backend-git-gateway/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

### Bug Fixes

* **backend-github:** make non-Large Media previews work with Git Gateway+Github ([#2151](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-backend-git-gateway/issues/2151)) ([63582dc](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-backend-git-gateway/commit/63582dc))
* **backend-github:** make non-Large Media previews work with Git Gateway+GitHub ([#2151](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-backend-git-gateway/issues/2151)) ([63582dc](https://github.com/decaporg/decap-cms/tree/master/packages/decap-cms-backend-git-gateway/commit/63582dc))



Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-backend-github/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub backend

An abstraction layer between the CMS and [Github](https://docs.github.com/en/rest)
An abstraction layer between the CMS and [GitHub](https://docs.github.com/en/rest)

## Code structure

Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

### Bug Fixes

* consider i18n strucutre when determining regex ruleString for github backend ([#6937](https://github.com/decaporg/decap-cms/issues/6937)) ([1aac51d](https://github.com/decaporg/decap-cms/commit/1aac51d864e15a6b1646eb13ca8d95ad8554b0d5))
* consider i18n structure when determining regex ruleString for github backend ([#6937](https://github.com/decaporg/decap-cms/issues/6937)) ([1aac51d](https://github.com/decaporg/decap-cms/commit/1aac51d864e15a6b1646eb13ca8d95ad8554b0d5))



Expand Down
12 changes: 6 additions & 6 deletions packages/decap-cms-core/src/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
selectAllowNewEntries,
selectAllowDeletion,
selectFolderEntryExtension,
selectInferedField,
selectInferredField,
selectMediaFolders,
selectFieldsComments,
selectHasMetaPath,
Expand Down Expand Up @@ -627,12 +627,12 @@ export class Backend {
});
} else {
searchFields = [
selectInferedField(collection, 'title'),
selectInferedField(collection, 'shortTitle'),
selectInferedField(collection, 'author'),
selectInferredField(collection, 'title'),
selectInferredField(collection, 'shortTitle'),
selectInferredField(collection, 'author'),
...summaryFields.map(elem => {
if (dateParsers[elem]) {
return selectInferedField(collection, 'date');
return selectInferredField(collection, 'date');
}
return elem;
}),
Expand All @@ -656,7 +656,7 @@ export class Backend {
if (errors.length > 0) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
throw new Error({ message: 'Errors ocurred while searching entries locally!', errors });
throw new Error({ message: 'Errors occurred while searching entries locally!', errors });
}

const hits = entries
Expand Down
6 changes: 3 additions & 3 deletions packages/decap-cms-core/src/components/App/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class Header extends React.Component {
showMediaButton,
} = this.props;

const createableCollections = collections
const creatableCollections = collections
.filter(collection => collection.get('create'))
.toList();

Expand Down Expand Up @@ -198,7 +198,7 @@ class Header extends React.Component {
</AppHeaderNavList>
</nav>
<AppHeaderActions>
{createableCollections.size > 0 && (
{creatableCollections.size > 0 && (
<Dropdown
renderButton={() => (
<AppHeaderQuickNewButton> {t('app.header.quickAdd')}</AppHeaderQuickNewButton>
Expand All @@ -207,7 +207,7 @@ class Header extends React.Component {
dropdownWidth="160px"
dropdownPosition="left"
>
{createableCollections.map(collection => (
{creatableCollections.map(collection => (
<DropdownItem
key={collection.get('name')}
label={collection.get('label_singular') || collection.get('label')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ function EntryCard({
}

function mapStateToProps(state, ownProps) {
const { entry, inferedFields, collection } = ownProps;
const { entry, inferredFields, collection } = ownProps;
const entryData = entry.get('data');
const summary = selectEntryCollectionTitle(collection, entry);

let image = entryData.get(inferedFields.imageField);
let image = entryData.get(inferredFields.imageField);
if (image) {
image = encodeURI(image);
}
Expand All @@ -142,7 +142,7 @@ function mapStateToProps(state, ownProps) {
image,
imageFolder: collection
.get('fields')
?.find(f => f.get('name') === inferedFields.imageField && f.get('widget') === 'image'),
?.find(f => f.get('name') === inferredFields.imageField && f.get('widget') === 'image'),
isLoadingAsset,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styled from '@emotion/styled';
import { Waypoint } from 'react-waypoint';
import { Map } from 'immutable';

import { selectFields, selectInferedField } from '../../../reducers/collections';
import { selectFields, selectInferredField } from '../../../reducers/collections';
import EntryCard from './EntryCard';

const CardsGrid = styled.ul`
Expand Down Expand Up @@ -39,20 +39,20 @@ export default class EntryListing extends React.Component {
};

inferFields = collection => {
const titleField = selectInferedField(collection, 'title');
const descriptionField = selectInferedField(collection, 'description');
const imageField = selectInferedField(collection, 'image');
const titleField = selectInferredField(collection, 'title');
const descriptionField = selectInferredField(collection, 'description');
const imageField = selectInferredField(collection, 'image');
const fields = selectFields(collection);
const inferedFields = [titleField, descriptionField, imageField];
const inferredFields = [titleField, descriptionField, imageField];
const remainingFields =
fields && fields.filter(f => inferedFields.indexOf(f.get('name')) === -1);
fields && fields.filter(f => inferredFields.indexOf(f.get('name')) === -1);
return { titleField, descriptionField, imageField, remainingFields };
};

renderCardsForSingleCollection = () => {
const { collections, entries, viewStyle } = this.props;
const inferedFields = this.inferFields(collections);
const entryCardProps = { collection: collections, inferedFields, viewStyle };
const inferredFields = this.inferFields(collections);
const entryCardProps = { collection: collections, inferredFields, viewStyle };
return entries.map((entry, idx) => <EntryCard {...entryCardProps} entry={entry} key={idx} />);
};

Expand All @@ -63,8 +63,8 @@ export default class EntryListing extends React.Component {
const collectionName = entry.get('collection');
const collection = collections.find(coll => coll.get('name') === collectionName);
const collectionLabel = !isSingleCollectionInList && collection.get('label');
const inferedFields = this.inferFields(collection);
const entryCardProps = { collection, entry, inferedFields, collectionLabel };
const inferredFields = this.inferFields(collection);
const entryCardProps = { collection, entry, inferredFields, collectionLabel };
return <EntryCard {...entryCardProps} key={idx} />;
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import {
getRemarkPlugins,
} from '../../../lib/registry';
import { ErrorBoundary } from '../../UI';
import { selectTemplateName, selectInferedField, selectField } from '../../../reducers/collections';
import {
selectTemplateName,
selectInferredField,
selectField,
} from '../../../reducers/collections';
import { boundGetAsset } from '../../../actions/media';
import { selectIsLoadingAsset } from '../../../reducers/medias';
import { INFERABLE_FIELDS } from '../../../constants/fieldInference';
Expand Down Expand Up @@ -55,17 +59,17 @@ export class PreviewPane extends React.Component {
);
};

inferedFields = {};
inferredFields = {};

inferFields() {
const titleField = selectInferedField(this.props.collection, 'title');
const shortTitleField = selectInferedField(this.props.collection, 'shortTitle');
const authorField = selectInferedField(this.props.collection, 'author');

this.inferedFields = {};
if (titleField) this.inferedFields[titleField] = INFERABLE_FIELDS.title;
if (shortTitleField) this.inferedFields[shortTitleField] = INFERABLE_FIELDS.shortTitle;
if (authorField) this.inferedFields[authorField] = INFERABLE_FIELDS.author;
const titleField = selectInferredField(this.props.collection, 'title');
const shortTitleField = selectInferredField(this.props.collection, 'shortTitle');
const authorField = selectInferredField(this.props.collection, 'author');

this.inferredFields = {};
if (titleField) this.inferredFields[titleField] = INFERABLE_FIELDS.title;
if (shortTitleField) this.inferredFields[shortTitleField] = INFERABLE_FIELDS.shortTitle;
if (authorField) this.inferredFields[authorField] = INFERABLE_FIELDS.author;
}

/**
Expand Down Expand Up @@ -100,15 +104,15 @@ export class PreviewPane extends React.Component {
}

const labelledWidgets = ['string', 'text', 'number'];
const inferedField = Object.entries(this.inferedFields)
const inferredField = Object.entries(this.inferredFields)
.filter(([key]) => {
const fieldToMatch = selectField(this.props.collection, key);
return fieldToMatch === field;
})
.map(([, value]) => value)[0];

if (inferedField) {
value = inferedField.defaultPreview(value);
if (inferredField) {
value = inferredField.defaultPreview(value);
} else if (
value &&
labelledWidgets.indexOf(field.get('widget')) !== -1 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('Editor', () => {
expect(props.loadEntry).toHaveBeenCalledWith(props.collection, 'slug');
});

it('should load entires when entries are not loaded when mounting', () => {
it('should load entries when entries are not loaded when mounting', () => {
render(
<Editor
{...props}
Expand All @@ -152,7 +152,7 @@ describe('Editor', () => {
expect(props.loadEntries).toHaveBeenCalledWith(props.collection);
});

it('should not load entires when entries are loaded when mounting', () => {
it('should not load entries when entries are loaded when mounting', () => {
render(
<Editor
{...props}
Expand Down
8 changes: 4 additions & 4 deletions packages/decap-cms-core/src/integrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Map } from 'immutable';
import Algolia from './providers/algolia/implementation';
import AssetStore from './providers/assetStore/implementation';

export function resolveIntegrations(interationsConfig, getToken) {
export function resolveIntegrations(integrationsConfig, getToken) {
let integrationInstances = Map({});
interationsConfig.get('providers').forEach((providerData, providerName) => {
integrationsConfig.get('providers').forEach((providerData, providerName) => {
switch (providerName) {
case 'algolia':
integrationInstances = integrationInstances.set('algolia', new Algolia(providerData));
Expand All @@ -24,11 +24,11 @@ export function resolveIntegrations(interationsConfig, getToken) {
export const getIntegrationProvider = (function () {
let integrations = null;

return (interationsConfig, getToken, provider) => {
return (integrationsConfig, getToken, provider) => {
if (integrations) {
return integrations.get(provider);
} else {
integrations = resolveIntegrations(interationsConfig, getToken);
integrations = resolveIntegrations(integrationsConfig, getToken);
return integrations.get(provider);
}
};
Expand Down
Loading

0 comments on commit 9720a4c

Please sign in to comment.