Commit acc3fcba34490828b499a01ea1787d69c62ee7e5
1 parent
9b61dc02
Exists in
staging
and in
29 other branches
fix translation marks
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
app/helpers/users_helper.rb
1 | 1 | module UsersHelper |
2 | 2 | |
3 | - FILTER_TRANSLATION = { | |
3 | + def filter_translation | |
4 | + { | |
4 | 5 | 'all_users' => _('All users'), |
5 | 6 | 'admin_users' => _('Admin users'), |
6 | 7 | 'activated_users' => _('Activated users'), |
7 | 8 | 'deactivated_users' => _('Deativated users'), |
8 | - } | |
9 | + } | |
10 | + end | |
9 | 11 | |
10 | 12 | def filter_selector(filter, float = 'right') |
11 | - options = options_for_select(FILTER_TRANSLATION.map {|key, name| [name, key]}, :selected => filter) | |
13 | + options = options_for_select(filter_translation.map {|key, name| [name, key]}, :selected => filter) | |
12 | 14 | url_params = url_for(params.merge(:filter => 'FILTER')) |
13 | 15 | onchange = "document.location.href = '#{url_params}'.replace('FILTER', this.value)" |
14 | 16 | select_field = select_tag(:filter, options, :onchange => onchange) |
... | ... | @@ -19,7 +21,7 @@ module UsersHelper |
19 | 21 | end |
20 | 22 | |
21 | 23 | def users_filter_title(filter) |
22 | - FILTER_TRANSLATION[filter] | |
24 | + filter_translation[filter] | |
23 | 25 | end |
24 | 26 | |
25 | 27 | end | ... | ... |