class Babelish::CSV2Strings
Attributes
languages[RW]
Public Instance Methods
extension()
click to toggle source
# File lib/babelish/csv2strings.rb, line 23 def extension "strings" end
get_row_format(row_key, row_value, comment = nil, indentation = 0)
click to toggle source
# File lib/babelish/csv2strings.rb, line 18 def get_row_format(row_key, row_value, comment = nil, indentation = 0) entry = comment.to_s.empty? ? "" : "\n/* #{comment} */\n" entry + "\"#{row_key}\"" + " " * indentation + " = \"#{row_value}\";\n" end
language_filepaths(language)
click to toggle source
# File lib/babelish/csv2strings.rb, line 5 def language_filepaths(language) require 'pathname' filepaths = [] if language.regions.empty? filepaths << Pathname.new(@output_dir) + "#{language.code}.lproj/#{output_basename}.#{extension}" else language.regions.each do |region| filepaths << Pathname.new(@output_dir) + "#{language.code}-#{region}.lproj/#{output_basename}.#{extension}" end end filepaths end
output_basename()
click to toggle source
# File lib/babelish/csv2strings.rb, line 27 def output_basename @output_basename || 'Localizable' end