0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-14 13:58:53 +08:00
discourse/plugins/discourse-openid-connect/config/locales/server.en.yml
Régis Hanol 8b03a42cd7
DEV: Linkify site setting references in descriptions (#40338)
Site setting descriptions frequently mention other settings, but the
YAML had no consistent convention. The same reference appeared in at
least four styles -- `foo` in backticks, 'foo' in single quotes,
'humanized name' in single quotes, or just `bare_snake_case` -- and none
of them rendered as a link the admin could click to jump to the
referenced setting.

Introduce a compact marker, `{{setting:foo}}`, and expand it in
`SiteSettings::LabelFormatter.description`. The marker resolves to a
linkified anchor pointing at
`/admin/site_settings/category/all_results?filter=foo`, with the
humanized setting name as the visible label. Wiring the expansion at the
description seam (rather than in the I18n freedom patch) keeps the
change surgical: no impact on `I18n.t` for unrelated translations, no
`html_safe` plumbing changes in the JSON error pipeline.

Migrate ~67 references in `config/locales/server.en.yml` to the new
marker, covering every flavour of inconsistency found by two sweeps
(snake_case identifiers and quoted humanized names). The sweep also
turned up a stale reference: `enable_linkedin_oidc_logins` described
`linkedin_client_id`/`linkedin_client_secret`, which were renamed to
`linkedin_oidc_client_id`/`linkedin_oidc_client_secret` years ago.

Teach `script/i18n_lint.rb` to whitelist the new marker -- previously
any `{{...}}` was flagged as an accidental Handlebars-style mistake.
Reset the `label a` margin inherited from `discourse.scss` inside
`.setting-value`, so the linkified anchors sit flush against surrounding
text in checkbox-label descriptions.

Ref - t/148687

**BEFORE**

<img width="1594" height="1279" alt="2026-05-27 @ 14 27 33"
src="https://github.com/user-attachments/assets/aeaf2ee3-ce8c-484c-805d-cec9298f068b"
/>

**AFTER**

<img width="1594" height="1279" alt="2026-05-27 @ 14 25 32"
src="https://github.com/user-attachments/assets/bbead088-6f80-4903-b320-31b87d821428"
/>
2026-06-01 10:31:18 +02:00

24 lines
2.9 KiB
YAML
Vendored

en:
site_settings:
openid_connect_enabled: Enable OpenID Connect authentication. Customize user interface text <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>here</a>
openid_connect_discovery_document: "OpenID Connect discovery document URL. Normally located at 'https://your.domain/.well-known/openid-configuration'"
openid_connect_client_id: "OpenID Connect client ID"
openid_connect_client_secret: "OpenID Connect client secret"
openid_connect_authorize_scope: "The scopes sent to the authorize endpoint. This must include 'openid'."
openid_connect_rp_initiated_logout: "Redirect the user to end_session_endpoint after logout. Must be supported by your identity provider and included in the discovery document."
openid_connect_rp_initiated_logout_redirect: "(optional) The post_logout_redirect_uri which will be passed to the logout endpoint. If provided, it must be registered with the identity provider."
openid_connect_rp_initiated_logout_include_client_id: "(optional) Append the client_id (openid_connect_client_id setting) as a query parameter to the logout endpoint"
openid_connect_token_scope: "The scopes sent when requesting the token endpoint. The official specification does not require this."
openid_connect_error_redirects: "If the callback error_reason contains the first parameter, the user will be redirected to the URL in the second parameter"
openid_connect_allow_association_change: "Allow users to disconnect and reconnect their Discourse accounts from the OpenID Connect provider"
openid_connect_verbose_logging: "Log detailed openid-connect authentication information to `/logs`. Keep this disabled during normal use."
openid_connect_authorize_parameters: "URL parameters which will be included in the redirect from /auth/oidc to the IDP's authorize endpoint"
openid_connect_overrides_email: "On every login, override the user's email using the openid-connect value. Works the same as the {{setting:auth_overrides_email}} setting, but is specific to OpenID Connect logins."
openid_connect_claims: "Explicitly define the claims for use with providers that don't pass data back based on scopes. (JSON)"
openid_connect_groups_claim: "The name of the claim in the OIDC token that contains the user's groups as an array of strings. Leave blank to disable group syncing."
openid_connect_user_field_mappings: "Map OIDC claims onto Discourse user fields. Each entry pairs an OIDC claim name with the numeric ID of a Discourse user field."
openid_connect_match_by_email: "Use email address to match OpenID Connect authentications to existing Discourse user accounts."
openid_connect_use_pkce: "Enable Proof Key for Code Exchange (PKCE) for OpenID Connect authentication."
login:
omniauth_error:
openid_connect_discovery_error: Unable to fetch configuration from identity provider. Please try again.