Module ActiveLdap::GetTextFallback
In: lib/active_ldap/get_text_fallback.rb
Error AttributeAssignmentError AdapterNotSpecified OperationNotPermitted RequiredObjectClassMissed ConnectionError RequiredAttributeMissed LdifInvalid DistinguishedNameNotSetError EntryNotFound LdapError SaveError StrongAuthenticationRequired NotImplemented AdapterNotFound TimeoutError AuthenticationError AttributeValueInvalid EntryNotSaved DistinguishedNameInputInvalid EntryAlreadyExist ObjectClassError UnknownAttribute EntryInvalid DeleteError ConfigurationError ConnectionNotSetup DistinguishedNameInvalid Schema\n[lib/active_ldap/schema.rb\nlib/active_ldap/schema/syntaxes.rb] Base DistinguishedName Reloadable::Deprecated Reloadable::Subclasses Enumerable Ldif Collection EntryAttribute StandardError Children HasManyWrap HasMany BelongsToMany Proxy BelongsTo Normalizable Common Find LDIF Delete Update ActiveRecord::Callbacks GetText Parser Base\n[lib/active_ldap/adapter/base.rb\nlib/active_ldap/adapter/jndi.rb\nlib/active_ldap/adapter/ldap.rb\nlib/active_ldap/adapter/net_ldap.rb] Jndi Ldap NetLdap GetTextSupport ActiveRecord::Validations Xml JndiConnection lib/active_ldap/distinguished_name.rb lib/active_ldap/base.rb lib/active_ldap/xml.rb lib/active_ldap/schema.rb lib/active_ldap/entry_attribute.rb lib/active_ldap/ldif.rb lib/active_ldap/ldap_error.rb Compatible ClassMethods Associations LdapBenchmarking ActionController Populate lib/active_ldap/association/has_many_wrap.rb lib/active_ldap/association/children.rb lib/active_ldap/association/collection.rb lib/active_ldap/association/proxy.rb lib/active_ldap/association/belongs_to_many.rb lib/active_ldap/association/belongs_to.rb lib/active_ldap/association/has_many.rb HasManyUtils Association ClassMethods Tree Acts Command ClassMethods Normalizable Attributes Update Common ModifyNameRecordLoadable AddOperationModifiable DeleteOperationModifiable ReplaceOperationModifiable ModifyRecordLoadable DeleteRecordLoadable AddRecordLoadable ContentRecordLoadable LDIF Delete Find Operations GetTextSupport Escape ClassMethods Configuration ClassMethods ObjectClass ClassMethods Callbacks lib/active_ldap/get_text/parser.rb GetText lib/active_ldap/adapter/jndi_connection.rb lib/active_ldap/adapter/net_ldap.rb lib/active_ldap/adapter/ldap.rb lib/active_ldap/adapter/base.rb lib/active_ldap/adapter/jndi.rb Adapter Validations GetTextFallback Helper ClassMethods HumanReadable Salt UserPassword ClassMethods Connection ActiveLdap dot/m_46_0.png

Methods

N_   Nn_   _   bindtextdomain   gettext   included   n_   ngettext   s_   sgettext  

Public Class methods

[Source]

   # File lib/active_ldap/get_text_fallback.rb, line 4
4:       def included(base)
5:         base.extend(self)
6:       end

Public Instance methods

[Source]

    # File lib/active_ldap/get_text_fallback.rb, line 30
30:     def N_(msg_id)
31:       msg_id
32:     end

[Source]

    # File lib/active_ldap/get_text_fallback.rb, line 34
34:     def Nn_(msg_id, msg_id_plural)
35:       [msg_id, msg_id_plural]
36:     end
_(msg_id)

Alias for gettext

[Source]

    # File lib/active_ldap/get_text_fallback.rb, line 10
10:     def bindtextdomain(domain_name, *args)
11:     end

[Source]

    # File lib/active_ldap/get_text_fallback.rb, line 13
13:     def gettext(msg_id)
14:       msg_id
15:     end
n_(arg1, arg2, arg3=nil)

Alias for ngettext

[Source]

    # File lib/active_ldap/get_text_fallback.rb, line 17
17:     def ngettext(arg1, arg2, arg3=nil)
18:       if arg1.kind_of?(Array)
19:         msg_id = arg1[0]
20:         msg_id_plural = arg1[1]
21:         n = arg2
22:       else
23:         msg_id = arg1
24:         msg_id_plural = arg2
25:         n = arg3
26:       end
27:       n == 1 ? msg_id : msg_id_plural
28:     end
s_(msg_id, div='|')

Alias for sgettext

[Source]

    # File lib/active_ldap/get_text_fallback.rb, line 38
38:     def sgettext(msg_id, div='|')
39:       index = msg_id.rindex(div)
40:       if index
41:         msg_id[(index + 1)..-1]
42:       else
43:         msg_id
44:       end
45:     end

[Validate]