Repository navigation
docs(tanstack): fix errors in the TanStack Start guide - #534
Merged
Merged
Conversation
Every locale had two steps sharing a number (7 in en, de, es, fr and zh; 9 or 12 in the others), so the later steps were off by one. Steps now run 1 to 18 in all 18 locales, and the FAQ references to step numbers point at the same steps as before.
The hook used LOCALE_ROUTE without importing it, so the snippet did not compile. It also spread the remaining navigate options (search, hash, replace...) into params, where TanStack Router ignores them. Options are now passed through, and caller params are merged with the locale, as in the TanStack Start template. The file is renamed to useLocalizedNavigate.ts to match the architecture tree, since it contains no JSX.
The home page imported LocaleSwitcher as a default export, but the locale switcher step only defines a named export.
The app dictionary declares title under meta, but the home page and the three metadata examples read content.title, which does not exist. They now read meta.title, as the TanStack Start template does.
The content declaration note said contentDir defaults to ./app. The default is ['.'] (CONTENT_DIR in packages/@intlayer/config/src/defaultValues/content.ts), as the configuration reference also states.
aymericzip
approved these changes
Nov 1, 2026
|
|
||
| > يمكن تعريف إعلانات المحتوى الخاصة بك في أي مكان في تطبيقك بمجرد تضمينها في دليل `contentDir` (افتراضيًا، `./app`). وتطابق امتداد ملف إعلان المحتوى (افتراضيًا، `.content.{json,ts,tsx,js,jsx,mjs,cjs,md,mdx,yaml,yml}`). | ||
| > يمكن تعريف إعلانات المحتوى الخاصة بك في أي مكان في تطبيقك بمجرد تضمينها في دليل `contentDir` (افتراضيًا، `['.']`). وتطابق امتداد ملف إعلان المحتوى (افتراضيًا، `.content.{json,ts,tsx,js,jsx,mjs,cjs,md,mdx,yaml,yml}`). | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes five errors in the TanStack Start guide (
docs/docs/*/intlayer_with_tanstack.md), one commit each, applied to all 18 locales. Three of them stop the guide's code from compiling.Changes
useLocalizedNavigateusedLOCALE_ROUTEwithout importing it, and spread navigate options such assearchandreplaceintoparams, where they were lost. Both now match the template's hook. The file is renamed to.ts, as in the architecture tree.LocaleSwitcheras a default export, but the component only has a named export.content.title, but the dictionary declares it asmeta.title.contentDirdefault is['.'], not./app(seepackages/@intlayer/config/src/defaultValues/content.ts).The changed code blocks are the same in every locale, so I didn't use the translate script. The only translated text that changes is the
./appvalue.updatedAtis bumped in each file.Testing
intlayer buildandtsc --noEmit: 7 errors with the guide onmain, 0 with this branch. Theparamsfix in item 2 sits behind anas anycast, so I checked it against the template's hook instead.docstests pass exceptmarkdownFormatting.test.ts, which fails onmaintoo, with the same 9 files. None of them is a TanStack guide.Not included
getRequestHeaderswithout using it, and a comment there mentionsgetIntlayerAsyncwhile the code callsgetIntlayer.intlayer_with_vite+react.md, still give the old./srcdefault forcontentDir.I can send these in a separate PR.