Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Oct 26, 2024
1 parent 18a1111 commit 7612413
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elsoul/fresh-i18n",
"version": "0.8.0",
"version": "0.9.0",
"description": "A simple and flexible internationalization (i18n) plugin for Deno's Fresh framework.",
"runtimes": ["deno", "browser"],
"exports": "./mod.ts",
Expand Down
6 changes: 5 additions & 1 deletion src/i18nPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// i18nPlugin.ts

import { join } from '@std/path'
import { pathname, translationData } from '@/src/store.ts'
import type { MiddlewareFn } from '@/src/types.ts'
Expand Down Expand Up @@ -79,8 +81,10 @@ export const i18nPlugin = (
}
}

// Load the common namespace and additional namespaces based on the URL path.
// Load the common and metadata namespace and additional namespaces based on the URL path.
await loadTranslation('common')
await loadTranslation('metadata')

for (
const segment of pathSegments.slice(lang === pathSegments[0] ? 1 : 0)
) {
Expand Down
2 changes: 0 additions & 2 deletions src/useTranslation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// useTranslation.ts

import { translationData } from '@/src/store.ts'

/**
Expand Down

0 comments on commit 7612413

Please sign in to comment.