shopping: UI strings all English
Picker dialog, hamburger menu entry, phone page and help section
still had German labels from the original request ("Einkaufsliste",
"keine aktive Liste", etc.). The rest of the app's UI is English,
so align everything here: menu entry is "Shopping list", dialog +
phone page copy translated, help references match. Trigger tags
stay as-is — both #einkauf and #shopping keep working so users with
either convention aren't disrupted.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d925070a36
commit
b9d610b612
5 files changed
+23
-22
No files matched your search
@@ -133,12 +133,12 @@ if ($route === '/shopping' && $method === 'GET') {
|
||||
$userLabel = htmlspecialchars($sessionTenant['username'], ENT_QUOTES);
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta name="theme-color" content="#0f172a">
|
||||
<title>Einkaufsliste</title>
|
||||
<title>Shopping list</title>
|
||||
<style>
|
||||
:root { color-scheme: dark; }
|
||||
* { box-sizing: border-box; }
|
||||
@@ -160,7 +160,7 @@ if ($route === '/shopping' && $method === 'GET') {
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Einkaufsliste</h1>
|
||||
<h1>Shopping list</h1>
|
||||
<span class="user"><?= $userLabel ?></span>
|
||||
<button class="refresh" id="refresh">↻</button>
|
||||
</header>
|
||||
@@ -205,7 +205,7 @@ if ($route === '/shopping' && $method === 'GET') {
|
||||
const data = await res.json();
|
||||
if (!data.ok || !data.state) {
|
||||
elTitle.textContent = '';
|
||||
elItems.innerHTML = '<div class="empty">keine aktive Einkaufsliste</div>';
|
||||
elItems.innerHTML = '<div class="empty">no active shopping list</div>';
|
||||
elStale.textContent = '';
|
||||
return;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ if ($route === '/shopping' && $method === 'GET') {
|
||||
elTitle.textContent = title || '';
|
||||
const items = parseItems(body);
|
||||
if (!items.length) {
|
||||
elItems.innerHTML = '<div class="empty">✓ alles erledigt</div>';
|
||||
elItems.innerHTML = '<div class="empty">✓ all done</div>';
|
||||
} else {
|
||||
elItems.innerHTML = '';
|
||||
for (const it of items) {
|
||||
@@ -226,10 +226,10 @@ if ($route === '/shopping' && $method === 'GET') {
|
||||
}
|
||||
}
|
||||
const ago = Math.round((Date.now() - Date.parse(updated_at_server.replace(' ','T') + 'Z')) / 1000);
|
||||
elStale.textContent = 'zuletzt synchronisiert: vor ' + (ago < 60 ? ago + 's' : Math.round(ago/60) + 'min');
|
||||
elStale.textContent = 'last synced: ' + (ago < 60 ? ago + 's ago' : Math.round(ago/60) + ' min ago');
|
||||
showErr('');
|
||||
} catch (e) {
|
||||
showErr('laden fehlgeschlagen: ' + e.message);
|
||||
showErr('load failed: ' + e.message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ if ($route === '/shopping' && $method === 'GET') {
|
||||
body: JSON.stringify({ line: li.dataset.line, checked: true }),
|
||||
});
|
||||
const data = await res.json();
|
||||
if (!data.ok) throw new Error(data.error || 'fehler');
|
||||
if (!data.ok) throw new Error(data.error || 'check failed');
|
||||
setTimeout(() => { busy = false; load(); }, 300);
|
||||
} catch (e) {
|
||||
busy = false;
|
||||
|
||||
Reference in new issue
Block a user