11import { raw } from "@hono/hono/html" ;
22import type { HtmlEscapedString } from "@hono/hono/utils/html" ;
33import { unescapeKey } from "../common/unescapeKey.ts" ;
4- import { ensureLazyLocalyzedString } from "./ensureLazyLocalyzedString .ts" ;
4+ import { ensureLazyLocalizedString } from "./ensureLazyLocalizedString .ts" ;
55import { getLocalizationMap } from "./getLocalizationMap.ts" ;
6- import type { LazyLocalyzedString } from "./LazyLocalyzedString .ts" ;
7- import type { LocalyzedStringValue } from "./LocalyzedStringValue .ts" ;
6+ import type { LazyLocalizedString } from "./LazyLocalizedString .ts" ;
7+ import type { LocalizedStringValue } from "./LocalizedStringValue .ts" ;
88
99/**
1010 * Resolves a localized string based on the current localization map.
1111
1212 * @returns the localized string with placeholders filled in
1313 *
14- * Can be used as a template string tag or as a function with a LazyLocalyzedString .
14+ * Can be used as a template string tag or as a function with a LazyLocalizedString .
1515 *
1616 * Can only be called inside a functional component. To use this directly in route handlers,
1717 * use {@link asFC} to wrap the handler as a functional component.
@@ -24,9 +24,9 @@ import type { LocalyzedStringValue } from "./LocalyzedStringValue.ts";
2424 * const greeting = t`greeting.hello.${userName}`;
2525 * ```
2626 *
27- * @example Example with LazyLocalyzedString :
27+ * @example Example with LazyLocalizedString :
2828 * ```ts
29- * const lls: LazyLocalyzedString = {
29+ * const lls: LazyLocalizedString = {
3030 * localizationKey: "greeting.hello",
3131 * values: [userName],
3232 * };
@@ -47,14 +47,14 @@ import type { LocalyzedStringValue } from "./LocalyzedStringValue.ts";
4747 */
4848export function t (
4949 strings : TemplateStringsArray ,
50- ...values : LocalyzedStringValue [ ]
50+ ...values : LocalizedStringValue [ ]
5151) : string | HtmlEscapedString ;
5252export function t (
53- string : string | LazyLocalyzedString ,
53+ string : string | LazyLocalizedString ,
5454) : string | HtmlEscapedString ;
5555export function t (
56- string : TemplateStringsArray | LazyLocalyzedString | string ,
57- ...values : LocalyzedStringValue [ ]
56+ string : TemplateStringsArray | LazyLocalizedString | string ,
57+ ...values : LocalizedStringValue [ ]
5858) : string | HtmlEscapedString {
5959 if ( typeof string === "string" ) {
6060 // simple string, return as is
@@ -63,7 +63,7 @@ export function t(
6363 values : [ ] ,
6464 } ;
6565 }
66- const lls = ensureLazyLocalyzedString ( string , values ) ;
66+ const lls = ensureLazyLocalizedString ( string , values ) ;
6767 const localizationValues = getLocalizationMap ( ) ;
6868
6969 if ( ! ( lls . localizationKey in localizationValues ) ) {
0 commit comments