Why is there no earth icon after I configured the Google Translator API?
root@talk:/data/discourse# ./launcher enter app
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
root@talk-app:/var/www/discourse# rails c
[1] pry(main)> DiscourseTranslator::Google.detect(Post.last)
DiscourseTranslator::TranslatorError: {"error"=>{"code"=>403, "message"=>"Requests from referer <empty> are blocked.", "errors"=>[{"message"=>"Requests from referer <empty> are blocked.", "domain"=>"global", "reason"=>"forbidden"}], "status"=>"PERMISSION_DENIED", "details"=>[{"@type"=>"type.googleapis.com/google.rpc.ErrorInfo", "reason"=>"API_KEY_HTTP_REFERRER_BLOCKED", "domain"=>"googleapis.com", "metadata"=>{"service"=>"translate.googleapis.com", "consumer"=>"projects/390801787023"}}]}}
from /var/www/discourse/plugins/discourse-translator/services/discourse_translator/google.rb:134:in `result'
It looks like you have not supplied a valid key for accessing the translator. I would check that you have supplied payment and re-copy or re-generate the key.
root@talk:/data/discourse# ./launcher enter app
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
root@talk-app:/var/www/discourse# rails c
[1] pry(main)> DiscourseTranslator::Google.detect(Post.last)
DiscourseTranslator::TranslatorError: {"error"=>{"code"=>403, "message"=>"Requests from referer <empty> are blocked.", "errors"=>[{"message"=>"Requests from referer <empty> are blocked.", "domain"=>"global", "reason"=>"forbidden"}], "status"=>"PERMISSION_DENIED", "details"=>[{"@type"=>"type.googleapis.com/google.rpc.ErrorInfo", "reason"=>"API_KEY_HTTP_REFERRER_BLOCKED", "domain"=>"googleapis.com", "metadata"=>{"service"=>"translate.googleapis.com", "consumer"=>"projects/390801787023"}}]}}
from /var/www/discourse/plugins/discourse-translator/services/discourse_translator/google.rb:134:in `result'
Thank you very much for your help, with the above I have been able to pass the test successfully. But I found that I still have the earth translation icon.
root@talk-app:/var/www/discourse/plugins/discourse-translator/services/discourse_translator# rails c
[1] pry(main)> DiscourseTranslator::Google.detect(Post.last)
=> "en"
[2] pry(main)>