Developing Amica
Last updated
Last updated
Once you've , you're ready to hack on Amica!
Unit tests are run using jest
via npm run test
from the __tests__
directory. To run a specific test, you can pass the path of the test:
On ARM64 platforms (like Mac machines with M1 chips) the npm run test
command may fail with the following error:
In order to fix it, the terminal must be running in the Rosetta mode, the detailed instructions can be found in .
The translation uses the framework.
In React Component/Page
useTranslation (react hook):
In Common Function
Execute the npm run i18n
command in order to incorporate updated translations into the language files.
The language JSON files are located within the src/i18n/locales/
directory.
If you wish to add a new language:
Add the new language into the src/i18n/langs.ts
file.
Run npm run i18n
, the corresponding language files will be automatically created in the 'src/i8n/locales/
' directory.
First include its corresponding within the i18next-parser.config.mjs
file: locales: ['en', 'zh', 'de']
.