Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Translation Epic - Configure Transloco to Work with AOT #333

Open
3 tasks done
Karvel opened this issue Jul 8, 2021 · 0 comments
Open
3 tasks done

Translation Epic - Configure Transloco to Work with AOT #333

Karvel opened this issue Jul 8, 2021 · 0 comments
Labels
bug Something isn't working chore Build and script changes

Comments

@Karvel
Copy link
Contributor

Karvel commented Jul 8, 2021

Desired Use Case

The project should be able to read the language JSON files when compiled for AOT.

Actual/Current Behavior

When compiling for production compiles for AOT, the project cannot find the language JSON files. This results in showing the JSON keys instead of values:

image

Steps to Implement This Feature

  • Add @ngneat/transloco-optimize as a dev dependency.
  • Explicitly enable the aot flag for production builds.
  • Add transloco:optimize script and use in build and deploy scripts.

Pre-Testing TODOs

What needs to be done before testing.

  1. Run yarn install to install the new @ngneat/transloco-optimize dependency.

Testing Steps

If you are not a member of this project, skip this step

How do the users test this change?

  1. Run ng serve --prod locally OR run yarn run build:prod and then run http-server dist/boilerplate-client-angular after installing http-server.
  2. Load the webapp in a browser.
  3. Confirm that the language values show, not the language keys
  4. Try changing languages.
  5. Confirm that the language changes to the new selected language successfully.

Learning

https://ngneat.github.io/transloco/docs/tools/optimize/
https://github.com/Shift3/bakersfield-goals/pull/87

@Karvel Karvel added bug Something isn't working chore Build and script changes labels Jul 8, 2021
@Karvel Karvel added this to the Translation - Sprint #6 milestone Jul 8, 2021
@Karvel Karvel self-assigned this Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working chore Build and script changes
Projects
None yet
Development

No branches or pull requests

1 participant