feat(waiter): English-first texts, part a: shell, sign-in, tables, settings, venues (platform-v2 step 4.5a)

- @xenia/i18n: new `waiter` namespace (en + el); the waiter's Greek texts become keys
  with English written fresh (Greek kept as the translation).
- App gates, side drawer / nav bars / notifications, user menu, login, table list and
  cards, settings, venues + pairing errors, install dialog, lock screen, update banners,
  QR scanner, favourites setup.
- Money and times through useFormat() (venue time, the language's number format):
  table cards, quick table view, user menu, notifications.
- waiter i18n.js: tw() for code outside components (pairing errors).
- The table-list's FavoritesSetupPage `.map(t => …)` renamed so it doesn't shadow t.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 03:50:33 +02:00
co-authored by Claude Opus 5.5
parent 8e0a786bbc
commit 37155c0457
20 changed files with 1229 additions and 375 deletions
+16 -14
View File
@@ -1,17 +1,18 @@
import { useEffect } from 'react'
import useInstallPromptStore, { APK_URL, canOfferApp } from '../store/installPromptStore'
import { useTranslation } from '@xenia/i18n'
const BENEFITS = [
{ icon: '⚡', title: 'Ανοίγει αμέσως', text: 'Χωρίς φόρτωση από τον browser, σαν κανονική εφαρμογή.' },
{ icon: '📶', title: 'Αντέχει στο WiFi', text: 'Συνεχίζει να δουλεύει όταν χάνεται για λίγο η σύνδεση.' },
{ icon: '🔒', title: 'Ασφαλής σύνδεση', text: 'Κρυπτογραφημένη επικοινωνία με τον server του καταστήματος.' },
{ icon: '🔄', title: 'Χωρίς ρυθμίσεις', text: 'Βρίσκει μόνη της τον server και ενημερώνεται αυτόματα.' },
{ icon: '⚡', title: 'install.fast', text: 'install.fastText' },
{ icon: '📶', title: 'install.wifi', text: 'install.wifiText' },
{ icon: '🔒', title: 'install.secure', text: 'install.secureText' },
{ icon: '🔄', title: 'install.noSetup', text: 'install.noSetupText' },
]
const STEPS = [
'Πατήστε «Λήψη εφαρμογής».',
'Ανοίξτε το αρχείο και επιτρέψτε την εγκατάσταση.',
'Ανοίξτε το Xenia και σαρώστε ξανά το QR του καταστήματος.',
'install.step1',
'install.step2',
'install.step3',
]
/**
@@ -19,6 +20,7 @@ const STEPS = [
* Opens by itself once; afterwards from the side drawer.
*/
export default function InstallAppDialog() {
const { t } = useTranslation('waiter')
const { open, dismiss, autoOpen } = useInstallPromptStore()
useEffect(() => {
@@ -56,10 +58,10 @@ export default function InstallAppDialog() {
style={{ borderRadius: 18, boxShadow: '0 6px 20px rgba(0,0,0,0.35)' }}
/>
<h2 id="install-app-title" style={{ fontSize: 20, fontWeight: 800, color: 'var(--text)', margin: '14px 0 4px' }}>
Εφαρμογή Xenia
{t('install.title')}
</h2>
<p style={{ fontSize: 13, color: 'var(--muted)', lineHeight: 1.45 }}>
Εγκαταστήστε την εφαρμογή για γρηγορότερη και πιο σταθερή λειτουργία.
{t('install.intro')}
</p>
</div>
@@ -73,8 +75,8 @@ export default function InstallAppDialog() {
{b.icon}
</span>
<div>
<div style={{ fontSize: 14, fontWeight: 700, color: 'var(--text)' }}>{b.title}</div>
<div style={{ fontSize: 12.5, color: 'var(--muted)', lineHeight: 1.4 }}>{b.text}</div>
<div style={{ fontSize: 14, fontWeight: 700, color: 'var(--text)' }}>{t(b.title)}</div>
<div style={{ fontSize: 12.5, color: 'var(--muted)', lineHeight: 1.4 }}>{t(b.text)}</div>
</div>
</div>
))}
@@ -84,7 +86,7 @@ export default function InstallAppDialog() {
margin: 0, padding: '12px 14px 12px 32px', borderRadius: 12, background: 'var(--bg3)',
fontSize: 12.5, color: 'var(--muted)', lineHeight: 1.55,
}}>
{STEPS.map(s => <li key={s}>{s}</li>)}
{STEPS.map(s => <li key={s}>{t(s)}</li>)}
</ol>
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
@@ -95,10 +97,10 @@ export default function InstallAppDialog() {
className="btn btn--accent btn--lg"
style={{ textDecoration: 'none', display: 'flex', alignItems: 'center', justifyContent: 'center' }}
>
Λήψη εφαρμογής
{t('install.download')}
</a>
<button className="btn btn--secondary" onClick={dismiss} style={{ minHeight: 44 }}>
Όχι τώρα
{t('install.later')}
</button>
</div>
</div>