From bb3e98c344f285a837de0222a720166a90999204 Mon Sep 17 00:00:00 2001 From: le king fu Date: Fri, 23 Oct 2026 20:16:58 -0400 Subject: [PATCH] test(i18n): say how the variable guard reads nesting and unescaped forms (#480) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neither locale file uses $t(…) nesting or the unescaped {{- …}} form yet. The header of the guard now says what would happen if one came: a nested key is not compared, and {{- name}} reads as the token "- name", a gap against {{name}}. Comments only. Resolves #480 Co-Authored-By: Claude Opus 5.5 --- src/i18n/locales.keys.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/i18n/locales.keys.test.ts b/src/i18n/locales.keys.test.ts index 16bcce6..702658b 100644 --- a/src/i18n/locales.keys.test.ts +++ b/src/i18n/locales.keys.test.ts @@ -20,6 +20,9 @@ // languages, and a format option left out on one side (`{{filter}}` against // `{{filter, lowercase}}`) keeps the capital the sentence meant to drop: each // leaf both files hold carries one set of tokens, format options included. +// Neither file nests a key (`$t(…)`) or writes the unescaped form (`{{- …}}`) +// yet: a nested key would not be compared, and `{{- name}}` would read as the +// token `- name`, a gap against `{{name}}`. import { describe, it, expect } from "vitest"; import fr from "./locales/fr.json";