Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-05 15:08:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-05 15:08:55 +0300
commitfdb953945da752dc52c1957f64a179de39f507e5 (patch)
tree288f38f5448ffd575dc4361258a0ca91b20f327b /lib/gitlab/visibility_level.rb
parent77831d580c99993c0367bbb8f2aec373ff09a79a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/visibility_level.rb')
-rw-r--r--lib/gitlab/visibility_level.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb
index 76cf769d041..abfb7e2310e 100644
--- a/lib/gitlab/visibility_level.rb
+++ b/lib/gitlab/visibility_level.rb
@@ -44,9 +44,9 @@ module Gitlab
def options
{
- N_('VisibilityLevel|Private') => PRIVATE,
- N_('VisibilityLevel|Internal') => INTERNAL,
- N_('VisibilityLevel|Public') => PUBLIC
+ s_('VisibilityLevel|Private') => PRIVATE,
+ s_('VisibilityLevel|Internal') => INTERNAL,
+ s_('VisibilityLevel|Public') => PUBLIC
}
end
@@ -104,12 +104,7 @@ module Gitlab
end
def level_name(level)
- level_name = N_('VisibilityLevel|Unknown')
- options.each do |name, lvl|
- level_name = name if lvl == level.to_i
- end
-
- s_(level_name)
+ options.key(level.to_i) || s_('VisibilityLevel|Unknown')
end
def level_value(level)