<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: localize.dev</title>
    <description>The latest articles on DEV Community by localize.dev (uselocalizedev).</description>
    <link>https://dev.to/uselocalizedev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F16373%2Feb456bce-61a2-4485-8974-487ecc20f7e1.png</url>
      <title>DEV Community: localize.dev</title>
      <link>https://dev.to/uselocalizedev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uselocalizedev"/>
    <language>en</language>
    <item>
      <title>How localize.dev rewrites your UI text, and what it got wrong on a real app</title>
      <dc:creator>localize.dev</dc:creator>
      <pubDate>Mon, 23 Nov 2026 11:06:31 +0000</pubDate>
      <link>https://dev.to/uselocalizedev/how-localizedev-rewrites-your-ui-text-and-what-it-got-wrong-on-a-real-app-4kkn</link>
      <guid>https://dev.to/uselocalizedev/how-localizedev-rewrites-your-ui-text-and-what-it-got-wrong-on-a-real-app-4kkn</guid>
      <description>&lt;p&gt;Most apps that need a second language start with every string hardcoded in JSX. The usual fix is a week of pulling text into a JSON file, inventing a key for each string, wiring &lt;code&gt;t()&lt;/code&gt; through components that never had it, and sending the file off to be translated. localize.dev does that as one command, &lt;code&gt;npx localize-dev run&lt;/code&gt;, and you get one pull request.&lt;/p&gt;

&lt;p&gt;To see it on code I didn't write, I ran it on &lt;a href="https://github.com/hunvreus/pagescms" rel="noopener noreferrer"&gt;Pages CMS&lt;/a&gt;, an open-source Next.js App Router project. It moved 535 strings in 73 files to react-i18next: 395 new keys, plus 140 places that reused a key because the text was the same. It wrote Spanish, Arabic and Simplified Chinese locale files, added a language switcher and set Arabic to right to left. That's &lt;a href="https://github.com/ufortstephen/pagescms/pull/1" rel="noopener noreferrer"&gt;pull request #1 on my fork&lt;/a&gt;. It also got several things wrong. I list them below, with what changed in localize.dev because of each.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft00v7f1jg8eq6vlonu02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft00v7f1jg8eq6vlonu02.png" alt="Pull request #1 on the Pages CMS fork: 535 strings in 73 files moved to react-i18next, with Spanish, Arabic and Chinese locale files" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A tool that rewrites your code with a model in the loop deserves suspicion, so this post sticks to how it works, from the source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding the text
&lt;/h2&gt;

&lt;p&gt;The CLI parses each file with Babel, and code decides which strings count, not the model. A string is UI text when it sits where people see it: JSX text, attributes like &lt;code&gt;placeholder&lt;/code&gt;, &lt;code&gt;alt&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;aria-label&lt;/code&gt; and &lt;code&gt;label&lt;/code&gt;, toast and alert calls, &lt;code&gt;useState&lt;/code&gt; defaults that read like prose, and zod or yup messages such as &lt;code&gt;.email('Enter a valid email')&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A filter then drops what looks like text but isn't: URLs and paths, emails, hex colors, CSS units, UUIDs, versions, file names, prices like &lt;code&gt;CA${price}&lt;/code&gt;, identifiers like &lt;code&gt;auth.title&lt;/code&gt;, and Tailwind class lists (&lt;code&gt;bg-primary hover:shadow-2&lt;/code&gt; stays as it is; "sign-in now" gets a key). The CLI skips &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;kbd&amp;gt;&lt;/code&gt;, anything marked &lt;code&gt;data-i18n-ignore&lt;/code&gt;, and by default tests and stories.&lt;/p&gt;

