You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: restrict .ts file parsing to i18n files only (#37)
* fix: restrict .ts file parsing to i18n files only
## Changed
- Skip non-i18n .ts files during locale extraction to avoid parse errors on regular TypeScript files
- Updated extractLocaleFromPath and extractAllLocalesFromProject to match only `i18n.ts` files
## New
- Tests for non-i18n .ts file filtering in both extraction functions
- Added .claude/ to .gitignore
* fix: added checks for non i18n files in locale directory
* refactor: replace `any` with proper type assertions in tests
## Changed
- Replace `as any` with `as unknown as ParserFactory` for mock parser arguments in checksum tests
- Replace `as any` with `as unknown as void` for mock implementations in checksum and locale tests
- Replace `as any` with `as unknown as Record<string, unknown>` for edge-case inputs in parser tests
- Replace `as any` with `as unknown` for mock return values in locale tests
Made-with: Cursor
* fix: improved ts files recognition for patterns xx-i18n.ts
* fix: prevent deletion of keys containing "/" (#38)
* fix: prevent deletion of keys containing "/"
## Changed
- Use null byte (\0) as internal flat/unflatten delimiter instead of "/"
- Convert flattened keys back to "/" for user-facing pattern matching (lockedKeys, ignoredKeys, keyInstructions)
- Update locale extraction to split on null byte delimiter
## New
- Tests verifying keys with "/" (e.g. "harassment/threatening") survive parse/serialize round-trip
* refactor: deduplicate delimiter conversion logic
## Changed
- Extract toUserKey() helper for \0 → "/" key conversion
- Compute user-facing key once per key in translation loop
- Update JSDoc examples to reflect \0 delimiter
* chore: bump version to 1.0.1
## Changed
- Updated version in package.json from 1.0.0 to 1.0.1
- Updated version badge in README.md to 1.0.1
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Lara Cli automates translation of your i18n files with a single command, preserv
6
6
7
7
Supports multiple file formats including JSON, PO (gettext), TypeScript, Vue I18n single-file components, Markdown and MDX files, and Android XML string resource files. See [Supported Formats](docs/config/formats.md) for details.
0 commit comments