/findadoc-frontend

findadoc.jp web site

Primary LanguageVueBSD 4-Clause "Original" or "Old" LicenseBSD-4-Clause

Website Netlify Status GitHub License W3C Validation ESLint

Find a Doc JAPAN

Join our slack!

Working with the submodule

Note this project uses a git submodule to manage translations. That repository is here

# init submodules when running for the first time
$ git submodule update --init --recursive
# run this when you need to update the submodule
$ git submodule update

If you have more issues with submodules, please check out TROUBLESHOOTING.md

Environment Setup

$ cp .env.sample .env

Get the Firebase API key from the project leads and edit the .env file to have this value.

Build Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate

For detailed explanation on how things work, check out Nuxt.js docs.

Internationalization (i18n)

Under the hood, this project uses nuxt/i18n and vue-i18n.

The locale files are managed through a separate repo, incorporated as a submodule. Here is the process for adding new translation keys:

  1. Clone the findadoc-localization repo
  2. Edit the locales/en.json to contain the new keys.
  3. If you know another language, feel free to add the same key and translation to the appropriate locale file. Omit if you don't know it; we use English as the fallback language so nothing will break.
  4. Make a pull request to the localization repo and wait for it to be merged to main
  5. Update the submodule (see above) to get the latest keys
  6. Make your change in this repo with the new i18n keys and submit your PR 🎉