&lt;p&gt;The rewrite uses magic-string. The CLI overwrites each string's exact character range, inserts the hook and the import at fixed offsets, and leaves the rest of the file byte for byte as it was, comments and odd indentation included. Here is the sign-in legal line from the Pages CMS diff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// before&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"text-sm text-muted-foreground"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nc"&gt;By&lt;/span&gt; &lt;span class="n"&gt;clicking&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;agree&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;our&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"underline hover:decoration-muted-foreground/50"&lt;/span&gt;
     &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://pagescms.org/terms"&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"_blank"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;Terms&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nc"&gt;Service&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://pagescms.org/privacy"&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nc"&gt;Privacy&lt;/span&gt; &lt;span class="nc"&gt;Policy&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c1"&gt;// after&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"text-sm text-muted-foreground"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Trans&lt;/span&gt; &lt;span class="n"&gt;i18nKey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"sign_in.terms_privacy"&lt;/span&gt; &lt;span class="n"&gt;components&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;
    &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"underline hover:decoration-muted-foreground/50"&lt;/span&gt;
    &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://pagescms.org/terms"&lt;/span&gt;
    &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"_blank"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://pagescms.org/privacy"&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sentence becomes one message, &lt;code&gt;By clicking continue, you agree to our &amp;lt;a&amp;gt;Terms of Service&amp;lt;/a&amp;gt; and &amp;lt;a2&amp;gt;Privacy Policy&amp;lt;/a2&amp;gt;&lt;/code&gt;, so a translator can move the links when the word order changes. Spanish got &lt;code&gt;Al hacer clic en continuar, aceptas nuestros &amp;lt;a&amp;gt;Términos de servicio&amp;lt;/a&amp;gt; y &amp;lt;a2&amp;gt;Política de privacidad&amp;lt;/a2&amp;gt;.&lt;/code&gt; The links' addresses and classes stay in your code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqrc7j4rcwufu8qv99nvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqrc7j4rcwufu8qv99nvh.png" alt="The Pages CMS sign-in screen after one run, in English, Spanish, Arabic laid out right to left, and Simplified Chinese" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Plurals work the same way. &lt;code&gt;{n === 1 ? 'invite' : 'invites'}&lt;/code&gt; becomes &lt;code&gt;t('collaborators.send_invites_button', { count })&lt;/code&gt;, with &lt;code&gt;_one&lt;/code&gt; and &lt;code&gt;_other&lt;/code&gt; in English and all six CLDR forms in Arabic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where &lt;code&gt;t&lt;/code&gt; can go in the App Router
&lt;/h2&gt;

&lt;p&gt;This part takes the most code. A file under &lt;code&gt;app/&lt;/code&gt; without &lt;code&gt;'use client'&lt;/code&gt; is a server component, and so is everything it imports up to a &lt;code&gt;'use client'&lt;/code&gt; boundary. Hooks don't work there. &lt;code&gt;component-graph.ts&lt;/code&gt; builds the import graph, resolves tsconfig aliases like &lt;code&gt;@/lib/…&lt;/code&gt;, and labels each module server, client or shared.&lt;/p&gt;

&lt;p&gt;Client components get &lt;code&gt;const { t } = useTranslation();&lt;/code&gt;. Server components get &lt;code&gt;const { t } = await getTranslation();&lt;/code&gt; from a generated &lt;code&gt;i18n.server.ts&lt;/code&gt;, which takes the language from the URL, then a &lt;code&gt;lang&lt;/code&gt; cookie, then &lt;code&gt;Accept-Language&lt;/code&gt;. They become &lt;code&gt;async&lt;/code&gt; if they weren't. A module both sides import gets &lt;code&gt;'use client'&lt;/code&gt; only if it has no &lt;code&gt;await&lt;/code&gt;, no &lt;code&gt;'use server'&lt;/code&gt; and no &lt;code&gt;next/headers&lt;/code&gt;, &lt;code&gt;server-only&lt;/code&gt; or &lt;code&gt;node:&lt;/code&gt; imports. Otherwise the CLI reports its strings and leaves them alone.&lt;/p&gt;

&lt;p&gt;Every skipped string comes with a file, a line and a reason, like "validation message in a schema built outside a component: build it in the component (useMemo) so its messages can use t()". The Pages CMS run printed two of those.&lt;/p&gt;

&lt;h2&gt;
  
  
  What gets sent to the server
&lt;/h2&gt;

&lt;p&gt;A hosted model translates. For each batch of 10 strings, the CLI sends the file path, the source and target locales, and for each string its text with &lt;code&gt;{placeholders}&lt;/code&gt;, a context hint of up to 200 characters (&lt;code&gt;element text inside &amp;lt;Button&amp;gt; in component &amp;lt;SignIn&amp;gt;&lt;/code&gt;), and plural forms if any. That's the &lt;code&gt;TranslateRequest&lt;/code&gt; type in &lt;code&gt;src/llm/translator.ts&lt;/code&gt;. The CLI doesn't send file contents. Parsing, keys, rewriting and locale files all happen on your machine, and the server returns a key name and translations for each string.&lt;/p&gt;

