@akanjs/next 0.0.142 → 0.0.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,6 +128,9 @@ const makePageProto = (locales) => {
128
128
  const key = `${model}.qargdesc-${queryKey}-${arg}`;
129
129
  return l(key);
130
130
  };
131
+ l.trans = (translation) => {
132
+ return translation[lang] ?? "unknown translation";
133
+ };
131
134
  return { path, l, lang };
132
135
  };
133
136
  };
@@ -106,6 +106,9 @@ const makePageProto = (locales) => {
106
106
  const key = `${model}.qargdesc-${queryKey}-${arg}`;
107
107
  return l(key);
108
108
  };
109
+ l.trans = (translation) => {
110
+ return translation[lang] ?? "unknown translation";
111
+ };
109
112
  return { path, l, lang };
110
113
  };
111
114
  };
@@ -25,6 +25,7 @@ export declare const makePageProto: <Locale extends {
25
25
  qrydesc<ModelKey extends keyof Locale>(model: ModelKey, queryKey: keyof Locale[ModelKey]): string;
26
26
  qarg<ModelKey extends keyof Locale>(model: ModelKey, queryKey: keyof Locale[ModelKey], arg: string): string;
27
27
  qargdesc<ModelKey extends keyof Locale>(model: ModelKey, queryKey: keyof Locale[ModelKey], arg: string): string;
28
+ trans(translation: Record<"en" | "ko" | (string & {}), ReactNode>): ReactNode;
28
29
  };
29
30
  lang: string;
30
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/next",
3
- "version": "0.0.142",
3
+ "version": "0.0.144",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"