OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Allow skipping localization for non-localized environments such as APIs
Oliver Günther92d8a4b52048
diff --git a/lib/open_project/static/links.rb b/lib/open_project/static/links.rbindex 66c91cde791..0907bac2c4a 100644--- a/lib/open_project/static/links.rb+++ b/lib/open_project/static/links.rb@@ -46,10 +46,10 @@ module OpenProject@links ||= static_links.merge(dynamic_links)end- def url_for(*items)+ def url_for(*items, localize_url: true)href = links.dig(*items, :href)- if docs_url?(href)+ if localize_url && docs_url?(href)with_locale_param(href)elsehrefdiff --git a/lib/open_project_scimitar.rb b/lib/open_project_scimitar.rbindex df7cfe17625..c233efb1bb0 100644--- a/lib/open_project_scimitar.rb+++ b/lib/open_project_scimitar.rb@@ -33,17 +33,20 @@ module OpenProjectScimitarScimitar::AuthenticationScheme.new(type: "oauth2",name: "OAuth2",- description: OpenProject::Static::Links.url_for(:sysadmin_docs, :scim_static_access_token_authentication_method)+ description: OpenProject::Static::Links.url_for(:sysadmin_docs, :scim_static_access_token_authentication_method,+ localize_url: false)),Scimitar::AuthenticationScheme.new(type: "oauthbearertoken",name: "OAuth Bearer Token",- description: OpenProject::Static::Links.url_for(:sysadmin_docs, :scim_oauth2_client_credentials_authentication_method)+ description: OpenProject::Static::Links.url_for(:sysadmin_docs, :scim_oauth2_client_credentials_authentication_method,+ localize_url: false)),Scimitar::AuthenticationScheme.new(type: "oidcjwt",name: "OpenID Provider JWT",- description: OpenProject::Static::Links.url_for(:sysadmin_docs, :scim_jwt_authetication_method)+ description: OpenProject::Static::Links.url_for(:sysadmin_docs, :scim_jwt_authetication_method,+ localize_url: false))].freezeend