diff options
Diffstat (limited to 'lib/gitlab/auth/ldap')
-rw-r--r-- | lib/gitlab/auth/ldap/adapter.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/auth/ldap/dn.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/auth/ldap/adapter.rb b/lib/gitlab/auth/ldap/adapter.rb index 42c657afe6a..92c57697386 100644 --- a/lib/gitlab/auth/ldap/adapter.rb +++ b/lib/gitlab/auth/ldap/adapter.rb @@ -99,7 +99,7 @@ module Gitlab options[:size] = limit if limit if fields.include?('dn') - raise ArgumentError, 'It is not currently possible to search the DN and other fields at the same time.' if fields.size > 1 + raise ArgumentError, _('It is not currently possible to search the DN and other fields at the same time.') if fields.size > 1 options[:base] = value options[:scope] = Net::LDAP::SearchScope_BaseObject diff --git a/lib/gitlab/auth/ldap/dn.rb b/lib/gitlab/auth/ldap/dn.rb index 5df914aa367..732f0bec2a7 100644 --- a/lib/gitlab/auth/ldap/dn.rb +++ b/lib/gitlab/auth/ldap/dn.rb @@ -112,7 +112,7 @@ module Gitlab yield key.string.strip, rstrip_except_escaped(value.string, dn_index) key = StringIO.new value = StringIO.new - when '+' then raise(UnsupportedError, "Multivalued RDNs are not supported") + when '+' then raise(UnsupportedError, _("Multivalued RDNs are not supported")) else value << char end when :value_normal_escape then @@ -183,12 +183,12 @@ module Gitlab value = StringIO.new else raise(MalformedError, "Expected the end of an attribute value, but got \"#{char}\"") end - else raise "Fell out of state machine" + else raise _("Fell out of state machine") end end # Last pair - raise(MalformedError, 'DN string ended unexpectedly') unless + raise(MalformedError, _('DN string ended unexpectedly')) unless [:value, :value_normal, :value_hexstring, :value_end].include? state yield key.string.strip, rstrip_except_escaped(value.string, @dn.length) |