lib/agile_notifier/tts.rb in agile_notifier-2.1.3 vs lib/agile_notifier/tts.rb in agile_notifier-2.1.4

- old
+ new

@@ -67,10 +67,10 @@ raise("No available voice found, please check if you have downloaded voice [#{voice}] in System Preferences -> Speech") end else list_of_available_voices = `say -v '?'`.split("\n") voices = list_of_available_voices.inject({}) do |collection, record| - matched_results = record.match(/^(.*[^\s])\s+([a-z]{2})_[A-Z]{2}\s+/) + matched_results = record.match(/^(.*[^\s])\s+([a-z]{2})[_-][a-zA-Z]{2,}\s+/) available_language = matched_results[2].downcase.intern available_voice = matched_results[1] if collection.has_key?(available_language) collection[available_language] << available_voice else \ No newline at end of file