Sha256: 086a0ebbb8171c41ae41773502f935db58cbd0f499dd120cd31b311d10fa61b8

Contents?: true

Size: 401 Bytes

Versions: 8

Compression:

Stored size: 401 Bytes

Contents

module IsoDoc
  module Itu
    class I18n < IsoDoc::I18n
      def load_file(fname)
        f = File.join(File.dirname(__FILE__), fname)
        File.exist?(f) ? YAML.load_file(f) : {}
      end

      def load_yaml1(lang, script)
        y = load_file("i18n-#{yaml_lang(lang, script)}.yaml")
        y.empty? ? load_file("i18n-en.yaml").merge(super) : super.deep_merge(y)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metanorma-itu-2.5.13 lib/isodoc/itu/i18n.rb
metanorma-itu-2.5.12 lib/isodoc/itu/i18n.rb
metanorma-itu-2.5.11 lib/isodoc/itu/i18n.rb
metanorma-itu-2.5.10 lib/isodoc/itu/i18n.rb
metanorma-itu-2.5.9 lib/isodoc/itu/i18n.rb
metanorma-itu-2.5.8 lib/isodoc/itu/i18n.rb
metanorma-itu-2.5.6 lib/isodoc/itu/i18n.rb
metanorma-itu-2.5.5 lib/isodoc/itu/i18n.rb