Skip to content

Commit

Permalink
Add cspell
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw committed Oct 11, 2024
1 parent c2c93a7 commit 4dd8fd1
Show file tree
Hide file tree
Showing 21 changed files with 2,264 additions and 1,574 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/check-spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Check spelling"
on:
pull_request:
types: [synchronize, opened]

jobs:
spellcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@934c74da3775ac844ec89503f666f67efb427fed # v6.8.1
10 changes: 5 additions & 5 deletions components/AskAI/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import styles from "./styles.module.css";
const MARKPROMPT_COMPLETIONS_URL = "https://api.markprompt.com/v1/completions";
const STREAM_SEPARATOR = "___START_RESPONSE_STREAM___";
const DEFAULT_MODEL = "gpt-3.5-turbo";
const PROJECT_KEY = "WNDN2YD8Z1HZwy5fOMVkUTzdL7pazDwN";
const PROJECT_KEY = "WNDN2YD8Z1HZwy5fOMVkUTzdL7pazDwN"; // cspell: disable-line
const AUTO_SCROLL_DISABLED = false;

const Caret = () => {
Expand Down Expand Up @@ -52,7 +52,7 @@ const AskAI = () => {
const answerContainerRef = useRef(null);
const didCompleteFirstQuery = useRef(false);

const iDontKnowMessage = "Sorry, I am not sure how to answer that.";
const IDKMessage = "Sorry, I am not sure how to answer that.";
const placeholder = `Ask me anything... eg. 'How to query products?'`;

const submitPrompt = useCallback(
Expand Down Expand Up @@ -85,15 +85,15 @@ const AskAI = () => {
body: JSON.stringify({
prompt,
model: DEFAULT_MODEL,
iDontKnowMessage,
IDKMessage,
projectKey: PROJECT_KEY,
}),
});

if (!res.ok || !res.body) {
const text = await res.text();
console.error("Error:", text);
setAnswer(iDontKnowMessage);
setAnswer(IDKMessage);
setLoading(false);
return;
}
Expand Down Expand Up @@ -128,7 +128,7 @@ const AskAI = () => {
setReferences(refs);
} catch (e) {
console.error("Error", e);
setAnswer(iDontKnowMessage);
setAnswer(IDKMessage);
}
setLoading(false);
},
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/address.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Depending on the country, not all `allowedFields` fields are necessary. Neverthe
### Valid address items extension

Saleor gives an option to extend the ruleset from [Google Address Data](https://chromium-i18n.appspot.com/ssl-address) and process custom address names.
There is a `VALID_ADDRESS_EXTENSION_MAP` embeded in core repository, which can be utilised to link custom names with the valid ones.
There is a `VALID_ADDRESS_EXTENSION_MAP` embedded in core repository, which can be utilized to link custom names with the valid ones.

Ie. `Dublin` is an invalid `countryArea` in accordance to Google Address Data ruleset. The correct value is `Co. Dublin`. By providing
a proper mapping, the value `Dublin` will be recognized as a valid country area and converted to `Co. Dublin`.
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/app-store/apps/TEMPLATE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Explain problem the app solves. Outline basic context and use cases.
Highlight the most important features of the app. Mention available providers if any.
If some feature is more complicated, create a dedicated page with more details or a dedicated guide.

Add upcoming featuers with link to roadmap/github, allowing reader to vote or comment.
Add upcoming features with link to roadmap/github, allowing reader to vote or comment.
-->

## Assumptions & limitations
Expand Down Expand Up @@ -98,7 +98,7 @@ put here with details instructions.
## Development

<!--
Link to develoment guide common for every apps.
Link to development guide common for every apps.

Then include specific development guide for this app.

Expand Down
4 changes: 2 additions & 2 deletions docs/developer/app-store/apps/adyen/storefront.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ The `code` field is a string identifying the error. One of the following values
- **`MissingSaleorApiUrlError`**
- **`MissingAuthDataError`** - when app was incorrectly installed / uninstalled and token to communicate with Saleor cannot be found
- **`HttpClientError`**
- **`InvalidDataError`** - when `data` field provded by storefront is invalid
- **`InvalidDataError`** - when `data` field provided by storefront is invalid

:::note

Expand All @@ -597,7 +597,7 @@ The `message` field is a human-readable message describing the error.

The `details` field is an object containing additional information about the error. It will contain different fields, depending on error code.

### Adyen API erorrs
### Adyen API errors

Error `details` will contain two fields:

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/app-store/apps/product-feed.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _Product Feed_ app allows generating an XML file with products and their details

## Limitations

The app is able to handle a maxium ~2300 variants per sales channel of your product catalogue.
The app is able to handle a maximum ~2300 variants per sales channel of your product catalogue.
After reaching that limit, only that amount will be included in the feed.

## Permissions
Expand Down
18 changes: 9 additions & 9 deletions docs/developer/app-store/legacy-plugins/np-atobarai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ For an up to date list of NP error codes please refer to the NP documentation.
Saleor introduces several internal codes in order to allow consistent processing across internal and external errors,
although most of them can be eliminated by validating data on the frontend.

- _SALEORNP000_ - networking error occurred while communicating with the payment gateway
- _SALEORNP001_ - missing billing address
- _SALEORNP002_ - missing shipping address
- _SALEORNP003_ - invalid billing address, this can happen for invalid post codes with the "Fill missing address" option switched on
- _SALEORNP004_ - invalid shipping address, this can happen for invalid post codes with the "Fill missing address" option switched on
- _SALEORNP005_ - payment has no pspReference
- _SALEORNP006_ - payment with the given id could not be found
- _SALEORNP007_ - tracking number is missing
- _SALEORNP008_ - carrier company code is invalid
- `SALEORNP000` - networking error occurred while communicating with the payment gateway
- `SALEORNP001` - missing billing address
- `SALEORNP002` - missing shipping address
- `SALEORNP003` - invalid billing address, this can happen for invalid post codes with the "Fill missing address" option switched on
- `SALEORNP004` - invalid shipping address, this can happen for invalid post codes with the "Fill missing address" option switched on
- `SALEORNP005` - payment has no pspReference
- `SALEORNP006` - payment with the given id could not be found
- `SALEORNP007` - tracking number is missing
- `SALEORNP008` - carrier company code is invalid

For errors that cannot be parsed, we recommend to display a generic payment error.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/app-store/plugins/stripe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ After we create a payment object for the Stripe payment gateway,
we can call the `checkoutComplete` mutation. The first call of `checkoutComplete` for checkout
creates [Stripe payment intent object](https://stripe.com/docs/api/payment_intents/object).

Optionaly, `checkoutComplete` can accept additional parameters for Stripe as fields in `paymentData` input:
Optionally, `checkoutComplete` can accept additional parameters for Stripe as fields in `paymentData` input:

- `paymentData.setup_future_usage` - Store payment method in Stripe for [future usage](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-setup_future_usage). **DEPRECATED**: This field will be removed in Saleor 4.0.
- `paymentData.off_session` - When [off_session](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-off_session) is set to True, [confirm](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm)=True will be also attached to request.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/community/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ Please, note that you need `MANAGE_ORDERS` permission to perform this action.

Please refer to the [Payments guide](developer/payments/overview.mdx) on how to use the API.

You can also check the [community resouces](developer/extending/apps/building-payment-app.mdx) for dummy payment app that can mimick payment gateway responses.
You can also check the [community resouces](developer/extending/apps/building-payment-app.mdx) for dummy payment app that can mimic payment gateway responses.
4 changes: 4 additions & 0 deletions docs/developer/export/export-gift-cards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ The link to download the file is sent by email to the requestor. An email with i

The exported file contains one column with a `code` header in the first row and gift card codes in the following rows, as shown below.

<!-- cspell:disable -->

| code |
| -------------- |
| ABCD-EFGH-IJKL |
| IJKL-ABCD-EFGH |
| EFGH-ABCD-IJKL |
| IJKL-EFGH-ABCD |

<!-- cspell:enable -->

## Exporting Gift Cards

:::note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: App Requirements
---

If you want to build your App from scratch, you should know that to make it installable in the Dashboard, the App requries implementation of following endpoints:
If you want to build your App from scratch, you should know that to make it installable in the Dashboard, the App requires implementation of following endpoints:

- [Manifest URL](#manifest-url) - to get your app's metadata.
- [Register URL](#register-url) - to exchange the app token.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/extending/apps/building-payment-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sequenceDiagram
In this step we simulate the attempt of charging payment gateway by returning [`CHARGE_SUCCESS`](api-reference/payments/enums/transaction-event-type-enum.mdx#transactioneventtypeenumcharge_success) or [`CHARGE_FAILURE`](api-reference/payments/enums/transaction-event-type-enum.mdx#transactioneventtypeenumcharge_failure) back from the app.

:::warning
[Transaction Flow Strategy](api-reference/payments/enums/transaction-flow-strategy-enum.mdx) setting can alter the behaviour of `transactionProcess` mutation. When set to `CHARGE` strategy, payments will be charged immediately, when it set `AUTHORIZATION` additional authorization step would be necessary. You can decide on the strategy on per channel basis in the _Configuration__Channels_ → your channel page. For this tutorial, we will assume the `CHARGE` strategy is used.
[Transaction Flow Strategy](api-reference/payments/enums/transaction-flow-strategy-enum.mdx) setting can alter the behavior of `transactionProcess` mutation. When set to `CHARGE` strategy, payments will be charged immediately, when it set `AUTHORIZATION` additional authorization step would be necessary. You can decide on the strategy on per channel basis in the _Configuration__Channels_ → your channel page. For this tutorial, we will assume the `CHARGE` strategy is used.
:::

## Building Saleor App from Template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ title: App Examples

### Saleor App Examples

<!-- TODO describe that App Examples are based on the App Template, and that's a repositorty -->
<!-- TODO describe that App Examples are based on the App Template, and that's a repository -->

[App Examples](https://github.com/saleor/app-examples) - examples of building common app logic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Events are messages that originate in Saleor Dashboard. AppBridge can subscribe

### Subscribing to events

`subscribe(eventType, callback)` - can be used to listen to particular [event type](#available-event-types). It returns an `unsubscribe` function, which unregisters the callback.
`subscribe(eventType, callback)` - can be used to listen to particular [event type](#available-event-types). It returns an `unsubscribe` function, which unregister the callback.

Example:

Expand All @@ -129,7 +129,7 @@ unsubscribe();

### Unsubscribing multiple listeners

`unsubscribeAll(eventType?)` - unregisters all callbacks of provided type. If no type was provided, it will remove all event callbacks.
`unsubscribeAll(eventType?)` - unregister all callbacks of provided type. If no type was provided, it will remove all event callbacks.

Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/extending/webhooks/creating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ If you change the webhook subscription, you may need to update the webhook in th
### Updating a webhook
To update a webhook (e.g. to deactivate it or change the permissions), use the `webhookUpdate` mutation. The mutation takes similar input fields as the `webhookCreate` mutation. The example below shows how to deactive a webhook:
To update a webhook (e.g. to deactivate it or change the permissions), use the `webhookUpdate` mutation. The mutation takes similar input fields as the `webhookCreate` mutation. The example below shows how to deactivate a webhook:
```graphql {2}
mutation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Keep in mind that some fields that use the synchronous event to be resolved are
# Blocked Fields for Subscription Payloads

Synchronous events are not allowed to request fields that are resolved using other synchronous events, which would lead to circular calls of the webhook.
Fields that are currently unallowed:
Fields that are currently not allowed:

| Object | Fields |
| ---------- | ------------------------------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/payments/payment-apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Depending on the provided `idempotencyKey` value, the below results will happen:

The idempotency is used to detect the same payment request made by `transactionInitialize`. The idempotency key should be generated by the storefront and passed as a mutation input. Any retries made with `transactionInitialize` mutation should provide the same idempotency key.

In Web, UUID can be generated by using Crytpo Web API:
In Web, UUID can be generated by using Crypto Web API:

```js
const idempotencyKey = window.crypto.randomUUID();
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/products/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: Learn how to configure products and catalog in Saleor.
---

import Figure from "@site/components/Figure";
import tshirt from "./t-shirt.png";
import tShirt from "./t-shirt.png";

## Creating an example product

Let's recreate a sample T-shirt product in Saleor.
The product is T-shirt that comes in different sizes, where each size has a different price and length description.

<Figure src={tshirt} alt={`Example config`} />
<Figure src={tShirt} alt={`Example config`} />

1. In _Configuration -> Attributes_ Create following _Product Attributes_:

Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = {

themeConfig: {
algolia: {
appId: "P1Y4DTZUZN",
appId: "P1Y4DTZUZN", // cspell: disable-line
apiKey: "021901243603f49a626be6b7435a2a8d",
indexName: "saleor",
placeholder: "Search Saleor Documentation",
Expand Down
Loading

0 comments on commit 4dd8fd1

Please sign in to comment.