Skip to content

Commit

Permalink
Merge pull request #113 from jamalsoueidan/add-comment
Browse files Browse the repository at this point in the history
Fix translate SSR namespaces
  • Loading branch information
jamalsoueidan authored Jun 22, 2024
2 parents 847d314 + 85d0c25 commit 514da8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export default async function handleRequest(
],
});

const namespaces = extractNamespaces(
context.routeModules as EntryContext['routeModules'],
);
const namespaces = extractNamespaces(remixContext.routeModules);

await initI18nServer(
context.storefront.i18n.language.toLowerCase(),
Expand Down
1 change: 1 addition & 0 deletions app/i18n/extractNamespaces.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {type UNSAFE_RouteModules} from '@remix-run/react';
import {type EntryContext} from '@remix-run/server-runtime';

//https://github.com/sergiodxa/remix-i18next/blob/main/src/client.ts
export function extractNamespaces(
routeModules: UNSAFE_RouteModules | EntryContext['routeModules'],
): string[] {
Expand Down

0 comments on commit 514da8c

Please sign in to comment.