File: i18n_simple.rb

package info (click to toggle)
ruby-fast-gettext 3.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 668 kB
  • sloc: ruby: 3,200; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require_relative 'base'

begin
  gem 'activesupport', '>=5.2.0'
rescue LoadError => e
  abort "Install the activesupport gem -- #{e}"
end

require 'active_support'

I18n.backend = I18n::Backend::Simple.new
I18n.load_path = ['benchmark/locale/de.yml']
I18n.locale = :de
puts "ActiveSupport I18n::Backend::Simple :"
results_test { I18n.translate('activerecord.models.car') == 'Auto' }