Sha256: 26256d03702c74645bb97c191088e397d90d6d0b3999bd25e992c642fda63ccc

Contents?: true

Size: 598 Bytes

Versions: 24

Compression:

Stored size: 598 Bytes

Contents

require_relative "utils"

module IsoDoc
  module Generic
    class I18n < IsoDoc::I18n
      class << self
        attr_accessor :_file
      end

      def self.inherited( k )
        k._file = caller_locations.first.absolute_path
      end

      def load_yaml1(lang, script)
        return super unless configuration.i18nyaml
        file = configuration.i18nyaml.is_a?(Hash) ?
          configuration.i18nyaml[lang] : configuration.i18nyaml
        return super if file.nil?
        y = YAML.load_file(baselocation(file))
        super.merge(y)
      end

      include Utils
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
metanorma-generic-2.1.1 lib/isodoc/generic/i18n.rb
metanorma-generic-2.1.0 lib/isodoc/generic/i18n.rb
metanorma-generic-2.0.4 lib/isodoc/generic/i18n.rb
metanorma-generic-2.0.3 lib/isodoc/generic/i18n.rb
metanorma-generic-2.0.2 lib/isodoc/generic/i18n.rb
metanorma-generic-2.0.1 lib/isodoc/generic/i18n.rb
metanorma-generic-2.0.0 lib/isodoc/generic/i18n.rb
metanorma-generic-1.11.3 lib/isodoc/generic/i18n.rb
metanorma-generic-1.11.2 lib/isodoc/generic/i18n.rb
metanorma-generic-1.11.1 lib/isodoc/generic/i18n.rb
metanorma-generic-1.11.0 lib/isodoc/generic/i18n.rb
metanorma-generic-1.10.4 lib/isodoc/generic/i18n.rb
metanorma-generic-1.10.3 lib/isodoc/generic/i18n.rb
metanorma-generic-1.10.2 lib/isodoc/generic/i18n.rb
metanorma-generic-1.10.1 lib/isodoc/generic/i18n.rb
metanorma-generic-1.10.0 lib/isodoc/generic/i18n.rb
metanorma-generic-1.9.0 lib/isodoc/generic/i18n.rb
metanorma-generic-1.8.2 lib/isodoc/generic/i18n.rb
metanorma-generic-1.8.1 lib/isodoc/generic/i18n.rb
metanorma-generic-1.8.0 lib/isodoc/generic/i18n.rb