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

Open
3 tasks done
Karvel opened this issue Jun 17, 2021 · 0 comments
Open
3 tasks done

Translation Epic - Handle Server Translated Messages #326

Karvel opened this issue Jun 17, 2021 · 0 comments
Labels
feature New feature or change that directly affects users

Comments

@Karvel
Copy link
Contributor

Karvel commented Jun 17, 2021

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.
@Karvel Karvel added the feature New feature or change that directly affects users label Jun 17, 2021
@Karvel Karvel added this to the Translation - Sprint #6 milestone Jun 17, 2021
@Karvel Karvel self-assigned this Jun 17, 2021
@Karvel Karvel changed the title Handle Server Translated Messages Translation Epic - Handle Server Translated Messages Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or change that directly affects users
Projects
None yet
Development

No branches or pull requests

1 participant