lib/meme-translator/translator.rb
# Change this to the languages you want this to randomly choose from
Change this to the languages you want this to randomly choose from
Change this to the languages you want this to randomly choose from
def translate_single_phrase(phrase)
    langs = @@languages.keys.sample(@passes) << 'en'
    puts "Starting with phrase: '#{phrase}'"
    (@passes + 1).times do |i|
      from = i == 0 ? nil : langs[i - 1]
      phrase, code = translate_phrase(phrase, langs[i], from)
      break if code
    end
    puts "Final output after #{@passes + 1} passes: '#{phrase}'"
    puts ""
  end
def translate_single_phrase ( phrase ) langs = @@languages . keys . sample ( @passes ) << 'en' puts "Starting with phrase: '#{phrase}'" ( @passes + 1 ) . times do | i | from = i == 0 ? nil : langs [ i - 1 ] phrase , code = translate_phrase ( phrase , langs [ i ] , from ) break if code end puts "Final output after #{@passes + 1} passes: '#{phrase}'" puts "" end
Change this to the languages you want this to randomly choose from
Change this to the languages you want this to randomly choose from
phrase
<not_specific>