i18n: translate all hardcoded Italian strings in app.js

Added 49 new translation keys to all 3 language files (IT/EN/DE)
and wired every hardcoded Italian label/toast/hint in app.js to use
the t() translation function.

Sections covered:
- scale: density_hint, ml_hint, weight_detected, weight_too_low,
         stable, auto_confirm
- dashboard: banner review titles/details, prediction rate/days/
             direction texts, finished-zero/expected/check,
             anomaly phantom/ghost titles and details
- action: have_title, add_more_sub, use_qty_sub, throw_btn/sub, edit_sub
- add: purchase_type_label, new_btn, existing_btn,
       remaining_label/hint/full/half
- use: throw_title, throw_all, throw_qty_label/hint, throw_partial_btn
- shopping: bring_badge, add_urgent_toast, migration_done,
            added_to_bring, added_to_bring_skip, all_on_bring,
            removed_sufficient (was a complex plural, now uses key)
- toast: product_updated, thrown_away, thrown_away_partial
- confirm: kiosk_exit
- WEEK_DAYS array now uses t('days.*') keys
This commit is contained in:
dadaloop82
2026-04-28 06:36:30 +00:00
parent 1606cb3a90
commit 8a16307b39
4 changed files with 230 additions and 83 deletions
+56 -7
View File
@@ -109,7 +109,25 @@
"banner_finished_title": "aufgebraucht?",
"banner_finished_detail": "Ich habe vermerkt, dass {name} auf null gesunken ist. Ist es wirklich leer, oder hast du noch welches?",
"banner_finished_action_yes": "Ja, aufgebraucht",
"banner_finished_action_no": "Nein, ich habe noch welches"
"banner_finished_action_no": "Nein, ich habe noch welches",
"banner_review_unusual_pkg_title": "Ungewöhnliche Packungsgröße",
"banner_review_unusual_pkg_detail": "Du hast eine Packung von {qty} {unit} eingestellt — die Größe scheint sehr groß. Überprüfe ob es korrekt ist.",
"banner_review_low_qty_title": "Sehr geringe Menge",
"banner_review_low_qty_detail": "Du hast nur {qty} im Bestand — das scheint sehr wenig, möglicherweise ein Eingabefehler. Bestätige wenn korrekt.",
"banner_review_high_qty_title": "Ungewöhnlich hohe Menge",
"banner_review_high_qty_detail": "Du hast {qty} im Bestand — die Zahl scheint sehr hoch. Bestätige wenn korrekt oder korrigiere.",
"banner_prediction_rate_day": "Durchschnitt ~{n} {unit}/Tag",
"banner_prediction_rate_week": "Durchschnitt ~{n} {unit}/Woche",
"banner_prediction_days_ago": "Vor {n} Tagen aufgefüllt",
"banner_prediction_more": "Ich erwartete {expected} {unit}{time}, du hast aber {actual} {unit}. Hast du Bestand ohne Buchung hinzugefügt?",
"banner_prediction_less": "Ich erwartete {expected} {unit}{time}, du hast aber nur {actual} {unit}. Hast du mehr als üblich verbraucht?",
"banner_finished_zero": "Bestand zeigt null, aber gespeicherte Buchungen deuten an, dass es nicht leer sein sollte.",
"banner_finished_expected": "Laut Aufzeichnungen solltest du noch {qty} {unit} haben.",
"banner_finished_check": "Kannst du nachschauen?",
"banner_anomaly_phantom_title": "mehr Bestand als erwartet",
"banner_anomaly_phantom_detail": "Bestand zeigt {inv_qty} {unit}, aber laut Buchungen solltest du nur {expected_qty} {unit} haben. Hast du Bestand ohne Buchung hinzugefügt?",
"banner_anomaly_ghost_title": "weniger Bestand als erwartet",
"banner_anomaly_ghost_detail": "Laut Buchungen solltest du {expected_qty} {unit} von {name} haben, aber der Bestand zeigt nur {inv_qty} {unit}. Hast du etwas ohne Buchung entnommen?"
},
"inventory": {
"title": "Vorrat",
@@ -140,7 +158,13 @@
"add_btn": "📥 HINZUFÜGEN",
"add_sub": "in Vorrat/Kühlschrank",
"use_btn": "📤 VERWENDEN / VERBRAUCHEN",
"use_sub": "aus Vorrat/Kühlschrank"
"use_sub": "aus Vorrat/Kühlschrank",
"have_title": "📦 Schon auf Lager!",
"add_more_sub": "weitere Menge",
"use_qty_sub": "wie viel verwendet",
"throw_btn": "🗑️ ENTSORGEN",
"throw_sub": "wegwerfen",
"edit_sub": "Ablauf, Ort…"
},
"add": {
"title": "Zum Vorrat hinzufügen",
@@ -150,7 +174,14 @@
"conf_size_placeholder": "z.B. 300",
"vacuum_label": "🫙 Vakuumiert",
"vacuum_hint": "Ablaufdatum wird automatisch verlängert",
"submit": "✅ Hinzufügen"
"submit": "✅ Hinzufügen",
"purchase_type_label": "🛒 Dieses Produkt ist...",
"new_btn": "🆕 Gerade gekauft",
"existing_btn": "📦 Hatte ich schon",
"remaining_label": "📦 Verbleibende Menge",
"remaining_hint": "Ungefähr wie viel ist noch übrig?",
"remaining_full": "🟢 Voll",
"remaining_half": "🟠 Halb"
},
"use": {
"title": "Verwenden / Verbrauchen",
@@ -161,7 +192,12 @@
"submit": "📤 Diese Menge verwenden",
"available": "📦 Verfügbar:",
"not_in_inventory": "⚠️ Produkt nicht im Bestand.",
"expiry_warning": "⚠️ Verwende zuerst die{loc}, die am {date} abläuft — {when}!"
"expiry_warning": "⚠️ Verwende zuerst die{loc}, die am {date} abläuft — {when}!",
"throw_title": "🗑️ Produkt entsorgen",
"throw_all": "🗑️ ALLES entsorgen ({qty})",
"throw_qty_label": "Wie viel wegwerfen?",
"throw_qty_hint": "oder Menge angeben:",
"throw_partial_btn": "🗑️ Diese Menge entsorgen"
},
"product": {
"title_new": "Neues Produkt",
@@ -231,7 +267,13 @@
"smart_already": "📊 Intelligenter Einkauf sagt bereits {name} voraus",
"all_searched": "Alle Produkte wurden bereits gesucht. Nutze 🔄 für einzelne Suchen.",
"search_complete": "Suche abgeschlossen: {count} Produkte",
"removed_sufficient": "🧹 {removed} Produkt(e) mit ausreichendem Bestand von der Liste entfernt"
"removed_sufficient": "🧹 {removed} Produkt(e) mit ausreichendem Bestand von der Liste entfernt",
"bring_badge": "🛒 Schon auf Bring!",
"add_urgent_toast": "🔴 {n} dringende(s) Produkt(e) automatisch zu Bring! hinzugefügt",
"migration_done": "✅ {migrated} aktualisiert, {skipped} bereits ok",
"added_to_bring": "🛒 {n} Produkte zu Bring! hinzugefügt",
"added_to_bring_skip": "{n} bereits vorhanden",
"all_on_bring": "Alle Produkte waren bereits auf Bring!"
},
"ai": {
"title": "🤖 KI-Identifikation",
@@ -455,7 +497,8 @@
"already_exists": "Bereits vorhanden"
},
"confirm": {
"remove_item": "Möchtest du dieses Produkt wirklich aus dem Bestand entfernen?"
"remove_item": "Möchtest du dieses Produkt wirklich aus dem Bestand entfernen?",
"kiosk_exit": "Kioskmodus verlassen?"
},
"edit": {
"title": "{name} bearbeiten"
@@ -493,7 +536,13 @@
"timeout": "Timeout: keine Antwort vom Gateway",
"error_connect": "Verbindung zum Gateway nicht möglich",
"tab": "Smart-Waage",
"low_weight": "Gewicht < 10 g · manuell eingeben\n(Auto-Erkennung erfordert mind. 10 g)"
"low_weight": "Gewicht < 10 g · manuell eingeben\n(Auto-Erkennung erfordert mind. 10 g)",
"density_hint": "(Dichte {density} g/ml)",
"ml_hint": "(wird in ml umgerechnet)",
"weight_detected": "Gewicht erkannt — 10s Stabilität abwarten…",
"weight_too_low": "Gewicht zu niedrig — warten…",
"stable": "✓ Stabil",
"auto_confirm": "✅ {val} {unit} — Auto-Bestätigung in 5s (tippen zum Abbrechen)"
},
"prediction": {
"expected_qty": "Erwartet: {expected} {unit}",
+56 -7
View File
@@ -109,7 +109,25 @@
"banner_finished_title": "finished?",
"banner_finished_detail": "I recorded that {name} reached zero stock. Is it really gone, or do you still have some?",
"banner_finished_action_yes": "Yes, it's done",
"banner_finished_action_no": "No, I still have some"
"banner_finished_action_no": "No, I still have some",
"banner_review_unusual_pkg_title": "Unusual package size",
"banner_review_unusual_pkg_detail": "You set a package of {qty} {unit} — the size seems very large. Check if correct or edit.",
"banner_review_low_qty_title": "Very low quantity",
"banner_review_low_qty_detail": "You only have {qty} in stock — seems very little, could be a typo. Confirm if correct.",
"banner_review_high_qty_title": "Unusually high quantity",
"banner_review_high_qty_detail": "You have {qty} in stock — the figure seems very high. Confirm if correct or edit.",
"banner_prediction_rate_day": "Average ~{n} {unit}/day",
"banner_prediction_rate_week": "Average ~{n} {unit}/week",
"banner_prediction_days_ago": "{n} days ago you restocked",
"banner_prediction_more": "I expected {expected} {unit}{time}, but you have {actual} {unit}. Did you add stock without recording it?",
"banner_prediction_less": "I expected {expected} {unit}{time}, but you only have {actual} {unit}. Did you use more than usual?",
"banner_finished_zero": "Inventory shows zero, but recorded movements suggest it shouldn't be empty.",
"banner_finished_expected": "According to records you should still have {qty} {unit}.",
"banner_finished_check": "Can you check?",
"banner_anomaly_phantom_title": "you have more stock than expected",
"banner_anomaly_phantom_detail": "Inventory shows {inv_qty} {unit}, but based on records you should only have {expected_qty} {unit}. Did you add stock without recording it?",
"banner_anomaly_ghost_title": "you have less stock than expected",
"banner_anomaly_ghost_detail": "Based on recorded operations you should have {expected_qty} {unit} of {name}, but inventory shows only {inv_qty} {unit}. Did you take stock without recording it?"
},
"inventory": {
"title": "Pantry",
@@ -140,7 +158,13 @@
"add_btn": "📥 ADD",
"add_sub": "to pantry/fridge",
"use_btn": "📤 USE / CONSUME",
"use_sub": "from pantry/fridge"
"use_sub": "from pantry/fridge",
"have_title": "📦 Already in stock!",
"add_more_sub": "add more",
"use_qty_sub": "how much you used",
"throw_btn": "🗑️ DISCARD",
"throw_sub": "throw away",
"edit_sub": "expiry, location…"
},
"add": {
"title": "Add to Pantry",
@@ -150,7 +174,14 @@
"conf_size_placeholder": "e.g. 300",
"vacuum_label": "🫙 Vacuum sealed",
"vacuum_hint": "Expiry date will be extended automatically",
"submit": "✅ Add"
"submit": "✅ Add",
"purchase_type_label": "🛒 This product is...",
"new_btn": "🆕 Just bought",
"existing_btn": "📦 I already had it",
"remaining_label": "📦 Remaining quantity",
"remaining_hint": "Approximately how much is left?",
"remaining_full": "🟢 Full",
"remaining_half": "🟠 Half"
},
"use": {
"title": "Use / Consume",
@@ -161,7 +192,12 @@
"submit": "📤 Use this quantity",
"available": "📦 Available:",
"not_in_inventory": "⚠️ Product not in inventory.",
"expiry_warning": "⚠️ Use first the one{loc} that expires on {date} — {when}!"
"expiry_warning": "⚠️ Use first the one{loc} that expires on {date} — {when}!",
"throw_title": "🗑️ Discard Product",
"throw_all": "🗑️ Discard ALL ({qty})",
"throw_qty_label": "How much to discard?",
"throw_qty_hint": "or enter a quantity:",
"throw_partial_btn": "🗑️ Discard this quantity"
},
"product": {
"title_new": "New Product",
@@ -231,7 +267,13 @@
"smart_already": "📊 Smart shopping already predicts {name}",
"all_searched": "All products have already been searched. Use 🔄 to search individual ones.",
"search_complete": "Search complete: {count} products",
"removed_sufficient": "🧹 {removed} product(s) with sufficient stock removed from the list"
"removed_sufficient": "🧹 {removed} product(s) with sufficient stock removed from the list",
"bring_badge": "🛒 Already on Bring!",
"add_urgent_toast": "🔴 {n} urgent product(s) automatically added to Bring!",
"migration_done": "✅ {migrated} updated, {skipped} already ok",
"added_to_bring": "🛒 {n} products added to Bring!",
"added_to_bring_skip": "{n} already present",
"all_on_bring": "All products were already on Bring!"
},
"ai": {
"title": "🤖 AI Identification",
@@ -455,7 +497,8 @@
"already_exists": "Already exists"
},
"confirm": {
"remove_item": "Do you really want to remove this product from inventory?"
"remove_item": "Do you really want to remove this product from inventory?",
"kiosk_exit": "Exit kiosk mode?"
},
"edit": {
"title": "Edit {name}"
@@ -493,7 +536,13 @@
"timeout": "Timeout: no response from gateway",
"error_connect": "Cannot connect to gateway",
"tab": "Smart Scale",
"low_weight": "Weight < 10 g · enter manually\n(auto-reading requires at least 10 g)"
"low_weight": "Weight < 10 g · enter manually\n(auto-reading requires at least 10 g)",
"density_hint": "(density {density} g/ml)",
"ml_hint": "(will be converted to ml)",
"weight_detected": "Weight detected — wait 10s for stability…",
"weight_too_low": "Weight too low — waiting…",
"stable": "✓ Stable",
"auto_confirm": "✅ {val} {unit} — auto-confirm in 5s (tap to cancel)"
},
"prediction": {
"expected_qty": "Expected: {expected} {unit}",
+56 -7
View File
@@ -109,7 +109,25 @@
"banner_finished_title": "è finito?",
"banner_finished_detail": "Ho registrato che {name} ha toccato quota zero. È davvero finito o hai ancora delle scorte?",
"banner_finished_action_yes": "Sì, è finito",
"banner_finished_action_no": "No, ne ho ancora"
"banner_finished_action_no": "No, ne ho ancora",
"banner_review_unusual_pkg_title": "Confezione insolita",
"banner_review_unusual_pkg_detail": "Hai impostato una confezione da {qty} {unit} — la dimensione sembra molto alta. Controlla se è corretta o modifica.",
"banner_review_low_qty_title": "Quantità molto bassa",
"banner_review_low_qty_detail": "Hai solo {qty} in inventario — sembra poco, potrebbe essere un errore. Conferma se è corretto.",
"banner_review_high_qty_title": "Quantità insolitamente alta",
"banner_review_high_qty_detail": "Hai {qty} in inventario — la cifra sembra molto alta. Conferma se è corretto o correggi.",
"banner_prediction_rate_day": "Media ~{n} {unit}/giorno",
"banner_prediction_rate_week": "Media ~{n} {unit}/settimana",
"banner_prediction_days_ago": "{n} giorni fa hai rifornito",
"banner_prediction_more": "mi aspettavo {expected} {unit}{time}, ne hai invece {actual} {unit}. Hai aggiunto scorte senza registrarle?",
"banner_prediction_less": "mi aspettavo {expected} {unit}{time}, ne hai solo {actual} {unit}. Hai consumato di più del solito?",
"banner_finished_zero": "L'inventario segna zero, ma i movimenti registrati dicono che non dovrebbe essere finito.",
"banner_finished_expected": "Secondo le registrazioni dovresti averne ancora {qty} {unit}.",
"banner_finished_check": "Puoi controllare?",
"banner_anomaly_phantom_title": "hai più scorte del previsto",
"banner_anomaly_phantom_detail": "L'inventario segna {inv_qty} {unit}, ma in base alle registrazioni ne dovresti avere solo {expected_qty} {unit}. Hai aggiunto scorte senza registrarle?",
"banner_anomaly_ghost_title": "hai meno scorte del previsto",
"banner_anomaly_ghost_detail": "In base alle operazioni registrate dovresti avere {expected_qty} {unit} di {name}, ma l'inventario mostra solo {inv_qty} {unit}. Hai prelevato senza registrarlo?"
},
"inventory": {
"title": "Dispensa",
@@ -140,7 +158,13 @@
"add_btn": "📥 AGGIUNGI",
"add_sub": "in dispensa/frigo",
"use_btn": "📤 USA / CONSUMA",
"use_sub": "dalla dispensa/frigo"
"use_sub": "dalla dispensa/frigo",
"have_title": "📦 Ce l'hai già!",
"add_more_sub": "altra quantità",
"use_qty_sub": "quanto ne hai usato",
"throw_btn": "🗑️ BUTTA",
"throw_sub": "butta il prodotto",
"edit_sub": "scadenza, luogo…"
},
"add": {
"title": "Aggiungi alla Dispensa",
@@ -150,7 +174,14 @@
"conf_size_placeholder": "es. 300",
"vacuum_label": "🫙 Sotto vuoto",
"vacuum_hint": "La scadenza verrà estesa automaticamente",
"submit": "✅ Aggiungi"
"submit": "✅ Aggiungi",
"purchase_type_label": "🛒 Questo prodotto è...",
"new_btn": "🆕 Appena comprato",
"existing_btn": "📦 Ce l'avevo già",
"remaining_label": "📦 Quantità rimasta",
"remaining_hint": "Quanto è rimasto approssimativamente?",
"remaining_full": "🟢 Pieno",
"remaining_half": "🟠 Metà"
},
"use": {
"title": "Usa / Consuma",
@@ -161,7 +192,12 @@
"submit": "📤 Usa questa quantità",
"available": "📦 Disponibile:",
"not_in_inventory": "⚠️ Prodotto non presente nell'inventario.",
"expiry_warning": "⚠️ Usa prima quella{loc} che scade il {date} — {when}!"
"expiry_warning": "⚠️ Usa prima quella{loc} che scade il {date} — {when}!",
"throw_title": "🗑️ Butta Prodotto",
"throw_all": "🗑️ Butta TUTTO ({qty})",
"throw_qty_label": "Quanto butti?",
"throw_qty_hint": "oppure specifica la quantità:",
"throw_partial_btn": "🗑️ Butta questa quantità"
},
"product": {
"title_new": "Nuovo Prodotto",
@@ -231,7 +267,13 @@
"smart_already": "📊 La spesa intelligente prevede già {name}",
"all_searched": "Tutti i prodotti sono già stati cercati. Usa 🔄 per ricercare singoli.",
"search_complete": "Ricerca completata: {count} prodotti",
"removed_sufficient": "🧹 {removed} prodotto/i con scorte sufficienti rimosso/i dalla lista"
"removed_sufficient": "🧹 {removed} prodotto/i con scorte sufficienti rimosso/i dalla lista",
"bring_badge": "🛒 Già su Bring!",
"add_urgent_toast": "🔴 {n} prodotto/i urgente/i aggiunto/i automaticamente a Bring!",
"migration_done": "✅ {migrated} aggiornati, {skipped} già ok",
"added_to_bring": "🛒 {n} prodotti aggiunti a Bring!",
"added_to_bring_skip": "{n} già presenti",
"all_on_bring": "Tutti i prodotti erano già su Bring!"
},
"ai": {
"title": "🤖 Identificazione AI",
@@ -455,7 +497,8 @@
"already_exists": "Già presente"
},
"confirm": {
"remove_item": "Vuoi davvero rimuovere questo prodotto dall'inventario?"
"remove_item": "Vuoi davvero rimuovere questo prodotto dall'inventario?",
"kiosk_exit": "Uscire dalla modalità kiosk?"
},
"edit": {
"title": "Modifica {name}"
@@ -493,7 +536,13 @@
"timeout": "Timeout: nessuna risposta dal gateway",
"error_connect": "Impossibile connettersi al gateway",
"tab": "Bilancia Smart",
"low_weight": "Peso < 10 g · inserisci manualmente\n(la lettura automatica richiede almeno 10 g)"
"low_weight": "Peso < 10 g · inserisci manualmente\n(la lettura automatica richiede almeno 10 g)",
"density_hint": "(densità {density} g/ml)",
"ml_hint": "(verrà convertito in ml)",
"weight_detected": "Peso rilevato — attendi 10s di stabilità…",
"weight_too_low": "Peso troppo basso — attendi…",
"stable": "✓ Stabile",
"auto_confirm": "✅ {val} {unit} — conferma automatica tra 5s (tocca per annullare)"
},
"prediction": {
"expected_qty": "Previsto: {expected} {unit}",