i18n(site): convert Hugo i18n TOML->go-i18n JSON for Weblate

Weblate has no native Hugo-TOML format. The strings are already the go-i18n
structure ([key]/other=), so convert site/i18n/{en,es}.toml -> {en,es}.json
({"key":{"other":"..."}}) — Hugo 0.140 reads it identically (verified with the
pinned hugomods/hugo:exts-0.140.2 image). Enables a 'site' Weblate component.

Update TRANSLATIONS.md: site is now a component (go-i18n-json), not deferred.
This commit is contained in:
vjrj 2026-07-15 19:42:54 +02:00
parent 7d5f26ff4a
commit 7150e337eb
5 changed files with 300 additions and 234 deletions

View file

@ -13,7 +13,7 @@ The links to the repo and to Weblate are shown both on the landing site
| Surface | Files | Format | Base locale | Locales today |
|---|---|---|---|---|
| **App** (`app` component) | `apps/app_seeds/lib/i18n/*.i18n.json` | JSON **nested** (slang, `{param}` placeholders) | `en` | en, es, pt, fr, de, ast, ja |
| **Site** (deferred) | `site/i18n/*.toml` | Hugo TOML | `en` | en, es |
| **Site** (`site` component) | `site/i18n/*.json` | **go-i18n JSON** (`{"key":{"other":"…"}}`) | `en` | en, es |
Only source strings live in git; app strings use `slang`, so `strings.g.dart` /
`strings_*.g.dart` are **generated** (see the slang caveat below).
@ -76,12 +76,24 @@ git add -A && git commit -m "chore(i18n): regenerate slang after Weblate sync"
regenerate. `fallback_strategy: base_locale` means locales missing a key show the
English text until translators fill it in.)
## Site component — deferred
## The `site` component (landing page)
Weblate 5.x has no native Hugo-TOML format, and the site has only EN/ES (~3 KB).
Two options, decide later:
- (a) Switch Hugo i18n to a Weblate-supported format (Hugo also reads
`i18n/*.json` / `*.yaml`), then add a matching `site` component.
- (b) Keep translating the two `site/i18n/*.toml` files by hand.
The Hugo landing strings live in `site/i18n/*.json`. Weblate has no native Hugo-TOML
format, so these were converted from TOML to **go-i18n JSON** (`{"key":{"other":"…"}}`)
— a shape Hugo 0.140 reads identically and Weblate supports natively. Component settings:
For now the site is translated manually; only the `app` component is on Weblate.
| Field | Value |
|---|---|
| Project | `tane` |
| Name / slug | `site` |
| Source code repository | *(link to the `app` component: `weblate://tane/app`)* |
| Repository branch | `main` |
| File mask | `site/i18n/*.json` |
| Monolingual base language file | `site/i18n/en.json` |
| Template for new translations | `site/i18n/en.json` |
| File format | **go-i18n JSON** (`go-i18n-json`) |
| Source language | English (`en`) |
Linking the repo to the `app` component (`weblate://tane/app`) shares one clone/token.
No slang step here — Hugo consumes the JSON directly. Only EN/ES today; adding a locale =
add `site/i18n/<code>.json`.

140
site/i18n/en.json Normal file
View file

