Mark user interface strings

For now exclude command help, as cobra itself is not localizable yet.
This commit is contained in:
Philipp Wolfer 2023-12-09 16:43:14 +01:00
parent 511b71b909
commit d6ca8d33f7
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
27 changed files with 1005 additions and 95 deletions

View file

@ -19,13 +19,15 @@ import (
"fmt"
"net/http"
"net/url"
"go.uploadedlobster.com/scotty/internal/i18n"
)
func RunOauth2CallbackServer(redirectURL url.URL, param string, responseChan chan CodeResponse) {
http.HandleFunc(redirectURL.Path, func(w http.ResponseWriter, r *http.Request) {
code := r.URL.Query().Get(param)
state := r.URL.Query().Get("state")
fmt.Fprint(w, "Token received, you can close this window now.")
fmt.Fprint(w, i18n.Tr("Token received, you can close this window now."))
responseChan <- CodeResponse{
Code: code,
State: state,