Skip to content

Latest commit

 

History

History

gravitee-apim-portal-webui-next

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GraviteeApimPortalWebuiNext

This project was generated with Angular CLI version 17.2.3.

Development server

Run yarn serve for a dev server. Navigate to http://localhost:4101/. The application will automatically reload if you change any of the source files.

Code scaffolding

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.

Build

Run yarn build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run yarn test to execute the unit tests via Jest.

Translations

You can add your own translations to this project.

Manually add your translations

  1. Run yarn extract to extract the source language file.
    • You can specify the file extension with yarn extract --format=<format>. Find out more about available formats.
  2. Rename the translation file in src/locale to add the locale: messages.xlf --> messages.{locale}.xlf
  3. Complete the file with the desired translations.
  4. In the angular.json file, add the new local to i18n.locales. Example:
{ 
  // ...
  "i18n": {
    "sourceLocale": "en-US",
    "locales": {
      "fr": {
        "translation": "src/locale/messages.fr.xlf"
      }
    }
  },
  // ...
}
  1. Run yarn build:i18n to build all translations of your app.
  2. Serve the application from the gravitee-apim-portal-webui/dist/next/browser.
    • You use a simple HTTP server to test the build with npx http-server gravitee-apim-portal-webui/dist/next/browser.
  3. The translations will be available via <host>/en-US/ and for each locale specified, example: <host>/fr/.

Use a script to merge your translations

  1. Run yarn extract to extract the source language file.
  • You can specify the file extension with yarn extract --format=<format>. Find out more about available formats.
  1. Rename the translation file in src/locale to add the locale: messages.xlf --> messages.{locale}.xlf
  2. Complete the file with the desired translations.
  3. Run yarn merge:i18n to update the angular.json with the locale configuration and build the project.
  4. Serve the application from the gravitee-apim-portal-webui/dist/next/browser.

Find out more about @angular/localize.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.