russian
russian copied to clipboard
Russian language support for Ruby and Rails | Поддержка русского языка для Ruby и Rails
Bumps [i18n](https://github.com/ruby-i18n/i18n) from 0.6.0 to 0.8.0. Release notes Sourced from i18n's releases. v0.8.0 This release is the same as the v0.8.0.beta1 gem. Notable changes You can now set I18n.cache_key_digest to...
closes #68
Кажется, это уже несколько раз фиксили, и каждый раз неправильно. Исправлено путем написания более злостных регулярок для %d и %e в соответствии с документацией strftime (http://ruby-doc.org/core-1.9.3/Time.html#method-i-strftime). Чтобы уменьшить количество регулярочного...
For ruby 3.0 support: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ Params to I18n should be passed this way: ``` def translate(key, options = {}) I18n.translate(key, **options.merge({ :locale => LOCALE })) end def localize(object, options =...
Rails 4.1.0 Devise 3.2.4 Devise adds this for validatable model: ``` ruby # https://github.com/plataformatec/devise/blob/master/lib/devise/models/validatable.rb#L34 validates_confirmation_of :password, if: :password_required? ``` Rails confirmation helper works like that: ``` ruby # https://github.com/rails/rails/blob/master/activemodel/lib/active_model/validations/confirmation.rb#L13 record.errors.add(:"#{attribute}_confirmation",...
Код иннициализации: ``` ruby translations = {} I18n.backend = I18n::Backend::Chain.new(I18n::Backend::KeyValue.new(translations), I18n.backend) if Rails.configuration.appa[:i18n].present? then Rails.configuration.appa[:i18n].each do |locale, h| I18n.backend.store_translations(locale, h, :escape => false) end end ``` Вываливается здесь: () Users/yuri/.rvm/gems/ruby-2.1.1/bundler/gems/russian-6da1fe45cbff/lib/russian/action_view_ext/helpers/date_helper.rb...
> Russian::transliterate("Дональд\nКнут") > => "DonaldKnut"
Master
Bumps [rake](https://github.com/ruby/rake) from 0.9.2.2 to 12.3.3. Changelog *Sourced from [rake's changelog](https://github.com/ruby/rake/blob/master/History.rdoc).* > === 12.3.3 > > ==== Bug fixes > > * Use the application's name in error message if...
Russian::strftime(date, "%B") согласно документации должна выдать standalone month, однако выдает как при обычной дате, допустим - мая, апреля, января. russian-0.6.0