Use default translations

This commit is contained in:
Artur Beljajev 2019-12-10 15:54:30 +02:00
parent e6981e7e28
commit ce8f7993c2
4 changed files with 8 additions and 11 deletions

View file

@ -40,7 +40,7 @@
<div class="checkbox">
<label for="api_user_active">
<%= f.check_box(:active) %>
<%= t('.active') %>
<%= ApiUser.human_attribute_name :active %>
</label>
</div>
</div>

View file

@ -12,10 +12,10 @@
<%= sort_link(@q, 'username') %>
</th>
<th class="col-xs-2">
<%= sort_link(@q, 'registrar_name', t(:registrar_name)) %>
<%= sort_link(@q, 'registrar_name', Registrar.model_name.human) %>
</th>
<th class="col-xs-2">
<%= sort_link(@q, 'active', t('.active')) %>
<%= sort_link(@q, 'active', ApiUser.human_attribute_name(:active)) %>
</th>
</tr>
</thead>

View file

@ -35,19 +35,19 @@
<div class="panel-body">
<dl class="dl-horizontal">
<dt><%= t(:username) %></dt>
<dt><%= ApiUser.human_attribute_name :username %></dt>
<dd><%= @api_user.username %></dd>
<dt><%= t(:password) %></dt>
<dt><%= ApiUser.human_attribute_name :plain_text_password %></dt>
<dd><%= @api_user.plain_text_password %></dd>
<dt><%= t(:registrar_name) %></dt>
<dt><%= Registrar.model_name.human %></dt>
<dd><%= link_to(@api_user.registrar, admin_registrar_path(@api_user.registrar)) %></dd>
<dt><%= t(:role) %></dt>
<dt><%= ApiUser.human_attribute_name :roles %></dt>
<dd><%= @api_user.roles.join(', ') %></dd>
<dt><%= t('.active') %></dt>
<dt><%= ApiUser.human_attribute_name :active %></dt>
<dd><%= @api_user.active %></dd>
</dl>
</div>

View file

@ -3,7 +3,6 @@ en:
api_users:
index:
header: API users
active: Active
new:
header: New API user
@ -12,7 +11,6 @@ en:
created: API user has been successfully created
show:
active: Active
subject: Subject
edit_btn: Edit
delete_btn: Delete
@ -27,6 +25,5 @@ en:
deleted: API user has been successfully deleted
form:
active: Active
create_btn: Create API user
update_btn: Update API user