Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #2062

Merged
merged 5 commits into from
Aug 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/4devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,26 @@ For _very_ rough statistics, open devTools -> Network and look at the line that
## Subscriptions and queries

For the performance of the app, it is important that we limit the amount of queries and subscriptions that alchemy creates when loading a page.

## Coding conventions

- As an ongoing process of adopting language localization, any new static text should be added to a translation file and used via `i18next` internationalization-framework.
Translation files location is under `src/assets/locales/`. After adding your text just import `i18next` and use the translation function:

`src/assets/locales/en/translation.json`

```
{
"My text key" : "Lorem ipsum dolor sit amet"
}
```

Your code:

```
import i18next from "i18next";

i18next.t("My text key"")}
```
- Use global variables for styling. See `src/assets/styles/global-variables.scss`.
We aim to stick to a uniform variables palette so add a new one only if it's necessary.