GithubHelp home page GithubHelp logo

jbelke / yearn-vaults-descriptions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yearn/yearn-vaults-descriptions

0.0 1.0 0.0 3.75 MB

Home Page: https://vaults.yearn.finance

JavaScript 97.42% CSS 2.58%

yearn-vaults-descriptions's Introduction

Vaults at Yearn

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.

How to - Dev

  1. Clone the repo
  2. Install the dependencies: yarn
  3. Run the project in dev mode: yarn run dev
  4. Optional: to test in prod mode, run yarn run build && yarn run start

How to - Add translations

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.

Create the translation file

  • 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 to common.json. Then, you can start translating.

Add the locale to the list of supported locale

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.

Enable locale in auto-detection

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',
	},

yearn-vaults-descriptions's People

Contributors

majorfi avatar darkghost7 avatar jktranslator avatar ceazor avatar saltyfacu avatar marcoworms avatar 0xbok avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.