Use GCS for cache, make it public.
Use official Google Translate API
Design
Ops
We will operate this under the ops@getcourgaenow account. We use it for other things like this.
Sec
Because we are going to use this for the CLI and Server, the caller needs to handle collecting credentials and passing it down.
At runtime, the CLi should ask for auth credentials, and then cache and proceed.
At runtime, the Server ( for product example below ) needs to pull credentials from config.
Logic flow
Check cache for miss, etc
check google trans, and update cache and return data.
HIL ( human in loops )
Cli can edit the cache on Google.
Ops needed are search, listall, replace, delete, deleteall ( requires special "-f" flag for force ).
HA
google gives it for free.
But we might need to copy all of a cache and then move all the data to another account..
So maybe we need a backup and restore. THis is really like what our real Operations needs to backup data to google and then restore from it. So if we make this work for this Issue we can reuse it for that too.
Suggested code approach:
shared/servers/google
shared code for accessing google storage that can be used by bs-lang but also other things we will need for various functionality we need now and going forward.
Seems like a good fit because its a KV the Ops and Auth aspects we need.
We will need to also do the same with badger acting as a Lang Service cache for the Product. By Product i mean that the system will need to provide at runtime a translation service ( for example real time translated chat), and we will want to cache it in our google storage cache and in their server ( which uses badger ).
Use GCS for cache, make it public. Use official Google Translate API
Design
Ops
Sec
Logic flow
HIL ( human in loops )
HA
Suggested code approach:
shared/servers/google
shared/tool/bs-lang/services/translation.go
shared/tool/bs-lang/services/googletranslation.go
shared/tool/bs-lang/services/write.go
auth approach: