Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WELCOME message not in user's locale #811

Open
apple314159 opened this issue Nov 3, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@apple314159
Copy link
Contributor

commented Nov 3, 2017

The first page (dashboard) is rendered in the user's locale but the alert sent along with it is rendered in the default locale.

Forum discussion:
https://forums.userfrosting.com/t/welcome-message-not-in-users-locale/93/4

@lcharette

This comment has been minimized.

Copy link
Member

commented Nov 6, 2017

As stated on the forum, it's because the alert is generated before the user locale is loaded. The user locale is loaded after the redirect.

See : https://github.com/userfrosting/UserFrosting/blob/master/app/sprinkles/account/src/Controller/AccountController.php#L361

Maybe addMessageTranslated could accept the locale name as an additional argument.

@Silic0nS0ldier

This comment has been minimized.

Copy link
Member

commented Nov 30, 2017

Duplicate of #718. (well, a consequence of at least)

@lcharette

This comment has been minimized.

Copy link
Member

commented Nov 30, 2017

Yes and no... #718 would partly solve this. But if the browser is in French and the account in Spanish, it's still an issue.

@Silic0nS0ldier

This comment has been minimized.

Copy link
Member

commented Nov 30, 2017

Ah. I see. Hmm... Updating the language service to use the new language (if its different) would be a more useful change wouldn't it? That way any messages generated afterward (either from UF code, or user customisations) would be covered.

@lcharette

This comment has been minimized.

Copy link
Member

commented Nov 30, 2017

Actually, forcing a locale when using translate would be more useful... but the way the translator is made, it needs to load all of the translation key... which isn't optimal...

@lcharette lcharette added this to the 4.2.0 milestone Dec 16, 2017

@lcharette lcharette self-assigned this Mar 28, 2018

@lcharette lcharette modified the milestones: 4.2.0, 4.3.0 Aug 21, 2018

@lcharette lcharette modified the milestones: 4.3.0, 4.4.0 Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.