Skip to content

Commit

Permalink
docs: add references to the 'Message Extraction' guide (#1594)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Apr 13, 2023
1 parent d1f1a4b commit 461c79e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions website/docs/ref/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,7 @@ Watches only for changes in locale files in your defined locale catalogs. For ex
#### `--debounce <delay>` {#compile-debounce}
Debounce, when used with `--debounce <delay>`, delays compilation for `<delay>` milliseconds, to avoid compiling multiple times for subsequent file changes.
## Further reading
- [Message Extraction](/docs/guides/message-extraction.md)
8 changes: 7 additions & 1 deletion website/docs/tutorials/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ Messages extracted!

[`extract`](/docs/ref/cli.md#extract) merges all translations with new messages, so you can run this command any time without worrying about losing any translations.

:::tip
Visit the [Message Extraction](/docs/guides/message-extraction.md) guide to read more about how it works.
:::

## Preparing catalogs for production

Once we have all catalogs ready and translated, we can compile the JSON into a minified JS file with the [`compile`](/docs/ref/cli.md#compile) command. This command parses the messages in MessageFormat and compiles them into simple functions. It also adds plural rules to a production ready catalog:
Expand Down Expand Up @@ -164,4 +168,6 @@ If you're using a CI, it is a good idea to add the `yarn extract` and `yarn comp

## Further reading

That's it! Checkout [CLI Reference](/docs/ref/cli.md) documentation for more info about `lingui` commands or [configuration reference](/docs/ref/conf.md) for info about configuration parameters.
- [CLI Reference](/docs/ref/cli.md)
- [Configuration Reference](/docs/ref/conf.md)
- [Message Extraction](/docs/guides/message-extraction.md)

0 comments on commit 461c79e

Please sign in to comment.