feat: FASE 4 - Editor Maker (Fabric.js) con annotazioni, task editor, preview e storico versioni

- recipe_list.html: lista ricette con filtri, paginazione, cards Alpine.js
- recipe_editor.html: form metadati, upload drag-and-drop, canvas Fabric.js per annotazioni
- annotation-editor.js: editor annotazioni Fabric.js (marker, frecce, rettangoli, zoom, pan)
- task_editor.html: editor task/subtask inline con drag-and-drop reorder e tolleranze
- recipe_preview.html: anteprima ricetta come MeasurementTec
- version_history.html: timeline versioni con conteggio misurazioni AJAX
- maker.py: 6 route pagina + 13 proxy AJAX, gestione sicura risposte lista API
- i18n: 170+ stringhe tradotte IT/EN per tutti i template Maker

Architect review: 3 CRITICO + 5 MEDIO + 3 NEW risolti, 2 BASSO differiti

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Adriano
2026-02-07 13:15:24 +01:00
parent a386986c17
commit e1f4ee73d0
11 changed files with 5915 additions and 19 deletions
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env python
"""Compile .po files to .mo files for Flask-Babel."""
from pathlib import Path
from babel.messages.mofile import write_mo
from babel.messages.pofile import read_po
def compile_po_file(po_path: Path) -> None:
"""Compile a single .po file to .mo."""
mo_path = po_path.with_suffix('.mo')
print(f"Compiling {po_path} -> {mo_path}")
with open(po_path, 'rb') as po_file:
catalog = read_po(po_file)
with open(mo_path, 'wb') as mo_file:
write_mo(mo_file, catalog)
print(f" {len(catalog)} messages compiled")
def main():
"""Find and compile all .po files in translations directory."""
translations_dir = Path(__file__).parent / 'translations'
if not translations_dir.exists():
print(f"ERROR: {translations_dir} does not exist")
return
po_files = list(translations_dir.rglob('*.po'))
if not po_files:
print(f"No .po files found in {translations_dir}")
return
print(f"Found {len(po_files)} .po file(s)")
for po_file in po_files:
compile_po_file(po_file)
print("\n✓ All translations compiled successfully")
if __name__ == '__main__':
main()