Sha256: 7ddf1696f11c7ed565c85f28ca81bdd64f35cbc0af7c0647cda0dbb399123a4c
Contents?: true
Size: 798 Bytes
Versions: 21
Compression:
Stored size: 798 Bytes
Contents
require "yaml" require "isodoc-i18n" module IsoDoc class RelatonRenderI18n < I18n def load_yaml1(lang, script) case lang when "en", "fr", "ru", "de", "es", "ar" load_yaml2(lang) when "zh" if script == "Hans" then load_yaml2("zh-Hans") else load_yaml2("en") end else load_yaml2("en") end end def load_yaml2(str) YAML.load_file(File.join(File.dirname(__FILE__), "../isodoc-yaml/i18n-#{str}.yaml")) end # force bidi for all i18n strings in Arabic, # because of the potential for script mixing def cleanup_entities(hash, is_xml: true) ret = super if @lang == "ar" && /%/.match?(ret) ret = "؜#{ret}؜" end ret end end end
Version data entries
21 entries across 21 versions & 1 rubygems