Sha256: 0a7eacd5e5f61dfad09097cf9c695b9dcbdf7efc9aa47f2c81a40c2cf58d7043

Contents?: true

Size: 673 Bytes

Versions: 212

Compression:

Stored size: 673 Bytes

Contents

# encoding: utf-8
require "spec_helper"
require "i18n"

I18N_T_REGEX = Regexp.new('I18n.t.+?"(.+?)"')

describe I18n do
  context "when using en.yml" do
    glob_path = File.join(LogStash::Environment::LOGSTASH_HOME, "logstash-*", "lib", "**", "*.rb")

    Dir.glob(glob_path).each do |file_name|

      context "in file \"#{file_name}\"" do
        File.foreach(file_name) do |line|
          next unless (match = line.match(I18N_T_REGEX))
          line = $INPUT_LINE_NUMBER
          key = match[1]
          it "in line #{line} the \"#{key}\" key should exist" do
            expect(I18n.exists?(key)).to be_truthy
          end
        end
      end
    end
  end
end

Version data entries

212 entries across 206 versions & 15 rubygems

Version Path
logstash-core-6.8.23-java spec/static/i18n_spec.rb
logstash-core-6.8.22-java spec/static/i18n_spec.rb
logstash-core-6.8.21-java spec/static/i18n_spec.rb
logstash-core-6.8.20-java spec/static/i18n_spec.rb
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-core-6.8.19-java spec/static/i18n_spec.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-core-6.8.18-java spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-core-6.8.17-java spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/static/i18n_spec.rb