7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/localio/writers/java_properties_writer.rb', line 7
def self.write(languages, terms, path, formatter, options)
puts 'Writing Java Properties translations...'
languages.keys.each do |lang|
output_path = path
segments = SegmentsListHolder.new lang
terms.each do |term|
key = Formatter.format(term.keyword, formatter, method(:java_properties_key_formatter))
translation = term.values[lang]
segment = Segment.new(key, translation, lang)
segment.key = nil if term.
segments.segments << segment
end
TemplateHandler.process_template 'java_properties_localizable.erb', output_path, "language_#{lang}.properties", segments
puts " > #{lang.yellow}"
end
end
|