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-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb
logstash-filter-base64-1.0.1 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb
logstash-filter-base64-1.0.0 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb
logstash-core-2.4.0-java spec/static/i18n_spec.rb
logstash-core-2.4.0.snapshot4-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha6.snapshot5-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha6.snapshot4-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha6.snapshot3-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha6.snapshot2-java spec/static/i18n_spec.rb
logstash-core-2.4.0.snapshot3-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha6.snapshot1-java spec/static/i18n_spec.rb
logstash-core-2.4.0.snapshot2-java spec/static/i18n_spec.rb
logstash-core-2.4.0.snapshot1-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha5.snapshot1-java spec/static/i18n_spec.rb
logstash-core-2.3.4-java spec/static/i18n_spec.rb
logstash-core-2.3.4.snapshot1-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha4.snapshot3-java spec/static/i18n_spec.rb
logstash-core-5.0.0.alpha4.snapshot2-java spec/static/i18n_spec.rb
logstash-core-2.3.3-java spec/static/i18n_spec.rb