&lt;p&gt;Three more things leave your machine in some setups. The server keeps a translation memory that stores a SHA-256 of the source text and the translation; short generic strings (at most 60 characters and 8 words, with no email, URL or number of 4 or more digits) are shared across projects, and longer ones stay in your workspace. If the GitHub Action opens the pull request as our GitHub App, the changed files pass through our API to make the commit. And the hosted MCP server, for agents that can't run a local process, receives the files the agent sends and deletes them after the call. The local one, &lt;code&gt;npx localize-dev mcp&lt;/code&gt;, runs on your machine.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt;, &lt;code&gt;--offline&lt;/code&gt; (keys only) and &lt;code&gt;--pseudo&lt;/code&gt; (a pseudo-locale for finding layout breaks) make no model calls and need no key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking what the model returns
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;translationProblem()&lt;/code&gt; in &lt;code&gt;src/validate.ts&lt;/code&gt; checks every translation before the CLI writes it. Every &lt;code&gt;{placeholder}&lt;/code&gt; must survive with none added, markup tags must match, a plural needs every CLDR category the language uses (six for Arabic), and for ICU libraries the message has to parse the way intl-messageformat parses it, including the French &lt;code&gt;d'{name}&lt;/code&gt; apostrophe that quotes out a placeholder. The CLI asks again for a failing translation, with the reason attached. If it fails twice, the CLI leaves that language out for that string and says so, and the app falls back to English instead of showing something broken.&lt;/p&gt;

&lt;p&gt;None of that tells you whether a translation is good, and I won't claim it always is. The model can flag strings it's unsure of, and those go first in the pull request's review comment. Corrections you make on the review page go into your workspace's memory for later runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;check&lt;/code&gt; in CI
&lt;/h2&gt;

&lt;p&gt;The next pull request will add a hardcoded string. &lt;code&gt;localize-dev check&lt;/code&gt; runs the same scanner without the network and fails on hardcoded text, keys the locale file lacks, missing translations, and source messages edited since they were translated (tracked in &lt;code&gt;localize.lock.json&lt;/code&gt;). In GitHub Actions it annotates the diff.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ufortstephen/pagescms/pull/2" rel="noopener noreferrer"&gt;Pull request #2&lt;/a&gt; adds one line to the sign-in form: "We'll email you a 6-digit code. No password needed." The check job failed in about 8 seconds, with the error on &lt;code&gt;components/sign-in.tsx&lt;/code&gt; line 226. It also warned about classes like &lt;code&gt;ml-auto&lt;/code&gt; and &lt;code&gt;text-right&lt;/code&gt;, which stay on the same side in Arabic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fikzjwr08dst6mec3yi71.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fikzjwr08dst6mec3yi71.png" alt="The check failing on line 226 of components/sign-in.tsx in the pull request diff: a hardcoded string that isn't translated" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it got wrong on Pages CMS
&lt;/h2&gt;

&lt;p&gt;The run used 0.34.1 and took about eight and a half minutes. Here is what I found reading the diff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Email templates became client components.&lt;/strong&gt; The React Email templates render to HTML on the server, but the graph saw shared modules with no &lt;code&gt;await&lt;/code&gt; and gave them &lt;code&gt;'use client'&lt;/code&gt; and &lt;code&gt;useTranslation()&lt;/code&gt;. Nothing knows the recipient's language there. Since 0.34.4 the CLI lists React Email, jsx-email and mjml-react files with a note to use &lt;code&gt;i18n.getFixedT(lang)&lt;/code&gt;, and doesn't rewrite them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An icon ended up inside a button's message.&lt;/strong&gt; The "Install GitHub App" link starts with an &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; holding &lt;code&gt;&amp;lt;title&amp;gt;GitHub&amp;lt;/title&amp;gt;&lt;/code&gt;. Because the title has text, the scanner didn't treat the SVG as an icon, and its path data landed inside a &lt;code&gt;&amp;lt;Trans&amp;gt;&lt;/code&gt;. Now an &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; at either end of a message counts as an icon, title or not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product names got keys.&lt;/strong&gt; &lt;code&gt;alt="Pages CMS"&lt;/code&gt; and &lt;code&gt;&amp;lt;title&amp;gt;GitHub&amp;lt;/title&amp;gt;&lt;/code&gt; became &lt;code&gt;t()&lt;/code&gt; calls, translated to the same word in every language. Since 0.34.4 the CLI keeps labels that are only a well-known product name. Your own names go in &lt;code&gt;doNotTranslate&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It missed some zod messages&lt;/strong&gt;, in &lt;code&gt;ctx.addIssue({ message })&lt;/code&gt; and in &lt;code&gt;.refine()&lt;/code&gt; on a schema kept in a variable. It finds both now.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arabic plurals came back empty.&lt;/strong&gt; For plurals that never show the number ("Send invite" and "Send invites"), the model skipped the &lt;code&gt;two&lt;/code&gt;, &lt;code&gt;few&lt;/code&gt; and &lt;code&gt;many&lt;/code&gt; forms. Validation refused them, so nothing broken shipped, but they were missing. I filled in the six Arabic forms of that one button by hand. The prompt now asks for every form.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Code" came out as program code.&lt;/strong&gt; On the sign-in screen, Chinese got 代码 where it should say 验证码 (verification code). The prompt now asks for the sense that fits the screen. That lowers the odds of this mistake but doesn't rule it out.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I made two changes in the pull request by hand. The number and UUID field messages (&lt;code&gt;Minimum value is ${min}&lt;/code&gt;, "Invalid UUID format", "This field is required") are built inside zod schemas that get no &lt;code&gt;t&lt;/code&gt;, so I passed &lt;code&gt;t&lt;/code&gt; through &lt;code&gt;generateZodSchema&lt;/code&gt; and wired those four messages myself. That's the gap still open: the CLI neither rewrites nor reports validation messages built with template literals. The Arabic plural above is the other one.&lt;/p&gt;

