Skip to content

Commit

Permalink
Add translation and improve a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
svewap committed Dec 23, 2024
1 parent ed94902 commit 03f8d86
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 10 deletions.
48 changes: 48 additions & 0 deletions Resources/Private/Language/de.locallang.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2014-07-17T12:47:06Z"
product-name="filecollection_gallery">
<header/>
<body>
<trans-unit id="pagination_first">
<source>First</source>
<target>Erste</target>
</trans-unit>
<trans-unit id="pagination_last">
<source>Last</source>
<target>Letzte</target>
</trans-unit>
<trans-unit id="pagination_previous">
<source>&lt;</source>
</trans-unit>
<trans-unit id="pagination_next">
<source>&gt;</source>
</trans-unit>
<trans-unit id="back_to_gallery_selection">
<source>Back to gallery selection</source>
<target>Zurück zur Galerie-Auswahl</target>
</trans-unit>

<trans-unit id="error.noGallerySelected">
<source>No gallery selected</source>
</trans-unit>
<trans-unit id="btn.download">
<source>Download</source>
<target>Herunterladen</target>
</trans-unit>
<trans-unit id="btn.download_image">
<source>Download image "%s"</source>
<target>Das Bild "%s" herunterladen</target>
</trans-unit>
<trans-unit id="btn.maximize">
<source>Maximize in lightbox</source>
<target>Maximiere in einer Lightbox</target>
</trans-unit>

<trans-unit id="image.download.alt">
<source>Download</source>
<target>Herunterladen</target>
</trans-unit>
</body>
</file>
</xliff>
9 changes: 8 additions & 1 deletion Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2014-07-17T12:47:06Z"
product-name="sf-filecollection-gallery">
product-name="filecollection_gallery">
<header/>
<body>
<trans-unit id="pagination_first">
Expand All @@ -26,9 +26,16 @@
<trans-unit id="btn.download">
<source>Download</source>
</trans-unit>
<trans-unit id="btn.download_image">
<source>Download image "%s"</source>
</trans-unit>
<trans-unit id="btn.maximize">
<source>Maximize in lightbox</source>
</trans-unit>

<trans-unit id="image.download.alt">
<source>Download</source>
</trans-unit>
</body>
</file>
</xliff>
2 changes: 1 addition & 1 deletion Resources/Private/Language/locallang_be.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2014-07-17T12:47:06Z" product-name="sf-filecollection-gallery">
<file source-language="en" datatype="plaintext" original="messages" date="2014-07-17T12:47:06Z" product-name="filecollection_gallery">
<header/>
<body>
<trans-unit id="flexforms_tab.settings">
Expand Down
8 changes: 4 additions & 4 deletions Resources/Private/Partials/Gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ <h2>{galleryListName}</h2>
<f:image class="fc-gallery__item__thumbnail" image="{mediaItem}" maxWidth="{settings.mobile.image.maxWidth}" />

<f:if condition="{settings.downloadButton}">
<f:link.file class="fc-gallery__download-btn" download="1" file="{mediaItem}">
<f:image loading="lazy" title="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Languages/locallang.xlf:btn.download')}" src="EXT:filecollection_gallery/Resources/Public/Images/download-solid.svg" />
<f:link.file aria-label="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:btn.download_image', arguments: '{0:mediaItem.properties.title}')}" class="fc-gallery__download-btn" download="1" file="{mediaItem}">
<f:image alt="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:image.download.alt')}" loading="lazy" title="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Languages/locallang.xlf:btn.download')}" src="EXT:filecollection_gallery/Resources/Public/Images/download-solid.svg" />
</f:link.file>
</f:if>

Expand Down Expand Up @@ -59,8 +59,8 @@ <h2>{galleryListName}</h2>
</div>
</a>
<f:if condition="{settings.downloadButton}">
<f:link.file title="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:btn.download')}" class="fc-gallery__download-btn" download="1" file="{mediaItem}">
<f:image title="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:btn.download')}" src="EXT:filecollection_gallery/Resources/Public/Images/download-solid.svg" />
<f:link.file aria-label="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:btn.download_image', arguments: '{0:mediaItem.properties.title}')}" title="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:btn.download')}" class="fc-gallery__download-btn" download="1" file="{mediaItem}">
<f:image alt="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:image.download.alt')}" title="{f:translate(key: 'LLL:EXT:filecollection_gallery/Resources/Private/Language/locallang.xlf:btn.download')}" src="EXT:filecollection_gallery/Resources/Public/Images/download-solid.svg" />
</f:link.file>
</f:if>

Expand Down
4 changes: 2 additions & 2 deletions Resources/Private/Templates/Gallery/ListFromFolder.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2>{galleryFolderName}</h2>
<f:for each="{paginatedObject}" as="object">
<f:if condition="{settings.enableLightbox}">
<f:then>
<div class="sf-filecollection-gallery-image-container">
<div class="filecollection_gallery-image-container">
<a rel="{settings.lightbox}" class="{settings.lightbox}" title="{object.properties.title}"
href="{f:uri.image(src:'{object.uid}', treatIdAsReference:0, maxWidth:'{settings.image.lightboxWidth}')}">
<f:image image="{object}" width="{settings.image.width}" height="{settings.image.height}"
Expand All @@ -32,7 +32,7 @@ <h2>{galleryFolderName}</h2>
</div>
</f:then>
<f:else>
<div class="sf-filecollection-gallery-image-container">
<div class="filecollection_gallery-image-container">
<f:image image="{object}" width="{settings.image.width}" height="{settings.image.height}" alt="{object.properties.alternative}"
title="{object.properties.title}"/>
<f:if condition="{object.properties.description}">
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Gallery/Nested.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<f:section name="main">
<f:if condition="{imageItems}">
<f:for each="{paginatedObject}" as="object">
<div class="sf-filecollection-gallery-image-container">
<div class="filecollection_gallery-image-container">
<f:link.action action="list" arguments="{galleryUID : object.galleryUID}" title="{object.properties.title}">
<f:image image="{object}" width="{settings.image.width}" height="{settings.image.height}"
alt="{object.properties.alternative}"
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Gallery/NestedFromFolder.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<f:section name="main">
<f:if condition="{imageItems}">
<f:for each="{paginatedObject}" as="object">
<div class="sf-filecollection-gallery-image-container">
<div class="filecollection_gallery-image-container">
<f:link.action action="listFromFolder" arguments="{galleryFolder: object.galleryFolder, galleryUID: object.galleryUID}" title="{object.properties.title}">
<f:image image="{object}" width="{settings.image.width}" height="{settings.image.height}"
alt="{object.properties.alternative}"
Expand Down

0 comments on commit 03f8d86

Please sign in to comment.