Skip to content

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

Update link documentation

Henriette Dargede592c195b4e
diff --git a/lookbook/docs/patterns/04-links.md.erb b/lookbook/docs/patterns/04-links.md.erb
index 819f9e93c2a..cd6449cc686 100644
--- a/lookbook/docs/patterns/04-links.md.erb
+++ b/lookbook/docs/patterns/04-links.md.erb
@@ -23,6 +23,22 @@ For links in form captions and PageHeader descriptions, this is done automatical
<%= embed OpenProject::Common::LinkPreview, :inline %>
-## Technical notes
+# Links in translated texts
The module `Redmine::I18n` offers a helper called `link_translate` that can be used to render inline links inside translated text. This method ensures that the guidelines above are respected.
+
+```ruby
+link_translate("consent.user_has_consented", links: { consent_settings: "www.openproject.com" })
+```
+
+For that to work, the base string needs to define the link in the following format in the yml file:
+
+```yml
+user_has_consented: The user gave their consent to your [configured consent information text](consent_settings).
+```
+
+That will result in:
+
+```html
+The user gave their consent to your <a target="_blank" href="www.openproject.com" data-view-component="true" class="Link Link--underline"><span data-view-component="true" class="Link-content">configured consent information text</span></a>.
+```