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

[TypeScript][Bot-Solutions] Fix MultiProviderAuthDialog not being localized #3762

Conversation

VictorGrycuk
Copy link
Contributor

Purpose

What is the context of this pull request? Why is it being done?
These changes replicate in Bot-Solution TypeScript the fix of PR #3760.

MultiProviderAuthDialog login dialog only works with the fallback language. It should be able to localize it using the user's locale.

The dialog is added in the constructor of MultiProviderAuthDialog, before the activity from the user is received, therefore the locale of the user is unknown at this moment.

This fix revolves around the idea of adding dialogs of known language beforehand, and then using the user locale to retrieve their specific locale's dialog.

Changes

Are there any changes that need to be called out as significant or particularly difficult to grasp? (Include illustrative screenshots for context if applicable.)

  • Overloads ResponseManager's GetResponse to receive a specific locale instead of using the i18next.
  • Adds a new method on MultiProviderAuthDialog to add a new login dialog for each configured locale
  • Adds support for LoginButton and LoginPrompt in authenticationResponses class
  • Adds support for LoginButton and LoginPrompt responses in authenticationResponses cards

Tests

Is this covered by existing tests or new ones? If no, why not?
Unit tests passing
image

Feature Plan

Are there any remaining steps or dependencies before this issue can be fully resolved? If so, describe and link to any relevant pull requests or issues.

Checklist

General

  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the appropriate tests
  • I have updated related documentation

@lauren-mills lauren-mills merged commit db57d22 into microsoft:master Jun 2, 2021
@Batta32 Batta32 deleted the feature/southworks/fix-MultiProviderAuthDialog-localization-ts branch June 2, 2021 22:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants