Changeset bbf9d1a in Klonkt for src/views/pages/admin-google.ejs


Ignore:
Timestamp:
06/21/2026 02:32:39 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
4885eab
Parents:
929d98d
Message:

feat(i18n phase 5): all admin sub-pages translated (NL/EN/DE)

settings, site-edit, seo, google, audio, stats, playlists, users, sites,
comments, circle, shows, newsletter, updates, epk, help. ~520 new keys
per language. Loop-shadowing of t() resolved by fetching before the loop. 709
view-keys cross-checked against the dictionary (0 missing).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-google.ejs

    r929d98d rbbf9d1a  
    11<div class="container admin-page">
    2   <h1>Google-login</h1>
    3   <p><a href="/admin/settings" class="btn">&larr; Instellingen</a></p>
     2  <h1><%= t('agoog.title') %></h1>
     3  <p><a href="/admin/settings" class="btn">&larr; <%= t('agoog.back') %></a></p>
    44
    55  <% if (success) { %><div class="alert alert-success"><%= success %></div><% } %>
     
    77
    88  <section class="set-card">
    9     <h2>Google-login (bezoekers)</h2>
    10     <p class="set-help">Laat bezoekers met Google inloggen om te reageren — met je <strong>eigen</strong>
    11       Google Cloud-client. Maak er een aan op
     9    <h2><%= t('agoog.card_title') %></h2>
     10    <p class="set-help"><%= t('agoog.card_help_pre') %> <strong><%= t('agoog.card_help_own') %></strong>
     11      <%= t('agoog.card_help_mid') %>
    1212      <a href="https://console.cloud.google.com/apis/credentials" target="_blank" rel="noopener">console.cloud.google.com</a>
    13       (OAuth client-ID, type "Web application").
    14       <% if (google && google.configured) { %><strong>Status: ingesteld&nbsp;✓</strong><% } else { %>Nog niet ingesteld.<% } %></p>
     13      <%= t('agoog.card_help_post') %>
     14      <% if (google && google.configured) { %><strong><%= t('agoog.status_set') %></strong><% } else { %><%= t('agoog.status_unset') %><% } %></p>
    1515
    1616    <details class="set-google-guide">
    17       <summary>Hoe stel ik dit in? (stap voor stap)</summary>
     17      <summary><%= t('agoog.guide_summary') %></summary>
    1818      <ol class="set-google-steps">
    19         <li>Ga naar de <a href="https://console.cloud.google.com/" target="_blank" rel="noopener">Google Cloud Console</a> en maak (of kies) een project.</li>
    20         <li><strong>APIs &amp; Services → OAuth consent screen</strong>: User type <strong>External</strong>. Voeg de scopes <code>email</code>, <code>profile</code> en <code>openid</code> toe. (In testmodus: voeg jezelf toe als testgebruiker.)</li>
    21         <li><strong>APIs &amp; Services → Credentials → Create credentials → OAuth client ID</strong>, type <strong>Web application</strong>.</li>
    22         <li>Bij <strong>Authorized redirect URIs</strong>: plak de redirect-URI hieronder (moet <strong>exact</strong> matchen).</li>
    23         <li>Kopieer de <strong>Client ID</strong> + <strong>Client Secret</strong> die je krijgt naar de velden hieronder en klik Opslaan.</li>
     19        <li><%= t('agoog.step1_pre') %> <a href="https://console.cloud.google.com/" target="_blank" rel="noopener">Google Cloud Console</a> <%= t('agoog.step1_post') %></li>
     20        <li><strong>APIs &amp; Services → OAuth consent screen</strong>: <%= t('agoog.step2_usertype') %> <strong>External</strong>. <%= t('agoog.step2_scopes_pre') %> <code>email</code>, <code>profile</code> <%= t('agoog.step2_scopes_and') %> <code>openid</code> <%= t('agoog.step2_scopes_post') %> <%= t('agoog.step2_testmode') %></li>
     21        <li><strong>APIs &amp; Services → Credentials → Create credentials → OAuth client ID</strong>, <%= t('agoog.step3_type') %> <strong>Web application</strong>.</li>
     22        <li><%= t('agoog.step4_pre') %> <strong>Authorized redirect URIs</strong><%= t('agoog.step4_post') %></li>
     23        <li><%= t('agoog.step5_pre') %> <strong>Client ID</strong> + <strong>Client Secret</strong> <%= t('agoog.step5_post') %></li>
    2424      </ol>
    25       <p class="set-help" style="margin:.5rem 0 0"><strong>Let op:</strong> je hoeft <strong>geen API's aan te zetten</strong> — "Google Cloud APIs", People API e.d. zijn <em>niet</em> nodig. Inloggen werkt via OpenID Connect (alleen het toestemmingsscherm + de OAuth-client).</p>
     25      <p class="set-help" style="margin:.5rem 0 0"><strong><%= t('agoog.note_label') %></strong> <%= t('agoog.note_pre') %> <strong><%= t('agoog.note_noapi') %></strong> <%= t('agoog.note_mid') %> <em><%= t('agoog.note_not') %></em> <%= t('agoog.note_post') %></p>
    2626    </details>
    2727
    2828    <% if (google && google.redirectUri) { %>
    2929      <div class="set-redirect">
    30         <div class="set-redirect-label">Redirect-URI — kopieer deze en plak 'm in Google</div>
     30        <div class="set-redirect-label"><%= t('agoog.redirect_label') %></div>
    3131        <code class="set-redirect-url" style="user-select:all"><%= google.redirectUri %></code>
    3232        <ol class="set-redirect-steps">
    33           <li>Ga naar <a href="https://console.cloud.google.com/apis/credentials" target="_blank" rel="noopener">Google Cloud Console → APIs &amp; Services → Credentials</a>.</li>
    34           <li>Open jouw <strong>OAuth client-ID</strong> (type "Web application").</li>
    35           <li>Onder <strong>Authorized redirect URIs</strong> → klik <strong>+ ADD URI</strong> en plak de regel hierboven.</li>
    36           <li>Klik <strong>Save</strong> en wacht ~1 minuut.</li>
     33          <li><%= t('agoog.rstep1_pre') %> <a href="https://console.cloud.google.com/apis/credentials" target="_blank" rel="noopener">Google Cloud Console → APIs &amp; Services → Credentials</a>.</li>
     34          <li><%= t('agoog.rstep2') %></li>
     35          <li><%= t('agoog.rstep3_pre') %> <strong>Authorized redirect URIs</strong> → <%= t('agoog.rstep3_mid') %> <strong>+ ADD URI</strong> <%= t('agoog.rstep3_post') %></li>
     36          <li><%= t('agoog.rstep4_pre') %> <strong>Save</strong> <%= t('agoog.rstep4_post') %></li>
    3737        </ol>
    38         <p class="set-redirect-warn">Moet <strong>exact</strong> kloppen: <code>https://</code> (geen <code>http</code>), juiste domein, en <strong>geen</strong> schuine streep aan het eind. Anders krijg je <em>"Error 400: redirect_uri_mismatch"</em>.</p>
     38        <p class="set-redirect-warn"><%= t('agoog.warn_pre') %> <strong><%= t('agoog.warn_exact') %></strong> <%= t('agoog.warn_mid1') %> <code>https://</code> (<%= t('agoog.warn_nohttp') %> <code>http</code>)<%= t('agoog.warn_mid2') %> <strong><%= t('agoog.warn_noslash') %></strong> <%= t('agoog.warn_mid3') %> <em><%= t('agoog.warn_error') %></em>.</p>
    3939      </div>
    4040    <% } else { %>
    41       <p class="set-help" style="color:var(--accent)">Stel eerst <code>PUBLIC_BASE_URL</code> in — daar wordt de redirect-URI van afgeleid.</p>
     41      <p class="set-help" style="color:var(--accent)"><%= t('agoog.set_baseurl_pre') %> <code>PUBLIC_BASE_URL</code> <%= t('agoog.set_baseurl_post') %></p>
    4242    <% } %>
    4343
    4444    <form method="post" action="/admin/settings/google" class="set-form">
    4545      <label class="set-field">
    46         <span>Client ID</span>
     46        <span><%= t('agoog.client_id') %></span>
    4747        <input type="text" name="google_client_id" value="<%= google ? google.clientId : '' %>" placeholder="123-abc.apps.googleusercontent.com" autocomplete="off">
    4848      </label>
    4949      <label class="set-field">
    50         <span>Client Secret <% if (google && google.secretSet) { %><small style="font-weight:400">— ingesteld; leeg laten = ongewijzigd</small><% } %></span>
    51         <input type="password" name="google_client_secret" placeholder="<%= (google && google.secretSet) ? '•••••••• (ingesteld)' : 'GOCSPX-…' %>" autocomplete="off">
     50        <span><%= t('agoog.client_secret') %> <% if (google && google.secretSet) { %><small style="font-weight:400">— <%= t('agoog.client_secret_set') %></small><% } %></span>
     51        <input type="password" name="google_client_secret" placeholder="<%= (google && google.secretSet) ? t('agoog.secret_ph_set') : 'GOCSPX-…' %>" autocomplete="off">
    5252      </label>
    5353      <div class="set-actions">
    54         <button type="submit" class="btn btn-primary">Opslaan</button>
     54        <button type="submit" class="btn btn-primary"><%= t('agoog.save') %></button>
    5555        <% if (google && (google.clientId || google.secretSet)) { %>
    56           <button type="submit" name="clear" value="1" class="btn">Loskoppelen</button>
     56          <button type="submit" name="clear" value="1" class="btn"><%= t('agoog.disconnect') %></button>
    5757        <% } %>
    5858      </div>
    5959    </form>
    6060    <% if (typeof premiumEnabled !== 'undefined' && premiumEnabled && !isPremium) { %>
    61       <p class="set-help" style="margin-top:.7rem; color:var(--accent)">Premium-laag staat aan zonder Patreon — de Google-knop blijft verborgen tot premium ontgrendeld is.</p>
     61      <p class="set-help" style="margin-top:.7rem; color:var(--accent)"><%= t('agoog.premium_locked') %></p>
    6262    <% } %>
    6363  </section>
Note: See TracChangeset for help on using the changeset viewer.