Move translation service config to config_for yml (#30663)

This commit is contained in:
Matt Jankowski 2024-10-23 09:32:18 -04:00 committed by GitHub
parent 5a4f4f3e83
commit 35f008aa2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 5 deletions

View file

@ -109,6 +109,8 @@ module Mastodon
end
end
config.x.translation = config_for(:translation)
config.to_prepare do
Doorkeeper::AuthorizationsController.layout 'modal'
Doorkeeper::AuthorizedApplicationsController.layout 'admin'

7
config/translation.yml Normal file
View file

@ -0,0 +1,7 @@
shared:
deepl:
api_key: <%= ENV.fetch('DEEPL_API_KEY', nil) %>
plan: <%= ENV.fetch('DEEPL_PLAN', 'free') %>
libre_translate:
api_key: <%= ENV.fetch('LIBRE_TRANSLATE_API_KEY', nil) %>
endpoint: <%= ENV.fetch('LIBRE_TRANSLATE_ENDPOINT', nil) %>