Skip to content

Commit c71378e

Browse files
authored
Merge pull request #1240 from firebase/@invertase/bb-26
2 parents 553675a + 04ea77b commit c71378e

File tree

18 files changed

+24
-26
lines changed

18 files changed

+24
-26
lines changed

examples/shadcn/src/components/sign-in-auth-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function SignInAuthForm(props: SignInAuthFormProps) {
8080
{props.onRegisterClick ? (
8181
<>
8282
<Button type="button" variant="secondary" onClick={props.onRegisterClick}>
83-
{getTranslation(ui, "prompts", "noAccount")} {getTranslation(ui, "labels", "register")}
83+
{getTranslation(ui, "prompts", "noAccount")} {getTranslation(ui, "labels", "signUp")}
8484
</Button>
8585
</>
8686
) : null}

examples/shadcn/src/components/sign-up-auth-screen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type { SignUpAuthScreenProps };
1212
export function SignUpAuthScreen({ children, ...props }: SignUpAuthScreenProps) {
1313
const ui = useUI();
1414

15-
const titleText = getTranslation(ui, "labels", "register");
15+
const titleText = getTranslation(ui, "labels", "signUp");
1616
const subtitleText = getTranslation(ui, "prompts", "enterDetailsToCreate");
1717

1818
return (

packages/angular/src/lib/auth/forms/sign-in-auth-form.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe("<fui-sign-in-auth-form />", () => {
7878
expect(screen.getByRole("button", { name: "Sign In" })).toBeInTheDocument();
7979
expect(screen.getByText("By continuing, you agree to our")).toBeInTheDocument();
8080
expect(screen.getByRole("button", { name: "Forgot Password" })).toBeInTheDocument();
81-
expect(screen.getByRole("button", { name: "Don't have an account? Register" })).toBeInTheDocument();
81+
expect(screen.getByRole("button", { name: "Don't have an account? Sign Up" })).toBeInTheDocument();
8282
});
8383

8484
it("should have correct translation labels", async () => {
@@ -102,7 +102,7 @@ describe("<fui-sign-in-auth-form />", () => {
102102
expect(component.forgotPasswordLabel()).toBe("Forgot Password");
103103
expect(component.signInLabel()).toBe("Sign In");
104104
expect(component.noAccountLabel()).toBe("Don't have an account?");
105-
expect(component.registerLabel()).toBe("Register");
105+
expect(component.signUpLabel()).toBe("Sign Up");
106106
expect(component.unknownErrorLabel()).toBe("An unknown error occurred");
107107
});
108108

@@ -164,7 +164,7 @@ describe("<fui-sign-in-auth-form />", () => {
164164
const component = fixture.componentInstance;
165165
const signUpSpy = jest.spyOn(component.signUp, "emit");
166166

167-
const signUpButton = screen.getByRole("button", { name: "Don't have an account? Register" });
167+
const signUpButton = screen.getByRole("button", { name: "Don't have an account? Sign Up" });
168168
fireEvent.click(signUpButton);
169169
expect(signUpSpy).toHaveBeenCalled();
170170
});

packages/angular/src/lib/auth/forms/sign-in-auth-form.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import {
7272
</fieldset>
7373
7474
@if (signUp) {
75-
<button fui-form-action (click)="signUp.emit()">{{ noAccountLabel() }} {{ registerLabel() }}</button>
75+
<button fui-form-action (click)="signUp.emit()">{{ noAccountLabel() }} {{ signUpLabel() }}</button>
7676
}
7777
</form>
7878
`,
@@ -86,7 +86,7 @@ export class SignInAuthFormComponent {
8686
forgotPasswordLabel = injectTranslation("labels", "forgotPassword");
8787
signInLabel = injectTranslation("labels", "signIn");
8888
noAccountLabel = injectTranslation("prompts", "noAccount");
89-
registerLabel = injectTranslation("labels", "register");
89+
signUpLabel = injectTranslation("labels", "signUp");
9090
unknownErrorLabel = injectTranslation("errors", "unknownError");
9191

9292
forgotPassword = output<void>();

packages/angular/src/lib/auth/screens/sign-up-auth-screen.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe("<fui-sign-up-auth-screen>", () => {
7373
injectTranslation.mockImplementation((category: string, key: string) => {
7474
const mockTranslations: Record<string, Record<string, string>> = {
7575
labels: {
76-
register: "Create Account",
76+
signUp: "Create Account",
7777
},
7878
prompts: {
7979
enterDetailsToCreate: "Enter your details to create an account",
@@ -205,7 +205,7 @@ describe("<fui-sign-up-auth-screen>", () => {
205205
],
206206
});
207207

208-
expect(injectTranslation).toHaveBeenCalledWith("labels", "register");
208+
expect(injectTranslation).toHaveBeenCalledWith("labels", "signUp");
209209
expect(injectTranslation).toHaveBeenCalledWith("prompts", "enterDetailsToCreate");
210210
});
211211

packages/angular/src/lib/auth/screens/sign-up-auth-screen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class SignUpAuthScreenComponent {
6969

7070
mfaResolver = computed(() => this.ui().multiFactorResolver);
7171

72-
titleText = injectTranslation("labels", "register");
72+
titleText = injectTranslation("labels", "signUp");
7373
subtitleText = injectTranslation("prompts", "enterDetailsToCreate");
7474

7575
signUp = output<UserCredential>();

packages/angular/src/lib/tests/test-helpers.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export const injectUI = jest.fn().mockReturnValue(() => ({
7575
sendSignInLink: "Send Sign In Link",
7676
resetPassword: "Reset Password",
7777
backToSignIn: "Back to Sign In",
78-
register: "Register",
7978
termsOfService: "Terms of Service",
8079
privacyPolicy: "Privacy Policy",
8180
},
@@ -109,7 +108,6 @@ export const injectTranslation = jest.fn().mockImplementation((category: string,
109108
sendSignInLink: "Send Sign In Link",
110109
resetPassword: "Reset Password",
111110
backToSignIn: "Back to Sign In",
112-
register: "Register",
113111
termsOfService: "Terms of Service",
114112
privacyPolicy: "Privacy Policy",
115113
phoneNumber: "Phone Number",

packages/react/src/auth/forms/sign-in-auth-form.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ describe("<SignInAuthForm />", () => {
236236
noAccount: "foo",
237237
},
238238
labels: {
239-
register: "bar",
239+
signUp: "bar",
240240
},
241241
}),
242242
});

packages/react/src/auth/forms/sign-in-auth-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function SignInAuthForm({ onSignIn, onForgotPasswordClick, onRegisterClic
112112
</fieldset>
113113
{onRegisterClick ? (
114114
<form.Action onClick={onRegisterClick}>
115-
{getTranslation(ui, "prompts", "noAccount")} {getTranslation(ui, "labels", "register")}
115+
{getTranslation(ui, "prompts", "noAccount")} {getTranslation(ui, "labels", "signUp")}
116116
</form.Action>
117117
) : null}
118118
</form.AppForm>

packages/react/src/auth/screens/sign-up-auth-screen.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe("<SignUpAuthScreen />", () => {
5959
const ui = createMockUI({
6060
locale: registerLocale("test", {
6161
labels: {
62-
register: "register",
62+
signUp: "register",
6363
},
6464
prompts: {
6565
enterDetailsToCreate: "enterDetailsToCreate",

0 commit comments

Comments
 (0)