Skip to content

Commit

Permalink
chore(linter): change locale to UK from US (#1533)
Browse files Browse the repository at this point in the history
* chore(linter): change locale to UK from US
  • Loading branch information
dutterbutter authored Apr 24, 2021
1 parent 4f8a37b commit 40537f9
Show file tree
Hide file tree
Showing 88 changed files with 392 additions and 382 deletions.
10 changes: 5 additions & 5 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
Examples of behaviour that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
Expand All @@ -20,7 +20,7 @@ include:
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:
Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
Expand All @@ -34,13 +34,13 @@ Examples of unacceptable behavior by participants include:
## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
permanently any contributor for other behaviours that they deem inappropriate,
threatening, offensive, or harmful.

## Scope
Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $ git remote -v (you should see myrepo and gossamer in the list of remotes)

To start, check out our open issues. We recommend starting with an [issue labeled `Good First Issue`](https://github.com/ChainSafe/gossamer/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22). Leave a comment to let us know that you would like to work on it.

Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best faciliate collaboration, please create an issue before you start working on it.
Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best facilitate collaboration, please create an issue before you start working on it.

**6. Make improvements to the code.**

Expand Down Expand Up @@ -76,7 +76,7 @@ Navigate your browser to [https://github.com/ChainSafe/gossamer](https://github.

## Note on memory intensive tests
Unfortunately, the free tier for CI's have a memory cap and some tests will cause the CI to experience an out of memory error.
In order to mitigate this we have introduced the concept of **short tests**. If your PR causes an out of memory error please seperate the tests into two groups
In order to mitigate this we have introduced the concept of **short tests**. If your PR causes an out of memory error please separate the tests into two groups
like below and make sure to label it `large`:

```
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ If you're suggesting a change/improvement, tell us how it should work.

<!---
If describing a bug, tell us what happens instead of the expected behavior.
If describing a bug, tell us what happens instead of the expected behaviour.
If suggesting a change or an improvement, explain the difference between your
suggestion and current behavior.
suggestion and current behaviour.
-->

Expand All @@ -55,7 +55,7 @@ submit a PR and you'll get credit for the whole thing.


## To Reproduce
Steps to reproduce the behavior:
Steps to reproduce the behaviour:

1.
2.
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ run:

# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# no need to include all autogenerated files, we confidently recognise
# autogenerated files. If it's not please let us know.
#skip-files:

Expand Down Expand Up @@ -132,7 +132,7 @@ linters-settings:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
locale: US
locale: UK
ignore-words:
- gossamer
lll:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ build-debug:
@echo " > \033[32mBuilding binary...\033[0m "
GOBIN=$(PWD)/bin go run scripts/ci.go install-debug

## init: Initialize gossamer using the default genesis and toml configuration files
## init: Initialise gossamer using the default genesis and toml configuration files
init:
./bin/gossamer --key alice init --genesis chain/gssmr/genesis.json --force

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ make gossamer

### Run Default Node

initialize default node:
initialise default node:
```
./bin/gossamer --chain gssmr init
```
Expand All @@ -87,7 +87,7 @@ Then, re-run the above steps. NOTE: this feature is for testing only; if you wis

### Run Kusama Node

initialize kusama node:
initialise kusama node:
```
./bin/gossamer --chain kusama init
```
Expand All @@ -108,7 +108,7 @@ After it's finished bootstrapping, the node should begin to sync.

### Run Polkadot Node

initialize polkadot node:
initialise polkadot node:
```
./bin/gossamer --chain polkadot init
```
Expand Down
8 changes: 4 additions & 4 deletions cmd/gossamer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func createDotConfig(ctx *cli.Context) (*dot.Config, error) {
return cfg, nil
}

// createInitConfig creates the configuration required to initialize a dot node
// createInitConfig creates the configuration required to initialise a dot node
func createInitConfig(ctx *cli.Context) (*dot.Config, error) {
tomlCfg, cfg, err := setupConfigFromChain(ctx)
if err != nil {
Expand Down Expand Up @@ -736,17 +736,17 @@ func updateDotConfigFromGenesisJSONRaw(tomlCfg ctoml.Config, cfg *dot.Config) {
)
}

// updateDotConfigFromGenesisData updates the configuration from genesis data of an initialized node
// updateDotConfigFromGenesisData updates the configuration from genesis data of an initialised node
func updateDotConfigFromGenesisData(ctx *cli.Context, cfg *dot.Config) error {
// initialize database using data directory
// initialise database using data directory
db, err := chaindb.NewBadgerDB(&chaindb.Config{
DataDir: cfg.Global.BasePath,
})
if err != nil {
return fmt.Errorf("failed to create database: %s", err)
}

// load genesis data from initialized node database
// load genesis data from initialised node database
gen, err := state.LoadGenesisData(db)
if err != nil {
return fmt.Errorf("failed to load genesis data: %s", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/gossamer/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ var (
// FixFlagOrder allow us to use various flag order formats (ie, `gossamer init
// --config config.toml` and `gossamer --config config.toml init`). FixFlagOrder
// only fixes global flags, all local flags must come after the subcommand (ie,
// `gossamer --force --config config.toml init` will not recognize `--force` but
// `gossamer --force --config config.toml init` will not recognise `--force` but
// `gossamer init --force --config config.toml` will work as expected).
func FixFlagOrder(f func(ctx *cli.Context) error) func(*cli.Context) error {
return func(ctx *cli.Context) error {
Expand Down
30 changes: 15 additions & 15 deletions cmd/gossamer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ var (
initCommand = cli.Command{
Action: FixFlagOrder(initAction),
Name: "init",
Usage: "Initialize node databases and load genesis data to state",
Usage: "Initialise node databases and load genesis data to state",
ArgsUsage: "",
Flags: InitFlags,
Category: "INIT",
Description: "The init command initializes the node databases and loads the genesis data from the genesis file to state.\n" +
Description: "The init command initialises the node databases and loads the genesis data from the genesis file to state.\n" +
"\tUsage: gossamer init --genesis genesis.json",
}
// accountCommand defines the "account" subcommand (ie, `gossamer account`)
Expand Down Expand Up @@ -108,7 +108,7 @@ var (
}
)

// init initializes the cli application
// init initialises the cli application
func init() {
app.Action = gossamerAction
app.Copyright = "Copyright 2019 ChainSafe Systems Authors"
Expand Down Expand Up @@ -181,7 +181,7 @@ func importRuntimeAction(ctx *cli.Context) error {
}

// gossamerAction is the root action for the gossamer command, creates a node
// configuration, loads the keystore, initializes the node if not initialized,
// configuration, loads the keystore, initialises the node if not initialised,
// then creates and starts the node and node services
func gossamerAction(ctx *cli.Context) error {
// check for unknown command arguments
Expand Down Expand Up @@ -216,13 +216,13 @@ func gossamerAction(ctx *cli.Context) error {
// from createDotConfig because dot config should not include expanded path)
cfg.Global.BasePath = utils.ExpandDir(cfg.Global.BasePath)

// check if node has not been initialized (expected true - add warning log)
// check if node has not been initialised (expected true - add warning log)
if !dot.NodeInitialized(cfg.Global.BasePath, true) {

// initialize node (initialize state database and load genesis data)
// initialise node (initialise state database and load genesis data)
err = dot.InitNode(cfg)
if err != nil {
logger.Error("failed to initialize node", "error", err)
logger.Error("failed to initialise node", "error", err)
return err
}
}
Expand Down Expand Up @@ -289,7 +289,7 @@ func gossamerAction(ctx *cli.Context) error {
return nil
}

// initAction is the action for the "init" subcommand, initializes the trie and
// initAction is the action for the "init" subcommand, initialises the trie and
// state databases and loads initial state from the configured genesis file
func initAction(ctx *cli.Context) error {
lvl, err := setupLogger(ctx)
Expand All @@ -310,31 +310,31 @@ func initAction(ctx *cli.Context) error {
// from createDotConfig because dot config should not include expanded path)
cfg.Global.BasePath = utils.ExpandDir(cfg.Global.BasePath)

// check if node has been initialized (expected false - no warning log)
// check if node has been initialised (expected false - no warning log)
if dot.NodeInitialized(cfg.Global.BasePath, false) {

// use --force value to force initialize the node
// use --force value to force initialise the node
force := ctx.Bool(ForceFlag.Name)

// prompt user to confirm reinitialization
if force || confirmMessage("Are you sure you want to reinitialize the node? [Y/n]") {
if force || confirmMessage("Are you sure you want to reinitialise the node? [Y/n]") {
logger.Info(
"reinitializing node...",
"reinitialising node...",
"basepath", cfg.Global.BasePath,
)
} else {
logger.Warn(
"exiting without reinitializing the node",
"exiting without reinitialising the node",
"basepath", cfg.Global.BasePath,
)
return nil // exit if reinitialization is not confirmed
}
}

// initialize node (initialize state database and load genesis data)
// initialise node (initialise state database and load genesis data)
err = dot.InitNode(cfg)
if err != nil {
logger.Error("failed to initialize node", "error", err)
logger.Error("failed to initialise node", "error", err)
return err
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/gossamer/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func TestGossamerCommand(t *testing.T) {
t.Log("init gossamer output, ", "stdout", string(stdout), "stderr", string(stderr))

expectedMessages := []string{
"node initialized",
"node initialised",
}

for _, m := range expectedMessages {
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $ git remote -v (you should see myrepo and gossamer in the list of remotes)

To start, check out our open issues. We recommend starting with an [issue labeled `Good First Issue`](https://github.com/ChainSafe/gossamer/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22). Leave a comment to let us know that you would like to work on it.

Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best faciliate collaboration, please create an issue before you start working on it.
Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best facilitate collaboration, please create an issue before you start working on it.

**6. Make improvements to the code.**

Expand Down Expand Up @@ -76,7 +76,7 @@ Navigate your browser to [https://github.com/ChainSafe/gossamer](https://github.

## Note on memory intensive tests
Unfortunately, the free tier for CI's have a memory cap and some tests will cause the CI to experience an out of memory error.
In order to mitigate this we have introduced the concept of **short tests**. If your PR causes an out of memory error please seperate the tests into two groups
In order to mitigate this we have introduced the concept of **short tests**. If your PR causes an out of memory error please separate the tests into two groups
like below and make sure to label it `large`:

```
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ make gossamer

## Run a Gossamer Node

To run default Gossamer node, first initialize the node. This writes the genesis state to the database.
To run default Gossamer node, first initialise the node. This writes the genesis state to the database.
```
./bin/gossamer --chain gssmr init
```
Expand Down Expand Up @@ -77,7 +77,7 @@ After it's finished bootstrapping, the node should begin to sync.

## Run Polkadot Node

Initialize polkadot node:
Initialise polkadot node:
```
./bin/gossamer --chain polkadot init
```
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/overview/host-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Service interface {

### Core Service

The **core service** is responsible for block production and finalization (consensus) and processing messages received from the **network service**; it initializes <a target="_blank" rel="noopener noreferrer" href="https://research.web3.foundation/en/latest/polkadot/BABE/Babe/">BABE</a> sessions and <a target="_blank" rel="noopener noreferrer" href="https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf">GRANDPA</a> rounds and validates blocks and transactions before committing them to the **state service**.
The **core service** is responsible for block production and finalisation (consensus) and processing messages received from the **network service**; it initialises <a target="_blank" rel="noopener noreferrer" href="https://research.web3.foundation/en/latest/polkadot/BABE/Babe/">BABE</a> sessions and <a target="_blank" rel="noopener noreferrer" href="https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf">GRANDPA</a> rounds and validates blocks and transactions before committing them to the **state service**.

- only the **core service** writes to block state
- only the **core service** writes to storage state
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/getting-started/overview/package-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Gossamer packages can be categorized into **four package types**:

#### `dot/core`

- The **core package** implements the [Core Service](/getting-started/overview/host-architecture#core-service) - responsible for block production and block finalization (consensus) and processing messages received from the [Network Service](/getting-started/overview/host-architecture/#network-service).
- The **core package** implements the [Core Service](/getting-started/overview/host-architecture#core-service) - responsible for block production and block finalisation (consensus) and processing messages received from the [Network Service](/getting-started/overview/host-architecture/#network-service).

#### `dot/network`

Expand Down Expand Up @@ -72,7 +72,7 @@ Gossamer packages can be categorized into **four package types**:

#### `lib/blocktree`

- the **blocktree package** implements the blocktree, a data structure which tracks the chain and all its non-finalized forks.
- the **blocktree package** implements the blocktree, a data structure which tracks the chain and all its non-finalised forks.

#### `lib/common`

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/resources/general-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To start, it would be extremely beneficial to have an understanding of the Polka

## Polkadot Host

[_Please Note: The "Polkadot Host" was formerly known as the "Polkadot Runtime Enviornment"_]
[_Please Note: The "Polkadot Host" was formerly known as the "Polkadot Runtime Environment"_]

The Polkadot Host plays two important roles within the Polkadot ecosystem.

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/usage/command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permalink: /usage/command-line/

## Gossamer Command

The `gossamer` command is the root command for the `gossamer` package (`cmd/gossamer`). The root command starts the node (and initializes the node if the node has not already been initialized).
The `gossamer` command is the root command for the `gossamer` package (`cmd/gossamer`). The root command starts the node (and initialises the node if the node has not already been initialised).

### Accepted Formats

Expand Down Expand Up @@ -69,7 +69,7 @@ SUBCOMMANDS:
help, h Shows a list of commands or help for one command
account Create and manage node keystore accounts
export Export configuration values to TOML configuration file
init Initialize node databases and load genesis data to state
init Initialise node databases and load genesis data to state
```

List of ***local flags*** for `init` subcommand:
Expand Down Expand Up @@ -188,15 +188,15 @@ Available built-in keys:
./bin/gossmer --key heather
```

## Initializing Nodes
## initialising Nodes

To initialize or re-initialize a node, use the init subcommand `init`:
To initialise or re-initialise a node, use the init subcommand `init`:
```
./bin/gossamer init
./bin/gossamer --key alice --roles 4
```

`init` can be used with the `--base-path` or `--config` flag to re-initialize a custom node (ie, `bob` from the example above):
`init` can be used with the `--base-path` or `--config` flag to re-initialise a custom node (ie, `bob` from the example above):
```
./bin/gossamer --config node/gssmr/bob.toml init
```
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/usage/import-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ To create the raw genesis file used by the node, you can use the `gossamer build

This creates a genesis file `genesis.json` that is usable by the node.

### 3. Initialize the node with the genesis file
### 3. Initialise the node with the genesis file

Next, you will need to write the state in `genesis.json` to the database by initializing the node.
Next, you will need to write the state in `genesis.json` to the database by initialising the node.

```
./bin/gossamer init --genesis genesis.json
Expand Down
Loading

0 comments on commit 40537f9

Please sign in to comment.