Sha256: 5bdf850fdca360790d90eba9a6d86c2629157c2ec3648288b4db20fd2b50cb43
Contents?: true
Size: 392 Bytes
Versions: 2
Compression:
Stored size: 392 Bytes
Contents
require 'glue/localization' module Nitro class Localization class << self # Transform localization macros. def transform(text, compiler = nil) # handle symbols text.gsub!(/\[\[\:(.*?)\]\]/, '#{@lc[\1]}') # handle strings text.gsub!(/\[\[(.*?)\]\]/, '#{@lc["\1"]}') return text end end end end # * George Moschovitis <gm@navel.gr>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.30.0 | lib/nitro/compiler/localization.rb |
nitro-0.31.0 | lib/nitro/compiler/localization.rb |