Skip to content

Commit

Permalink
TMS-1047: Add image-links sr-text to exhibition archive
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbi committed Jun 3, 2024
1 parent fe49af6 commit d8451ba
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 41 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- TMS-1047: Add image-links sr-text to exhibition archive

## [1.3.5] - 2024-05-20

- TMS-1028: Add social-media link column to footer
Expand Down
Binary file modified lang/fi.mo
Binary file not shown.
40 changes: 22 additions & 18 deletions lang/fi.po
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
msgid ""
msgstr ""
"Project-Id-Version: TMS Theme Vapriikki\n"
"POT-Creation-Date: 2023-08-25 15:24+0300\n"
"PO-Revision-Date: 2023-08-25 15:25+0300\n"
"POT-Creation-Date: 2024-06-02 23:15+0300\n"
"PO-Revision-Date: 2024-06-02 23:15+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.3.2\n"
"X-Generator: Poedit 3.4.4\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: style.css\n"
Expand All @@ -23,8 +23,8 @@ msgstr ""
"X-Poedit-SearchPathExcluded-1: vendor\n"
"X-Poedit-SearchPathExcluded-2: node_modules\n"

#: lib/Formatters/ExhibitionsFormatter.php:98 models/archive-exhibition.php:183
#: models/page-lobby-display.php:90
#: lib/Formatters/ExhibitionsFormatter.php:98 models/archive-exhibition.php:214
#: models/page-lobby-display.php:94
msgid "Upcoming"
msgstr "Tulossa"

Expand Down Expand Up @@ -72,59 +72,63 @@ msgstr ""
msgid "Send Comment"
msgstr ""

#: models/archive-exhibition.php:176
#: models/archive-exhibition.php:207
msgid "Search from archive"
msgstr "Hae arkistosta"

#: models/archive-exhibition.php:177
#: models/archive-exhibition.php:208
msgid "Search"
msgstr "Hae"

#: models/archive-exhibition.php:178
#: models/archive-exhibition.php:209
msgid "Type a search word"
msgstr "Kirjoita hakusana"

#: models/archive-exhibition.php:180
#: models/archive-exhibition.php:211
msgid "No results"
msgstr "Ei hakutuloksia"

#: models/archive-exhibition.php:181
#: models/archive-exhibition.php:212
msgid "Year"
msgstr "Vuosi"

#: models/archive-exhibition.php:182
#: models/archive-exhibition.php:213
msgid "Selecting the year filter limits the exhibition view."
msgstr "Vuosisuodattimen valinta rajaa näyttelynäkymän."

#: models/archive-exhibition.php:277
#: models/archive-exhibition.php:313
msgid "Upcoming exhibitions"
msgstr "Tulevat näyttelyt"

#: models/archive-exhibition.php:286
#: models/archive-exhibition.php:322
msgid "Current exhibitions"
msgstr "Näyttelyt nyt"

#: models/archive-exhibition.php:291
#: models/archive-exhibition.php:327
msgid "Past exhibitions"
msgstr "Menneet näyttelyt"

#: models/archive-exhibition.php:300
#: models/archive-exhibition.php:336
msgid "Digital exhibitions"
msgstr "Digitaaliset näyttelyt"

#: models/archive-exhibition.php:379
#: models/archive-exhibition.php:421
msgid "Filter by year"
msgstr "Rajaa"

#: models/archive-exhibition.php:738
#: models/archive-exhibition.php:615
msgid "Go to exhibition"
msgstr "Siirry näyttelyyn"

#: models/archive-exhibition.php:762
#, php-format
msgctxt "filter with search clause results summary"
msgid "%1$1s result found for \"%2$2s\""
msgid_plural "%1$1s results found for \"%2$2s\""
msgstr[0] "%1$1s tulos haulle “%2$2s”"
msgstr[1] "%1$1s tulosta haulle “%2$2s”"

#: models/archive-exhibition.php:752
#: models/archive-exhibition.php:776
#, php-format
msgctxt "filter results summary"
msgid "%1$1s result found"
Expand Down
36 changes: 20 additions & 16 deletions lang/tms-theme-vapriikki.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
msgid ""
msgstr ""
"Project-Id-Version: TMS Theme Vapriikki\n"
"POT-Creation-Date: 2023-08-25 15:24+0300\n"
"POT-Creation-Date: 2024-06-02 23:15+0300\n"
"PO-Revision-Date: 2022-01-12 16:20+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"X-Generator: Poedit 3.3.2\n"
"X-Generator: Poedit 3.4.4\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: style.css\n"
Expand All @@ -24,7 +24,7 @@ msgstr ""
"X-Poedit-SearchPathExcluded-2: node_modules\n"

