diff --git a/cookbook/llms/markets.prompt.md b/cookbook/llms/markets.prompt.md index 4821a3b07e..00f558548d 100644 --- a/cookbook/llms/markets.prompt.md +++ b/cookbook/llms/markets.prompt.md @@ -182,7 +182,7 @@ Create a new `CountrySelector` component that allows users to select the locale To handle redirects, use a `Form` that updates the cart buyer identity, which eventually redirects to the localized root of the app. -##### File: [CountrySelector.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/CountrySelector.tsx) +##### File: [CountrySelector.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/CountrySelector.tsx) ~~~tsx import {Form, useLocation} from 'react-router'; @@ -278,7 +278,7 @@ This component automatically: - Cleans invalid locale prefixes from menu URLs - Enables locale switching while preserving paths -##### File: [Link.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/Link.tsx) +##### File: [Link.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/Link.tsx) ~~~tsx import type {LinkProps, NavLinkProps} from 'react-router'; @@ -356,7 +356,7 @@ Create a centralized i18n module that includes: 6. Locale validation utilities for route params 7. Support for case-insensitive locale matching -##### File: [i18n.ts](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/i18n.ts) +##### File: [i18n.ts](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/i18n.ts) ~~~ts import {useMatches, useLocation} from 'react-router'; @@ -586,7 +586,7 @@ allowlist if your store relies on them. Call it in each route's loader, so the sanitized HTML is what reaches the browser in both the server render and client-side navigations. -##### File: [sanitizeHtml.ts](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/sanitizeHtml.ts) +##### File: [sanitizeHtml.ts](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/sanitizeHtml.ts) ~~~ts /** @@ -1518,7 +1518,7 @@ For brevity, we'll focus on the home page, the cart page, and the product page i > [!NOTE] > Rename `app/routes/_index.tsx` to `app/routes/($locale)._index.tsx`. -##### File: [($locale)._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale)._index.tsx) +##### File: [($locale)._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale)._index.tsx) ~~~tsx import {Await, useLoaderData} from 'react-router'; @@ -1699,7 +1699,7 @@ Add the dynamic segment to the cart page route. > [!NOTE] > Rename `app/routes/cart.tsx` to `app/routes/($locale).cart.tsx`. -##### File: [($locale).cart.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).cart.tsx) +##### File: [($locale).cart.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).cart.tsx) ~~~tsx import { @@ -1832,7 +1832,7 @@ localized prefix. > [!NOTE] > Rename `app/routes/products.$handle.tsx` to `app/routes/($locale).products.$handle.tsx`. -##### File: [($locale).products.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).products.$handle.tsx) +##### File: [($locale).products.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).products.$handle.tsx) ~~~tsx import {useLoaderData} from 'react-router'; @@ -2097,7 +2097,7 @@ Add a utility route in `$(locale).tsx` that will use `localeMatchesPrefix` to validate the locale from the URL params. If the locale is invalid, the route will throw a 404 error. -##### File: [($locale).tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).tsx) +##### File: [($locale).tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).tsx) ~~~tsx import type {Route} from './+types/($locale)'; @@ -2117,7 +2117,7 @@ export async function loader({params}: Route.LoaderArgs) { Add a fallback route for unauthenticated account pages with locale support. -##### File: [($locale).account.$.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.$.tsx) +##### File: [($locale).account.$.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.$.tsx) ~~~tsx import {redirect} from 'react-router'; @@ -2136,7 +2136,7 @@ export async function loader({context}: Route.LoaderArgs) { Add a localized account dashboard redirect route. -##### File: [($locale).account._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account._index.tsx) +##### File: [($locale).account._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account._index.tsx) ~~~tsx import {redirect} from 'react-router'; @@ -2151,7 +2151,7 @@ export async function loader() { Add a customer address management page with locale-aware forms and links. -##### File: [($locale).account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.addresses.tsx) +##### File: [($locale).account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.addresses.tsx) ~~~tsx import type {CustomerAddressInput} from '@shopify/hydrogen/customer-account-api-types'; @@ -2677,7 +2677,7 @@ export function AddressForm({ Add an individual order details page with localized currency and date formatting. -##### File: [($locale).account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders.$id.tsx) +##### File: [($locale).account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders.$id.tsx) ~~~tsx import {redirect, useLoaderData} from 'react-router'; @@ -2909,7 +2909,7 @@ function OrderLineRow({lineItem}: {lineItem: OrderLineItemFullFragment}) { Implement customer order history listing with locale-specific pagination. -##### File: [($locale).account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders._index.tsx) +##### File: [($locale).account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders._index.tsx) ~~~tsx import { @@ -3141,7 +3141,7 @@ function OrderItem({order}: {order: OrderItemFragment}) { Add a customer profile editing form with localized field labels. -##### File: [($locale).account.profile.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.profile.tsx) +##### File: [($locale).account.profile.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.profile.tsx) ~~~tsx import type {CustomerFragment} from 'customer-accountapi.generated'; @@ -3284,7 +3284,7 @@ export default function AccountProfile() { Add an account layout wrapper with locale-aware navigation tabs. -##### File: [($locale).account.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.tsx) +##### File: [($locale).account.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.tsx) ~~~tsx import { @@ -3394,7 +3394,7 @@ function Logout() { Add an OAuth authorization callback route with locale preservation. -##### File: [($locale).account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.authorize.tsx) +##### File: [($locale).account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.authorize.tsx) ~~~tsx import type {Route} from './+types/($locale).account_.authorize'; @@ -3409,7 +3409,7 @@ export async function loader({context}: Route.LoaderArgs) { Add a customer login redirect with a locale-specific return URL. -##### File: [($locale).account_.login.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.login.tsx) +##### File: [($locale).account_.login.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.login.tsx) ~~~tsx import type {Route} from './+types/($locale).account_.login'; @@ -3436,7 +3436,7 @@ export async function loader({request, context}: Route.LoaderArgs) { Add a logout handler that maintains locale after the user signs out. -##### File: [($locale).account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.logout.tsx) +##### File: [($locale).account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.logout.tsx) ~~~tsx import {redirect} from 'react-router'; @@ -3458,7 +3458,7 @@ export async function action({context}: Route.ActionArgs) { Add a blog article page with locale-specific content and SEO metadata. Sanitize the article's `contentHtml` with `sanitizeHtml()` in the loader. -##### File: [($locale).blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx) +##### File: [($locale).blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx) ~~~tsx import {useLoaderData} from 'react-router'; @@ -3602,7 +3602,7 @@ const ARTICLE_QUERY = `#graphql Add a blog listing page with localized article previews and pagination. -##### File: [($locale).blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle._index.tsx) +##### File: [($locale).blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle._index.tsx) ~~~tsx import { @@ -3794,7 +3794,7 @@ const BLOGS_QUERY = `#graphql Add an overview page for all blogs with locale-aware navigation links. -##### File: [($locale).blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs._index.tsx) +##### File: [($locale).blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs._index.tsx) ~~~tsx import {useLoaderData} from 'react-router'; @@ -3914,7 +3914,7 @@ const BLOGS_QUERY = `#graphql Add a collection page displaying products with locale-specific pricing and availability. -##### File: [($locale).collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.$handle.tsx) +##### File: [($locale).collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.$handle.tsx) ~~~tsx import {redirect, useLoaderData} from 'react-router'; @@ -4085,7 +4085,7 @@ const COLLECTION_QUERY = `#graphql Add a collections listing page with localized collection names and images. -##### File: [($locale).collections._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections._index.tsx) +##### File: [($locale).collections._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections._index.tsx) ~~~tsx import {useLoaderData} from 'react-router'; @@ -4229,7 +4229,7 @@ const COLLECTIONS_QUERY = `#graphql Add an "All products" page with locale-based filtering and sorting. -##### File: [($locale).collections.all.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.all.tsx) +##### File: [($locale).collections.all.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.all.tsx) ~~~tsx import type {Route} from './+types/($locale).collections.all'; @@ -4364,7 +4364,7 @@ const CATALOG_QUERY = `#graphql Add a dynamic page route for locale-specific content pages. Sanitize the page `body` with `sanitizeHtml()` in the loader. -##### File: [($locale).pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).pages.$handle.tsx) +##### File: [($locale).pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).pages.$handle.tsx) ~~~tsx import {useLoaderData} from 'react-router'; @@ -4465,7 +4465,7 @@ const PAGE_QUERY = `#graphql Add a policy page (privacy, terms, etc.) with locale-specific legal content. Sanitize the policy `body` with `sanitizeHtml()` in the loader. -##### File: [($locale).policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies.$handle.tsx) +##### File: [($locale).policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies.$handle.tsx) ~~~tsx import {useLoaderData} from 'react-router'; @@ -4571,7 +4571,7 @@ const POLICY_CONTENT_QUERY = `#graphql Add a policies index page that lists all available store policies. -##### File: [($locale).policies._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies._index.tsx) +##### File: [($locale).policies._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies._index.tsx) ~~~tsx import {useLoaderData} from 'react-router'; @@ -4651,7 +4651,7 @@ const POLICIES_QUERY = `#graphql Add a search results page with locale-aware product matching and predictive search. -##### File: [($locale).search.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).search.tsx) +##### File: [($locale).search.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).search.tsx) ~~~tsx import { diff --git a/cookbook/recipes/markets/README.md b/cookbook/recipes/markets/README.md index a6ee054a90..8bf57d7a4d 100644 --- a/cookbook/recipes/markets/README.md +++ b/cookbook/recipes/markets/README.md @@ -57,34 +57,34 @@ _New files added to the template by this recipe._ | File | Description | | --- | --- | -| [app/components/CountrySelector.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/CountrySelector.tsx) | A component that displays a country selector inside the Header. | -| [app/components/Link.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/Link.tsx) | A unified locale-aware Link component that handles both regular links and navigation links with active states. Automatically prepends locale prefixes and cleans menu URLs. | -| [app/lib/i18n.ts](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/i18n.ts) | Comprehensive i18n utilities including locale detection, path transformation hooks, URL cleaning functions, and locale validation. Centralizes all localization logic in one place. | -| [app/lib/sanitizeHtml.ts](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/sanitizeHtml.ts) | An allowlist HTML sanitizer for merchant-managed rich text (page bodies, article content, policies and product descriptions) before it is rendered with dangerouslySetInnerHTML. | -| [app/routes/($locale)._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale)._index.tsx) | A route that renders a localized version of the home page. | -| [app/routes/($locale).account.$.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.$.tsx) | Fallback route for unauthenticated account pages with locale support | -| [app/routes/($locale).account._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account._index.tsx) | Localized account dashboard redirect route | -| [app/routes/($locale).account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.addresses.tsx) | Customer address management page with locale-aware forms and links | -| [app/routes/($locale).account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders.$id.tsx) | Individual order details page with localized currency and date formatting | -| [app/routes/($locale).account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders._index.tsx) | Customer order history listing with locale-specific pagination | -| [app/routes/($locale).account.profile.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.profile.tsx) | Customer profile editing form with localized field labels | -| [app/routes/($locale).account.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.tsx) | Account layout wrapper with locale-aware navigation tabs | -| [app/routes/($locale).account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.authorize.tsx) | OAuth authorization callback route with locale preservation | -| [app/routes/($locale).account_.login.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.login.tsx) | Customer login redirect with locale-specific return URL | -| [app/routes/($locale).account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.logout.tsx) | Logout handler that maintains locale after sign out | -| [app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx) | Blog article page with locale-specific content and SEO metadata | -| [app/routes/($locale).blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle._index.tsx) | Blog listing page with localized article previews and pagination | -| [app/routes/($locale).blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs._index.tsx) | All blogs overview page with locale-aware navigation links | -| [app/routes/($locale).cart.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).cart.tsx) | A localized cart route. | -| [app/routes/($locale).collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.$handle.tsx) | Collection page displaying products with locale-specific pricing and availability | -| [app/routes/($locale).collections._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections._index.tsx) | Collections listing page with localized collection names and images | -| [app/routes/($locale).collections.all.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.all.tsx) | All products page with locale-based filtering and sorting | -| [app/routes/($locale).pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).pages.$handle.tsx) | Dynamic page route for locale-specific content pages | -| [app/routes/($locale).policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies.$handle.tsx) | Policy page (privacy, terms, etc.) with locale-specific legal content | -| [app/routes/($locale).policies._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies._index.tsx) | Policies index page listing all available store policies | -| [app/routes/($locale).products.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).products.$handle.tsx) | A route that renders a localized version of the product page. | -| [app/routes/($locale).search.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).search.tsx) | Search results page with locale-aware product matching and predictive search | -| [app/routes/($locale).tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).tsx) | A utility route that makes sure the locale is valid. | +| [app/components/CountrySelector.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/CountrySelector.tsx) | A component that displays a country selector inside the Header. | +| [app/components/Link.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/Link.tsx) | A unified locale-aware Link component that handles both regular links and navigation links with active states. Automatically prepends locale prefixes and cleans menu URLs. | +| [app/lib/i18n.ts](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/i18n.ts) | Comprehensive i18n utilities including locale detection, path transformation hooks, URL cleaning functions, and locale validation. Centralizes all localization logic in one place. | +| [app/lib/sanitizeHtml.ts](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/sanitizeHtml.ts) | An allowlist HTML sanitizer for merchant-managed rich text (page bodies, article content, policies and product descriptions) before it is rendered with dangerouslySetInnerHTML. | +| [app/routes/($locale)._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale)._index.tsx) | A route that renders a localized version of the home page. | +| [app/routes/($locale).account.$.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.$.tsx) | Fallback route for unauthenticated account pages with locale support | +| [app/routes/($locale).account._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account._index.tsx) | Localized account dashboard redirect route | +| [app/routes/($locale).account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.addresses.tsx) | Customer address management page with locale-aware forms and links | +| [app/routes/($locale).account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders.$id.tsx) | Individual order details page with localized currency and date formatting | +| [app/routes/($locale).account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders._index.tsx) | Customer order history listing with locale-specific pagination | +| [app/routes/($locale).account.profile.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.profile.tsx) | Customer profile editing form with localized field labels | +| [app/routes/($locale).account.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.tsx) | Account layout wrapper with locale-aware navigation tabs | +| [app/routes/($locale).account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.authorize.tsx) | OAuth authorization callback route with locale preservation | +| [app/routes/($locale).account_.login.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.login.tsx) | Customer login redirect with locale-specific return URL | +| [app/routes/($locale).account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.logout.tsx) | Logout handler that maintains locale after sign out | +| [app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx) | Blog article page with locale-specific content and SEO metadata | +| [app/routes/($locale).blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle._index.tsx) | Blog listing page with localized article previews and pagination | +| [app/routes/($locale).blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs._index.tsx) | All blogs overview page with locale-aware navigation links | +| [app/routes/($locale).cart.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).cart.tsx) | A localized cart route. | +| [app/routes/($locale).collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.$handle.tsx) | Collection page displaying products with locale-specific pricing and availability | +| [app/routes/($locale).collections._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections._index.tsx) | Collections listing page with localized collection names and images | +| [app/routes/($locale).collections.all.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.all.tsx) | All products page with locale-based filtering and sorting | +| [app/routes/($locale).pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).pages.$handle.tsx) | Dynamic page route for locale-specific content pages | +| [app/routes/($locale).policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies.$handle.tsx) | Policy page (privacy, terms, etc.) with locale-specific legal content | +| [app/routes/($locale).policies._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies._index.tsx) | Policies index page listing all available store policies | +| [app/routes/($locale).products.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).products.$handle.tsx) | A route that renders a localized version of the product page. | +| [app/routes/($locale).search.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).search.tsx) | Search results page with locale-aware product matching and predictive search | +| [app/routes/($locale).tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).tsx) | A utility route that makes sure the locale is valid. | ## Steps @@ -96,7 +96,7 @@ In this section, we'll create utilities to handle localization and country selec Update cart line items to use the unified Link component for product links. -##### File: [app/components/CartLineItem.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/components/CartLineItem.tsx) +##### File: [app/components/CartLineItem.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/components/CartLineItem.tsx) ~~~diff index 63a0ecd9d..47da6dfa0 100644 @@ -117,7 +117,7 @@ index 63a0ecd9d..47da6dfa0 100644 Update the AddToCartButton component to post to the localized cart route (e.g., /FR-CA/cart instead of /cart) so the cart is created with the correct market context and currency. -##### File: [app/components/AddToCartButton.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/components/AddToCartButton.tsx) +##### File: [app/components/AddToCartButton.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/components/AddToCartButton.tsx) ~~~diff index 6e553f9f6..a8aefc7d8 100644 @@ -150,7 +150,7 @@ Create a new `CountrySelector` component that allows users to select the locale To handle redirects, use a `Form` that updates the cart buyer identity, which eventually redirects to the localized root of the app. -##### File: [CountrySelector.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/CountrySelector.tsx) +##### File: [CountrySelector.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/CountrySelector.tsx)
@@ -250,7 +250,7 @@ This component automatically: - Cleans invalid locale prefixes from menu URLs - Enables locale switching while preserving paths -##### File: [Link.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/Link.tsx) +##### File: [Link.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/components/Link.tsx)
@@ -332,7 +332,7 @@ Create a centralized i18n module that includes: 6. Locale validation utilities for route params 7. Support for case-insensitive locale matching -##### File: [i18n.ts](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/i18n.ts) +##### File: [i18n.ts](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/i18n.ts)
@@ -566,7 +566,7 @@ allowlist if your store relies on them. Call it in each route's loader, so the sanitized HTML is what reaches the browser in both the server render and client-side navigations. -##### File: [sanitizeHtml.ts](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/sanitizeHtml.ts) +##### File: [sanitizeHtml.ts](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/lib/sanitizeHtml.ts)
@@ -1285,7 +1285,7 @@ function escapeAttributeValue(value: string): string { Replace standard react-router Link imports with the new unified Link component. This ensures all product links automatically include the correct locale prefix. -##### File: [app/components/ProductItem.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/components/ProductItem.tsx) +##### File: [app/components/ProductItem.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/components/ProductItem.tsx) ~~~diff index 3b0f69133..81ff9ec9f 100644 @@ -1310,7 +1310,7 @@ index 3b0f69133..81ff9ec9f 100644 Detect the locale from the URL path, and add it to the HydrogenContext. -##### File: [app/lib/context.ts](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/lib/context.ts) +##### File: [app/lib/context.ts](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/lib/context.ts) ~~~diff index 692d5ae17..7373ebca2 100644 @@ -1352,7 +1352,7 @@ index 692d5ae17..7373ebca2 100644 Menu URLs are automatically cleaned of invalid locale prefixes. -##### File: [app/components/Header.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/components/Header.tsx) +##### File: [app/components/Header.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/components/Header.tsx)
@@ -1454,7 +1454,7 @@ index 045a75925..8da92cdef 100644 3. Add a key prop to the `PageLayout` component to make sure it re-renders when the locale changes. -##### File: [app/root.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/root.tsx) +##### File: [app/root.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/root.tsx) ~~~diff index df87425c5..97ca81746 100644 @@ -1490,7 +1490,7 @@ In this section, we'll add localization to the individual routes using the langu Replace all Link imports to use the unified locale-aware `Link` component for consistent navigation. -##### File: [app/components/CartMain.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/components/CartMain.tsx) +##### File: [app/components/CartMain.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/components/CartMain.tsx) ~~~diff index f70b74760..39c4c4731 100644 @@ -1521,7 +1521,7 @@ For brevity, we'll focus on the home page, the cart page, and the product page i > [!NOTE] > Rename `app/routes/_index.tsx` to `app/routes/($locale)._index.tsx`. -##### File: [($locale)._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale)._index.tsx) +##### File: [($locale)._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale)._index.tsx)
@@ -1706,7 +1706,7 @@ Add the dynamic segment to the cart page route. > [!NOTE] > Rename `app/routes/cart.tsx` to `app/routes/($locale).cart.tsx`. -##### File: [($locale).cart.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).cart.tsx) +##### File: [($locale).cart.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).cart.tsx)
@@ -1843,7 +1843,7 @@ localized prefix. > [!NOTE] > Rename `app/routes/products.$handle.tsx` to `app/routes/($locale).products.$handle.tsx`. -##### File: [($locale).products.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).products.$handle.tsx) +##### File: [($locale).products.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).products.$handle.tsx)
@@ -2112,7 +2112,7 @@ Add a utility route in `$(locale).tsx` that will use `localeMatchesPrefix` to validate the locale from the URL params. If the locale is invalid, the route will throw a 404 error. -##### File: [($locale).tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).tsx) +##### File: [($locale).tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).tsx)
@@ -2136,7 +2136,7 @@ export async function loader({params}: Route.LoaderArgs) { Add a fallback route for unauthenticated account pages with locale support. -##### File: [($locale).account.$.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.$.tsx) +##### File: [($locale).account.$.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.$.tsx)
@@ -2159,7 +2159,7 @@ export async function loader({context}: Route.LoaderArgs) { Add a localized account dashboard redirect route. -##### File: [($locale).account._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account._index.tsx) +##### File: [($locale).account._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account._index.tsx)
@@ -2178,7 +2178,7 @@ export async function loader() { Add a customer address management page with locale-aware forms and links. -##### File: [($locale).account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.addresses.tsx) +##### File: [($locale).account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.addresses.tsx)
@@ -2708,7 +2708,7 @@ export function AddressForm({ Add an individual order details page with localized currency and date formatting. -##### File: [($locale).account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders.$id.tsx) +##### File: [($locale).account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders.$id.tsx)
@@ -2944,7 +2944,7 @@ function OrderLineRow({lineItem}: {lineItem: OrderLineItemFullFragment}) { Implement customer order history listing with locale-specific pagination. -##### File: [($locale).account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders._index.tsx) +##### File: [($locale).account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.orders._index.tsx)
@@ -3180,7 +3180,7 @@ function OrderItem({order}: {order: OrderItemFragment}) { Add a customer profile editing form with localized field labels. -##### File: [($locale).account.profile.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.profile.tsx) +##### File: [($locale).account.profile.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.profile.tsx)
@@ -3327,7 +3327,7 @@ export default function AccountProfile() { Add an account layout wrapper with locale-aware navigation tabs. -##### File: [($locale).account.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.tsx) +##### File: [($locale).account.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account.tsx)
@@ -3441,7 +3441,7 @@ function Logout() { Add an OAuth authorization callback route with locale preservation. -##### File: [($locale).account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.authorize.tsx) +##### File: [($locale).account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.authorize.tsx)
@@ -3460,7 +3460,7 @@ export async function loader({context}: Route.LoaderArgs) { Add a customer login redirect with a locale-specific return URL. -##### File: [($locale).account_.login.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.login.tsx) +##### File: [($locale).account_.login.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.login.tsx)
@@ -3491,7 +3491,7 @@ export async function loader({request, context}: Route.LoaderArgs) { Add a logout handler that maintains locale after the user signs out. -##### File: [($locale).account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.logout.tsx) +##### File: [($locale).account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).account_.logout.tsx)
@@ -3517,7 +3517,7 @@ export async function action({context}: Route.ActionArgs) { Add a blog article page with locale-specific content and SEO metadata. Sanitize the article's `contentHtml` with `sanitizeHtml()` in the loader. -##### File: [($locale).blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx) +##### File: [($locale).blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle.$articleHandle.tsx)
@@ -3665,7 +3665,7 @@ const ARTICLE_QUERY = `#graphql Add a blog listing page with localized article previews and pagination. -##### File: [($locale).blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle._index.tsx) +##### File: [($locale).blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs.$blogHandle._index.tsx)
@@ -3861,7 +3861,7 @@ const BLOGS_QUERY = `#graphql Add an overview page for all blogs with locale-aware navigation links. -##### File: [($locale).blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs._index.tsx) +##### File: [($locale).blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).blogs._index.tsx)
@@ -3985,7 +3985,7 @@ const BLOGS_QUERY = `#graphql Add a collection page displaying products with locale-specific pricing and availability. -##### File: [($locale).collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.$handle.tsx) +##### File: [($locale).collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.$handle.tsx)
@@ -4160,7 +4160,7 @@ const COLLECTION_QUERY = `#graphql Add a collections listing page with localized collection names and images. -##### File: [($locale).collections._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections._index.tsx) +##### File: [($locale).collections._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections._index.tsx)
@@ -4308,7 +4308,7 @@ const COLLECTIONS_QUERY = `#graphql Add an "All products" page with locale-based filtering and sorting. -##### File: [($locale).collections.all.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.all.tsx) +##### File: [($locale).collections.all.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).collections.all.tsx)
@@ -4447,7 +4447,7 @@ const CATALOG_QUERY = `#graphql Add a dynamic page route for locale-specific content pages. Sanitize the page `body` with `sanitizeHtml()` in the loader. -##### File: [($locale).pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).pages.$handle.tsx) +##### File: [($locale).pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).pages.$handle.tsx)
@@ -4552,7 +4552,7 @@ const PAGE_QUERY = `#graphql Add a policy page (privacy, terms, etc.) with locale-specific legal content. Sanitize the policy `body` with `sanitizeHtml()` in the loader. -##### File: [($locale).policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies.$handle.tsx) +##### File: [($locale).policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies.$handle.tsx)
@@ -4662,7 +4662,7 @@ const POLICY_CONTENT_QUERY = `#graphql Add a policies index page that lists all available store policies. -##### File: [($locale).policies._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies._index.tsx) +##### File: [($locale).policies._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).policies._index.tsx)
@@ -4746,7 +4746,7 @@ const POLICIES_QUERY = `#graphql Add a search results page with locale-aware product matching and predictive search. -##### File: [($locale).search.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).search.tsx) +##### File: [($locale).search.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/cookbook/recipes/markets/ingredients/templates/skeleton/app/routes/($locale).search.tsx)
@@ -5178,26 +5178,26 @@ async function predictiveSearch({ ## Deleted Files -- [templates/skeleton/app/routes/account.$.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account.$.tsx) -- [templates/skeleton/app/routes/account._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account._index.tsx) -- [templates/skeleton/app/routes/account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account.addresses.tsx) -- [templates/skeleton/app/routes/account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account.orders.$id.tsx) -- [templates/skeleton/app/routes/account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account.orders._index.tsx) -- [templates/skeleton/app/routes/account.profile.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account.profile.tsx) -- [templates/skeleton/app/routes/account.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account.tsx) -- [templates/skeleton/app/routes/account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account_.authorize.tsx) -- [templates/skeleton/app/routes/account_.login.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account_.login.tsx) -- [templates/skeleton/app/routes/account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/account_.logout.tsx) -- [templates/skeleton/app/routes/blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/blogs.$blogHandle.$articleHandle.tsx) -- [templates/skeleton/app/routes/blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/blogs.$blogHandle._index.tsx) -- [templates/skeleton/app/routes/blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/blogs._index.tsx) -- [templates/skeleton/app/routes/collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/collections.$handle.tsx) -- [templates/skeleton/app/routes/collections._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/collections._index.tsx) -- [templates/skeleton/app/routes/collections.all.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/collections.all.tsx) -- [templates/skeleton/app/routes/pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/pages.$handle.tsx) -- [templates/skeleton/app/routes/policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/policies.$handle.tsx) -- [templates/skeleton/app/routes/policies._index.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/policies._index.tsx) -- [templates/skeleton/app/routes/search.tsx](https://github.com/Shopify/hydrogen/blob/68f62c423b5382cb6a98a4f0000d656bf98b9c13/templates/skeleton/app/routes/search.tsx) +- [templates/skeleton/app/routes/account.$.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account.$.tsx) +- [templates/skeleton/app/routes/account._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account._index.tsx) +- [templates/skeleton/app/routes/account.addresses.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account.addresses.tsx) +- [templates/skeleton/app/routes/account.orders.$id.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account.orders.$id.tsx) +- [templates/skeleton/app/routes/account.orders._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account.orders._index.tsx) +- [templates/skeleton/app/routes/account.profile.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account.profile.tsx) +- [templates/skeleton/app/routes/account.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account.tsx) +- [templates/skeleton/app/routes/account_.authorize.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account_.authorize.tsx) +- [templates/skeleton/app/routes/account_.login.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account_.login.tsx) +- [templates/skeleton/app/routes/account_.logout.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/account_.logout.tsx) +- [templates/skeleton/app/routes/blogs.$blogHandle.$articleHandle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/blogs.$blogHandle.$articleHandle.tsx) +- [templates/skeleton/app/routes/blogs.$blogHandle._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/blogs.$blogHandle._index.tsx) +- [templates/skeleton/app/routes/blogs._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/blogs._index.tsx) +- [templates/skeleton/app/routes/collections.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/collections.$handle.tsx) +- [templates/skeleton/app/routes/collections._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/collections._index.tsx) +- [templates/skeleton/app/routes/collections.all.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/collections.all.tsx) +- [templates/skeleton/app/routes/pages.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/pages.$handle.tsx) +- [templates/skeleton/app/routes/policies.$handle.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/policies.$handle.tsx) +- [templates/skeleton/app/routes/policies._index.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/policies._index.tsx) +- [templates/skeleton/app/routes/search.tsx](https://github.com/Shopify/hydrogen/blob/085d418bbd40a8876625a97cd8204a8da666122b/templates/skeleton/app/routes/search.tsx) ## Next steps diff --git a/cookbook/recipes/markets/recipe.yaml b/cookbook/recipes/markets/recipe.yaml index 4673647cc1..45763443de 100644 --- a/cookbook/recipes/markets/recipe.yaml +++ b/cookbook/recipes/markets/recipe.yaml @@ -468,4 +468,4 @@ llms: solution: Make sure you update *all* routes that need localization (not only the routes for the home page, the cart page, and the product page). See step 2.1 for details. -commit: 68f62c423b5382cb6a98a4f0000d656bf98b9c13 +commit: 085d418bbd40a8876625a97cd8204a8da666122b