Sha256: 3e3a849db950499aa29ab49edad0d8ecfb9fad5f89e63eba5e2efbbee4f904f8

Contents?: true

Size: 305 Bytes

Versions: 52

Compression:

Stored size: 305 Bytes

Contents

class NSString

  # This can be called as `"Hello".localized` or `"Hello"._`.  The `str._`
  # syntax is meant to be reminiscent of gettext-style `_(str)`.
  def localized(value=nil, table=nil)
    NSBundle.mainBundle.localizedStringForKey(self, value: value, table: table)
  end
  alias _ localized

end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
sugarcube-4.0.0 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.5.0 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.4.2 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.4.1 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.4.0 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.7 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.6 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.5 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.4 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.3 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.2 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.1 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.3.0 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.2.0 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.1.1 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.1.0 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.0.8 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.0.7 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.0.6 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-3.0.5 lib/cocoa/sugarcube-localized/nsstring.rb