Welcome to The Vaults at Yearn
Here you can find in-depth information about how Yearn’s yVaults operateand the actions (strategies) these vaults perform.
This website will maintain a one-stop location for all yVault descriptions. All version 1 yVaults have been deprecated, and any in production are now on version 2.
- Clone the repo
- Install the dependencies:
yarn
- Run the project in dev mode:
yarn run dev
- Optional: to test in prod mode, run
yarn run build && yarn run start
This project integrate a custom translation system, based on some standard and localization standards. New locales must be manually added and integrated.
All translations are stored in the localization/[locale]
folder. Right now only the common.json
file is used.
[locale]
should be replaced with the locale code, e.g. en
, es
, fr
. Codes can be found here.
Fallback for missing translations is the en
locale.
- If the locale file exists, aka
[locale]/common.json
, you can just check the missing translations from the reference file (en/common.json
) and add them. - If the locale file does not exist, you first need to create a new folder with your locale code, copy the
_common.json
file in it and rename it tocommon.json
. Then, you can start translating.
Once the translation is done, you will need to ensure the app will recognize the new locale. To do so, you first need to check if the file utils/locales.js
is updated and contains your locale. This file contain an object following this structure:
'ru': { //Id of the locale
'code': 'ru', //Iso code of the locale, the same as for the [locale] folder
'name': 'Русский', //Name of the locale, in locale language
'symbol': 'Ru', //Symbol of the locale, which will be displayed on the language selection menu
},
If not, just apprend the new locale to the object.
In order to be able to auto-detect the locale and redirect the users browser to the correct locale, you need to add the locale Iso code to the i18n.locales
array in the next.config.js
file.
i18n: {
locales: ['en', 'fr', 'es', 'ru'],
defaultLocale: 'en',
},