@ -0,0 +1,140 @@
{
"skipToContent": {
"other": "Skip to content"
},
"navAbout": {
"other": "About"
},
"navLegal": {
"other": "Legal"
},
"navHome": {
"other": "Home"
},
"screenshotsTitle": {
"other": "A look inside"
},
"getItTitle": {
"other": "Get Tane"
},
"getItComingSoon": {
"other": "Publishing to app stores soon. Meanwhile, Tane is free software you can build and run today."
},
"legalIntro": {
"other": "The plain-language documents that govern Tane. Short version: your data stays on your device, Tane is only a tool, and you are responsible for the seeds you share."
},
"footerFreeSoftware": {
"other": "Free software (AGPL-3.0). No ads, no commissions, no data selling."
},
"footerPublishedBy": {
"other": "Published by"
},
"footerContact": {
"other": "Contact"
},
"backToHome": {
"other": "Back to home"
},
"statusBadge": {
"other": "Beta"
},
"statusTitle": {
"other": "Where Tane is right now"
},
"statusBody": {
"other": "The inventory works today: keep your seeds offline, encrypted, with no account. The neighbourly sharing layer (offers, messaging, trust) is being built now. Everything already works with zero network."
},
"screenCapHome": {
"other": "Home — your bank and the market, one tap away"
},
"screenCapInventory": {
"other": "Inventory — your seeds, grouped by family"
},
"screenCapMarket": {
"other": "Market — give, swap or sell with people nearby"
},
"screenCapCalendar": {
"other": "Calendar — what to sow this month"
},
"screenCapDetail": {
"other": "Variety — years, quantities, origin, germination"
},
"rtlNoteTitle": {
"other": "International by design"
},
"rtlNoteBody": {
"other": "Right-to-left and non-Latin scripts are first-class. Here is the inventory mirrored for RTL."
},
"collabTitle": {
"other": "Get involved"
},
"collabIntro": {
"other": "Tane has no business model — it lives on volunteers, communities and public tech grants. You can help:"
},
"collabTranslateT": {
"other": "Translate"
},
"collabTranslateB": {
"other": "Bring Tane to your language. Translation files are simple; patches are welcome."
},
"collabTestT": {
"other": "Try it with a seed group"
},
"collabTestB": {
"other": "Use it in a real seed network or fair and tell us what breaks or what's missing."
},
"collabCodeT": {
"other": "Contribute code"
},
"collabCodeB": {
"other": "Flutter/Dart, free software. Design docs and tests included."
},
"collabFundT": {
"other": "Support it"
},
"collabFundB": {
"other": "No ads, no commissions. Help fund the work or point us to grants for the commons."
},
"collabContact": {
"other": "Write to us"
},
"faqTitle": {
"other": "Questions"
},
"faqFreeQ": {
"other": "Is it free?"
},
"faqFreeA": {
"other": "Yes. Free software (AGPL-3.0), no ads, no commissions, no data selling."
},
"faqAccountQ": {
"other": "Do I need an account?"
},
"faqAccountA": {
"other": "No account, no sign-up, no server. Your data stays on your device."
},
"faqOfflineQ": {
"other": "Does it work offline?"
},
"faqOfflineA": {
"other": "Fully. The internet only enriches it; everything essential works with no connection."
},
"faqLegalQ": {
"other": "Is it legal to share seeds?"
},
"faqLegalA": {
"other": "Giving and swapping between growers is broadly allowed; selling can be regulated. You are responsible for what you share — see the notice on seed legality."
},
"faqDataQ": {
"other": "What about my privacy?"
},
"faqDataA": {
"other": "Data is encrypted on your device and only what you explicitly share ever leaves it. See the privacy policy."
},
"aboutCta": {
"other": "Learn what Tane is"
},
"footerSource": {
"other": "Source code"
}
}

View file

@ -1,113 +0,0 @@
[skipToContent]
other = "Skip to content"
[navAbout]
other = "About"
[navLegal]
other = "Legal"
[navHome]
other = "Home"
[screenshotsTitle]
other = "A look inside"
[getItTitle]
other = "Get Tane"
[getItComingSoon]
other = "Publishing to app stores soon. Meanwhile, Tane is free software you can build and run today."
[legalIntro]
other = "The plain-language documents that govern Tane. Short version: your data stays on your device, Tane is only a tool, and you are responsible for the seeds you share."
[footerFreeSoftware]
other = "Free software (AGPL-3.0). No ads, no commissions, no data selling."
[footerPublishedBy]
other = "Published by"
[footerContact]
other = "Contact"
[backToHome]
other = "Back to home"
# --- Status ---
[statusBadge]
other = "Beta"
[statusTitle]
other = "Where Tane is right now"
[statusBody]
other = "The inventory works today: keep your seeds offline, encrypted, with no account. The neighbourly sharing layer (offers, messaging, trust) is being built now. Everything already works with zero network."
# --- Screenshots ---
[screenCapHome]
other = "Home — your bank and the market, one tap away"
[screenCapInventory]
other = "Inventory — your seeds, grouped by family"
[screenCapMarket]
other = "Market — give, swap or sell with people nearby"
[screenCapCalendar]
other = "Calendar — what to sow this month"
[screenCapDetail]
other = "Variety — years, quantities, origin, germination"
[rtlNoteTitle]
other = "International by design"
[rtlNoteBody]
other = "Right-to-left and non-Latin scripts are first-class. Here is the inventory mirrored for RTL."
# --- Get involved ---
[collabTitle]
other = "Get involved"
[collabIntro]
other = "Tane has no business model — it lives on volunteers, communities and public tech grants. You can help:"
[collabTranslateT]
other = "Translate"
[collabTranslateB]
other = "Bring Tane to your language. Translation files are simple; patches are welcome."
[collabTestT]
other = "Try it with a seed group"
[collabTestB]
other = "Use it in a real seed network or fair and tell us what breaks or what's missing."
[collabCodeT]
other = "Contribute code"
[collabCodeB]
other = "Flutter/Dart, free software. Design docs and tests included."
[collabFundT]
other = "Support it"
[collabFundB]
other = "No ads, no commissions. Help fund the work or point us to grants for the commons."
[collabContact]
other = "Write to us"
# --- FAQ ---
[faqTitle]
other = "Questions"
[faqFreeQ]
other = "Is it free?"
[faqFreeA]
other = "Yes. Free software (AGPL-3.0), no ads, no commissions, no data selling."
[faqAccountQ]
other = "Do I need an account?"
[faqAccountA]
other = "No account, no sign-up, no server. Your data stays on your device."
[faqOfflineQ]
other = "Does it work offline?"
[faqOfflineA]
other = "Fully. The internet only enriches it; everything essential works with no connection."
[faqLegalQ]
other = "Is it legal to share seeds?"
[faqLegalA]
other = "Giving and swapping between growers is broadly allowed; selling can be regulated. You are responsible for what you share — see the notice on seed legality."
[faqDataQ]
other = "What about my privacy?"
[faqDataA]
other = "Data is encrypted on your device and only what you explicitly share ever leaves it. See the privacy policy."
# --- misc ---
[aboutCta]
other = "Learn what Tane is"
[footerSource]
other = "Source code"

140
site/i18n/es.json Normal file
View file

@ -0,0 +1,140 @@
{
"skipToContent": {
"other": "Saltar al contenido"
},
"navAbout": {
"other": "Qué es Tane"
},
"navLegal": {
"other": "Legal"
},
"navHome": {
"other": "Inicio"
},
"screenshotsTitle": {
"other": "Un vistazo por dentro"
},
"getItTitle": {
"other": "Consigue Tane"
},
"getItComingSoon": {
"other": "Pronto en las tiendas de aplicaciones. Mientras tanto, Tane es software libre que puedes compilar y usar hoy."
},
"legalIntro": {
"other": "Los documentos, en lenguaje claro, que rigen Tane. En resumen: tus datos se quedan en tu dispositivo, Tane es solo una herramienta, y tú eres responsable de las semillas que compartes."
},
"footerFreeSoftware": {
"other": "Software libre (AGPL-3.0). Sin anuncios, sin comisiones, sin venta de datos."
},
"footerPublishedBy": {
"other": "Publicado por"
},
"footerContact": {
"other": "Contacto"
},
"backToHome": {
"other": "Volver al inicio"
},
"statusBadge": {
"other": "Beta"
},
"statusTitle": {
"other": "En qué punto está Tane"
},
"statusBody": {
"other": "El inventario ya funciona: guarda tus semillas sin conexión, cifradas y sin cuenta. La capa de intercambio vecinal (ofertas, mensajería, confianza) se está construyendo ahora. Todo funciona ya sin ninguna red."
},
"screenCapHome": {
"other": "Inicio — tu banco y el mercado a un toque"
},
"screenCapInventory": {
"other": "Inventario — tus semillas, agrupadas por familia"
},
"screenCapMarket": {
"other": "Mercado — regala, intercambia o vende con gente cerca"
},
"screenCapCalendar": {
"other": "Calendario — qué sembrar este mes"
},
"screenCapDetail": {
"other": "Variedad — años, cantidades, procedencia, germinación"
},
"rtlNoteTitle": {
"other": "Internacional por diseño"
},
"rtlNoteBody": {
"other": "Los idiomas de derecha a izquierda y las escrituras no latinas son de primera clase. Aquí, el inventario reflejado para RTL."
},
"collabTitle": {
"other": "Colabora"
},
"collabIntro": {
"other": "Tane no tiene modelo de negocio: se sostiene con voluntariado, comunidades y ayudas públicas. Puedes ayudar:"
},
"collabTranslateT": {
"other": "Traduce"
},
"collabTranslateB": {
"other": "Lleva Tane a tu idioma. Los ficheros de traducción son sencillos; los parches son bienvenidos."
},
"collabTestT": {
"other": "Pruébala con un grupo de semillas"
},
"collabTestB": {
"other": "Úsala en una red o feria de semillas real y cuéntanos qué falla o qué falta."
},
"collabCodeT": {
"other": "Programa"
},
"collabCodeB": {
"other": "Flutter/Dart, software libre. Con documentación de diseño y tests."
},
"collabFundT": {
"other": "Apóyala"
},
"collabFundB": {
"other": "Sin anuncios ni comisiones. Ayuda a financiar el trabajo o señálanos ayudas para el común."
},
"collabContact": {
"other": "Escríbenos"
},
"faqTitle": {
"other": "Preguntas"
},
"faqFreeQ": {
"other": "¿Es gratis?"
},
"faqFreeA": {
"other": "Sí. Software libre (AGPL-3.0), sin anuncios, sin comisiones, sin venta de datos."
},
"faqAccountQ": {
"other": "¿Necesito cuenta?"
},
"faqAccountA": {
"other": "Sin cuenta, sin registro, sin servidor. Tus datos se quedan en tu dispositivo."
},
"faqOfflineQ": {
"other": "¿Funciona sin conexión?"
},
"faqOfflineA": {
"other": "Totalmente. Internet solo la enriquece; todo lo esencial funciona sin conexión."
},
"faqLegalQ": {
"other": "¿Es legal compartir semillas?"
},
"faqLegalA": {
"other": "Regalar e intercambiar entre cultivadoras suele estar permitido; vender puede estar regulado. Eres responsable de lo que compartes: mira el aviso sobre semillas."
},
"faqDataQ": {
"other": "¿Y mi privacidad?"
},
"faqDataA": {
"other": "Los datos van cifrados en tu dispositivo y solo sale lo que compartes a propósito. Mira la política de privacidad."
},
"aboutCta": {
"other": "Descubre qué es Tane"
},
"footerSource": {
"other": "Código fuente"
}
}

