Use inline translation helper for inline text.

This commit is contained in:
Martin Edenhofer 2015-04-12 11:12:48 +02:00
parent ec12481273
commit 4981b5af05
16 changed files with 19 additions and 19 deletions

View file

@ -122,7 +122,7 @@
<form> <form>
<div class="form-group"> <div class="form-group">
<label for="template-title"><%- @T('Template Title') %>:</label> <label for="template-title"><%- @T('Template Title') %>:</label>
<input class="form-control" id="template-title" placeholder="<%- @T('Enter Template Name') %>"> <input class="form-control" id="template-title" placeholder="<%- @Ti('Enter Template Name') %>">
</div> </div>
<p>This template saves the following attributes:</p> <p>This template saves the following attributes:</p>
<ul class="template-attributes"> <ul class="template-attributes">

View file

@ -1,3 +1,3 @@
<input id="<%= @attribute.id %>" type="hidden" name="<%= @attribute.name %>" value="<%= @attribute.value %>" <%= @attribute.required %> /> <input id="<%= @attribute.id %>" type="hidden" name="<%= @attribute.name %>" value="<%= @attribute.value %>" <%= @attribute.required %> />
<input id="<%= @attribute.id %>_autocompletion" type="text" name="<%= @attribute.name %>_autocompletion" value="<%= @attribute.valueShown %>" class="form-control <%= @attribute.class %>" <%= @attribute.required %> <%= @attribute.autofocus %> <%- @attribute.autocapitalize %> <% if @attribute.placeholder: %>placeholder="<%- @T(@attribute.placeholder) %>"<% end %>/> <input id="<%= @attribute.id %>_autocompletion" type="text" name="<%= @attribute.name %>_autocompletion" value="<%= @attribute.valueShown %>" class="form-control <%= @attribute.class %>" <%= @attribute.required %> <%= @attribute.autofocus %> <%- @attribute.autocapitalize %> <% if @attribute.placeholder: %>placeholder="<%- @Ti(@attribute.placeholder) %>"<% end %>/>
<input id="<%= @attribute.id %>_autocompletion_value_shown" type="hidden" name="<%= @attribute.name %>_autocompletion_value_shown" value="<%= @attribute.valueShown %>"/> <input id="<%= @attribute.id %>_autocompletion_value_shown" type="hidden" name="<%= @attribute.name %>_autocompletion_value_shown" value="<%= @attribute.valueShown %>"/>

View file

@ -1 +1 @@
<input id="<%= @attribute.id %>" type="<%= @attribute.type %>" name="<%= @attribute.name %>" value="<%= @attribute.value %>" class="form-control <%= @attribute.class %>" <% if @attribute.placeholder: %>placeholder="<%- @T(@attribute.placeholder) %>"<% end %> <%= @attribute.required %> <%= @attribute.autofocus %> <%- @attribute.autocapitalize %> <%- @attribute.autocomplete %>/> <input id="<%= @attribute.id %>" type="<%= @attribute.type %>" name="<%= @attribute.name %>" value="<%= @attribute.value %>" class="form-control <%= @attribute.class %>" <% if @attribute.placeholder: %>placeholder="<%- @Ti(@attribute.placeholder) %>"<% end %> <%= @attribute.required %> <%= @attribute.autofocus %> <%- @attribute.autocapitalize %> <%- @attribute.autocomplete %>/>

View file

@ -9,11 +9,11 @@
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
<label><%- @T('Full Name') %></label> <label><%- @T('Full Name') %></label>
<input type="text" class="form-control" value="" name="realname" placeholder="<%- @T('Organization Support') %>" required> <input type="text" class="form-control" value="" name="realname" placeholder="<%- @Ti('Organization Support') %>" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%- @T('Email') %></label> <label><%- @T('Email') %></label>
<input type="email" class="form-control" value="" name="email" placeholder="<%- @T('support@example.com') %>" required> <input type="email" class="form-control" value="" name="email" placeholder="<%- @Ti('support@example.com') %>" required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%- @T('Password') %></label> <label><%- @T('Password') %></label>

View file