&lt;p&gt;While writing this I also noticed that the English legal line came out as &lt;code&gt;…&amp;lt;/a2&amp;gt; .&lt;/code&gt;, with a space before the period, because the extractor kept a line break React drops. 0.34.5 fixed it. And a key shared across files takes its name from the first file that used it, which is why the 404 page's "Go home" is &lt;code&gt;admin.go_home_link&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not ask a coding agent?
&lt;/h2&gt;

&lt;p&gt;For ten strings in one component, I would. Across 73 files you need the same text to get the same key everywhere, no hooks in server components, all six Arabic plural forms with placeholders intact, and none of it depending on what fit in the agent's context. Here code does those parts: Babel decides what's text, a key registry handles reuse, &lt;code&gt;componentSides()&lt;/code&gt; decides where &lt;code&gt;t&lt;/code&gt; can go, and &lt;code&gt;translationProblem()&lt;/code&gt; decides what gets written. The model names keys and translates. &lt;code&gt;check&lt;/code&gt; then keeps CI honest with no model at all.&lt;/p&gt;

&lt;p&gt;You can also use both. localize.dev includes an MCP server with &lt;code&gt;localize&lt;/code&gt; and &lt;code&gt;check&lt;/code&gt; tools, and &lt;code&gt;npx localize-dev init --agent&lt;/code&gt; sets it up for Claude Code or Cursor with a rule to call it after editing UI text. The agent writes the feature, and localize.dev handles the new strings in the same session.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvgsnlbubga6649eny7eb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvgsnlbubga6649eny7eb.png" alt="Claude Code fixing the line that failed the check with the localize MCP tool: a key, the rewrite and the translations" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;npx localize-dev check&lt;/code&gt; needs no account and lists your hardcoded text by file and line. &lt;code&gt;npx localize-dev run --pseudo&lt;/code&gt; does the full rewrite into a pseudo-locale without a key, so you can read the diff first. Real translations need an API key from &lt;a href="https://uselocalize.dev/sign-up?utm_source=devto&amp;amp;utm_medium=crosspost" rel="noopener noreferrer"&gt;uselocalize.dev&lt;/a&gt;, and the prices are on the &lt;a href="https://uselocalize.dev/pricing?utm_source=devto&amp;amp;utm_medium=crosspost" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt;. Besides React and Next.js there are adapters for Vue, Svelte, Angular, Astro, Flutter, Swift, Android and server templates.&lt;/p&gt;

&lt;p&gt;The CLI is closed source under a proprietary license, the plugins are MIT, and the code it writes into your project is yours. Closed source is a real cost for a tool that edits your code, which is why this post tries to say exactly what it does. What you get is an ordinary pull request to read before you merge.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://uselocalize.dev/blog/what-localize-dev-got-wrong-on-a-real-app" rel="noopener noreferrer"&gt;localize.dev blog&lt;/a&gt;. Try the engine on your own code in the &lt;a href="https://uselocalize.dev/playground?utm_source=devto&amp;amp;utm_medium=crosspost" rel="noopener noreferrer"&gt;playground&lt;/a&gt;, no account needed.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>nextjs</category>
      <category>react</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
