Commit f8ee861c authored by Mark Chao's avatar Mark Chao

Move N_ calls into separate files

These are dynamic translations, so has to be marked explicitly using `N_`,
but they are not used in runtime, so can exist in separate file.
https://github.com/grosser/gettext_i18n_rails#unfound-translations-with-rake-gettextfind
parent bf88e9af
......@@ -48,6 +48,8 @@ Naming/FileName:
- 'qa/bin/*'
- 'config/**/*'
- 'lib/generators/**/*'
- 'locale/unfound_translations.rb'
- 'ee/locale/unfound_translations.rb'
- 'ee/lib/generators/**/*'
IgnoreExecutableScripts: true
AllowedAcronyms:
......
......@@ -88,16 +88,6 @@ module NotificationsHelper
when :success_pipeline
s_('NotificationEvent|Successful pipeline')
else
N_('NotificationEvent|New note')
N_('NotificationEvent|New issue')
N_('NotificationEvent|Reopen issue')
N_('NotificationEvent|Close issue')
N_('NotificationEvent|Reassign issue')
N_('NotificationEvent|New merge request')
N_('NotificationEvent|Close merge request')
N_('NotificationEvent|Reassign merge request')
N_('NotificationEvent|Merge merge request')
N_('NotificationEvent|Failed pipeline')
s_(event.to_s.humanize)
end
end
......
......@@ -45,6 +45,7 @@ class NotificationSetting < ActiveRecord::Base
:success_pipeline
].freeze
# Update unfound_translations.rb when events are changed
def self.email_events(source = nil)
EMAIL_EVENTS
end
......
# frozen_string_literal: true
# Dynamic translations which needs to be marked by `N_` so they can be found by `rake gettext:find`, see:
# https://github.com/grosser/gettext_i18n_rails#unfound-translations-with-rake-gettextfind
# NotificationSetting.email_events
N_('NotificationEvent|New note')
N_('NotificationEvent|New issue')
N_('NotificationEvent|Reopen issue')
N_('NotificationEvent|Close issue')
N_('NotificationEvent|Reassign issue')
N_('NotificationEvent|New merge request')
N_('NotificationEvent|Close merge request')
N_('NotificationEvent|Reassign merge request')
N_('NotificationEvent|Merge merge request')
N_('NotificationEvent|Failed pipeline')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment