feat(): Translation statistics (#14299)

* chore(): Translation statistics

* chore(): improve statistics performances

* add end point to get statistics

* add tests

* Create spicy-games-unite.md

* feat(): add material and fix tests

* feat(): add translatable api

* feat(): add translatable api

* fix tests

* fix tests

* fix tests

* feedback
This commit is contained in:
Adrien de Peretti
2025-12-15 14:11:49 +01:00
committed by GitHub
parent 0f1566c644
commit ba6ed8d9dd
20 changed files with 1196 additions and 2 deletions
@@ -6,7 +6,8 @@ const Translation = model
reference_id: model.text().searchable(),
reference: model.text().searchable(), // e.g., "product", "product_variant", "product_category"
locale_code: model.text().searchable(), // BCP 47 language tag, e.g., "en-US", "da-DK"
translations: model.json(), // JSON object containing translated fields, e.g., { "title": "...", "description": "..." }
translations: model.json(),
translated_field_count: model.number().default(0), // Precomputed count of translated fields for performance
})
.indexes([
{