11use maud:: { html, Markup , PreEscaped } ;
2+ use pointercrate_core:: localization:: task_lang;
23use pointercrate_core:: { localization:: tr, trp} ;
34use pointercrate_core_pages:: head:: HeadLike ;
45use pointercrate_core_pages:: PageFragment ;
@@ -20,6 +21,8 @@ pub fn registration_page() -> PageFragment {
2021}
2122
2223fn register_page_body ( ) -> Markup {
24+ let lang = task_lang ( ) . language . to_string ( ) ;
25+
2326 html ! {
2427 div. center #register style="display: flex; align-items: center; justify-content: center; height: calc(100% - 70px)" { // 70px = height of nav bar
2528 div. flex. col style="align-items: center" {
@@ -38,6 +41,7 @@ fn register_page_body() -> Markup {
3841 data-client_id=( config:: google_client_id( ) )
3942 data-callback="googleOauthRegisterCallback" { }
4043
44+ script src=( format!( "https://accounts.google.com/gsi/client?hl={}" , & lang) ) async { }
4145 div . g_id_signin data-text="signup_with" style="margin: 10px 0px" { }
4246 @if cfg!( feature = "legacy_accounts" ) {
4347 p. or style="text-size: small; margin: 0px" { ( tr( "login.methods-separator" ) ) }
@@ -90,16 +94,16 @@ fn oauth_registration_dialog() -> Markup {
9094 div. dialog #oauth-registration-pick-username style="width: 400px" {
9195 span. plus. cross. hover { }
9296 h2. underlined. pad {
93- "Pick your username:"
97+ ( tr ( "register-oauth" ) )
9498 }
9599 form. flex. col novalidate = "" {
96100 p. info-red. output { }
97101 span. form-input #oauth-username {
98- label for = "username" { "Username:" }
102+ label for = "username" { ( tr ( "auth-username" ) ) }
99103 input type = "text" name = "username" ;
100104 p. error { }
101105 }
102- input. button. blue. hover type = "submit" style = "margin: 15px auto 0px;" value="Sign Up!" ;
106+ input. button. blue. hover type = "submit" style = "margin: 15px auto 0px;" value=( tr ( "register-oauth.submit" ) ) ;
103107 }
104108 }
105109 }
0 commit comments