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-5.6.15-java spec/static/i18n_spec.rb
logstash-core-7.0.0.beta1-java spec/static/i18n_spec.rb
logstash-core-6.6.0-java spec/static/i18n_spec.rb
logstash-core-7.0.0.alpha2-java spec/static/i18n_spec.rb
logstash-core-6.5.4-java spec/static/i18n_spec.rb
logstash-core-6.5.3-java spec/static/i18n_spec.rb
logstash-core-5.6.14-java spec/static/i18n_spec.rb
logstash-core-6.5.2-java spec/static/i18n_spec.rb
logstash-core-6.5.1-java spec/static/i18n_spec.rb
logstash-core-7.0.0.alpha1-java spec/static/i18n_spec.rb
logstash-core-6.5.0-java spec/static/i18n_spec.rb
logstash-core-5.6.13-java spec/static/i18n_spec.rb
logstash-core-6.4.3-java spec/static/i18n_spec.rb
logstash-core-6.4.2-java spec/static/i18n_spec.rb
logstash-core-5.6.12-java spec/static/i18n_spec.rb
logstash-core-6.4.1-java spec/static/i18n_spec.rb
logstash-core-6.4.0-java spec/static/i18n_spec.rb
logstash-core-5.6.11-java spec/static/i18n_spec.rb
logstash-core-6.3.2-java spec/static/i18n_spec.rb
logstash-core-6.3.1-java spec/static/i18n_spec.rb