Commit b31c7b6b authored by ancoats's avatar ancoats
Browse files

Add `routes` translation category

parent f70461ca
......@@ -18,8 +18,14 @@
*/
return [
'modules' => [
'my-module' => \modules\Module::class,
'components' => [
'i18n' => [
'translations' => [
'routes' => [
'class' => \craft\i18n\PhpMessageSource::class,
'basePath' => '@translations',
],
]
]
],
//'bootstrap' => ['my-module'],
];
......@@ -2,9 +2,9 @@
{% if (heading is defined and heading) %}<h2 class="c-heading">{{ heading }}</h2>{% endif %}
<ol class="c-list c-list--cluster">
{% for user in users %}
{% set url = 'local-groups/{slug}'|t({
{% set url = 'local-groups/{slug}'|t('routes', {
slug: user.username
}, 'routes') %}
}) %}
<li class="c-list__item">
<a class="c-list__item__label" href="{{ url(url) }}">{{ user.userNamePublic | default(user.name) }}</a>
{% include '_partials/components/shared/icon-group.twig' with {
......
......@@ -2,9 +2,9 @@
<ul class="c-list c-list--terms">
{% for user in users %}
<li class="c-list__item">
{% set url = 'events/u/{slug}'|t({
{% set url = 'events/u/{slug}'|t('routes', {
slug: user.username
}, 'routes') %}
}) %}
<a class="c-label" href="{{ url(url) }}">{{ user.userNamePublic | default(user.name) }}</a>
</li>
{% endfor %}
......
......@@ -24,9 +24,9 @@
{% case 'host' %}
<span class="c-meta-item__heading">{{ 'Hosted by'|t }}</span>
{% set user = (entry.byline.one() ?: entry.author) %}
{% set url = 'events/u/{slug}'|t({
{% set url = 'events/u/{slug}'|t('routes', {
slug: user.username
}, 'routes') %}
}) %}
<a class="c-label" href="{{ url(url) }}">{{ user.userNamePublic | default(user.name) }}</a>
{% endswitch %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment