create phrase.rb and add javascript helper