-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a2ce4a
commit e3cab7e
Showing
7 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@elsoul/fresh-i18n", | ||
"version": "0.9.7", | ||
"version": "0.9.8", | ||
"description": "A simple and flexible internationalization (i18n) plugin for Deno's Fresh framework.", | ||
"runtimes": ["deno", "browser"], | ||
"exports": "./mod.ts", | ||
|
@@ -12,6 +12,7 @@ | |
"imports": { | ||
"@/": "./", | ||
"fresh": "jsr:@fresh/[email protected]", | ||
"fresh-atom": "jsr:@elsoul/[email protected]", | ||
"preact": "npm:[email protected]", | ||
"preact/hooks": "npm:[email protected]/hooks", | ||
"@preact/signals": "npm:@preact/[email protected]", | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
import { signal } from '@preact/signals' | ||
import { atom } from 'fresh-atom' | ||
|
||
/** | ||
* Signal to hold translation data globally across the app. | ||
* Updated by the i18n plugin during SSR and accessible on the client-side. | ||
*/ | ||
export const translationData = signal<Record<string, Record<string, string>>>( | ||
{}, | ||
) | ||
export const translationData = atom<Record<string, Record<string, string>>>({}) | ||
|
||
/** | ||
* Signal to hold the pathname without language prefix. | ||
* Set by the i18n plugin during SSR and accessible on the client-side. | ||
*/ | ||
export const pathname = signal<string>('') | ||
export const pathname = atom<string>('') | ||
|
||
/** | ||
* Signal to hold the current locale across the app. | ||
* This should be updated by the plugin during SSR and by the user for client-side changes. | ||
*/ | ||
export const currentLocale = signal<string>('') // Added currentLocale signal | ||
export const currentLocale = atom<string>('') |
This file contains 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
This file contains 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
This file contains 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