doc/send-translations.rb
# Process the source file if it hasn't been already.
# For now, we'll assume it's in English (en.yml) in the same directory.
# We should add options to increase flexibility.
Process the source file if it hasn't been already.
For now, we'll assume it's in English (en.yml) in the same directory.
We should add options to increase flexibility.
Process the source file if it hasn ' t been already . For now we ' ll assume it ' s in English ( en . yml ) in the same directory . We should add options to increase flexibility .
def ensure_source_processed(translated_filename)
  return unless $SOURCE.empty?
  source_filename = File.dirname(translated_filename) + '/en.yml'
  source_contents = File.read(source_filename)
  original_source = YAML.safe_load(source_contents)
  convert_source('', original_source['en'])
end
def ensure_source_processed ( translated_filename ) return unless $SOURCE . empty? source_filename = File . dirname ( translated_filename ) + '/en.yml' source_contents = File . read ( source_filename ) original_source = YAML . safe_load ( source_contents ) convert_source ( '' , original_source [ 'en' ] ) end
Process the source file if it hasn't been already.
Process the source file if it hasn ' t been already .
translated_filename
<not_specific>