Skip to content

Commit

Permalink
feat: add translations for phone auth
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveOrDead committed Jan 24, 2024
1 parent 73af6dc commit 94e6cd0
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 1 deletion.
86 changes: 85 additions & 1 deletion auth-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,45 @@
"choose_another_method_link"
]
},
"mfa_email_page": {
"type": "object",
"properties": {
"page_title": {
"type": "string"
},
"heading": {
"type": "string"
},
"description": {
"type": "string"
},
"continue_button": {
"type": "string"
},
"email_input_label": {
"type": "string"
},
"email_input_error_required": {
"type": "string"
},
"email_input_error_invalid": {
"type": "string"
},
"email_input_error_email_in_use": {
"type": "string"
}
},
"required": [
"page_title",
"heading",
"description",
"continue_button",
"email_input_label",
"email_input_error_required",
"email_input_error_invalid",
"email_input_error_email_in_use"
]
},
"auth_error_page": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1124,11 +1163,55 @@
"sign_in_another_way_separator",
"sign_in_another_way_link"
]
},
"phone_number_component": {
"type": "object",
"properties": {
"phone_input_label": {
"type": "string"
},
"country_select_label": {
"type": "string"
},
"use_email_link": {
"type": "string"
},
"use_phone_link": {
"type": "string"
},
"phone_input_error_sms_limit_reached": {
"type": "string"
},
"phone_input_error_invalid_country_code": {
"type": "string"
},
"phone_input_error_required": {
"type": "string"
},
"phone_input_error_invalid_format": {
"type": "string"
},
"phone_input_error_no_account_found": {
"type": "string"
}
},
"required": [
"phone_input_label",
"country_select_label",
"use_email_link",
"use_phone_link",
"phone_input_error_sms_limit_reached",
"phone_input_error_invalid_country_code",
"phone_input_error_required",
"phone_input_error_invalid_format",
"phone_input_error_no_account_found"
]
}
},
"required": [
"base_layout",
"mfa_sms_page",
"mfa_email_page",
"auth_error_page",
"secret_page",
"sign_in_page",
Expand All @@ -1150,7 +1233,8 @@
"authenticator_app_qr_code_page",
"email_address_verification_email",
"general_errors",
"account_not_found_page"
"account_not_found_page",
"phone_number_component"
]
}
},
Expand Down
21 changes: 21 additions & 0 deletions en-AU/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
"country_input_error_invalid": "A valid country is required",
"choose_another_method_link": "Choose another method"
},
"mfa_email_page": {
"page_title": "Enter email | ${business_name}",
"heading": "Authenticate via Email",
"description": "Add an email address to receive codes by email",
"continue_button": "Continue",
"email_input_label": "Email",
"email_input_error_required": "Email can't be left blank",
"email_input_error_invalid": "Enter a valid email address",
"email_input_error_email_in_use": "Email address in use"
},
"auth_error_page": {
"page_title": "Authentication error",
"heading": "Authentication error"
Expand Down Expand Up @@ -288,6 +298,17 @@
"back_button": "Back to sign in",
"sign_in_another_way_separator": "or",
"sign_in_another_way_link": "sign in another way"
},
"phone_number_component": {
"phone_input_label": "Phone number",
"country_select_label": "Country",
"use_email_link": "Switch to email",
"use_phone_link": "Switch to phone number",
"phone_input_error_sms_limit_reached": "Can't send code. SMS message service not set up. Sign in using another method.",
"phone_input_error_invalid_country_code": "Invalid country code. Select from the country list.",
"phone_input_error_required": "Phone number can't be left blank",
"phone_input_error_invalid_format": "Enter a valid number without spaces or leading country code",
"phone_input_error_no_account_found": "No account found with this phone number"
}
}
}
21 changes: 21 additions & 0 deletions en-GB/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
"country_input_error_invalid": "A valid country is required",
"choose_another_method_link": "Choose another method"
},
"mfa_email_page": {
"page_title": "Enter email | ${business_name}",
"heading": "Authenticate via Email",
"description": "Add an email address to receive codes by email",
"continue_button": "Continue",
"email_input_label": "Email",
"email_input_error_required": "Email can't be left blank",
"email_input_error_invalid": "Enter a valid email address",
"email_input_error_email_in_use": "Email address in use"
},
"auth_error_page": {
"page_title": "Authentication error",
"heading": "Authentication error"
Expand Down Expand Up @@ -288,6 +298,17 @@
"back_button": "Back to sign in",
"sign_in_another_way_separator": "or",
"sign_in_another_way_link": "sign in another way"
},
"phone_number_component": {
"phone_input_label": "Phone number",
"country_select_label": "Country",
"use_email_link": "Switch to email",
"use_phone_link": "Switch to phone number",
"phone_input_error_sms_limit_reached": "Can't send code. SMS message service not set up. Sign in using another method.",
"phone_input_error_invalid_country_code": "Invalid country code. Select from the country list.",
"phone_input_error_required": "Phone number can't be left blank",
"phone_input_error_invalid_format": "Enter a valid number without spaces or leading country code",
"phone_input_error_no_account_found": "No account found with this phone number"
}
}
}
21 changes: 21 additions & 0 deletions en-US/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
"country_input_error_invalid": "A valid country is required",
"choose_another_method_link": "Choose another method"
},
"mfa_email_page": {
"page_title": "Enter email | ${business_name}",
"heading": "Authenticate via Email",
"description": "Add an email address to receive codes by email",
"continue_button": "Continue",
"email_input_label": "Email",
"email_input_error_required": "Email can't be left blank",
"email_input_error_invalid": "Enter a valid email address",
"email_input_error_email_in_use": "Email address in use"
},
"auth_error_page": {
"page_title": "Authentication error",
"heading": "Authentication error"
Expand Down Expand Up @@ -288,6 +298,17 @@
"back_button": "Back to sign in",
"sign_in_another_way_separator": "or",
"sign_in_another_way_link": "sign in another way"
},
"phone_number_component": {
"phone_input_label": "Phone number",
"country_select_label": "Country",
"use_email_link": "Switch to email",
"use_phone_link": "Switch to phone number",
"phone_input_error_sms_limit_reached": "Can't send code. SMS message service not set up. Sign in using another method.",
"phone_input_error_invalid_country_code": "Invalid country code. Select from the country list.",
"phone_input_error_required": "Phone number can't be left blank",
"phone_input_error_invalid_format": "Enter a valid number without spaces or leading country code",
"phone_input_error_no_account_found": "No account found with this phone number"
}
}
}
21 changes: 21 additions & 0 deletions en/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
"country_input_error_invalid": "A valid country is required",
"choose_another_method_link": "Choose another method"
},
"mfa_email_page": {
"page_title": "Enter email | ${business_name}",
"heading": "Authenticate via Email",
"description": "Add an email address to receive codes by email",
"continue_button": "Continue",
"email_input_label": "Email",
"email_input_error_required": "Email can't be left blank",
"email_input_error_invalid": "Enter a valid email address",
"email_input_error_email_in_use": "Email address in use"
},
"auth_error_page": {
"page_title": "Authentication error",
"heading": "Authentication error"
Expand Down Expand Up @@ -288,6 +298,17 @@
"back_button": "Back to sign in",
"sign_in_another_way_separator": "or",
"sign_in_another_way_link": "sign in another way"
},
"phone_number_component": {
"phone_input_label": "Phone number",
"country_select_label": "Country",
"use_email_link": "Switch to email",
"use_phone_link": "Switch to phone number",
"phone_input_error_sms_limit_reached": "Can't send code. SMS message service not set up. Sign in using another method.",
"phone_input_error_invalid_country_code": "Invalid country code. Select from the country list.",
"phone_input_error_required": "Phone number can't be left blank",
"phone_input_error_invalid_format": "Enter a valid number without spaces or leading country code",
"phone_input_error_no_account_found": "No account found with this phone number"
}
}
}

0 comments on commit 94e6cd0

Please sign in to comment.