feat(i18n): French and German localization (phase 5)
- Add full message catalogs and content for French (fr) and German (de) - Implement ASCII canonical slugs for French and German routes - Add language-specific search endpoints (/api/busca/fr, /api/busca/de) - Configure strict 404 responses for /fr/livro and /de/livro - Localize SEO, OpenGraph (fr_FR, de_DE), Twitter and JSON-LD schemas - Add localized code example comments across 14 examples for fr and de - Enable 'fr' and 'de' in ENABLED_LOCALES with root negotiation and redirect - Extend test suite in check-i18n, smoke-imagem and verifica-vazamentos Co-Authored-By: Antigravity <noreply@google.com>
This commit is contained in:
1 parent
7b673aeb4b
commit
7fce46b9e1
104 files changed
+33369
-686
No files matched your search
@@ -0,0 +1,44 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_matter.h"
|
||||
#include "esp_matter_controller.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
static const char *TAG = "esp-matter-example";
|
||||
|
||||
void app_event_cb(const esp_matter_event_t *event)
|
||||
{
|
||||
switch (event->event_id) {
|
||||
case ESP_MATTER_EVENT_ATTRIBUTE_UPDATE: {
|
||||
const esp_matter_attr_update_t *attr_update = &event->data.attr_update;
|
||||
if (attr_update->endpoint_id == 1 && attr_update->cluster_id == ESP_MATTER_ON_OFF_CLUSTER_ID) {
|
||||
bool on = false;
|
||||
esp_matter_attribute_get(attr_update->endpoint_id, attr_update->cluster_id,
|
||||
attr_update->attribute_id, &on);
|
||||
ESP_LOGI(TAG, "Lâmpada %s", on ? "ligada" : "desligada");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Inicializa NVS
|
||||
esp_err_t err = nvs_flash_init();
|
||||
if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||
ESP_ERROR_CHECK(nvs_flash_erase());
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
}
|
||||
|
||||
// Inicializa o Matter node
|
||||
esp_matter::node_t *node = esp_matter::node::create(NULL, app_event_cb);
|
||||
esp_matter::endpoint_t *endpoint = esp_matter::endpoint::create(node, ESP_MATTER_ENDPOINT_TYPE_ON_OFF_LIGHT);
|
||||
|
||||
// Inicia o stack Matter
|
||||
ESP_ERROR_CHECK(esp_matter::start(node));
|
||||
|
||||
ESP_LOGI(TAG, "Dispositivo Matter iniciado. Aguardando comissionamento...");
|
||||
}
|
||||
Reference in new issue
Block a user