i18n-tasks icon indicating copy to clipboard operation
i18n-tasks copied to clipboard

Bad language pair when trying to translate with Google

Open Adsidera opened this issue 6 years ago • 2 comments

gems/ruby-2.4.2/gems/easy_translate-0.5.0/lib/easy_translate/request.rb:47:in `perform_raw': Bad language pair: en|en (EasyTranslate::EasyTranslateException)

bundle exec i18n-tasks translate-missing
warning: parser/current is loading parser/ruby24, which recognizes
warning: 2.4.0-compliant syntax, but you are running 2.4.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
/Users/adsidera/.rvm/gems/ruby-2.4.2/gems/easy_translate-0.5.0/lib/easy_translate/request.rb:47:in `perform_raw': Bad language pair: en|en (EasyTranslate::EasyTranslateException)
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/easy_translate-0.5.0/lib/easy_translate/translation.rb:34:in `request_translations'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/easy_translate-0.5.0/lib/easy_translate/threadable.rb:24:in `block in threaded_process'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/easy_translate-0.5.0/lib/easy_translate/threadable.rb:24:in `map'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/easy_translate-0.5.0/lib/easy_translate/threadable.rb:24:in `threaded_process'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/easy_translate-0.5.0/lib/easy_translate/translation.rb:20:in `translate'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/i18n-tasks-0.9.19/lib/i18n/tasks/google_translation.rb:40:in `fetch_google_translations'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/i18n-tasks-0.9.19/lib/i18n/tasks/google_translation.rb:30:in `block in google_translate_list'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/i18n-tasks-0.9.19/lib/i18n/tasks/google_translation.rb:29:in `each'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/i18n-tasks-0.9.19/lib/i18n/tasks/google_translation.rb:29:in `map'
	from /Users/adsidera/.rvm/gems/ruby-2.4.2/gems/i18n-tasks-0.9.19/lib/i18n/tasks/google_translation.rb:29:in `google_translate_list'
	from /Users/adsidera/.rvm/gem

Adsidera avatar Dec 28 '17 15:12 Adsidera

I had this issue come up when I removed a key in my en.yml file but it was still present in all the other language files. Running i18n-tasks remove-unused solved the issue.

I think the problem here is just a very vague error message.

kleinjm avatar Sep 12 '22 19:09 kleinjm

same here

paterlinimatias avatar Apr 02 '23 13:04 paterlinimatias