profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mutoh/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

mutoh/gettext 68

Ruby-GetText-Package is a Localization(L10n) library and tools which modeled after GNU gettext package.

mutoh/gettext_rails 23

Ruby on Rails (>=2.3) localization support with Ruby-GetText-Package.

mutoh/locale_rails 23

Ruby on Rails (>=2.2) localization support(auto locale detection, localized caches, views, routes, etc...) with Ruby-Locale.

mutoh/gettext_activerecord 19

ActiveRecord(>2.2) localization using Ruby-GetText-Package

mutoh/locale 16

Ruby-Locale is the pure ruby library which provides basic and general purpose APIs for localization.

mutoh/cldr 1

The library provides locale informations and APIs based on Common Locale Data Repository(CLDR) Project

mutoh/rails 1

Ruby on Rails

issue closedruby-gettext/locale

Doesn't correctly change the sort sequence.

And it also warns of the use of deprecated code.

irb(main):001:0> require 'locale'
=> true
irb(main):002:0> p Locale.candidates
[#<Locale::Tag::Common: nl>, #<Locale::Tag::Common: en_US>, #<Locale::Tag::Common: en>]
=> [#<Locale::Tag::Common: nl>, #<Locale::Tag::Common: en_US>, #<Locale::Tag::Common: en>]
irb(main):003:0> Locale.current
=> [#<Locale::Tag::Posix: nl>, #<Locale::Tag::Posix: en_US>, #<Locale::Tag::Posix: en>]
irb(main):004:0> ?F <=> ?É
=> -1 # Should be +1 for the nl locale.  Let's remove the other locales just to be sure..
irb(main):005:0> Locale.current=[Locale.current[0]]
/usr/lib/ruby/vendor_ruby/locale/tag/simple.rb:55: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/common.rb:38: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/common.rb:40: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/rfc.rb:32: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/rfc.rb:34: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/cldr.rb:31: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/cldr.rb:33: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/posix.rb:33: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/posix.rb:37: warning: deprecated Object#=~ is called on Array; it always returns nil
=> [#<Locale::Tag::Posix: nl>]
irb(main):006:0> ?F <=> ?É
=> -1 # Nope - still the wrong sort order.  ?E <=> ?É should be 0, and ?F <=> ?É should be +1

closed time in 19 days

Biep

issue commentruby-gettext/locale

Doesn't correctly change the sort sequence.

String#<=> doesn't care locale. It just compares strings as binary data.

You need to use Unicode's collation or something for locale depended sort. https://github.com/erickguan/ffi-icu may help you.

Biep

comment created time in 19 days

issue openedruby-gettext/locale

Doesn't correctly change the sort sequence.

And it also warns of the use of deprecated code.

irb(main):001:0> require 'locale'
=> true
irb(main):002:0> p Locale.candidates
[#<Locale::Tag::Common: nl>, #<Locale::Tag::Common: en_US>, #<Locale::Tag::Common: en>]
=> [#<Locale::Tag::Common: nl>, #<Locale::Tag::Common: en_US>, #<Locale::Tag::Common: en>]
irb(main):003:0> Locale.current
=> [#<Locale::Tag::Posix: nl>, #<Locale::Tag::Posix: en_US>, #<Locale::Tag::Posix: en>]
irb(main):004:0> ?F <=> ?É
=> -1
irb(main):005:0> Locale.current=[Locale.current[0]]
/usr/lib/ruby/vendor_ruby/locale/tag/simple.rb:55: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/common.rb:38: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/common.rb:40: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/rfc.rb:32: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/rfc.rb:34: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/cldr.rb:31: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/cldr.rb:33: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/posix.rb:33: warning: deprecated Object#=~ is called on Array; it always returns nil
/usr/lib/ruby/vendor_ruby/locale/tag/posix.rb:37: warning: deprecated Object#=~ is called on Array; it always returns nil
=> [#<Locale::Tag::Posix: nl>]
irb(main):006:0> ?F <=> ?É
=> -1

created time in 19 days