diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abe76c797..b66851eef 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -95,6 +95,10 @@ module ApplicationHelper l(:label_added_time_by, author || 'Anonymous', time_tag) end + def l_or_humanize(s) + l_has_string?("label_#{s}".to_sym) ? l("label_#{s}".to_sym) : s.to_s.humanize + end + def day_name(day) l(:general_day_names).split(',')[day-1] end |