Skip to content

i18n Translation Keys are rendering as plain text on the Login UI #109

@Rahulchaudharyji2

Description

@Rahulchaudharyji2

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

  1. Start the angular development server (npm start).
  2. Navigate to http://localhost:4200/login.
  3. 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

  1. Investigate the TranslateModule.forRoot() configuration in app.module.ts to ensure the TranslateHttpLoader is pointing to the correct ./assets/translations/ path.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions