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>2020-12-17 14:59:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 14:59:07 +0300
commit8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch)
tree544930fb309b30317ae9797a9683768705d664c4 /lib/gitlab/i18n/translation_entry.rb
parent4b1de649d0168371549608993deac953eb692019 (diff)
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'lib/gitlab/i18n/translation_entry.rb')
-rw-r--r--lib/gitlab/i18n/translation_entry.rb19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/gitlab/i18n/translation_entry.rb b/lib/gitlab/i18n/translation_entry.rb
index 25a45332d27..f3cca97950d 100644
--- a/lib/gitlab/i18n/translation_entry.rb
+++ b/lib/gitlab/i18n/translation_entry.rb
@@ -6,12 +6,11 @@ module Gitlab
PERCENT_REGEX = /(?:^|[^%])%(?!{\w*}|[a-z%])/.freeze
ANGLE_BRACKET_REGEX = /[<>]/.freeze
- attr_reader :nplurals, :entry_data, :html_allowed
+ attr_reader :nplurals, :entry_data
- def initialize(entry_data:, nplurals:, html_allowed:)
+ def initialize(entry_data:, nplurals:)
@entry_data = entry_data
@nplurals = nplurals
- @html_allowed = html_allowed
end
def msgid
@@ -97,20 +96,6 @@ module Gitlab
all_translations.any? { |translation| contains_angle_brackets?(translation) }
end
- def msgid_html_allowed?
- html_allowed.present?
- end
-
- def plural_id_html_allowed?
- html_allowed.present? && html_allowed['plural_id'] == plural_id
- end
-
- def translations_html_allowed?
- msgid_html_allowed? && html_allowed['translations'].present? && all_translations.all? do |translation|
- html_allowed['translations'].include?(translation)
- end
- end
-
private
def contains_angle_brackets?(string)