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"> <div class="checkbox">
<label for="api_user_active"> <label for="api_user_active">
<%= f.check_box(:active) %> <%= f.check_box(:active) %>
<%= t('.active') %> <%= ApiUser.human_attribute_name :active %>
</label> </label>
</div> </div>
</div> </div>

View file

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

View file

@ -35,19 +35,19 @@
<div class="panel-body"> <div class="panel-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><%= t(:username) %></dt> <dt><%= ApiUser.human_attribute_name :username %></dt>
<dd><%= @api_user.username %></dd> <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> <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> <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> <dd><%= @api_user.roles.join(', ') %></dd>
<dt><%= t('.active') %></dt> <dt><%= ApiUser.human_attribute_name :active %></dt>
<dd><%= @api_user.active %></dd> <dd><%= @api_user.active %></dd>
</dl> </dl>
</div> </div>

View file

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