diff options
Diffstat (limited to 'app/helpers/preferences_helper.rb')
-rw-r--r-- | app/helpers/preferences_helper.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index 3371592a36a..0faa28581cc 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -43,18 +43,21 @@ module PreferencesHelper ] end - def default_first_day_of_week - Date::DAYNAMES[Gitlab::CurrentSettings.default_first_day_of_week] - end - def first_day_of_week_choices [ - ["System Default (#{default_first_day_of_week})", nil], - ['Sunday', 0], - ['Monday', 1] + [_('Sunday'), 0], + [_('Monday'), 1] ] end + def default_first_day_of_week + first_day_of_week_choices.rassoc(Gitlab::CurrentSettings.default_first_day_of_week).first + end + + def first_day_of_week_choices_with_default + first_day_of_week_choices.unshift([_('System Default (%{default})') % { default: default_first_day_of_week }, nil]) + end + def user_application_theme @user_application_theme ||= Gitlab::Themes.for_user(current_user).css_class end |