Problem
- String concatenation madness in hook_help():
<?php
$output .= '<h3>'. t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>'. t('Creating aliases') . '</dt>';
$output .= '<dd>'. t('Users with sufficient <a href="@permissions">permissions</a> can create aliases under the <em>URL settings</em> section when they create or edit content. Some examples of aliases are: ', array('@permissions'=> url('admin/people/permissions', array('fragment'=> 'module-path'))));
$output .= '<ul><li>'. t('<em>member/jane-smith</em> aliased to internal path <em>user/123</em>') . '</li>';
$output .= '<li>'. t('<em>about-us/team</em> aliased to internal path <em>node/456</em>') . '</li>';
$output .= '</ul></dd>';
$output .= '<dt>'. t('Managing aliases') . '</dt>';
$output .= '<dd>'. t('The Path module provides a way to search and view a <a href="@aliases">list of all aliases</a> that are in use on your website. Aliases can be added, edited and deleted through this list.', array('@aliases'=> url('admin/config/search/path'))) . '</dd>';
$output .= '</dl>';
?>
Goal
Sanity?
<h3>Uses</h3>
<dl>
<dt>Creating aliases</dt>
<dd>Users with sufficient <a href="{{ 'admin/people/permissions#module-path'|url }}">permissions</a> can create aliases under the <em>URL settings</em> section when they create or edit content. Some examples of aliases are:
<ul>
<li><em>member/jane-smith</em> aliased to internal path <em>user/123</em></li>
<li><em>about-us/team</em> aliased to internal path <em>node/456</em></li>
</ul>
</dd>
<dt>Managing aliases</dt>
<dd>The Path module provides a way to search and view a <a href="{{ 'admin/config/search/path'|url }}">list of all aliases</a> that are in use on your website. Aliases can be added, edited and deleted through this list.</dd>
</dl>(sorry, I'm not up to speed with twig template syntax)
Details
- Obviously, a couple of things to figure out...
- Extracting (static) translatable strings out of twig templates.
- Making that |url filter work.
- ...more...