Skip to content

Commit

Permalink
update development docs with new installation steps
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-funk committed Aug 16, 2023
1 parent c2f3f4f commit 3fa6653
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions docs/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,13 @@ docker run -d -p 27017:27017 --restart always --name mongo mongo:4.2
docker run -d -p 6379:6379 --restart always --name redis redis:3.2
```

We recommend installing
[watchman](https://facebook.github.io/watchman/docs/install.html) for better
watch performance.
Then initialize Coral using the helper script:

```bash
# On macOS, you can run the following with Homebrew.
brew install watchman
sh initialize.sh
```

Then start Coral in development mode with:
Then inside the `client/` folder run:

```bash
# Run the server in development mode in order to facilitate auto-restarting and
Expand All @@ -51,6 +48,14 @@ Then start Coral in development mode with:
npm run watch
```

Then open another terminal inside the `server/` folder and similarly run:

```bash
npm run watch
```

These two terminals will run through some build steps and start the system up in development mode. The `client/` hosts the front end code and the `server/` hosts the GraphQL API and underlying data management with Redis and Mongo.

When the client code has been built, navigate to http://localhost:8080/install
to start the installation wizard.

Expand All @@ -60,9 +65,9 @@ To run linting and tests use the following commands:

```bash
# Run the linters.
npm run lint
sh lint.sh

# Run our unit and integration tests.
# Inside client, server you can run our unit and integration tests
npm run test
```

Expand Down Expand Up @@ -105,7 +110,7 @@ https://github.com/coralproject/talk/tree/main/src/locales

Coral uses the [fluent](http://projectfluent.org/) library and store our
translations in [FTL](http://projectfluent.org/fluent/guide/) files in
`src/locales/` and `src/core/server/locales/`.
`locales/` and `server/src/core/server/locales/`.

Strings are added or removed from localization bundles in the translation files
as needed. Strings **MUST NOT** be _changed_ after they've been committed and
Expand All @@ -115,12 +120,12 @@ It's often useful to add a comment above the string with info about how and
where the string is used.

Once a language has enough coverage, it should be added to
`src/core/common/helpers/i18n/locales.ts`.
`common/lib/helpers/i18n/locales.ts`.

The [Perspective API](https://developers.perspectiveapi.com/s/about-the-api-methods)
also supports comments in specific languages. When the language is supported in
Coral and supported by the Perspective API, the language should be added to the
language map in `src/core/server/services/comments/pipeline/phases/toxic.ts`.
language map in `server/src/core/server/services/comments/pipeline/phases/toxic.ts`.

To assist with the translation process, we have a script that is based on the
work by @cristiandean in https://github.com/coralproject/talk/pull/2949 that
Expand Down

0 comments on commit 3fa6653

Please sign in to comment.