mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 06:24:48 +08:00
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"
/>
38 lines
3.1 KiB
YAML
Vendored
38 lines
3.1 KiB
YAML
Vendored
en:
|
|
login:
|
|
authenticator_error_fetch_user_details: "Could not retrieve your user details. Do you have an active account?"
|
|
|
|
site_settings:
|
|
oauth2_enabled: "Custom OAuth2 is enabled"
|
|
oauth2_client_id: "Client ID for custom OAuth2"
|
|
oauth2_client_secret: "Client Secret for custom OAuth2"
|
|
oauth2_authorize_url: "Authorization URL for OAuth2"
|
|
oauth2_authorize_signup_url: '(optional) Alternative authorization URL used when the "Sign Up" button is used'
|
|
oauth2_token_url: "Token URL for OAuth2"
|
|
oauth2_token_url_method: "Method used to fetch the Token URL"
|
|
oauth2_callback_user_id_path: "Path in the token response to the user id. eg: params.info.uuid"
|
|
oauth2_callback_user_info_paths: "Paths in the token response to other user properties. Supported properties are name, username, email, email_verified and avatar. Format is property:path, eg: name:params.info.name"
|
|
oauth2_fetch_user_details: "Fetch user JSON for OAuth2"
|
|
oauth2_user_json_url: "URL to fetch user JSON for OAuth2 (note we replace :id with the id returned by OAuth call and :token with the token id)"
|
|
oauth2_user_json_url_method: "Method used to fetch the user JSON URL"
|
|
oauth2_json_user_id_path: "Path in the OAuth2 User JSON to the user id. eg: user.id"
|
|
oauth2_json_username_path: "Path in the OAuth2 User JSON to the username. eg: user.username"
|
|
oauth2_json_name_path: "Path in the OAuth2 User JSON to the user's full. eg: user.name.full"
|
|
oauth2_json_email_path: "Path in the OAuth2 User JSON to the user's email. eg: user.email"
|
|
oauth2_json_email_verified_path: "Path in the OAuth2 User JSON to the user's email verification state. eg: user.email.verified. oauth2_email_verified must be disabled for this setting to have any effect"
|
|
oauth2_json_avatar_path: "Path in the Oauth2 User JSON to the user's avatar. eg: user.avatar_url"
|
|
oauth2_json_groups_path: "Path in the OAuth2 User JSON to an array of group names the user belongs to. Leave blank to disable group syncing."
|
|
oauth2_user_field_mappings: "Map paths in the OAuth2 User JSON onto Discourse user fields. Each entry pairs a JSON path with the numeric ID of a Discourse user field."
|
|
oauth2_email_verified: "Check this if the OAuth2 site has verified the email"
|
|
oauth2_overrides_email: "Override the Discourse email with the remote email on every login. Works the same as the {{setting:auth_overrides_email}} setting, but is specific to OAuth2 logins."
|
|
oauth2_send_auth_header: "Send client credentials in an HTTP Authorization header"
|
|
oauth2_send_auth_body: "Send client credentials in the request body"
|
|
oauth2_debug_auth: "Include rich debugging information in your logs"
|
|
oauth2_authorize_options: "When authorizing request these options"
|
|
oauth2_scope: "When authorizing request this scope"
|
|
oauth2_button_title: "The text for the OAuth2 button"
|
|
oauth2_allow_association_change: Allow users to disconnect and reconnect their Discourse accounts from the OAuth2 provider
|
|
oauth2_disable_csrf: "Disable CSRF check"
|
|
|
|
errors:
|
|
oauth2_fetch_user_details: "oauth2_callback_user_id_path must be present to disable oauth2_fetch_user_details"
|