lingo-linter-tool 1.0.5 → 1.0.6

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.
@@ -41,15 +41,15 @@ async function healIssues(issues, localesDir) {
41
41
  if (!fs.existsSync(configPath)) {
42
42
  console.log(chalk_1.default.yellow("⚠️ i18n.json not found. Auto-generating default config..."));
43
43
  const defaultConfig = {
44
- source: "en",
45
- targets: ["fr", "de"],
44
+ version: 1,
46
45
  buckets: [
47
46
  {
48
- path: "./" + path.basename(localesDir),
49
- pattern: "{locale}.json",
47
+ id: "frontend",
48
+ source: "en",
49
+ patterns: ["src/**/*.{ts,tsx,js,jsx}"],
50
+ output: "src/locales/{{lang}}.json",
50
51
  },
51
52
  ],
52
- provider: "openai",
53
53
  };
54
54
  fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2));
55
55
  console.log(chalk_1.default.green("✅ Created valid i18n.json with buckets"));
@@ -74,9 +74,11 @@ async function healIssues(issues, localesDir) {
74
74
  fs.writeFileSync(enPath, JSON.stringify(enContent, null, 2));
75
75
  console.log(chalk_1.default.gray(` ➕ Injected ${missingKeys.length} missing keys into en.json`));
76
76
  }
77
+ console.log(chalk_1.default.gray("\n📄 i18n.json contents:\n"));
78
+ console.log(fs.readFileSync(configPath, "utf-8"));
77
79
  try {
78
80
  console.log(chalk_1.default.magenta("🚀 Triggering Lingo.dev AI Translation..."));
79
- (0, child_process_1.execSync)("npx lingo.dev run --force", {
81
+ (0, child_process_1.execSync)("npx lingo translate --force", {
80
82
  stdio: "inherit",
81
83
  cwd: projectRoot,
82
84
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lingo-linter-tool",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Localization linter and self-healing tool",
5
5
  "bin": {
6
6
  "lingo-lint": "./dist/cli.js"