From f217994370479a1b2fc5838d7369456278ec90b1 Mon Sep 17 00:00:00 2001 From: moss-bryophyta <261561981+moss-bryophyta@users.noreply.github.com> Date: Sun, 22 Mar 2026 13:04:22 -0700 Subject: [PATCH] docs: add T component granularity guidance --- docs-templates/guides/t.mdx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs-templates/guides/t.mdx b/docs-templates/guides/t.mdx index bce51c7..a66f941 100644 --- a/docs-templates/guides/t.mdx +++ b/docs-templates/guides/t.mdx @@ -164,6 +164,39 @@ Content in [``](__DOCS_PATH__/api/components/t) components is sent to the GT ``` +## How much to wrap in a single `` + +Wrap **logical content blocks** — content that a translator would naturally read and translate together. + +```jsx +// ✅ Good — related content wrapped together gives translators full context + +

Welcome to Our Platform

+

Get started in minutes with our simple setup process.

+
+ +// ✅ Good — each card is an independent unit +{features.map((feature) => ( + +

{feature.title}

+

{feature.description}

+
+))} + +// ❌ Too narrow — fragments the translation, loses context +

Welcome to Our Platform

+

Get started in minutes with our simple setup process.

+ +// ❌ Too wide — wrapping your entire page makes it harder to maintain + + {/* ...hundreds of lines of JSX... */} + +``` + +**Rule of thumb:** if text is visually or semantically related, wrap it in one ``. Only split when content is genuinely independent (e.g., a header vs. a footer). + +Wrapping more content in a single `` gives translators better context, which produces more natural translations — some languages restructure sentences or need to reference nearby content. + ## Common issues ### Component boundaries