This project was generated with Angular CLI version 6.2.4.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
- Run
ng build
to build the project. The build artifacts will be stored in thedist/
directory. - IMPORTANT For a production build
ng build --prod
is likely to result in a memory error - Please use
npm run prod-build
instead
You can login with either of the two credentials mentioned below listed in username
: password
format
olduser
:abboldsecret
newuser
:abbnewsecret
The view will display according to different user type('old', 'new').
To edit the login credentials you can go to src/assets/data/UserCredentials.json
and updated the SHA-256 hashed credentials. Note the secret
for SHA-256 hashing to be used is abbrcs
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
Ref this: https://gitlab.com/nildaine/abb-rcs-prototype/blob/f6c00cc2f5b91bf78d803ff34f7b638b2d59fb6a/src/locale/messages.fr.xlf or locally check the /src/locale/message.fr.xlf; This file contains all the text/labels used in the application. The
npm run start:fr
& to run the usual english version use the command
npm start or npm run start
To generate a new translation file run ng xi18n --output-path src/i18n
check this (https://angular.io/guide/i18n) for more details.
these are automatically generated.
npm run xi18n
This generates src/locale/message.xlf
this file contains the list of all the text/labels that can be translated. (i.e. text in tags with keyword i18n)
after this make a copy of this file (say src/locale/message.fr.xlf
) . In this file add the <target> translated text </target>
after every <source> original text </source>
tag.
Once these changes are made, start the application by running npm run start:fr
for the French version . & to build the command is npm run build:fr
Adding new translation text/keywords at a later stage to existing message.xlf
file or message.fr.xlf
file:
If we have to add new text for translation then add "i18n" keyword to the desired tags. After this run npm run xi18n
to generate the updated version of message.xlf
. This time, from the newly generated message.xlf
only copy the new text/labes to message.fr.xlf
& add their translation by adding <target>
tags next to the the <source>
tags.
To run & build the updated version run npm run start:fr
& npm run build:fr
ref this: https://angular.io/guide/i18n for more details.
- Add the
i18n
keyword to the tag containing text that you want to translate ref: https://d.pr/free/i/2vU7bA+ - Then run
npm run xi18n
to regenerate the 'src/locale/message.xlf` - Then copy the text those text ( ..., tags) are to converted to
src/locale/message.fr.xlf
& add the (<target... tags) contaning the translated text. - To run the translated development build run
npm run start:fr
- & to build the prodicution versin run
npm run build:fr
ref this: https://angular.io/guide/i18n for more details.