mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 13:47:05 +02:00
Mark user interface strings
For now exclude command help, as cobra itself is not localizable yet.
This commit is contained in:
parent
511b71b909
commit
d6ca8d33f7
27 changed files with 1005 additions and 95 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue