Changeset fe86013 in Klonkt for src/views/pages/search.ejs


Ignore:
Timestamp:
06/21/2026 11:45:21 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
929d98d
Parents:
137cca5
Message:

feat(i18n phase 4): post comments/like/related + search page (NL/EN/DE)

post.ejs (comment heading with plural, empty state, reply/delete/cancel,
comment form, pending notice, related posts), search.ejs (title, placeholder,
button, results with plural, sections, empty), like button (login title).

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/search.ejs

    r137cca5 rfe86013  
    22<% const _tracks = (typeof tracks !== 'undefined' && tracks) ? tracks : []; %>
    33<div class="container search-page">
    4   <h1>Zoeken</h1>
     4  <h1><%= t('nav.search') %></h1>
    55
    66  <form method="get" action="<%= _base %>/search" class="search-page-form">
     
    99      name="q"
    1010      value="<%= query %>"
    11       placeholder="Zoek posts en nummers…"
     11      placeholder="<%= t('search.placeholder') %>"
    1212      autocomplete="off"
    1313      autofocus
    14       aria-label="Zoekopdracht">
    15     <button type="submit" class="btn btn-primary">Zoek</button>
     14      aria-label="<%= t('nav.search') %>">
     15    <button type="submit" class="btn btn-primary"><%= t('search.button') %></button>
    1616  </form>
    1717
    1818  <% if (queryError) { %>
    19     <p class="search-error">Kon die zoekopdracht niet uitvoeren. Probeer een eenvoudiger term.</p>
     19    <p class="search-error"><%= t('search.error') %></p>
    2020  <% } %>
    2121
    2222  <% if (query && !queryError) { %>
    2323    <p class="search-meta">
    24       <%= total %> resulta<%= total === 1 ? 'at' : 'ten' %> voor &ldquo;<%= query %>&rdquo;
     24      <%= t(total === 1 ? 'search.results_one' : 'search.results_other', { n: total, q: query }) %>
    2525    </p>
    2626  <% } %>
    2727
    2828  <% if (_tracks.length) { %>
    29     <h2 class="search-section-title">Nummers</h2>
     29    <h2 class="search-section-title"><%= t('search.section_tracks') %></h2>
    3030    <div class="search-tracks">
    3131      <% _tracks.forEach(function(t) {
     
    5656               hx-swap="innerHTML"
    5757               hx-push-url="<%= t.postUrl %>"
    58                aria-label="Open in post">in post →</a>
     58               aria-label="<%= t('search.in_post') %>"><%= t('search.in_post') %></a>
    5959          <% } %>
    6060        </div>
     
    6464
    6565  <% if (results && results.length) { %>
    66     <% if (_tracks.length) { %><h2 class="search-section-title">Posts</h2><% } %>
     66    <% if (_tracks.length) { %><h2 class="search-section-title"><%= t('search.section_posts') %></h2><% } %>
    6767    <ol class="search-results">
    6868      <% results.forEach(function(r) { %>
     
    8989
    9090  <% if (query && !queryError && !results.length && !_tracks.length) { %>
    91     <p class="search-empty">Niets gevonden.</p>
     91    <p class="search-empty"><%= t('search.empty') %></p>
    9292  <% } %>
    9393</div>
Note: See TracChangeset for help on using the changeset viewer.