#: lib/Formatters/ExhibitionsFormatter.php:98
#: models/archive-exhibition.php:183 models/page-lobby-display.php:90
#: models/archive-exhibition.php:214 models/page-lobby-display.php:94
msgid "Upcoming"
msgstr ""

Expand Down Expand Up @@ -72,59 +72,63 @@ msgstr ""
msgid "Send Comment"
msgstr ""

#: models/archive-exhibition.php:176
#: models/archive-exhibition.php:207
msgid "Search from archive"
msgstr ""

#: models/archive-exhibition.php:177
#: models/archive-exhibition.php:208
msgid "Search"
msgstr ""

#: models/archive-exhibition.php:178
#: models/archive-exhibition.php:209
msgid "Type a search word"
msgstr ""

#: models/archive-exhibition.php:180
#: models/archive-exhibition.php:211
msgid "No results"
msgstr ""

#: models/archive-exhibition.php:181
#: models/archive-exhibition.php:212
msgid "Year"
msgstr ""

#: models/archive-exhibition.php:182
#: models/archive-exhibition.php:213
msgid "Selecting the year filter limits the exhibition view."
msgstr ""

#: models/archive-exhibition.php:277
#: models/archive-exhibition.php:313
msgid "Upcoming exhibitions"
msgstr ""

#: models/archive-exhibition.php:286
#: models/archive-exhibition.php:322
msgid "Current exhibitions"
msgstr ""

#: models/archive-exhibition.php:291
#: models/archive-exhibition.php:327
msgid "Past exhibitions"
msgstr ""

#: models/archive-exhibition.php:300
#: models/archive-exhibition.php:336
msgid "Digital exhibitions"
msgstr ""

#: models/archive-exhibition.php:379
#: models/archive-exhibition.php:421
msgid "Filter by year"
msgstr ""

#: models/archive-exhibition.php:738
#: models/archive-exhibition.php:615
msgid "Go to exhibition"
msgstr ""

#: models/archive-exhibition.php:762
#, php-format
msgctxt "filter with search clause results summary"
msgid "%1$1s result found for \"%2$2s\""
msgid_plural "%1$1s results found for \"%2$2s\""
msgstr[0] ""
msgstr[1] ""

#: models/archive-exhibition.php:752
#: models/archive-exhibition.php:776
#, php-format
msgctxt "filter results summary"
msgid "%1$1s result found"
Expand Down
15 changes: 8 additions & 7 deletions models/archive-exhibition.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,18 +609,19 @@ protected function format_posts( array $posts ) {
}

return array_map( function ( $item ) {
$item->permalink = get_the_permalink( $item->ID );
$additional_fields = get_fields( $item->ID );
$item->post_title = $additional_fields['title'] ?: $item->post_title;
$item->fields = $additional_fields;
$date = SingleExhibition::get_date( $item->ID );
$item->permalink = \get_the_permalink( $item->ID );
$additional_fields = \get_fields( $item->ID );
$item->post_title = $additional_fields['title'] ?: $item->post_title;
$item->link_sr_text = __( 'Go to exhibition', 'tms-theme-vapriikki' ) . ' ' . $item->post_title;
$item->fields = $additional_fields;
$date = SingleExhibition::get_date( $item->ID );

if ( ! empty( $date ) ) {
$item->date = $date;
}

if ( has_post_thumbnail( $item->ID ) ) {
$item->image = get_post_thumbnail_id( $item->ID );
if ( \has_post_thumbnail( $item->ID ) ) {
$item->image = \get_post_thumbnail_id( $item->ID );
}

// Get single dates between start_date and end_date for the exhibitions
Expand Down
3 changes: 3 additions & 0 deletions partials/shared/exhibition-item.dust
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<div class="exhibition-item column is-6 is-4-desktop is-3-widescreen mb-3">
{?exhibition.image}
<a href="{exhibition.permalink|url}" tabindex="-1">
<span class="is-sr-only">
{exhibition.link_sr_text|html}
</span>
<div class="exhibition-item__image image mb-5">
{@image id=exhibition.image size="large" class="objectfit-image" /}

Expand Down

0 comments on commit d8451ba

Please sign in to comment.