View file

@ -1,113 +0,0 @@
[skipToContent]
other = "Saltar al contenido"
[navAbout]
other = "Qué es Tane"
[navLegal]
other = "Legal"
[navHome]
other = "Inicio"
[screenshotsTitle]
other = "Un vistazo por dentro"
[getItTitle]
other = "Consigue Tane"
[getItComingSoon]
other = "Pronto en las tiendas de aplicaciones. Mientras tanto, Tane es software libre que puedes compilar y usar hoy."
[legalIntro]
other = "Los documentos, en lenguaje claro, que rigen Tane. En resumen: tus datos se quedan en tu dispositivo, Tane es solo una herramienta, y tú eres responsable de las semillas que compartes."
[footerFreeSoftware]
other = "Software libre (AGPL-3.0). Sin anuncios, sin comisiones, sin venta de datos."
[footerPublishedBy]
other = "Publicado por"
[footerContact]
other = "Contacto"
[backToHome]
other = "Volver al inicio"
# --- Estado ---
[statusBadge]
other = "Beta"
[statusTitle]
other = "En qué punto está Tane"
[statusBody]
other = "El inventario ya funciona: guarda tus semillas sin conexión, cifradas y sin cuenta. La capa de intercambio vecinal (ofertas, mensajería, confianza) se está construyendo ahora. Todo funciona ya sin ninguna red."
# --- Capturas ---
[screenCapHome]
other = "Inicio — tu banco y el mercado a un toque"
[screenCapInventory]
other = "Inventario — tus semillas, agrupadas por familia"
[screenCapMarket]
other = "Mercado — regala, intercambia o vende con gente cerca"
[screenCapCalendar]
other = "Calendario — qué sembrar este mes"
[screenCapDetail]
other = "Variedad — años, cantidades, procedencia, germinación"
[rtlNoteTitle]
other = "Internacional por diseño"
[rtlNoteBody]
other = "Los idiomas de derecha a izquierda y las escrituras no latinas son de primera clase. Aquí, el inventario reflejado para RTL."
# --- Colabora ---
[collabTitle]
other = "Colabora"
[collabIntro]
other = "Tane no tiene modelo de negocio: se sostiene con voluntariado, comunidades y ayudas públicas. Puedes ayudar:"
[collabTranslateT]
other = "Traduce"
[collabTranslateB]
other = "Lleva Tane a tu idioma. Los ficheros de traducción son sencillos; los parches son bienvenidos."
[collabTestT]
other = "Pruébala con un grupo de semillas"
[collabTestB]
other = "Úsala en una red o feria de semillas real y cuéntanos qué falla o qué falta."
[collabCodeT]
other = "Programa"
[collabCodeB]
other = "Flutter/Dart, software libre. Con documentación de diseño y tests."
[collabFundT]
other = "Apóyala"
[collabFundB]
other = "Sin anuncios ni comisiones. Ayuda a financiar el trabajo o señálanos ayudas para el común."
[collabContact]
other = "Escríbenos"
# --- Preguntas ---
[faqTitle]
other = "Preguntas"
[faqFreeQ]
other = "¿Es gratis?"
[faqFreeA]
other = "Sí. Software libre (AGPL-3.0), sin anuncios, sin comisiones, sin venta de datos."
[faqAccountQ]
other = "¿Necesito cuenta?"
[faqAccountA]
other = "Sin cuenta, sin registro, sin servidor. Tus datos se quedan en tu dispositivo."
[faqOfflineQ]
other = "¿Funciona sin conexión?"
[faqOfflineA]
other = "Totalmente. Internet solo la enriquece; todo lo esencial funciona sin conexión."
[faqLegalQ]
other = "¿Es legal compartir semillas?"
[faqLegalA]
other = "Regalar e intercambiar entre cultivadoras suele estar permitido; vender puede estar regulado. Eres responsable de lo que compartes: mira el aviso sobre semillas."
[faqDataQ]
other = "¿Y mi privacidad?"
[faqDataA]
other = "Los datos van cifrados en tu dispositivo y solo sale lo que compartes a propósito. Mira la política de privacidad."
# --- varios ---
[aboutCta]
other = "Descubre qué es Tane"
[footerSource]
other = "Código fuente"