summaryrefslogtreecommitdiff
path: root/app/helpers/visibility_level_helper.rb
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2019-04-04 17:05:25 +0000
committerNick Thomas <nick@gitlab.com>2019-04-04 17:05:25 +0000
commit2e756052720a68302231eba83339235b8983b6de (patch)
treea98b75ff2b47ceecc3cb488bcb786e57d4b7bbeb /app/helpers/visibility_level_helper.rb
parentd0b9ab1910024c13ec5df55632ffafa1d18add39 (diff)
downloadgitlab-ce-2e756052720a68302231eba83339235b8983b6de.tar.gz
Externalize strings in helpers
- Update qa selector - Update PO file
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r--app/helpers/visibility_level_helper.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb
index 712f0f808dd..9deb783d289 100644
--- a/app/helpers/visibility_level_helper.rb
+++ b/app/helpers/visibility_level_helper.rb
@@ -42,11 +42,11 @@ module VisibilityLevelHelper
def group_visibility_level_description(level)
case level
when Gitlab::VisibilityLevel::PRIVATE
- "The group and its projects can only be viewed by members."
+ _("The group and its projects can only be viewed by members.")
when Gitlab::VisibilityLevel::INTERNAL
- "The group and any internal projects can be viewed by any logged in user."
+ _("The group and any internal projects can be viewed by any logged in user.")
when Gitlab::VisibilityLevel::PUBLIC
- "The group and any public projects can be viewed without any authentication."
+ _("The group and any public projects can be viewed without any authentication.")
end
end
@@ -54,20 +54,20 @@ module VisibilityLevelHelper
case level
when Gitlab::VisibilityLevel::PRIVATE
if snippet.is_a? ProjectSnippet
- "The snippet is visible only to project members."
+ _("The snippet is visible only to project members.")
else
- "The snippet is visible only to me."
+ _("The snippet is visible only to me.")
end
when Gitlab::VisibilityLevel::INTERNAL
- "The snippet is visible to any logged in user."
+ _("The snippet is visible to any logged in user.")
when Gitlab::VisibilityLevel::PUBLIC
- "The snippet can be accessed without any authentication."
+ _("The snippet can be accessed without any authentication.")
end
end
def restricted_visibility_level_description(level)
level_name = Gitlab::VisibilityLevel.level_name(level)
- "#{level_name.capitalize} visibility has been restricted by the administrator."
+ _("%{level_name} visibility has been restricted by the administrator.") % { level_name: level_name.capitalize }
end
def disallowed_visibility_level_description(level, form_model)