@awsless/i18n 0.0.6 → 0.0.8

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.
package/dist/index.cjs CHANGED
@@ -126,7 +126,6 @@ var findSvelteTranslatable = (code) => {
126
126
  css: false
127
127
  });
128
128
  const enter = (node) => {
129
- console.log(node);
130
129
  if (
131
130
  //
132
131
  node.type === "TaggedTemplateExpression" && node.tag.type === "MemberExpression" && node.tag.object.type === "Identifier" && node.tag.object.name === "lang" && node.tag.property.type === "Identifier" && node.tag.property.name === "t" && node.quasi.type === "TemplateLiteral" && node.quasi.loc
@@ -213,6 +212,7 @@ var createI18nPlugin = (props) => {
213
212
  if (newOriginals.length > 0) {
214
213
  this.info(`Translating ${newOriginals.length} new texts.`);
215
214
  const translations = await props.translate(props.default ?? "en", newOriginals);
215
+ this.info(`Translated ${translations.length} texts.`);
216
216
  for (const item of translations) {
217
217
  cache.set(item.original, item.locale, item.translation);
218
218
  }
package/dist/index.js CHANGED
@@ -88,7 +88,6 @@ var findSvelteTranslatable = (code) => {
88
88
  css: false
89
89
  });
90
90
  const enter = (node) => {
91
- console.log(node);
92
91
  if (
93
92
  //
94
93
  node.type === "TaggedTemplateExpression" && node.tag.type === "MemberExpression" && node.tag.object.type === "Identifier" && node.tag.object.name === "lang" && node.tag.property.type === "Identifier" && node.tag.property.name === "t" && node.quasi.type === "TemplateLiteral" && node.quasi.loc
@@ -175,6 +174,7 @@ var createI18nPlugin = (props) => {
175
174
  if (newOriginals.length > 0) {
176
175
  this.info(`Translating ${newOriginals.length} new texts.`);
177
176
  const translations = await props.translate(props.default ?? "en", newOriginals);
177
+ this.info(`Translated ${translations.length} texts.`);
178
178
  for (const item of translations) {
179
179
  cache.set(item.original, item.locale, item.translation);
180
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/i18n",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -42,6 +42,7 @@
42
42
  ]
43
43
  },
44
44
  "devDependencies": {
45
+ "@ai-sdk/openai": "^1.3.23",
45
46
  "@sveltejs/vite-plugin-svelte": "^3.1.2",
46
47
  "svelte": "^4.2.19",
47
48
  "svelte-preprocess": "^6.0.2",
@@ -52,7 +53,6 @@
52
53
  "vite": "^5.4.2"
53
54
  },
54
55
  "dependencies": {
55
- "@ai-sdk/openai": "^1.3.23",
56
56
  "@swc/core": "^1.3.70",
57
57
  "@types/chunk": "^0.0.0",
58
58
  "@types/line-column": "^1.0.2",
@@ -61,7 +61,6 @@
61
61
  "estree-walker": "^3.0.3",
62
62
  "glob": "^10.3.9",
63
63
  "line-column": "^1.0.2",
64
- "openai": "^4.57.0",
65
64
  "swc-walk": "1.0.0-rc.2",
66
65
  "zod": "^3.21.4"
67
66
  },