Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/breezy-ravens-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/web-ui-registration": patch
---

Removes the `Change to Default` language button from the login page
3 changes: 3 additions & 0 deletions apps/meteor/tests/e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ test.describe.parallel('Login', () => {
test('Should correctly display switch language button', async ({ page, api }) => {
expect((await setSettingValueById(api, 'Language', 'pt-BR')).status()).toBe(200);

const buttonDefault = page.getByRole('button', { name: 'Change to Default' });
await expect(buttonDefault).not.toBeVisible();

const button = page.getByRole('button', { name: 'Alterar para português (Brasil)' });
await button.click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,20 @@ const LoginSwitchLanguageFooter = ({

return (
<HorizontalWizardLayoutCaption>
{suggestions.map((suggestion) => (
<Button secondary small mie={8} key={suggestion.key} onClick={handleSwitchLanguageClick(suggestion)}>
<Trans i18nKey='registration.component.switchLanguage' tOptions={{ lng: suggestion.key }} values={{ name: suggestion.ogName }}>
Change to <strong>{suggestion.ogName}</strong>
</Trans>
</Button>
))}
{suggestions.map((suggestion) => {
// If suggestion is "Default", skip it
if (!suggestion.key) {
return;
}

return (
<Button secondary small mie={8} key={suggestion.key} onClick={handleSwitchLanguageClick(suggestion)}>
<Trans i18nKey='registration.component.switchLanguage' tOptions={{ lng: suggestion.key }} values={{ name: suggestion.ogName }}>
Change to <strong>{suggestion.ogName}</strong>
</Trans>
</Button>
);
})}
</HorizontalWizardLayoutCaption>
);
};
Expand Down
Loading