diff --git a/docs/4devs.md b/docs/4devs.md index bd92c356a..b6833e1fb 100644 --- a/docs/4devs.md +++ b/docs/4devs.md @@ -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. \ No newline at end of file