summaryrefslogtreecommitdiff
path: root/lib/gitlab/i18n/translation_entry.rb
diff options
context:
space:
mode:
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)