Merge branch 'i18n'
This commit is contained in:
commit
9381dee142
|
@ -4,26 +4,26 @@
|
|||
|
||||
<ul id="navigation">
|
||||
<li class="home">
|
||||
<a {{action showRoot href=true}}>Home</a>
|
||||
<a {{action showRoot href=true}}>{{t layouts.top.home}}</a>
|
||||
</li>
|
||||
<li class="stats">
|
||||
<a {{action showStats href=true}}>Stats</a>
|
||||
<a {{action showStats href=true}}>{{t layouts.top.stats}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://about.travis-ci.org/blog">Blog</a>
|
||||
<a href="http://about.travis-ci.org/blog">{{t layouts.top.blog}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://about.travis-ci.org/docs">Docs</a>
|
||||
<a href="http://about.travis-ci.org/docs">{{t layouts.top.docs}}</a>
|
||||
</li>
|
||||
<li {{bindAttr class="view.classProfile"}}>
|
||||
<p class="handle">
|
||||
<a class="signed-out" href="#" {{action signIn target="Travis.app"}}>{{t layouts.top.github_login}}</a>
|
||||
<a class="signed-in" {{action showProfile href=true}}><img {{bindAttr src="view.gravatarUrl"}}>{{view.userName}}</a>
|
||||
<span class="signing-in">Signing in</span>
|
||||
<span class="signing-in">{{t layouts.top.signing_in}}</span>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a {{action showProfile href=true}}>Accounts</a>
|
||||
<a {{action showProfile href=true}}>{{t layouts.top.accounts}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/" {{action signOut target="Travis.app"}}>{{t layouts.top.sign_out}}</a>
|
||||
|
|
|
@ -1,24 +1,30 @@
|
|||
<img {{bindAttr src="view.gravatarUrl"}}>
|
||||
|
||||
<dl class="profile">
|
||||
<dt>
|
||||
{{t profiles.show.github}}:
|
||||
</dt>
|
||||
<dd>
|
||||
<a {{bindAttr href="urlGithub"}}>{{user.login}}</a>
|
||||
</dd>
|
||||
<dt>
|
||||
{{t profiles.show.email}}:
|
||||
</dt>
|
||||
<dd>
|
||||
{{user.email}}
|
||||
</dd>
|
||||
<dt>
|
||||
{{t profiles.show.token}}:
|
||||
</dt>
|
||||
<dd>
|
||||
{{user.token}}
|
||||
</dd>
|
||||
<div>
|
||||
<dt>
|
||||
{{t profiles.show.github}}:
|
||||
</dt>
|
||||
<dd>
|
||||
<a {{bindAttr href="urlGithub"}}>{{user.login}}</a>
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>
|
||||
{{t profiles.show.email}}:
|
||||
</dt>
|
||||
<dd>
|
||||
{{user.email}}
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>
|
||||
{{t profiles.show.token}}:
|
||||
</dt>
|
||||
<dd>
|
||||
{{user.token}}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
<form>
|
||||
|
|
5
assets/scripts/lib/ext/i18n.coffee
Normal file
5
assets/scripts/lib/ext/i18n.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
I18n.missingTranslation = ->
|
||||
key = arguments[arguments.length - 1]
|
||||
value = key.split('.').pop()
|
||||
$.titleize(value)
|
||||
|
|
@ -64,6 +64,10 @@ $.extend
|
|||
string[0].toLowerCase() + string.substring(1).replace /([A-Z])?/g, (match, chr) ->
|
||||
if chr then "_#{chr.toUpperCase()}" else ''
|
||||
|
||||
titleize: (string) ->
|
||||
$.capitalize(string).replace /_(.)?/g, (match, chr) ->
|
||||
if chr then ' ' + chr.toUpperCase() else ''
|
||||
|
||||
camelize: (string, uppercase) ->
|
||||
string = if uppercase == false then $.underscore(string) else $.capitalize(string)
|
||||
string.replace /_(.)?/g, (match, chr) ->
|
||||
|
|
|
@ -71,6 +71,7 @@ if window.history.state == undefined
|
|||
@store = app.store
|
||||
$ => app.initialize()
|
||||
|
||||
require 'ext/i18n'
|
||||
require 'travis/ajax'
|
||||
require 'app'
|
||||
|
||||
|
|
|
@ -14,19 +14,16 @@
|
|||
@include border-radius(4px)
|
||||
background-color: $color-bg-light
|
||||
|
||||
dl
|
||||
float: left
|
||||
dl.profile
|
||||
display: table
|
||||
margin: 0 0 20px 0
|
||||
|
||||
dt
|
||||
display: block
|
||||
clear: left
|
||||
float: left
|
||||
width: 50px
|
||||
|
||||
dd
|
||||
float: left
|
||||
margin-left: 0
|
||||
div
|
||||
display: table-row
|
||||
dt
|
||||
display: table-cell
|
||||
padding-right: 20px
|
||||
dd
|
||||
margin-left: 0
|
||||
|
||||
form
|
||||
clear: left
|
||||
|
|
Loading…
Reference in New Issue
Block a user