@ -1,7 +1,7 @@
<% for item in @items: %> <% for item in @items: %>
<% if item.child: %> <% if item.child: %>
<li class="<% if item.class: %><%- item.class %><% end %> dropup <% if @open_tab[item.target] : %>open<% end %>"> <li class="<% if item.class: %><%- item.class %><% end %> dropup <% if @open_tab[item.target] : %>open<% end %>">
<a class="list-button horizontal centered dropdown-toggle" data-toggle="dropdown" href="<%= item.target %>" title="<%- @T( item.name ) %>"> <a class="list-button horizontal centered dropdown-toggle" data-toggle="dropdown" href="<%= item.target %>" title="<%- @Ti( item.name ) %>">
<span class="dropdown-nose"></span> <span class="dropdown-nose"></span>
<% if item.class is 'user': %> <% if item.class is 'user': %>
<span class="js-avatar"></span> <span class="js-avatar"></span>
@ -30,7 +30,7 @@
</li> </li>
<% else: %> <% else: %>
<li class="settings <% if @active_tab[item.target] : %>active<% end %>"> <li class="settings <% if @active_tab[item.target] : %>active<% end %>">
<a class="list-button fit horizontal centered" href="<%= item.target %>" title="<%- @T( item.name ) %>"> <a class="list-button fit horizontal centered" href="<%= item.target %>" title="<%- @Ti( item.name ) %>">
<span class="light cog icon"></span> <span class="light cog icon"></span>
<span class="dark cog icon"></span> <span class="dark cog icon"></span>
</a> </a>

View file

@ -28,7 +28,7 @@
<td> <td>
<a href="#" class="glyphicon glyphicon-chevron-up js-up"></a><a href="#" class="glyphicon glyphicon-chevron-down js-down"></a> <a href="#" class="glyphicon glyphicon-chevron-up js-up"></a><a href="#" class="glyphicon glyphicon-chevron-down js-down"></a>
<% if item.editable: %> <% if item.editable: %>
<a href="#" data-id="<%- item.id %>" data-type="delete" class="glyphicon glyphicon-trash" title="<%- @T('Delete') %>"></a> <a href="#" data-id="<%- item.id %>" data-type="delete" class="glyphicon glyphicon-trash" title="<%- @Ti('Delete') %>"></a>
<% end %> <% end %>
</td> </td>
</tr> </tr>

View file

@ -11,7 +11,7 @@
<% if row.tag is 'richtext': %> <% if row.tag is 'richtext': %>
<div class="profile-detailsEntry" style="width: 100%;"> <div class="profile-detailsEntry" style="width: 100%;">
<label><%- @Ti( row.display ) %></label> <label><%- @Ti( row.display ) %></label>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%- @organization[row.name] %></div> <div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @Ti('Add a Note') %>"><%- @organization[row.name] %></div>
</div> </div>
<% else: %> <% else: %>
<% if @organization[row.name]: %> <% if @organization[row.name]: %>

View file

@ -20,7 +20,7 @@
<td title="<%= session.data.remote_id %>"><% if session.data.geo && session.data.geo.country_name: %><%= session.data.geo.country_name %> <%= session.data.geo.city_name %><% else: %><%= session.data.remote_id %><% end %></td> <td title="<%= session.data.remote_id %>"><% if session.data.geo && session.data.geo.country_name: %><%= session.data.geo.country_name %> <%= session.data.geo.city_name %><% else: %><%= session.data.remote_id %><% end %></td>
<td><span class="humanTimeFromNow" data-time="<%- session.created_at %>">?</span></td> <td><span class="humanTimeFromNow" data-time="<%- session.created_at %>">?</span></td>
<td><span class="humanTimeFromNow" data-time="<%- session.updated_at %>">?</span></td> <td><span class="humanTimeFromNow" data-time="<%- session.updated_at %>">?</span></td>
<td><a href="#" data-session-id="<%- session.id %>" data-type="delete" class="glyphicon glyphicon-trash" title="<%- @T('Delete') %>"></a></td> <td><a href="#" data-session-id="<%- session.id %>" data-type="delete" class="glyphicon glyphicon-trash" title="<%- @Ti('Delete') %>"></a></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View file

