summaryrefslogtreecommitdiff
path: root/app/models/application_setting.rb
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2019-04-12 12:28:07 +0000
committerNick Thomas <nick@gitlab.com>2019-04-12 12:28:07 +0000
commitcd6f77409359de53c20c99c5d291ada3545d9d28 (patch)
tree6adff56500804a67329a8746613c370fe62bb24e /app/models/application_setting.rb
parentf9cf04fe4fa39a71ba4d17201397fff5f3dc7d97 (diff)
downloadgitlab-ce-cd6f77409359de53c20c99c5d291ada3545d9d28.tar.gz
Externalize strings in app/models
- Update PO file
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r--app/models/application_setting.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index eb6ddaac871..2f9b4c4eaa2 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -198,7 +198,7 @@ class ApplicationSetting < ApplicationRecord
validates_each :restricted_visibility_levels do |record, attr, value|
value&.each do |level|
unless Gitlab::VisibilityLevel.options.value?(level)
- record.errors.add(attr, "'#{level}' is not a valid visibility level")
+ record.errors.add(attr, _("'%{level}' is not a valid visibility level") % { level: level })
end
end
end
@@ -206,7 +206,7 @@ class ApplicationSetting < ApplicationRecord
validates_each :import_sources do |record, attr, value|
value&.each do |source|
unless Gitlab::ImportSources.options.value?(source)
- record.errors.add(attr, "'#{source}' is not a import source")
+ record.errors.add(attr, _("'%{source}' is not a import source") % { source: source })
end
end
end