Description
When running the application locally via npm start, the Login component (src/app/login/login.component.html) fails to properly bind the translation keys to the loaded en.json file.
Instead of seeing the expected text (e.g., "Enterprise Edition" or "Backoffice Login"), the raw translation keys are rendered directly on the screen. For example, the APP_NAME key fails to interpolate, and the labels.heading.Backoffice Login key is displayed as raw text.
Steps to Reproduce
- Start the angular development server (
npm start).
- Navigate to
http://localhost:4200/login.
- Observe the
mifosx-language-selector and the main text bindings rendering raw keys instead of the values defined in src/assets/translations/en.json.
Expected Behavior
The TranslateHttpLoader should correctly fetch and parse the assets/translations/en.json file (or the default browser locale), and the translate pipe should render the appropriate string values.
Proposed Solution
- Investigate the
TranslateModule.forRoot() configuration in app.module.ts to ensure the TranslateHttpLoader is pointing to the correct ./assets/translations/ path.
- Verify if a missing fallback language configuration or a race condition during initialization is causing the pipes to render before the JSON is fetched.
I have researched this issue locally and would be happy to submit a PR with the fix.
Description
When running the application locally via
npm start, the Login component (src/app/login/login.component.html) fails to properly bind the translation keys to the loadeden.jsonfile.Instead of seeing the expected text (e.g., "Enterprise Edition" or "Backoffice Login"), the raw translation keys are rendered directly on the screen. For example, the
APP_NAMEkey fails to interpolate, and thelabels.heading.Backoffice Loginkey is displayed as raw text.Steps to Reproduce
npm start).http://localhost:4200/login.mifosx-language-selectorand the main text bindings rendering raw keys instead of the values defined insrc/assets/translations/en.json.Expected Behavior
The
TranslateHttpLoadershould correctly fetch and parse theassets/translations/en.jsonfile (or the default browser locale), and thetranslatepipe should render the appropriate string values.Proposed Solution
TranslateModule.forRoot()configuration inapp.module.tsto ensure theTranslateHttpLoaderis pointing to the correct./assets/translations/path.I have researched this issue locally and would be happy to submit a PR with the fix.