Quantcast
Viewing all articles
Browse latest Browse all 295840

Update sentence-embedded internal links in content_moderation, core.content_structure, search.overview help topics to use help_route_link function

Problem/Motivation

In #3215784: [META] Fix up topics to use new help_route_link function, the patch was too large and too burdensome to review, so the issue was re-scoped and child issues created. The patches in #58 (9.5.x) and #61 (10.1.x) can be used as a reference.

On #3090659: Make a way for help topics to generate links only if they work and are accessible, we've added two new functions for making safe links with access checks in help topics.
Related change record is https://www.drupal.org/node/3192582

As an example, this is how the block.place.html.twig file was updated in the patch on that issue (that was the only production topic that was updated):

-{% set layout_url = render_var(url('block.admin_display')) %}
+{% set layout_link_text %}
+{% trans %}Block layout{% endtrans %}
+{% endset %}
+{% set layout_link = render_var(help_route_link(layout_link_text, 'block.admin_display')) %}
 
...

-  <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <a href="{{ layout_url }}"><em>Block layout</em></a>.{% endtrans %}</li>
+  <li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; {{ layout_link }}.{% endtrans %}</li>

...

-  <li>{% trans %}Configure the block and click <em>Save block</em>; see <a href="{{ configure }}">Configuring a previously-placed block</a> for configuration details.{% endtrans %}</li>
+  <li>{% trans %}Configure the block and click <em>Save block</em>; see {{ configure_topic }} for configuration details.{% endtrans %}</li>

Steps to reproduce

N/A

Proposed resolution

0. Discuss and decide on the best way to handle the sentence-embedded links in these help topics.

1. Update internal links and breadcrumbs in the following help topics:

  • core/modules/help_topics/help_topics/content_moderation.changing_states.html.twig
  • core/modules/help_topics/help_topics/content_moderation.configuring_workflows.html.twig
  • core/modules/help_topics/help_topics/core.content_structure.html.twig
  • core/modules/help_topics/help_topics/search.overview.html.twig

2. Attempt to embed the link in the help topic copy simply and directly in order to help translators. If possible, use the menu link title for the link text.

3. Get feedback from Multilingual subsystem maintainer on translatability. (When issue is ready for review, the issue reporter should add "Needs subsystem maintainer review" tag and request feedback from @Gábor Hojtsy.)

Remaining tasks

Patch, review, commit.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Not necessary. This is an experimental module.


Viewing all articles
Browse latest Browse all 295840

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>