Multi language support User Registration page finished
Cette révision appartient à :
Parent
8f964371a4
révision
2b59ca3c97
3 fichiers modifiés avec 61 ajouts et 14 suppressions
|
@ -22,5 +22,49 @@
|
|||
{
|
||||
"id":"register_title",
|
||||
"translation": "Creating a new account"
|
||||
},
|
||||
{
|
||||
"id":"signup_box_title",
|
||||
"translation": "Please Sign Up <small>It's free and always will be.</small>"
|
||||
},
|
||||
{
|
||||
"id":"username",
|
||||
"translation": "Username"
|
||||
},
|
||||
{
|
||||
"id":"email_address",
|
||||
"translation": "Email Address"
|
||||
},
|
||||
{
|
||||
"id":"password",
|
||||
"translation": "Password"
|
||||
},
|
||||
{
|
||||
"id":"confirm_password",
|
||||
"translation": "Confirm Password"
|
||||
},
|
||||
{
|
||||
"id":"i_agree",
|
||||
"translation": "I agree"
|
||||
},
|
||||
{
|
||||
"id":"terms_conditions_confirm",
|
||||
"translation": "By clicking <strong class=\"label label-primary\">Register</strong>, you agree to the <a href=\"#\" data-toggle=\"modal\" data-target=\"#t_and_c_m\">Terms and Conditions</a> set out by this site, including our Cookie Use."
|
||||
},
|
||||
{
|
||||
"id":"signin",
|
||||
"translation": "Sign In"
|
||||
},
|
||||
{
|
||||
"id":"register",
|
||||
"translation": "Creating"
|
||||
},
|
||||
{
|
||||
"id":"terms_conditions",
|
||||
"translation": "Terms and Conditions"
|
||||
},
|
||||
{
|
||||
"id":"terms_conditions_full",
|
||||
"translation": "Some Shit."
|
||||
}
|
||||
]
|
||||
|
|
|
@ -5,42 +5,43 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3">
|
||||
<form role="form">
|
||||
<h2>Please Sign Up <small>It's free and always will be.</small></h2>
|
||||
<h2>{{T "signup_box_title" }}</h2>
|
||||
<hr class="colorgraph">
|
||||
<div class="form-group">
|
||||
<input type="text" name="username" id="display_name" class="form-control input-lg" placeholder="Display Name" tabindex="3">
|
||||
<input type="text" name="username" id="display_name" class="form-control input-lg" placeholder="{{T "username" }}" tabindex="1">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="email" name="email" id="email" class="form-control input-lg" placeholder="Email Address" tabindex="4">
|
||||
<input type="email" name="email" id="email" class="form-control input-lg" placeholder="{{T "email_address" }}" tabindex="2">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<input type="password" name="password" id="password" class="form-control input-lg" placeholder="Password" tabindex="5">
|
||||
<input type="password" name="password" id="password" class="form-control input-lg" placeholder="{{T "password" }}" tabindex="3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<input type="password" name="password_confirmation" id="password_confirmation" class="form-control input-lg" placeholder="Confirm Password" tabindex="6">
|
||||
<input type="password" name="password_confirmation" id="password_confirmation" class="form-control input-lg" placeholder="{{T "confirm_password" }}" tabindex="4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-sm-3 col-md-3">
|
||||
<span class="button-checkbox">
|
||||
<button type="button" class="btn hidden" data-color="info" tabindex="7">I Agree</button>
|
||||
<button type="button" class="btn hidden" data-color="info" tabindex="5">{{T "i_agree" }}</button>
|
||||
<input type="checkbox" name="t_and_c" id="t_and_c" value="1">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-8 col-sm-9 col-md-9">
|
||||
{{T "terms_conditions_confirm" }}
|
||||
By clicking <strong class="label label-primary">Register</strong>, you agree to the <a href="#" data-toggle="modal" data-target="#t_and_c_m">Terms and Conditions</a> set out by this site, including our Cookie Use.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="colorgraph">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6"><input type="submit" value="Register" class="btn btn-primary btn-block btn-lg" tabindex="7"></div>
|
||||
<div class="col-xs-12 col-md-6">or <a href="#" class="">Sign In</a></div>
|
||||
<div class="col-xs-12 col-md-6"><input type="submit" value="{{T "register" }}" class="btn btn-primary btn-block btn-lg" tabindex="7"></div>
|
||||
<div class="col-xs-12 col-md-6">or <a href="#" class="">{{T "signin" }}</a></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -51,13 +52,13 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Terms & Conditions</h4>
|
||||
<h4 class="modal-title" id="myModalLabel">{{T "terms_conditions" }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Some shit.</p>
|
||||
<p>{{T "terms_conditions_full" }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">I Agree</button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">{{T "i_agree" }}</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -5,9 +5,11 @@ import (
|
|||
"html/template"
|
||||
)
|
||||
|
||||
func SetTranslation(language string, template *template.Template) {
|
||||
func SetTranslation(language string, tmpl *template.Template) {
|
||||
T, _ := i18n.Tfunc(language)
|
||||
template.Funcs(map[string]interface{}{
|
||||
"T": T,
|
||||
tmpl.Funcs(map[string]interface{}{
|
||||
"T": func (str string) template.HTML {
|
||||
return template.HTML(T(str))
|
||||
},
|
||||
})
|
||||
}
|
Référencer dans un nouveau ticket