Skip to content

Commit

Permalink
Merge pull request #420 from City-of-Helsinki/UHF-8707_other-language…
Browse files Browse the repository at this point in the history
…s-bugs

UHF-8707: Fixed other languages bugs in latest news component
  • Loading branch information
dire authored Aug 25, 2023
2 parents 3c84a06 + 2c872ab commit b178138
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
component_classes: [ 'component--latest-news' ],
component_title: 'Latest news'|t({}, {'context': 'Front page latest news paragraph title'}),
use_component_title_lang_fallback: alternative_language ?? false,
component_content_class: 'latest-news',
}
%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@
{% include "@hdbt/misc/icon.twig" with {icon: 'arrow-right' } %}
{% endset %}

{% if alternative_language %}
{% set link_attributes = link_attributes|merge({
'dir': lang_attributes.fallback_dir,
'lang': lang_attributes.fallback_lang
})
%}
{% endif %}

{{ link(link_title, element['#url'], link_attributes) }}

0 comments on commit b178138

Please sign in to comment.