feat: localize interface messages

This commit is contained in:
Erzbir
2026-08-07 14:45:14 +08:00
parent b556dd9a74
commit e83853ba34
22 changed files with 188 additions and 41 deletions
+5 -5
View File
@@ -46,7 +46,7 @@
<img th:if="${media.type == 'PHOTO'}"
class="transform-gpu rounded-lg object-cover"
th:src="${media.url}"
alt="photo"/>
th:alt="#{media.photo}"/>
</a>
<video th:if="${media.type == 'VIDEO'}"
@@ -58,7 +58,7 @@
<footer class="moment-footer">
<button class="moment-action-btn moment-upvote-btn"
th:attr="data-moment-action='upvote',data-moment-name=${name},data-count=${upvoteCount}">
th:attr="data-moment-action='upvote',data-moment-name=${name},data-count=${upvoteCount},aria-label=#{moment.upvote}">
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
fill="currentColor" width="16" height="16">
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
@@ -74,7 +74,7 @@
</button>
<button class="moment-action-btn moment-comment-btn"
th:attr="data-moment-action='toggle-comment',data-comment-target=${commentId}">
th:attr="data-moment-action='toggle-comment',data-comment-target=${commentId},aria-label=#{moment.comments}">
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
fill="currentColor" width="16" height="16">
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>
@@ -102,12 +102,12 @@
<div class="pagination-buttons">
<span th:if="${moments.hasPrevious()}">
<a data-pjax th:href="@{${moments.prevUrl}}" class="button inline prev">
<span class="button-text"><&nbsp;Prev</span>
<span class="button-text" th:text="'< ' + #{page.pagination.prev}">&lt;&nbsp;Prev</span>
</a>
</span>
<span th:if="${moments.hasNext()}">
<a data-pjax th:href="@{${moments.nextUrl}}" class="button inline next">
<span class="button-text">Next&nbsp;</span>
<span class="button-text" th:text="#{page.pagination.next} + ' >'">Next&nbsp;&gt;</span>
</a>
</span>
</div>