Before running the following steps make sure you have yarn installed
1- Clone the repo
git clone https://github.com/ORCID/orcid-angular
2- Install its dependencies
cd orcid-angular
yarn
3- Serve the front-end locally
yarn start-local
At the moment the only way to run the application on development time with a translation file is using AOT compilations.
1- First generate the translations files
yarn build:i18n
This writes src/locale/messages.xlf (the source strings) and the three test
languages messages.xx.xlf, messages.lr.xlf and messages.rl.xlf. None of
those four files are committed: they are regenerated by the prebuild hook on
every yarn build, and CI pushes messages.xlf to Transifex on every push to
main. Translations for real locales come back through the
pull-translations workflow, so run this step once after a fresh clone.
2- Run the application on the language you want using one of the following options
yarn start:en ## Runs the application using the english translations
yarn start:fr ## Runs the application using the french translations
yarn start:ar ## Runs the application using the arabic translations
yarn start:xx ## Pseudo-locale, used only for testing i18n coverage
Only those four have a script. Every other locale declared in angular.json
(ca cs es it ja ko lr pt rl ru src uk zh-CN zh-TW) has a serve configuration
you can use directly, for example:
ng serve --configuration=es
The following tools are not required to work on the project but they facilitate the development process, please read more about these tools on the provided URLs.
1- Download Visual Studio Code and install it
2- Download and install Prettier, TSLint and Angular Language Service extensions
3- Go to VSCode menu Code/Preferences/Settings search for Format and select esbenp.prettier-vscode. You might also activate the Editor: Format On Save checkbox.
Build the application for deployment (prod, sandbox, qa, int all use the same asset; environment is resolved at runtime):
yarn build
Please refer to the following documentation for more information: