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

Translation Epic - Handle Server Translated Messages #326

@Karvel

Description

@Karvel

Desired Use Case

The client should not try to translate server-translated messages.

Actual/Current Behavior

Currently, the client tries to translate all messages passed through to the NotificationService. When given a translated string from the server, the service falls back to serving the message as is, but the translation library, transloco, logs a missing translation key error.

Steps to Implement This Feature

  • Add a isServerTranslated flag with default value of false to the NotificationService methods.
  • Only try translating the message when isServerTranslated is true.
  • Pass the true value from the server error statements in the handleError() semaphore.

Testing Steps

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

How do the users test this change?

  1. Cause a server side error (logging in with the wrong credentials is an easy test).
  2. Confirm that the error toast shows correctly.
  3. Confirm that no error about missing keys appears in the console.
  4. Try again in other languages.
  5. Confirm that no error about missing keys appears in the console.
  6. Trigger a client side message (adding or deleting a user, agency, or agent, resending activation email, and resetting user passwords all show client side messages).
  7. Confirm that the success message shows correctly.
  8. Try again in other languages.
  9. Confirm that the success message shows correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or change that directly affects users

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions