Open Adsidera opened 6 years ago
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.
same here
I have the same issue on 1.0.14
I am using google_translate_api
.
I get this error if I do:
i18n-tasks translate-missing --verbose
locales inferred from data: en, da, de, en-GB, es, fr, is, it, nl, no, pt, sv
task: translate-missing(locales: ["en", "da", "de", "en-GB", "es", "fr", "is", "it", "nl", "no", "pt", "sv"], from: "en", format: "terminal-table", backend: "google", pattern: nil, arguments: [])
bundler: failed to load command: i18n-tasks (/home/viktor/.rbenv/versions/3.3.5/bin/i18n-tasks)
/home/viktor/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/easy_translate-0.5.1/lib/easy_translate/request.rb:47:in `perform_raw': Bad language pair: en|en (EasyTranslate::EasyTranslateException)
from /home/viktor/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/easy_translate-0.5.1/lib/easy_translate/translation.rb:34:in `request_translations'
from /home/viktor/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/easy_translate-0.5.1/lib/easy_translate/threadable.rb:24:in `block in threaded_process'
But if I use -l
to list all my languages, it works without issues.
i18n-tasks translate-missing -l es is ...
works perfectly.
How can I use translate-missing without having to list all my languages?
Bad language pair: en|en
Do I need to skip translating en
is that possible in the config?
@viktorsmari Could you add your config file?
Output of i18n-tasks config
internal_locale: en
base_locale: en
locales:
- en
- da
- de
- en-GB
- es
- fr
- is
- it
- nl
- 'no'
- pt
- sv
data:
adapter: I18n::Tasks::Data::FileSystem
read:
- config/locales/%{locale}.yml
write:
- config/locales/%{locale}.yml
yaml:
write:
line_width: -1
sort: true
search:
paths:
- app/
relative_exclude_method_name_paths: []
relative_roots:
- app/controllers
- app/helpers
- app/mailers
- app/presenters
- app/views
scanners:
- - "::I18n::Tasks::Scanners::RubyAstScanner"
- only:
- "*.rb"
- - "::I18n::Tasks::Scanners::ErbAstScanner"
- only:
- "*.html.erb"
- - "::I18n::Tasks::Scanners::PatternWithScopeScanner"
- exclude:
- "*.html.erb"
- "*.rb"
ast_matchers: []
strict: true
exclude:
- app/assets/images
- app/assets/fonts
- app/assets/videos
- app/assets/builds
translation:
google_translate_api_key: xxx
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)