@ -4,7 +4,7 @@
<div class="<% if item.task.active: %>white <% end %><%= item.data.iconClass %> icon<% if item.task.notify: %> modified<% end %>"></div> <div class="<% if item.task.active: %>white <% end %><%= item.data.iconClass %> icon<% if item.task.notify: %> modified<% end %>"></div>
</div> </div>
<div class="name u-textTruncate flex"><%= item.data.head %></div> <div class="name u-textTruncate flex"><%= item.data.head %></div>
<div class="closeTask js-close u-clickable horizontal centered" title="<%- @T('close') %>"> <div class="closeTask js-close u-clickable horizontal centered" title="<%- @Ti('close') %>">
<div class="closeTask-inner centered"> <div class="closeTask-inner centered">
<div class="white close icon"></div> <div class="white close icon"></div>
</div> </div>

View file

@ -19,10 +19,10 @@
</div> </div>
</div> </div>
<div class="visibility-toggle zIndex-7 u-clickable editControls-item"> <div class="visibility-toggle zIndex-7 u-clickable editControls-item">
<div class="internal-visibility centered" title="<%- @T("unset internal") %>"> <div class="internal-visibility centered" title="<%- @Ti("unset internal") %>">
<div class="internal visibility icon"></div> <div class="internal visibility icon"></div>
</div> </div>
<div class="public-visibility centered" title="<%- @T("set internal") %>"> <div class="public-visibility centered" title="<%- @Ti("set internal") %>">
<div class="public visibility icon"></div> <div class="public visibility icon"></div>
</div> </div>
</div> </div>

View file

@ -1,4 +1,4 @@
<div class="pagination-counter align-right" title="<%- @T(@title) %>"> <div class="pagination-counter align-right" title="<%- @Ti(@title) %>">
<span class="pagination-item-current"><%= @current_position %></span>/<span class="pagination-total-items"><%= @total_count %></span> <span class="pagination-item-current"><%= @current_position %></span>/<span class="pagination-total-items"><%= @total_count %></span>
</div> </div>
<ul class="pagination"> <ul class="pagination">

View file

@ -1 +1 @@
<div contenteditable="true" class="ticket-title-update" data-placeholder="<%= @T('Enter Title...') %>"><%= @ticket.title %></div> <div contenteditable="true" class="ticket-title-update" data-placeholder="<%= @Ti('Enter Title...') %>"><%= @ticket.title %></div>

View file

@ -12,7 +12,7 @@
</div> </div>
<div class="userSearch vertical center"> <div class="userSearch vertical center">
<input type="text" class="js-search form-control flex" name="search" placeholder="<%- @T('Search for users') %>"> <input type="text" class="js-search form-control flex" name="search" placeholder="<%- @Ti('Search for users') %>">
</div> </div>
<div class="userSearch horizontal"> <div class="userSearch horizontal">
<div class="userSearch-label"><%- @T('Roles') %>:</div> <div class="userSearch-label"><%- @T('Roles') %>:</div>

View file

@ -12,7 +12,7 @@
<% if row.tag is 'richtext': %> <% if row.tag is 'richtext': %>
<div class="profile-detailsEntry" style="width: 100%;"> <div class="profile-detailsEntry" style="width: 100%;">
<label><%- @Ti( row.display ) %></label> <label><%- @Ti( row.display ) %></label>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%- @user[row.name] %></div> <div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @Ti('Add a Note') %>"><%- @user[row.name] %></div>
</div> </div>
<% else: %> <% else: %>
<% if @user[row.name]: %> <% if @user[row.name]: %>

View file

@ -13,7 +13,7 @@
<%- @P( @organization, row.name ) %> <%- @P( @organization, row.name ) %>
<% else: %> <% else: %>
<label><%- @T( row.display ) %></label> <label><%- @T( row.display ) %></label>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update-org" data-placeholder="<%- @T('Add a Note') %>"><%- @organization[row.name] %></div> <div contenteditable="true" data-name="<%= row.name %>" data-type="update-org" data-placeholder="<%- @Ti('Add a Note') %>"><%- @organization[row.name] %></div>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>

View file

@ -10,7 +10,7 @@
<%- @P( @user, row.name ) %> <%- @P( @user, row.name ) %>
<% else: %> <% else: %>
<label><%- @T( row.display ) %></label> <label><%- @T( row.display ) %></label>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%- @user[row.name] %></div> <div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @Ti('Add a Note') %>"><%- @user[row.name] %></div>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>