From 6feee555ba09aadacb852a59785f0a6006db368a Mon Sep 17 00:00:00 2001 From: Finn Date: Mon, 12 Aug 2024 22:05:15 -0700 Subject: [PATCH] feat: allow customizing the display name of the OpenID Connect provider --- internal/config/options.go | 9 +++++++++ internal/config/parser.go | 2 ++ internal/locale/translations/de_DE.json | 6 +++--- internal/locale/translations/el_EL.json | 6 +++--- internal/locale/translations/en_US.json | 6 +++--- internal/locale/translations/es_ES.json | 6 +++--- internal/locale/translations/fi_FI.json | 6 +++--- internal/locale/translations/fr_FR.json | 6 +++--- internal/locale/translations/hi_IN.json | 6 +++--- internal/locale/translations/id_ID.json | 6 +++--- internal/locale/translations/it_IT.json | 6 +++--- internal/locale/translations/ja_JP.json | 6 +++--- internal/locale/translations/nl_NL.json | 6 +++--- internal/locale/translations/pl_PL.json | 6 +++--- internal/locale/translations/pt_BR.json | 6 +++--- internal/locale/translations/ru_RU.json | 6 +++--- internal/locale/translations/tr_TR.json | 6 +++--- internal/locale/translations/uk_UA.json | 6 +++--- internal/locale/translations/zh_CN.json | 6 +++--- internal/locale/translations/zh_TW.json | 6 +++--- internal/template/functions.go | 1 + internal/template/templates/views/login.html | 2 +- internal/template/templates/views/settings.html | 4 ++-- miniflux.1 | 5 +++++ 24 files changed, 74 insertions(+), 57 deletions(-) diff --git a/internal/config/options.go b/internal/config/options.go index 484f5f9c..303c8ff3 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -69,6 +69,7 @@ const ( defaultOAuth2ClientSecret = "" defaultOAuth2RedirectURL = "" defaultOAuth2OidcDiscoveryEndpoint = "" + defaultOauth2OidcProviderName = "OpenID Connect" defaultOAuth2Provider = "" defaultDisableLocalAuth = false defaultPocketConsumerKey = "" @@ -154,6 +155,7 @@ type Options struct { oauth2ClientSecret string oauth2RedirectURL string oidcDiscoveryEndpoint string + oidcProviderName string oauth2Provider string disableLocalAuth bool pocketConsumerKey string @@ -232,6 +234,7 @@ func NewOptions() *Options { oauth2ClientSecret: defaultOAuth2ClientSecret, oauth2RedirectURL: defaultOAuth2RedirectURL, oidcDiscoveryEndpoint: defaultOAuth2OidcDiscoveryEndpoint, + oidcProviderName: defaultOauth2OidcProviderName, oauth2Provider: defaultOAuth2Provider, disableLocalAuth: defaultDisableLocalAuth, pocketConsumerKey: defaultPocketConsumerKey, @@ -454,6 +457,11 @@ func (o *Options) OIDCDiscoveryEndpoint() string { return o.oidcDiscoveryEndpoint } +// OIDCProviderName returns the OAuth2 OIDC provider's display name +func (o *Options) OIDCProviderName() string { + return o.oidcProviderName +} + // OAuth2Provider returns the name of the OAuth2 provider configured. func (o *Options) OAuth2Provider() string { return o.oauth2Provider @@ -700,6 +708,7 @@ func (o *Options) SortedOptions(redactSecret bool) []*Option { "OAUTH2_CLIENT_ID": o.oauth2ClientID, "OAUTH2_CLIENT_SECRET": redactSecretValue(o.oauth2ClientSecret, redactSecret), "OAUTH2_OIDC_DISCOVERY_ENDPOINT": o.oidcDiscoveryEndpoint, + "OAUTH2_OIDC_PROVIDER_NAME": o.oidcProviderName, "OAUTH2_PROVIDER": o.oauth2Provider, "OAUTH2_REDIRECT_URL": o.oauth2RedirectURL, "OAUTH2_USER_CREATION": o.oauth2UserCreationAllowed, diff --git a/internal/config/parser.go b/internal/config/parser.go index 062ffea8..b443bae0 100644 --- a/internal/config/parser.go +++ b/internal/config/parser.go @@ -225,6 +225,8 @@ func (p *Parser) parseLines(lines []string) (err error) { p.opts.oauth2RedirectURL = parseString(value, defaultOAuth2RedirectURL) case "OAUTH2_OIDC_DISCOVERY_ENDPOINT": p.opts.oidcDiscoveryEndpoint = parseString(value, defaultOAuth2OidcDiscoveryEndpoint) + case "OAUTH2_OIDC_PROVIDER_NAME": + p.opts.oidcProviderName = parseString(value, defaultOauth2OidcProviderName) case "OAUTH2_PROVIDER": p.opts.oauth2Provider = parseString(value, defaultOAuth2Provider) case "DISABLE_LOCAL_AUTH": diff --git a/internal/locale/translations/de_DE.json b/internal/locale/translations/de_DE.json index 9f32999c..3de1e04e 100644 --- a/internal/locale/translations/de_DE.json +++ b/internal/locale/translations/de_DE.json @@ -210,8 +210,8 @@ "page.settings.title": "Einstellungen", "page.settings.link_google_account": "Google-Konto verknüpfen", "page.settings.unlink_google_account": "Verknüpfung mit Google-Konto entfernen", - "page.settings.link_oidc_account": "OpenID-Connect-Konto verknüpfen", - "page.settings.unlink_oidc_account": "Verknüpfung mit OpenID-Connect-Konto entfernen", + "page.settings.link_oidc_account": "%s-Konto verknüpfen", + "page.settings.unlink_oidc_account": "Verknüpfung mit %s-Konto entfernen", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Aktionen", "page.settings.webauthn.passkey_name": "Name des Passkeys", @@ -225,7 +225,7 @@ ], "page.login.title": "Anmeldung", "page.login.google_signin": "Anmeldung mit Google", - "page.login.oidc_signin": "Anmeldung mit OpenID Connect", + "page.login.oidc_signin": "Anmeldung mit %s", "page.login.webauthn_login": "Melden Sie sich mit dem Passkey an", "page.login.webauthn_login.error": "Anmeldung mit Passkey nicht möglich", "page.integrations.title": "Dienste", diff --git a/internal/locale/translations/el_EL.json b/internal/locale/translations/el_EL.json index b7047da0..229bee73 100644 --- a/internal/locale/translations/el_EL.json +++ b/internal/locale/translations/el_EL.json @@ -210,8 +210,8 @@ "page.settings.title": "Ρυθμίσεις", "page.settings.link_google_account": "Σύνδεση του λογαριασμό μου Google", "page.settings.unlink_google_account": "Αποσύνδεση του λογαριασμού μου Google", - "page.settings.link_oidc_account": "Σύνδεση του λογαριασμού μου OpenID Connect", - "page.settings.unlink_oidc_account": "Αποσύνδεση του λογαριασμού μου OpenID Connect", + "page.settings.link_oidc_account": "Σύνδεση του λογαριασμού μου %s", + "page.settings.unlink_oidc_account": "Αποσύνδεση του λογαριασμού μου %s", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -225,7 +225,7 @@ ], "page.login.title": "Είσοδος", "page.login.google_signin": "Συνδεθείτε με τo Google", - "page.login.oidc_signin": "Συνδεθείτε με το OpenID Connect", + "page.login.oidc_signin": "Συνδεθείτε με το %s", "page.login.webauthn_login": "Είσοδος με κωδικό πρόσβασης", "page.login.webauthn_login.error": "Δεν είναι δυνατή η σύνδεση με κωδικό πρόσβασης", "page.integrations.title": "Ενσωμάτωση", diff --git a/internal/locale/translations/en_US.json b/internal/locale/translations/en_US.json index f2fd6384..87c5af58 100644 --- a/internal/locale/translations/en_US.json +++ b/internal/locale/translations/en_US.json @@ -210,8 +210,8 @@ "page.settings.title": "Settings", "page.settings.link_google_account": "Link my Google account", "page.settings.unlink_google_account": "Unlink my Google account", - "page.settings.link_oidc_account": "Link my OpenID Connect account", - "page.settings.unlink_oidc_account": "Unlink my OpenID Connect account", + "page.settings.link_oidc_account": "Link my %s account", + "page.settings.unlink_oidc_account": "Unlink my %s account", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -225,7 +225,7 @@ ], "page.login.title": "Sign In", "page.login.google_signin": "Sign in with Google", - "page.login.oidc_signin": "Sign in with OpenID Connect", + "page.login.oidc_signin": "Sign in with %s", "page.login.webauthn_login": "Login with passkey", "page.login.webauthn_login.error": "Unable to login with passkey", "page.integrations.title": "Integrations", diff --git a/internal/locale/translations/es_ES.json b/internal/locale/translations/es_ES.json index 232d1a6c..a0cc1034 100644 --- a/internal/locale/translations/es_ES.json +++ b/internal/locale/translations/es_ES.json @@ -210,8 +210,8 @@ "page.settings.title": "Ajustes", "page.settings.link_google_account": "Vincular mi cuenta de Google", "page.settings.unlink_google_account": "Desvincular mi cuenta de Google", - "page.settings.link_oidc_account": "Vincular mi cuenta de OpenID Connect", - "page.settings.unlink_oidc_account": "Desvincular mi cuenta de OpenID Connect", + "page.settings.link_oidc_account": "Vincular mi cuenta de %s", + "page.settings.unlink_oidc_account": "Desvincular mi cuenta de %s", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -225,7 +225,7 @@ ], "page.login.title": "Iniciar sesión", "page.login.google_signin": "Iniciar sesión con tu cuenta de Google", - "page.login.oidc_signin": "Iniciar sesión con tu cuenta de OpenID Connect", + "page.login.oidc_signin": "Iniciar sesión con tu cuenta de %s", "page.login.webauthn_login": "Iniciar sesión con clave de acceso", "page.login.webauthn_login.error": "No se puede iniciar sesión con la clave de paso", "page.integrations.title": "Integraciones", diff --git a/internal/locale/translations/fi_FI.json b/internal/locale/translations/fi_FI.json index ec9de09a..0f3e6ea6 100644 --- a/internal/locale/translations/fi_FI.json +++ b/internal/locale/translations/fi_FI.json @@ -210,8 +210,8 @@ "page.settings.title": "Asetukset", "page.settings.link_google_account": "Linkitä Google-tilini", "page.settings.unlink_google_account": "Poista Google-tilini linkitys", - "page.settings.link_oidc_account": "Linkitä OpenID Connect -tilini", - "page.settings.unlink_oidc_account": "Poista OpenID Connect -tilini linkitys", + "page.settings.link_oidc_account": "Linkitä %s -tilini", + "page.settings.unlink_oidc_account": "Poista %s -tilini linkitys", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -225,7 +225,7 @@ ], "page.login.title": "Kirjaudu sisään", "page.login.google_signin": "Kirjaudu sisään Googlella", - "page.login.oidc_signin": "Kirjaudu sisään OpenID Connectilla", + "page.login.oidc_signin": "Kirjaudu sisään %silla", "page.login.webauthn_login": "Kirjaudu sisään salasanalla", "page.login.webauthn_login.error": "Ei voida kirjautua sisään salasanalla", "page.integrations.title": "Integraatiot", diff --git a/internal/locale/translations/fr_FR.json b/internal/locale/translations/fr_FR.json index 125ca165..ddd4d471 100644 --- a/internal/locale/translations/fr_FR.json +++ b/internal/locale/translations/fr_FR.json @@ -210,8 +210,8 @@ "page.settings.title": "Réglages", "page.settings.link_google_account": "Associer mon compte Google", "page.settings.unlink_google_account": "Dissocier mon compte Google", - "page.settings.link_oidc_account": "Associer mon compte OpenID Connect", - "page.settings.unlink_oidc_account": "Dissocier mon compte OpenID Connect", + "page.settings.link_oidc_account": "Associer mon compte %s", + "page.settings.unlink_oidc_account": "Dissocier mon compte %s", "page.settings.webauthn.passkeys": "Clés d’accès", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Nom de la clé d’accès", @@ -225,7 +225,7 @@ ], "page.login.title": "Connexion", "page.login.google_signin": "Se connecter avec Google", - "page.login.oidc_signin": "Se connecter avec OpenID Connect", + "page.login.oidc_signin": "Se connecter avec %s", "page.login.webauthn_login": "Se connecter avec une clé d’accès", "page.login.webauthn_login.error": "Impossible de se connecter avec la clé d’accès", "page.integrations.title": "Intégrations", diff --git a/internal/locale/translations/hi_IN.json b/internal/locale/translations/hi_IN.json index 6c2ca393..918062a8 100644 --- a/internal/locale/translations/hi_IN.json +++ b/internal/locale/translations/hi_IN.json @@ -210,8 +210,8 @@ "page.settings.title": "समायोजन", "page.settings.link_google_account": "मेरा गूगल खाता जोरीय", "page.settings.unlink_google_account": "मेरा गूगल खाता हटाय", - "page.settings.link_oidc_account": "मेरा ओपन-ईद खाता जोरीय", - "page.settings.unlink_oidc_account": "मेरा ओपन-ईद खाता हटाय", + "page.settings.link_oidc_account": "मेरा ओपन-ईद खाता जोरीय (%s)", + "page.settings.unlink_oidc_account": "मेरा ओपन-ईद खाता हटाय (%s)", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -225,7 +225,7 @@ ], "page.login.title": "साइन इन करें", "page.login.google_signin": "गूगल के साथ साइन इन करें", - "page.login.oidc_signin": "ओपन-ईद के साथ साइन इन करें", + "page.login.oidc_signin": "ओपन-ईद के साथ साइन इन करें (%s)", "page.login.webauthn_login": "पासकी से लॉगिन करें", "page.login.webauthn_login.error": "पासकी से लॉगिन करने में असमर्थ", "page.integrations.title": "एकीकरण", diff --git a/internal/locale/translations/id_ID.json b/internal/locale/translations/id_ID.json index 555ed1ef..e63f39c7 100644 --- a/internal/locale/translations/id_ID.json +++ b/internal/locale/translations/id_ID.json @@ -201,8 +201,8 @@ "page.settings.title": "Pengaturan", "page.settings.link_google_account": "Tautkan akun Google saya", "page.settings.unlink_google_account": "Putuskan akun Google saya", - "page.settings.link_oidc_account": "Tautkan akun OpenID Connect saya", - "page.settings.unlink_oidc_account": "Putuskan akun OpenID Connect saya", + "page.settings.link_oidc_account": "Tautkan akun %s saya", + "page.settings.unlink_oidc_account": "Putuskan akun %s saya", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -215,7 +215,7 @@ ], "page.login.title": "Masuk", "page.login.google_signin": "Masuk dengan Google", - "page.login.oidc_signin": "Masuk dengan OpenID Connect", + "page.login.oidc_signin": "Masuk dengan %s", "page.login.webauthn_login": "Login with passkey", "page.login.webauthn_login.error": "Unable to login with passkey", "page.integrations.title": "Integrasi", diff --git a/internal/locale/translations/it_IT.json b/internal/locale/translations/it_IT.json index d77f0357..1c8f7a31 100644 --- a/internal/locale/translations/it_IT.json +++ b/internal/locale/translations/it_IT.json @@ -210,8 +210,8 @@ "page.settings.title": "Impostazioni", "page.settings.link_google_account": "Collega il mio account Google", "page.settings.unlink_google_account": "Scollega il mio account Google", - "page.settings.link_oidc_account": "Collega il mio account OpenID Connect", - "page.settings.unlink_oidc_account": "Scollega il mio account OpenID Connect", + "page.settings.link_oidc_account": "Collega il mio account %s", + "page.settings.unlink_oidc_account": "Scollega il mio account %s", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -225,7 +225,7 @@ ], "page.login.title": "Accedi", "page.login.google_signin": "Accedi tramite Google", - "page.login.oidc_signin": "Accedi tramite OpenID Connect", + "page.login.oidc_signin": "Accedi tramite %s", "page.login.webauthn_login": "Accedi con passkey", "page.login.webauthn_login.error": "Impossibile accedere con passkey", "page.integrations.title": "Integrazioni", diff --git a/internal/locale/translations/ja_JP.json b/internal/locale/translations/ja_JP.json index 57d62d7c..56ba1360 100644 --- a/internal/locale/translations/ja_JP.json +++ b/internal/locale/translations/ja_JP.json @@ -201,8 +201,8 @@ "page.settings.title": "設定", "page.settings.link_google_account": "Google アカウントと接続する", "page.settings.unlink_google_account": "Google アカウントと接続を解除する", - "page.settings.link_oidc_account": "OpenID Connect アカウントと接続する", - "page.settings.unlink_oidc_account": "OpenID Connect アカウントと接続を解除する", + "page.settings.link_oidc_account": "%s アカウントと接続する", + "page.settings.unlink_oidc_account": "%s アカウントと接続を解除する", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -215,7 +215,7 @@ ], "page.login.title": "ログイン", "page.login.google_signin": "Google アカウントでログイン", - "page.login.oidc_signin": "OpenID Connect アカウントでログイン", + "page.login.oidc_signin": "%s アカウントでログイン", "page.login.webauthn_login": "パスキーでログイン", "page.login.webauthn_login.error": "パスキーでログインできない", "page.integrations.title": "連携", diff --git a/internal/locale/translations/nl_NL.json b/internal/locale/translations/nl_NL.json index 30321a49..fc7db3e9 100644 --- a/internal/locale/translations/nl_NL.json +++ b/internal/locale/translations/nl_NL.json @@ -211,8 +211,8 @@ "page.settings.title": "Instellingen", "page.settings.link_google_account": "Koppel mijn Google-account", "page.settings.unlink_google_account": "Ontkoppel mijn Google-account", - "page.settings.link_oidc_account": "Koppel mijn OpenID Connect-account", - "page.settings.unlink_oidc_account": "Ontkoppel mijn OpenID Connect-account", + "page.settings.link_oidc_account": "Koppel mijn %s-account", + "page.settings.unlink_oidc_account": "Ontkoppel mijn %s-account", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -224,7 +224,7 @@ "Verwijder %d wachtwoord", "Verwijder %d wachtwoordsleutels" ], - "page.login.oidc_signin": "Inloggen via OpenID Connect", + "page.login.oidc_signin": "Inloggen via %s", "page.login.webauthn_login": "Inloggen met wachtwoord", "page.login.webauthn_login.error": "Kan niet inloggen met wachtwoord", "page.login.google_signin": "Inloggen via Google", diff --git a/internal/locale/translations/pl_PL.json b/internal/locale/translations/pl_PL.json index 35c99095..ecd1f540 100644 --- a/internal/locale/translations/pl_PL.json +++ b/internal/locale/translations/pl_PL.json @@ -219,8 +219,8 @@ "page.settings.title": "Ustawienia", "page.settings.link_google_account": "Połącz z moim kontem Google", "page.settings.unlink_google_account": "Odłącz moje konto Google", - "page.settings.link_oidc_account": "Połącz z moim kontem OpenID Connect", - "page.settings.unlink_oidc_account": "Odłącz moje konto OpenID Connect", + "page.settings.link_oidc_account": "Połącz z moim kontem %s", + "page.settings.unlink_oidc_account": "Odłącz moje konto %s", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -235,7 +235,7 @@ ], "page.login.title": "Zaloguj się", "page.login.google_signin": "Zaloguj przez Google", - "page.login.oidc_signin": "Zaloguj przez OpenID Connect", + "page.login.oidc_signin": "Zaloguj przez %s", "page.login.webauthn_login": "Zaloguj się za pomocą hasła", "page.login.webauthn_login.error": "Nie można zalogować się za pomocą klucza dostępu", "page.integrations.title": "Usługi", diff --git a/internal/locale/translations/pt_BR.json b/internal/locale/translations/pt_BR.json index 0a6f8566..3c1c8390 100644 --- a/internal/locale/translations/pt_BR.json +++ b/internal/locale/translations/pt_BR.json @@ -210,8 +210,8 @@ "page.settings.title": "Ajustes", "page.settings.link_google_account": "Vincular minha conta do Google", "page.settings.unlink_google_account": "Desvincular minha conta do Google", - "page.settings.link_oidc_account": "Vincular minha conta do OpenID Connect", - "page.settings.unlink_oidc_account": "Desvincular minha conta do OpenID Connect", + "page.settings.link_oidc_account": "Vincular minha conta do %s", + "page.settings.unlink_oidc_account": "Desvincular minha conta do %s", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -225,7 +225,7 @@ ], "page.login.title": "Iniciar Sessão", "page.login.google_signin": "Iniciar Sessão com sua conta do Google", - "page.login.oidc_signin": "Iniciar Sessão com sua conta do OpenID Connect", + "page.login.oidc_signin": "Iniciar Sessão com sua conta do %s", "page.login.webauthn_login": "Entrar com senha", "page.login.webauthn_login.error": "Não é possível fazer login com senha", "page.integrations.title": "Integrações", diff --git a/internal/locale/translations/ru_RU.json b/internal/locale/translations/ru_RU.json index 5818e237..fd214374 100644 --- a/internal/locale/translations/ru_RU.json +++ b/internal/locale/translations/ru_RU.json @@ -219,8 +219,8 @@ "page.settings.title": "Настройки", "page.settings.link_google_account": "Привязать мой Google аккаунт", "page.settings.unlink_google_account": "Отвязать мой Google аккаунт", - "page.settings.link_oidc_account": "Привязать мой OpenID Connect аккаунт", - "page.settings.unlink_oidc_account": "Отвязать мой OpenID Connect аккаунт", + "page.settings.link_oidc_account": "Привязать мой %s аккаунт", + "page.settings.unlink_oidc_account": "Отвязать мой %s аккаунт", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -235,7 +235,7 @@ ], "page.login.title": "Войти", "page.login.google_signin": "Войти с помощью Google", - "page.login.oidc_signin": "Войти с помощью OpenID Connect", + "page.login.oidc_signin": "Войти с помощью %s", "page.login.webauthn_login": "Войти с паролем", "page.login.webauthn_login.error": "Невозможно войти с паролем", "page.integrations.title": "Интеграции", diff --git a/internal/locale/translations/tr_TR.json b/internal/locale/translations/tr_TR.json index 3366dc7d..ac150d24 100644 --- a/internal/locale/translations/tr_TR.json +++ b/internal/locale/translations/tr_TR.json @@ -455,7 +455,7 @@ "page.keyboard_shortcuts.toggle_read_status_next": "Okundu/okunmadı arasında geçiş yap, sonrakine odaklan", "page.keyboard_shortcuts.toggle_read_status_prev": "Okundu/okunmadı arasında geçiş yap, öncekine odaklan", "page.login.google_signin": "Google ile oturum aç", - "page.login.oidc_signin": "OpenID Connect ile oturum aç", + "page.login.oidc_signin": "%s ile oturum aç", "page.login.title": "Oturum aç", "page.login.webauthn_login": "Passkey ile giriş yap", "page.login.webauthn_login.error": "Passkey ile giriş yapılamıyor", @@ -474,10 +474,10 @@ "page.sessions.table.user_agent": "User Agent", "page.sessions.title": "Oturumlar", "page.settings.link_google_account": "Google hesabımı bağla", - "page.settings.link_oidc_account": "OpenID Connect hesabımı bağla", + "page.settings.link_oidc_account": "%s hesabımı bağla", "page.settings.title": "Ayarlar", "page.settings.unlink_google_account": "Google hesabımın bağlantısını kaldır", - "page.settings.unlink_oidc_account": "OpenID Connect hesabımın bağlantısını kaldır", + "page.settings.unlink_oidc_account": "%s hesabımın bağlantısını kaldır", "page.settings.webauthn.actions": "Eylemler", "page.settings.webauthn.added_on": "Eklendi", "page.settings.webauthn.delete": [ diff --git a/internal/locale/translations/uk_UA.json b/internal/locale/translations/uk_UA.json index 72fc9d34..2bebf3cd 100644 --- a/internal/locale/translations/uk_UA.json +++ b/internal/locale/translations/uk_UA.json @@ -219,8 +219,8 @@ "page.settings.title": "Налаштування ", "page.settings.link_google_account": "Підключити мій обліковий запис Google", "page.settings.unlink_google_account": "Відключити мій обліковий запис Google", - "page.settings.link_oidc_account": "Підключити мій обліковий запис OpenID Connect", - "page.settings.unlink_oidc_account": "Відключити мій обліковий запис OpenID Connect", + "page.settings.link_oidc_account": "Підключити мій обліковий запис %s", + "page.settings.unlink_oidc_account": "Відключити мій обліковий запис %s", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "Actions", "page.settings.webauthn.passkey_name": "Passkey Name", @@ -235,7 +235,7 @@ ], "page.login.title": "Вхід", "page.login.google_signin": "Увійти через Google", - "page.login.oidc_signin": "Увійти через OpenID Connect", + "page.login.oidc_signin": "Увійти через %s", "page.login.webauthn_login": "Увійти за допомогою пароля", "page.login.webauthn_login.error": "Неможливо ввійти за допомогою ключа доступу", "page.integrations.title": "Інтеграції", diff --git a/internal/locale/translations/zh_CN.json b/internal/locale/translations/zh_CN.json index 0d5be6f2..f96342fe 100644 --- a/internal/locale/translations/zh_CN.json +++ b/internal/locale/translations/zh_CN.json @@ -201,8 +201,8 @@ "page.settings.title": "设置", "page.settings.link_google_account": "关联我的 Google 账户", "page.settings.unlink_google_account": "解除 Google 账号关联", - "page.settings.link_oidc_account": "关联我的 OpenID Connect 账户", - "page.settings.unlink_oidc_account": "解除 OpenID Connect 账号关联", + "page.settings.link_oidc_account": "关联我的 %s 账户", + "page.settings.unlink_oidc_account": "解除 %s 账号关联", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "操作", "page.settings.webauthn.passkey_name": "Passkey 名称", @@ -215,7 +215,7 @@ ], "page.login.title": "登录", "page.login.google_signin": "使用 Google 登录", - "page.login.oidc_signin": "使用 OpenID Connect 登录", + "page.login.oidc_signin": "使用 %s 登录", "page.login.webauthn_login": "使用密码登录", "page.login.webauthn_login.error": "无法使用密码登录", "page.integrations.title": "集成", diff --git a/internal/locale/translations/zh_TW.json b/internal/locale/translations/zh_TW.json index f0e2ea8b..b2f5ea7c 100644 --- a/internal/locale/translations/zh_TW.json +++ b/internal/locale/translations/zh_TW.json @@ -201,8 +201,8 @@ "page.settings.title": "設定", "page.settings.link_google_account": "關聯我的 Google 賬戶", "page.settings.unlink_google_account": "解除 Google 帳號關聯", - "page.settings.link_oidc_account": "關聯我的 OpenID Connect 賬戶", - "page.settings.unlink_oidc_account": "解除 OpenID Connect 帳號關聯", + "page.settings.link_oidc_account": "關聯我的 %s 賬戶", + "page.settings.unlink_oidc_account": "解除 %s 帳號關聯", "page.settings.webauthn.passkeys": "Passkeys", "page.settings.webauthn.actions": "操作", "page.settings.webauthn.passkey_name": "Passkey 名稱", @@ -215,7 +215,7 @@ ], "page.login.title": "登入", "page.login.google_signin": "使用 Google 登入", - "page.login.oidc_signin": "使用 OpenID Connect 登入", + "page.login.oidc_signin": "使用 %s 登入", "page.login.webauthn_login": "使用密碼登錄", "page.login.webauthn_login.error": "無法使用密碼登錄", "page.integrations.title": "整合", diff --git a/internal/template/functions.go b/internal/template/functions.go index 4a91ffdf..a084db86 100644 --- a/internal/template/functions.go +++ b/internal/template/functions.go @@ -40,6 +40,7 @@ func (f *funcMap) Map() template.FuncMap { "baseURL": config.Opts.BaseURL, "rootURL": config.Opts.RootURL, "disableLocalAuth": config.Opts.DisableLocalAuth, + "oidcProviderName": config.Opts.OIDCProviderName, "hasOAuth2Provider": func(provider string) bool { return config.Opts.OAuth2Provider() == provider }, diff --git a/internal/template/templates/views/login.html b/internal/template/templates/views/login.html index 14cb791f..ff642231 100644 --- a/internal/template/templates/views/login.html +++ b/internal/template/templates/views/login.html @@ -40,7 +40,7 @@ {{ else if hasOAuth2Provider "oidc" }}
- {{ t "page.login.oidc_signin" }} + {{ t "page.login.oidc_signin" oidcProviderName }}
{{ end }} diff --git a/internal/template/templates/views/settings.html b/internal/template/templates/views/settings.html index 58ad67d1..99ac5863 100644 --- a/internal/template/templates/views/settings.html +++ b/internal/template/templates/views/settings.html @@ -39,9 +39,9 @@ {{ else if hasOAuth2Provider "oidc" }}
{{ if .user.OpenIDConnectID }} - {{ t "page.settings.unlink_oidc_account" }} + {{ t "page.settings.unlink_oidc_account" oidcProviderName }} {{ else }} - {{ t "page.settings.link_oidc_account" }} + {{ t "page.settings.link_oidc_account" oidcProviderName }} {{ end }}
{{ end }} diff --git a/miniflux.1 b/miniflux.1 index 48868d0b..a2302fae 100644 --- a/miniflux.1 +++ b/miniflux.1 @@ -442,6 +442,11 @@ OpenID Connect discovery endpoint\&. .br Default is empty\&. .TP +.B OAUTH2_OIDC_PROVIDER_NAME +Name to display for the OIDC provider\&. +.br +Default is OpenID Connect\&. +.TP .B OAUTH2_PROVIDER Possible values are "google" or "oidc"\&. .br