v0.257.0: the app catalog can speak English (R-560, slice 5 Part A)
gates / gates (push) Successful in 25s
gates / gates (push) Successful in 25s
The READ PATH for a second language in `.felhom.yml`. An `i18n: {en: …}` sibling
block inside the same file; `Metadata.For(lang)` merges it FIELD BY FIELD over the
Hungarian, so a missing or blank English field shows the Hungarian one and a
half-translated app is a legal, shippable state.
`For("hu")` is the parsed struct with `I18n` cleared and nothing else — measured
against all 53 real catalog files, copied into `internal/stacks/testdata/catalog/`.
Lists replace whole; every other list is matched by its own key, never by position.
`For` never writes through the receiver: the metadata is the stack manager's, shared
by concurrent requests, and an in-place merge would leak one household's language
into another household's page.
Pages reach catalog copy only through `LocalizeStacks`/`LocalizeStackPtr`/`MetaFor`,
and `TestNoDirectMetaCopyReadOnPages` keeps a named, reasoned allow-list of every
direct `.Meta.<copy>` read in `internal/web` so the NEXT page to read one fails the
suite instead of quietly rendering Hungarian to an English household.
Eight red-proofs. Two of them convicted a hollow TEST rather than the code: a struct
copy shares its slices' backing arrays, so the obvious DeepEqual mutation check
passed a deliberately broken merge; and a one-entry fixture cannot tell key matching
from position matching. Both rewritten, both then seen to fail.
MinAgent: 0.131.0 (unchanged). Older controllers are unaffected — `LoadMetadata`
uses non-strict `yaml.Unmarshal`, so a pre-0.257.0 box drops the whole block.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
# =============================================================================
|
||||
# .felhom.yml — App metadata for felhom-controller
|
||||
# =============================================================================
|
||||
# Place alongside docker-compose.yml in each stack directory:
|
||||
# /opt/docker/stacks/recipe-importer/.felhom.yml
|
||||
# =============================================================================
|
||||
|
||||
# --- Display info (shown on dashboard) ---
|
||||
display_name: "Recipe Importer"
|
||||
description: "Magyar receptoldalak importálása Mealie-be és Tandoor-ba"
|
||||
category: "tools"
|
||||
subdomain: "rimport"
|
||||
|
||||
# --- Asset slug ---
|
||||
slug: "recipe-importer"
|
||||
# catalog_since: the date THIS repo last changed this app's pinned images. Any commit that
|
||||
# changes an image: line must set this to the same day (see CLAUDE.md).
|
||||
catalog_since: "2026-07-12"
|
||||
|
||||
# --- Resource hints (displayed on deploy screen) ---
|
||||
resources:
|
||||
mem_request: "30M"
|
||||
mem_limit: "128M"
|
||||
pi_compatible: true
|
||||
needs_hdd: false
|
||||
|
||||
# --- Deploy fields ---
|
||||
deploy_fields:
|
||||
- env_var: DOMAIN
|
||||
label: "Domain"
|
||||
type: domain
|
||||
description: "A szerver domain neve"
|
||||
locked_after_deploy: true
|
||||
|
||||
- env_var: SUBDOMAIN
|
||||
label: "Aldomain"
|
||||
type: subdomain
|
||||
default: "rimport"
|
||||
required: true
|
||||
locked_after_deploy: true
|
||||
description: "Az alkalmazás aldomainje"
|
||||
|
||||
- env_var: SECRET_KEY
|
||||
label: "Titkos kulcs"
|
||||
type: secret
|
||||
generate: "hex:32"
|
||||
locked_after_deploy: true
|
||||
description: "Flask munkamenet titkos kulcs (automatikusan generált)"
|
||||
|
||||
# --- App info (info page content) ---
|
||||
app_info:
|
||||
tagline: 'Magyar receptoldalak importálása egyszerűen — egyedi és tömeges import Mealie-be és Tandoor-ba'
|
||||
docs_url: 'https://gitea.dooplex.hu/admin/recipe-importer'
|
||||
|
||||
use_cases:
|
||||
- 'Receptek importálása 6 magyar oldalról: mindmegette.hu, streetkitchen.hu, nosalty.hu, sobors.hu, kiskegyed.hu és gastrohobbi.hu — hozzávalók, lépések, képek és címkék automatikus felismerése'
|
||||
- 'Tömeges importálás: több URL beillesztése egyszerre, recept-áttekintéssel vagy teljesen automatikus módban'
|
||||
- 'Importálás előtti szerkesztés — strukturált hozzávalók (mennyiség, mértékegység, étel, megjegyzés), lépések módosítása, címkék kezelése'
|
||||
- 'Mealie és Tandoor Recipes egyidejű támogatás — választhatsz célrendszert, vagy mindkettőbe importálhatsz egyszerre'
|
||||
- 'Ismeretlen oldalak esetén schema.org JSON-LD alapú automatikus feldolgozás (recipeIngredient, recipeInstructions, keywords)'
|
||||
|
||||
first_steps:
|
||||
- 'Nyisd meg a rimport.DOMAIN címet a böngészőben'
|
||||
- 'Menj a Beállítások oldalra és add meg a Mealie és/vagy Tandoor URL-t és API kulcsot (Mealie: Profil → API Tokens; Tandoor: Beállítások → API Browser → Auth Token)'
|
||||
- 'Állíts be felhasználónevet és jelszót a hozzáférés védelméhez'
|
||||
- 'Illeszd be egy recept URL-jét az importálás oldalon, kattints a Feldolgozás gombra, majd ellenőrzés után az Importálás gombra'
|
||||
|
||||
prerequisites:
|
||||
- 'Mealie és/vagy Tandoor Recipes telepítve és elérhető a hálózaton'
|
||||
- 'API kulcs a célalkalmazásban (Mealie és/vagy Tandoor) létrehozva'
|
||||
|
||||
# --- Controller-side health probe ---
|
||||
healthcheck:
|
||||
checks:
|
||||
- type: api
|
||||
port: 8000
|
||||
path: "/health"
|
||||
expect:
|
||||
status: 200
|
||||
Reference in New Issue
Block a user