lib/translations_manager/transifex_updater.rb
# Add comments to the top of files and replace the language (first key in YAML file)
Add comments to the top of files and replace the language (first key in YAML file)
Add comments to the top of files and replace the language ( first key in YAML file )
def update_file_header(filename, language)
      lines = read_yaml_and_update_language_key(filename, language)
      File.open(filename, 'w+') do |f|
        f.puts(YML_FILE_HEADER, '') unless lines[0][0] == '#'
        f.puts(lines)
      end
    end
def update_file_header ( filename , language ) lines = read_yaml_and_update_language_key ( filename , language ) File . open ( filename , 'w+' ) do | f | f . puts ( YML_FILE_HEADER , '' ) unless lines [ 0 ] [ 0 ] == '#' f . puts ( lines ) end end
Add comments to the top of files and replace the language (first key in YAML file)
Add comments to the top of files and replace the language ( first key in YAML file )
filename
language