#
tokens: 49854/50000 199/626 files (page 1/20)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 1 of 20. Use http://codebase.md/lingodotdev/lingo.dev?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .changeset
│   ├── config.json
│   └── README.md
├── .claude
│   ├── agents
│   │   └── code-architect-reviewer.md
│   └── commands
│       ├── analyze-bucket-type.md
│       └── create-bucket-docs.md
├── .editorconfig
├── .github
│   ├── dependabot.yml
│   └── workflows
│       ├── docker.yml
│       ├── lingodotdev.yml
│       ├── pr-check.yml
│       ├── pr-lint.yml
│       └── release.yml
├── .gitignore
├── .husky
│   └── commit-msg
├── .npmrc
├── .prettierignore
├── .prettierrc
├── .vscode
│   ├── extensions.json
│   ├── launch.json
│   └── settings.json
├── action.yml
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── commitlint.config.js
├── composer.json
├── content
│   ├── banner.compiler.png
│   ├── banner.dark.png
│   └── banner.launch.png
├── CONTRIBUTING.md
├── DEBUGGING.md
├── demo
│   ├── adonisjs
│   │   ├── .editorconfig
│   │   ├── .env.example
│   │   ├── .gitignore
│   │   ├── ace.js
│   │   ├── adonisrc.ts
│   │   ├── app
│   │   │   ├── exceptions
│   │   │   │   └── handler.ts
│   │   │   └── middleware
│   │   │       └── container_bindings_middleware.ts
│   │   ├── bin
│   │   │   ├── console.ts
│   │   │   ├── server.ts
│   │   │   └── test.ts
│   │   ├── CHANGELOG.md
│   │   ├── config
│   │   │   ├── app.ts
│   │   │   ├── bodyparser.ts
│   │   │   ├── cors.ts
│   │   │   ├── hash.ts
│   │   │   ├── inertia.ts
│   │   │   ├── logger.ts
│   │   │   ├── session.ts
│   │   │   ├── shield.ts
│   │   │   ├── static.ts
│   │   │   └── vite.ts
│   │   ├── eslint.config.js
│   │   ├── inertia
│   │   │   ├── app
│   │   │   │   ├── app.tsx
│   │   │   │   └── ssr.tsx
│   │   │   ├── css
│   │   │   │   └── app.css
│   │   │   ├── lingo
│   │   │   │   ├── dictionary.js
│   │   │   │   └── meta.json
│   │   │   ├── pages
│   │   │   │   ├── errors
│   │   │   │   │   ├── not_found.tsx
│   │   │   │   │   └── server_error.tsx
│   │   │   │   └── home.tsx
│   │   │   └── tsconfig.json
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── resources
│   │   │   └── views
│   │   │       └── inertia_layout.edge
│   │   ├── start
│   │   │   ├── env.ts
│   │   │   ├── kernel.ts
│   │   │   └── routes.ts
│   │   ├── tests
│   │   │   └── bootstrap.ts
│   │   ├── tsconfig.json
│   │   └── vite.config.ts
│   ├── next-app
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── eslint.config.mjs
│   │   ├── next.config.ts
│   │   ├── package.json
│   │   ├── postcss.config.mjs
│   │   ├── public
│   │   │   ├── file.svg
│   │   │   ├── globe.svg
│   │   │   ├── next.svg
│   │   │   ├── vercel.svg
│   │   │   └── window.svg
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── app
│   │   │   │   ├── client-component.tsx
│   │   │   │   ├── favicon.ico
│   │   │   │   ├── globals.css
│   │   │   │   ├── layout.tsx
│   │   │   │   ├── lingo-dot-dev.tsx
│   │   │   │   ├── page.tsx
│   │   │   │   └── test
│   │   │   │       └── page.tsx
│   │   │   ├── components
│   │   │   │   ├── hero-actions.tsx
│   │   │   │   ├── hero-subtitle.tsx
│   │   │   │   ├── hero-title.tsx
│   │   │   │   └── index.ts
│   │   │   └── lingo
│   │   │       ├── dictionary.js
│   │   │       └── meta.json
│   │   └── tsconfig.json
│   ├── react-router-app
│   │   ├── .dockerignore
│   │   ├── .gitignore
│   │   ├── app
│   │   │   ├── app.css
│   │   │   ├── lingo
│   │   │   │   ├── dictionary.js
│   │   │   │   └── meta.json
│   │   │   ├── root.tsx
│   │   │   ├── routes
│   │   │   │   ├── home.tsx
│   │   │   │   └── test.tsx
│   │   │   ├── routes.ts
│   │   │   └── welcome
│   │   │       ├── lingo-dot-dev.tsx
│   │   │       ├── logo-dark.svg
│   │   │       ├── logo-light.svg
│   │   │       └── welcome.tsx
│   │   ├── Dockerfile
│   │   ├── package.json
│   │   ├── public
│   │   │   └── favicon.ico
│   │   ├── react-router.config.ts
│   │   ├── README.md
│   │   ├── tsconfig.json
│   │   └── vite.config.ts
│   └── vite-project
│       ├── .gitignore
│       ├── CHANGELOG.md
│       ├── eslint.config.js
│       ├── index.html
│       ├── package.json
│       ├── public
│       │   └── vite.svg
│       ├── README.md
│       ├── src
│       │   ├── App.css
│       │   ├── App.tsx
│       │   ├── assets
│       │   │   └── react.svg
│       │   ├── components
│       │   │   └── test.tsx
│       │   ├── index.css
│       │   ├── lingo
│       │   │   ├── dictionary.js
│       │   │   └── meta.json
│       │   ├── lingo-dot-dev.tsx
│       │   ├── main.tsx
│       │   └── vite-env.d.ts
│       ├── tsconfig.app.json
│       ├── tsconfig.json
│       ├── tsconfig.node.json
│       └── vite.config.ts
├── Dockerfile
├── i18n.json
├── i18n.lock
├── integrations
│   └── directus
│       ├── .gitignore
│       ├── CHANGELOG.md
│       ├── docker-compose.yml
│       ├── Dockerfile
│       ├── package.json
│       ├── README.md
│       ├── src
│       │   ├── api.ts
│       │   ├── app.ts
│       │   └── index.spec.ts
│       ├── tsconfig.json
│       ├── tsconfig.test.json
│       └── tsup.config.ts
├── ISSUE_TEMPLATE.md
├── legacy
│   ├── cli
│   │   ├── bin
│   │   │   └── cli.mjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   └── readme.md
│   └── sdk
│       ├── CHANGELOG.md
│       ├── index.d.ts
│       ├── index.js
│       ├── package.json
│       └── README.md
├── LICENSE.md
├── mcp.md
├── package.json
├── packages
│   ├── cli
│   │   ├── assets
│   │   │   ├── failure.mp3
│   │   │   └── success.mp3
│   │   ├── bin
│   │   │   └── cli.mjs
│   │   ├── CHANGELOG.md
│   │   ├── demo
│   │   │   ├── android
│   │   │   │   ├── en
│   │   │   │   │   └── example.xml
│   │   │   │   ├── es
│   │   │   │   │   └── example.xml
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── csv
│   │   │   │   ├── example.csv
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── demo.spec.ts
│   │   │   ├── ejs
│   │   │   │   ├── en
│   │   │   │   │   └── example.ejs
│   │   │   │   ├── es
│   │   │   │   │   └── example.ejs
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── flutter
│   │   │   │   ├── en
│   │   │   │   │   └── example.arb
│   │   │   │   ├── es
│   │   │   │   │   └── example.arb
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── html
│   │   │   │   ├── en
│   │   │   │   │   └── example.html
│   │   │   │   ├── es
│   │   │   │   │   └── example.html
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── json
│   │   │   │   ├── en
│   │   │   │   │   └── example.json
│   │   │   │   ├── es
│   │   │   │   │   └── example.json
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── json-dictionary
│   │   │   │   ├── example.json
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── json5
│   │   │   │   ├── en
│   │   │   │   │   └── example.json5
│   │   │   │   ├── es
│   │   │   │   │   └── example.json5
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── jsonc
│   │   │   │   ├── en
│   │   │   │   │   └── example.jsonc
│   │   │   │   ├── es
│   │   │   │   │   └── example.jsonc
│   │   │   │   ├── i18n.json
│   │   │   │   ├── i18n.lock
│   │   │   │   └── ru
│   │   │   │       └── example.jsonc
│   │   │   ├── markdoc
│   │   │   │   ├── en
│   │   │   │   │   └── example.markdoc
│   │   │   │   ├── es
│   │   │   │   │   └── example.markdoc
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── markdown
│   │   │   │   ├── en
│   │   │   │   │   └── example.md
│   │   │   │   ├── es
│   │   │   │   │   └── example.md
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── mdx
│   │   │   │   ├── en
│   │   │   │   │   └── example.mdx
│   │   │   │   ├── es
│   │   │   │   │   └── example.mdx
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── php
│   │   │   │   ├── en
│   │   │   │   │   └── example.php
│   │   │   │   ├── es
│   │   │   │   │   └── example.php
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── po
│   │   │   │   ├── en
│   │   │   │   │   └── example.po
│   │   │   │   ├── es
│   │   │   │   │   └── example.po
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── properties
│   │   │   │   ├── en
│   │   │   │   │   └── example.properties
│   │   │   │   ├── es
│   │   │   │   │   └── example.properties
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── run_i18n.sh
│   │   │   ├── srt
│   │   │   │   ├── en
│   │   │   │   │   └── example.srt
│   │   │   │   ├── es
│   │   │   │   │   └── example.srt
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── txt
│   │   │   │   ├── en
│   │   │   │   │   └── example.txt
│   │   │   │   ├── es
│   │   │   │   │   └── example.txt
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── typescript
│   │   │   │   ├── en
│   │   │   │   │   └── example.ts
│   │   │   │   ├── es
│   │   │   │   │   └── example.ts
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── vtt
│   │   │   │   ├── en
│   │   │   │   │   └── example.vtt
│   │   │   │   ├── es
│   │   │   │   │   └── example.vtt
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── vue-json
│   │   │   │   ├── example.vue
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── xcode-strings
│   │   │   │   ├── en
│   │   │   │   │   └── example.strings
│   │   │   │   ├── es
│   │   │   │   │   └── example.strings
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── xcode-stringsdict
│   │   │   │   ├── en
│   │   │   │   │   └── example.stringsdict
│   │   │   │   ├── es
│   │   │   │   │   └── example.stringsdict
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── xcode-xcstrings
│   │   │   │   ├── example.xcstrings
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── xcode-xcstrings-v2
│   │   │   │   ├── complex-example.xcstrings
│   │   │   │   ├── example.xcstrings
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── xliff
│   │   │   │   ├── en
│   │   │   │   │   ├── example-v1.2.xliff
│   │   │   │   │   └── example-v2.xliff
│   │   │   │   ├── es
│   │   │   │   │   ├── example-v1.2.xliff
│   │   │   │   │   ├── example-v2.xliff
│   │   │   │   │   └── example.xliff
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── xml
│   │   │   │   ├── en
│   │   │   │   │   └── example.xml
│   │   │   │   ├── es
│   │   │   │   │   └── example.xml
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   ├── yaml
│   │   │   │   ├── en
│   │   │   │   │   └── example.yml
│   │   │   │   ├── es
│   │   │   │   │   └── example.yml
│   │   │   │   ├── i18n.json
│   │   │   │   └── i18n.lock
│   │   │   └── yaml-root-key
│   │   │       ├── en
│   │   │       │   └── example.yml
│   │   │       ├── es
│   │   │       │   └── example.yml
│   │   │       ├── i18n.json
│   │   │       └── i18n.lock
│   │   ├── i18n.json
│   │   ├── i18n.lock
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── cli
│   │   │   │   ├── cmd
│   │   │   │   │   ├── auth.ts
│   │   │   │   │   ├── ci
│   │   │   │   │   │   ├── flows
│   │   │   │   │   │   │   ├── _base.ts
│   │   │   │   │   │   │   ├── in-branch.ts
│   │   │   │   │   │   │   └── pull-request.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── platforms
│   │   │   │   │   │       ├── _base.ts
│   │   │   │   │   │       ├── bitbucket.ts
│   │   │   │   │   │       ├── github.ts
│   │   │   │   │   │       ├── gitlab.ts
│   │   │   │   │   │       └── index.ts
│   │   │   │   │   ├── cleanup.ts
│   │   │   │   │   ├── config
│   │   │   │   │   │   ├── get.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── set.ts
│   │   │   │   │   │   └── unset.ts
│   │   │   │   │   ├── i18n.ts
│   │   │   │   │   ├── init.ts
│   │   │   │   │   ├── lockfile.ts
│   │   │   │   │   ├── login.ts
│   │   │   │   │   ├── logout.ts
│   │   │   │   │   ├── may-the-fourth.ts
│   │   │   │   │   ├── mcp.ts
│   │   │   │   │   ├── purge.ts
│   │   │   │   │   ├── run
│   │   │   │   │   │   ├── _const.ts
│   │   │   │   │   │   ├── _types.ts
│   │   │   │   │   │   ├── _utils.ts
│   │   │   │   │   │   ├── execute.spec.ts
│   │   │   │   │   │   ├── execute.ts
│   │   │   │   │   │   ├── frozen.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── plan.ts
│   │   │   │   │   │   ├── setup.ts
│   │   │   │   │   │   └── watch.ts
│   │   │   │   │   ├── show
│   │   │   │   │   │   ├── _shared-key-command.ts
│   │   │   │   │   │   ├── config.ts
│   │   │   │   │   │   ├── files.ts
│   │   │   │   │   │   ├── ignored-keys.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── locale.ts
│   │   │   │   │   │   └── locked-keys.ts
│   │   │   │   │   └── status.ts
│   │   │   │   ├── constants.ts
│   │   │   │   ├── index.spec.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── loaders
│   │   │   │   │   ├── _types.ts
│   │   │   │   │   ├── _utils.ts
│   │   │   │   │   ├── android.spec.ts
│   │   │   │   │   ├── android.ts
│   │   │   │   │   ├── csv.spec.ts
│   │   │   │   │   ├── csv.ts
│   │   │   │   │   ├── dato
│   │   │   │   │   │   ├── _base.ts
│   │   │   │   │   │   ├── _utils.ts
│   │   │   │   │   │   ├── api.ts
│   │   │   │   │   │   ├── extract.ts
│   │   │   │   │   │   ├── filter.ts
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── ejs.spec.ts
│   │   │   │   │   ├── ejs.ts
│   │   │   │   │   ├── ensure-key-order.spec.ts
│   │   │   │   │   ├── ensure-key-order.ts
│   │   │   │   │   ├── flat.spec.ts
│   │   │   │   │   ├── flat.ts
│   │   │   │   │   ├── flutter.spec.ts
│   │   │   │   │   ├── flutter.ts
│   │   │   │   │   ├── formatters
│   │   │   │   │   │   ├── _base.ts
│   │   │   │   │   │   ├── biome.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── prettier.ts
│   │   │   │   │   ├── html.ts
│   │   │   │   │   ├── icu-safety.spec.ts
│   │   │   │   │   ├── ignored-keys-buckets.spec.ts
│   │   │   │   │   ├── ignored-keys.spec.ts
│   │   │   │   │   ├── ignored-keys.ts
│   │   │   │   │   ├── index.spec.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── inject-locale.spec.ts
│   │   │   │   │   ├── inject-locale.ts
│   │   │   │   │   ├── json-dictionary.spec.ts
│   │   │   │   │   ├── json-dictionary.ts
│   │   │   │   │   ├── json-sorting.test.ts
│   │   │   │   │   ├── json-sorting.ts
│   │   │   │   │   ├── json.ts
│   │   │   │   │   ├── json5.spec.ts
│   │   │   │   │   ├── json5.ts
│   │   │   │   │   ├── jsonc.spec.ts
│   │   │   │   │   ├── jsonc.ts
│   │   │   │   │   ├── locked-keys.spec.ts
│   │   │   │   │   ├── locked-keys.ts
│   │   │   │   │   ├── locked-patterns.spec.ts
│   │   │   │   │   ├── locked-patterns.ts
│   │   │   │   │   ├── markdoc.spec.ts
│   │   │   │   │   ├── markdoc.ts
│   │   │   │   │   ├── markdown.ts
│   │   │   │   │   ├── mdx.spec.ts
│   │   │   │   │   ├── mdx.ts
│   │   │   │   │   ├── mdx2
│   │   │   │   │   │   ├── _types.ts
│   │   │   │   │   │   ├── _utils.ts
│   │   │   │   │   │   ├── code-placeholder.spec.ts
│   │   │   │   │   │   ├── code-placeholder.ts
│   │   │   │   │   │   ├── frontmatter-split.spec.ts
│   │   │   │   │   │   ├── frontmatter-split.ts
│   │   │   │   │   │   ├── localizable-document.spec.ts
│   │   │   │   │   │   ├── localizable-document.ts
│   │   │   │   │   │   ├── section-split.spec.ts
│   │   │   │   │   │   ├── section-split.ts
│   │   │   │   │   │   └── sections-split-2.ts
│   │   │   │   │   ├── passthrough.ts
│   │   │   │   │   ├── php.ts
│   │   │   │   │   ├── plutil-json-loader.ts
│   │   │   │   │   ├── po
│   │   │   │   │   │   ├── _types.ts
│   │   │   │   │   │   ├── index.spec.ts
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── properties.ts
│   │   │   │   │   ├── root-key.ts
│   │   │   │   │   ├── srt.ts
│   │   │   │   │   ├── sync.ts
│   │   │   │   │   ├── text-file.ts
│   │   │   │   │   ├── txt.ts
│   │   │   │   │   ├── typescript
│   │   │   │   │   │   ├── cjs-interop.ts
│   │   │   │   │   │   ├── index.spec.ts
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── unlocalizable.spec.ts
│   │   │   │   │   ├── unlocalizable.ts
│   │   │   │   │   ├── variable
│   │   │   │   │   │   ├── index.spec.ts
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── vtt.ts
│   │   │   │   │   ├── vue-json.ts
│   │   │   │   │   ├── xcode-strings
│   │   │   │   │   │   ├── escape.ts
│   │   │   │   │   │   ├── parser.ts
│   │   │   │   │   │   ├── tokenizer.ts
│   │   │   │   │   │   └── types.ts
│   │   │   │   │   ├── xcode-strings.spec.ts
│   │   │   │   │   ├── xcode-strings.ts
│   │   │   │   │   ├── xcode-stringsdict.ts
│   │   │   │   │   ├── xcode-xcstrings-icu.spec.ts
│   │   │   │   │   ├── xcode-xcstrings-icu.ts
│   │   │   │   │   ├── xcode-xcstrings-lock-compatibility.spec.ts
│   │   │   │   │   ├── xcode-xcstrings-v2-loader.ts
│   │   │   │   │   ├── xcode-xcstrings.spec.ts
│   │   │   │   │   ├── xcode-xcstrings.ts
│   │   │   │   │   ├── xliff.spec.ts
│   │   │   │   │   ├── xliff.ts
│   │   │   │   │   ├── xml.ts
│   │   │   │   │   └── yaml.ts
│   │   │   │   ├── localizer
│   │   │   │   │   ├── _types.ts
│   │   │   │   │   ├── explicit.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── lingodotdev.ts
│   │   │   │   ├── processor
│   │   │   │   │   ├── _base.ts
│   │   │   │   │   ├── basic.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── lingo.ts
│   │   │   │   └── utils
│   │   │   │       ├── auth.ts
│   │   │   │       ├── buckets.spec.ts
│   │   │   │       ├── buckets.ts
│   │   │   │       ├── cache.ts
│   │   │   │       ├── cloudflare-status.ts
│   │   │   │       ├── config.ts
│   │   │   │       ├── delta.spec.ts
│   │   │   │       ├── delta.ts
│   │   │   │       ├── ensure-patterns.ts
│   │   │   │       ├── errors.ts
│   │   │   │       ├── exec.spec.ts
│   │   │   │       ├── exec.ts
│   │   │   │       ├── exit-gracefully.spec.ts
│   │   │   │       ├── exit-gracefully.ts
│   │   │   │       ├── exp-backoff.ts
│   │   │   │       ├── find-locale-paths.spec.ts
│   │   │   │       ├── find-locale-paths.ts
│   │   │   │       ├── fs.ts
│   │   │   │       ├── init-ci-cd.ts
│   │   │   │       ├── key-matching.spec.ts
│   │   │   │       ├── key-matching.ts
│   │   │   │       ├── lockfile.ts
│   │   │   │       ├── md5.ts
│   │   │   │       ├── observability.ts
│   │   │   │       ├── plutil-formatter.spec.ts
│   │   │   │       ├── plutil-formatter.ts
│   │   │   │       ├── settings.ts
│   │   │   │       ├── ui.ts
│   │   │   │       └── update-gitignore.ts
│   │   │   ├── compiler
│   │   │   │   └── index.ts
│   │   │   ├── locale-codes
│   │   │   │   └── index.ts
│   │   │   ├── react
│   │   │   │   ├── client.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── react-router.ts
│   │   │   │   └── rsc.ts
│   │   │   ├── sdk
│   │   │   │   └── index.ts
│   │   │   └── spec
│   │   │       └── index.ts
│   │   ├── tests
│   │   │   └── mock-storage.ts
│   │   ├── troubleshooting.md
│   │   ├── tsconfig.json
│   │   ├── tsconfig.test.json
│   │   ├── tsup.config.ts
│   │   ├── types
│   │   │   ├── vtt.d.ts
│   │   │   └── xliff.d.ts
│   │   ├── vitest.config.ts
│   │   └── WATCH_MODE.md
│   ├── compiler
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── _base.ts
│   │   │   ├── _const.ts
│   │   │   ├── _loader-utils.spec.ts
│   │   │   ├── _loader-utils.ts
│   │   │   ├── _utils.spec.ts
│   │   │   ├── _utils.ts
│   │   │   ├── client-dictionary-loader.ts
│   │   │   ├── i18n-directive.spec.ts
│   │   │   ├── i18n-directive.ts
│   │   │   ├── index.spec.ts
│   │   │   ├── index.ts
│   │   │   ├── jsx-attribute-flag.spec.ts
│   │   │   ├── jsx-attribute-flag.ts
│   │   │   ├── jsx-attribute-scope-inject.spec.ts
│   │   │   ├── jsx-attribute-scope-inject.ts
│   │   │   ├── jsx-attribute-scopes-export.spec.ts
│   │   │   ├── jsx-attribute-scopes-export.ts
│   │   │   ├── jsx-attribute.spec.ts
│   │   │   ├── jsx-attribute.ts
│   │   │   ├── jsx-fragment.spec.ts
│   │   │   ├── jsx-fragment.ts
│   │   │   ├── jsx-html-lang.spec.ts
│   │   │   ├── jsx-html-lang.ts
│   │   │   ├── jsx-provider.spec.ts
│   │   │   ├── jsx-provider.ts
│   │   │   ├── jsx-remove-attributes.spec.ts
│   │   │   ├── jsx-remove-attributes.ts
│   │   │   ├── jsx-root-flag.spec.ts
│   │   │   ├── jsx-root-flag.ts
│   │   │   ├── jsx-scope-flag.spec.ts
│   │   │   ├── jsx-scope-flag.ts
│   │   │   ├── jsx-scope-inject.spec.ts
│   │   │   ├── jsx-scope-inject.ts
│   │   │   ├── jsx-scopes-export.spec.ts
│   │   │   ├── jsx-scopes-export.ts
│   │   │   ├── lib
│   │   │   │   └── lcp
│   │   │   │       ├── api
│   │   │   │       │   ├── index.ts
│   │   │   │       │   ├── prompt.spec.ts
│   │   │   │       │   ├── prompt.ts
│   │   │   │       │   ├── provider-details.spec.ts
│   │   │   │       │   ├── provider-details.ts
│   │   │   │       │   ├── shots.ts
│   │   │   │       │   ├── xml2obj.spec.ts
│   │   │   │       │   └── xml2obj.ts
│   │   │   │       ├── api.spec.ts
│   │   │   │       ├── cache.spec.ts
│   │   │   │       ├── cache.ts
│   │   │   │       ├── index.spec.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── schema.ts
│   │   │   │       ├── server.spec.ts
│   │   │   │       └── server.ts
│   │   │   ├── lingo-turbopack-loader.ts
│   │   │   ├── react-router-dictionary-loader.ts
│   │   │   ├── rsc-dictionary-loader.ts
│   │   │   └── utils
│   │   │       ├── ast-key.spec.ts
│   │   │       ├── ast-key.ts
│   │   │       ├── create-locale-import-map.spec.ts
│   │   │       ├── create-locale-import-map.ts
│   │   │       ├── env.spec.ts
│   │   │       ├── env.ts
│   │   │       ├── hash.spec.ts
│   │   │       ├── hash.ts
│   │   │       ├── index.spec.ts
│   │   │       ├── index.ts
│   │   │       ├── invokations.spec.ts
│   │   │       ├── invokations.ts
│   │   │       ├── jsx-attribute-scope.ts
│   │   │       ├── jsx-attribute.spec.ts
│   │   │       ├── jsx-attribute.ts
│   │   │       ├── jsx-content-whitespace.spec.ts
│   │   │       ├── jsx-content.spec.ts
│   │   │       ├── jsx-content.ts
│   │   │       ├── jsx-element.spec.ts
│   │   │       ├── jsx-element.ts
│   │   │       ├── jsx-expressions.test.ts
│   │   │       ├── jsx-expressions.ts
│   │   │       ├── jsx-functions.spec.ts
│   │   │       ├── jsx-functions.ts
│   │   │       ├── jsx-scope.spec.ts
│   │   │       ├── jsx-scope.ts
│   │   │       ├── jsx-variables.spec.ts
│   │   │       ├── jsx-variables.ts
│   │   │       ├── llm-api-key.ts
│   │   │       ├── llm-api-keys.spec.ts
│   │   │       ├── locales.spec.ts
│   │   │       ├── locales.ts
│   │   │       ├── module-params.spec.ts
│   │   │       ├── module-params.ts
│   │   │       ├── observability.spec.ts
│   │   │       ├── observability.ts
│   │   │       ├── rc.spec.ts
│   │   │       └── rc.ts
│   │   ├── tsconfig.json
│   │   ├── tsup.config.ts
│   │   └── vitest.config.ts
│   ├── locales
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── constants.ts
│   │   │   ├── index.ts
│   │   │   ├── names
│   │   │   │   ├── index.spec.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── integration.spec.ts
│   │   │   │   └── loader.ts
│   │   │   ├── parser.spec.ts
│   │   │   ├── parser.ts
│   │   │   ├── types.ts
│   │   │   ├── validation.spec.ts
│   │   │   └── validation.ts
│   │   ├── tsconfig.json
│   │   └── tsup.config.ts
│   ├── react
│   │   ├── build.config.ts
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── client
│   │   │   │   ├── attribute-component.spec.tsx
│   │   │   │   ├── attribute-component.tsx
│   │   │   │   ├── component.lingo-component.spec.tsx
│   │   │   │   ├── component.spec.tsx
│   │   │   │   ├── component.tsx
│   │   │   │   ├── context.spec.tsx
│   │   │   │   ├── context.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── loader.spec.ts
│   │   │   │   ├── loader.ts
│   │   │   │   ├── locale-switcher.spec.tsx
│   │   │   │   ├── locale-switcher.tsx
│   │   │   │   ├── locale.spec.ts
│   │   │   │   ├── locale.ts
│   │   │   │   ├── provider.spec.tsx
│   │   │   │   ├── provider.tsx
│   │   │   │   ├── utils.spec.ts
│   │   │   │   └── utils.ts
│   │   │   ├── core
│   │   │   │   ├── attribute-component.spec.tsx
│   │   │   │   ├── attribute-component.tsx
│   │   │   │   ├── component.spec.tsx
│   │   │   │   ├── component.tsx
│   │   │   │   ├── const.ts
│   │   │   │   ├── get-dictionary.spec.ts
│   │   │   │   ├── get-dictionary.ts
│   │   │   │   └── index.ts
│   │   │   ├── react-router
│   │   │   │   ├── index.ts
│   │   │   │   ├── loader.spec.ts
│   │   │   │   └── loader.ts
│   │   │   ├── rsc
│   │   │   │   ├── attribute-component.tsx
│   │   │   │   ├── component.lingo-component.spec.tsx
│   │   │   │   ├── component.spec.tsx
│   │   │   │   ├── component.tsx
│   │   │   │   ├── index.ts
│   │   │   │   ├── loader.spec.ts
│   │   │   │   ├── loader.ts
│   │   │   │   ├── provider.spec.tsx
│   │   │   │   ├── provider.tsx
│   │   │   │   ├── utils.spec.ts
│   │   │   │   └── utils.ts
│   │   │   └── test
│   │   │       └── setup.ts
│   │   ├── tsconfig.json
│   │   └── vitest.config.ts
│   ├── sdk
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── abort-controller.specs.ts
│   │   │   ├── index.spec.ts
│   │   │   └── index.ts
│   │   ├── tsconfig.json
│   │   ├── tsconfig.test.json
│   │   └── tsup.config.ts
│   └── spec
│       ├── CHANGELOG.md
│       ├── package.json
│       ├── README.md
│       ├── src
│       │   ├── config.spec.ts
│       │   ├── config.ts
│       │   ├── formats.ts
│       │   ├── index.spec.ts
│       │   ├── index.ts
│       │   ├── json-schema.ts
│       │   ├── locales.spec.ts
│       │   └── locales.ts
│       ├── tsconfig.json
│       ├── tsconfig.test.json
│       └── tsup.config.ts
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── readme
│   ├── ar.md
│   ├── bn.md
│   ├── de.md
│   ├── en.md
│   ├── es.md
│   ├── fa.md
│   ├── fr.md
│   ├── he.md
│   ├── hi.md
│   ├── it.md
│   ├── ja.md
│   ├── ko.md
│   ├── pl.md
│   ├── pt-BR.md
│   ├── ru.md
│   ├── tr.md
│   ├── uk-UA.md
│   └── zh-Hans.md
├── readme.md
├── scripts
│   ├── docs
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── generate-cli-docs.ts
│   │   │   ├── generate-config-docs.ts
│   │   │   ├── json-schema
│   │   │   │   ├── markdown-renderer.test.ts
│   │   │   │   ├── markdown-renderer.ts
│   │   │   │   ├── parser.test.ts
│   │   │   │   ├── parser.ts
│   │   │   │   └── types.ts
│   │   │   ├── utils.test.ts
│   │   │   └── utils.ts
│   │   ├── tsconfig.json
│   │   └── vitest.config.ts
│   └── packagist-publish.php
└── turbo.json
```

# Files

--------------------------------------------------------------------------------
/integrations/directus/.gitignore:
--------------------------------------------------------------------------------

```
1 | .directus
2 | 
```

--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------

```
1 | engine-strict=true
2 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/.dockerignore:
--------------------------------------------------------------------------------

```
1 | .react-router
2 | build
3 | node_modules
4 | README.md
```

--------------------------------------------------------------------------------
/demo/react-router-app/.gitignore:
--------------------------------------------------------------------------------

```
1 | .DS_Store
2 | /node_modules/
3 | 
4 | # React Router
5 | /.react-router/
6 | /build/
7 | 
```

--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------

```
1 | root = true
2 | 
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | end_of_line = lf
7 | insert_final_newline = true
```

--------------------------------------------------------------------------------
/demo/adonisjs/.env.example:
--------------------------------------------------------------------------------

```
1 | TZ=UTC
2 | PORT=3333
3 | HOST=localhost
4 | LOG_LEVEL=info
5 | APP_KEY=
6 | NODE_ENV=development
7 | SESSION_DRIVER=cookie
```

--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------

```
 1 | pnpm-lock.yaml
 2 | .changeset/
 3 | packages/cli/demo/
 4 | build/
 5 | dist/
 6 | .react-router/
 7 | .turbo/
 8 | .next/
 9 | CLAUDE.md
10 | 
```

--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------

```
1 | {
2 |   "trailingComma": "all",
3 |   "singleQuote": false,
4 |   "semi": true,
5 |   "printWidth": 80,
6 |   "tabWidth": 2,
7 |   "useTabs": false
8 | }
9 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/.gitignore:
--------------------------------------------------------------------------------

```
 1 | # Logs
 2 | logs
 3 | *.log
 4 | npm-debug.log*
 5 | yarn-debug.log*
 6 | yarn-error.log*
 7 | pnpm-debug.log*
 8 | lerna-debug.log*
 9 | 
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 | 
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/.gitignore:
--------------------------------------------------------------------------------

```
 1 | # Dependencies and AdonisJS build
 2 | node_modules
 3 | build
 4 | tmp
 5 | 
 6 | # Secrets
 7 | .env
 8 | .env.local
 9 | .env.production.local
10 | .env.development.local
11 | 
12 | # Frontend assets compiled code
13 | public/assets
14 | 
15 | # Build tools specific
16 | npm-debug.log
17 | yarn-error.log
18 | 
19 | # Editors specific
20 | .fleet
21 | .idea
22 | .vscode
23 | 
24 | # Platform specific
25 | .DS_Store
26 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/.editorconfig:
--------------------------------------------------------------------------------

```
 1 | # http://editorconfig.org
 2 | 
 3 | [*]
 4 | indent_style = space
 5 | indent_size = 2
 6 | end_of_line = lf
 7 | charset = utf-8
 8 | trim_trailing_whitespace = true
 9 | insert_final_newline = true
10 | 
11 | [*.json]
12 | insert_final_newline = unset
13 | 
14 | [**.min.js]
15 | indent_style = unset
16 | insert_final_newline = unset
17 | 
18 | [MakeFile]
19 | indent_style = space
20 | 
21 | [*.md]
22 | trim_trailing_whitespace = false
23 | 
```

--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------

```
 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
 2 | 
 3 | # Dependencies
 4 | node_modules
 5 | .pnp
 6 | .pnp.js
 7 | 
 8 | # Local env files
 9 | .env
10 | .env.local
11 | .env.development.local
12 | .env.test.local
13 | .env.production.local
14 | 
15 | # Testing
16 | coverage
17 | .idea
18 | 
19 | # Turbo
20 | .turbo
21 | 
22 | # Vercel
23 | .vercel
24 | 
25 | # Build Outputs
26 | .next/
27 | out/
28 | build
29 | dist
30 | 
31 | 
32 | # Debug
33 | npm-debug.log*
34 | yarn-debug.log*
35 | yarn-error.log*
36 | 
37 | # Misc
38 | .DS_Store
39 | *.pem
40 | i18n.cache
41 | 
```

--------------------------------------------------------------------------------
/demo/next-app/.gitignore:
--------------------------------------------------------------------------------

```
 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
 2 | 
 3 | # dependencies
 4 | /node_modules
 5 | /.pnp
 6 | .pnp.*
 7 | .yarn/*
 8 | !.yarn/patches
 9 | !.yarn/plugins
10 | !.yarn/releases
11 | !.yarn/versions
12 | 
13 | # testing
14 | /coverage
15 | 
16 | # next.js
17 | /.next/
18 | /out/
19 | 
20 | # production
21 | /build
22 | 
23 | # misc
24 | .DS_Store
25 | *.pem
26 | 
27 | # debug
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 | .pnpm-debug.log*
32 | 
33 | # env files (can opt-in for committing if needed)
34 | .env*
35 | 
36 | # vercel
37 | .vercel
38 | 
39 | # typescript
40 | *.tsbuildinfo
41 | next-env.d.ts
42 | 
```

--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------

```markdown
1 | packages/cli/README.md
```

--------------------------------------------------------------------------------
/legacy/cli/readme.md:
--------------------------------------------------------------------------------

```markdown
1 | Replexica is now [Lingo.dev](https://npmjs.com/package/lingo.dev)
2 | 
```

--------------------------------------------------------------------------------
/legacy/sdk/README.md:
--------------------------------------------------------------------------------

```markdown
1 | Replexica is now [Lingo.dev](https://npmjs.com/package/lingo.dev)
2 | 
```

--------------------------------------------------------------------------------
/packages/react/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # Lingo.dev Compiler React
2 | 
3 | Set of components to implement Lingo.dev Compiler in modern React frameworks.
4 | 
5 | Please refer to [Lingo.dev Compiler documentation](https://lingo.dev/en/compiler/).
6 | 
```

--------------------------------------------------------------------------------
/packages/sdk/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Lingo.dev SDK
 2 | 
 3 | Official SDK for Lingo.dev.
 4 | 
 5 | ### Installation
 6 | 
 7 | ```bash
 8 | npm i lingo.dev
 9 | ```
10 | 
11 | ### Usage
12 | 
13 | ```
14 | import {} from 'lingo.dev/sdk';
15 | ```
16 | 
17 | ### Documentation
18 | 
19 | [Documentation](https://lingo.dev/go/docs)
20 | 
```

--------------------------------------------------------------------------------
/packages/spec/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Lingo.dev Spec
 2 | 
 3 | A utility package for Lingo.dev.
 4 | 
 5 | ### Installation
 6 | 
 7 | ```bash
 8 | npm i lingo.dev
 9 | ```
10 | 
11 | ### Usage
12 | 
13 | ```
14 | import {} from 'lingo.dev/spec';
15 | ```
16 | 
17 | ### Documentation
18 | 
19 | [Documentation](https://lingo.dev/go/docs)
20 | 
```

--------------------------------------------------------------------------------
/packages/compiler/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # Lingo.dev Compiler
2 | 
3 | **Lingo.dev Compiler** is a free, open-source compiler middleware, that makes React apps multilingual at build time without requiring any changes to the existing React components.
4 | 
5 | Documentation: https://lingo.dev/compiler
6 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # Compiler demo: Vite + React + TypeScript
2 | 
3 | This template provides a minimal setup to get [React](https://react.dev/) and [Lingo.dev Compiler](https://lingo.dev/compiler) working in [Vite](https://vite.dev/).
4 | 
5 | Documentation: https://lingo.dev/compiler/frameworks/vite
6 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # Compiler demo: React Router / Remix
2 | 
3 | A modern, production-ready template for building full-stack React applications using [React Router](https://reactrouter.com/) and and [Lingo.dev Compiler](https://lingo.dev/compiler) implementation.
4 | 
5 | Documentation: https://lingo.dev/compiler/frameworks/react-router
6 | 
```

--------------------------------------------------------------------------------
/demo/next-app/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # Compiler demo: Next.js with App Router
2 | 
3 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app) and [Lingo.dev Compiler](https://lingo.dev/compiler) implementation.
4 | 
5 | Documentation: https://lingo.dev/compiler/frameworks/nextjs
6 | 
```

--------------------------------------------------------------------------------
/.changeset/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # Changesets
2 | 
3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4 | with multi-package repos, or single-package repos to help you version and publish your code. You can
5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6 | 
7 | We have a quick list of common questions to get you started engaging with this project in
8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Lingo.dev Compiler with AdonisJS
 2 | 
 3 | ## Introduction
 4 | 
 5 | This example demonstrates how to set up [Lingo.dev Compiler](https://lingo.dev/en/compiler/) with [AdonisJS](https://adonisjs.com/).
 6 | 
 7 | ## Running this example
 8 | 
 9 | To run this example:
10 | 
11 | 1. Set the `LINGODOTDEV_API_KEY` environment variable:
12 | 
13 |    ```bash
14 |    export LINGODOTDEV_API_KEY="<your_api_key>"
15 |    ```
16 | 
17 |    To get an API key, sign up for a free account at [lingo.dev](https://lingo.dev).
18 | 
19 | 2. Navigate into this example's directory:
20 | 
21 |    ```bash
22 |    cd demo/adonisjs
23 |    ```
24 | 
25 | 3. Install the dependencies:
26 | 
27 |    ```bash
28 |    pnpm install
29 |    ```
30 | 
31 | 4. Run the development server:
32 | 
33 |    ```bash
34 |    pnpm run dev
35 |    ```
36 | 
37 | 5. Navigate to <http://localhost:3333>.
38 | 
39 | ## Changed files
40 | 
41 | These are the files that were changed to get **Lingo.dev Compiler** up and running:
42 | 
43 | - [inertia/pages/home.tsx](./inertia/pages/home.tsx)
44 | - [vite.config.ts](./vite.config.ts)
45 | 
46 | You can use these files as a reference when setting up the compiler in your own project.
47 | 
```

--------------------------------------------------------------------------------
/scripts/docs/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # scripts/docs
 2 | 
 3 | ## Introduction
 4 | 
 5 | This directory contains scripts for generating documentation from the Lingo.dev source code.
 6 | 
 7 | ## generate-cli-docs
 8 | 
 9 | This script generates reference documentation for **Lingo.dev CLI**.
10 | 
11 | ### Usage
12 | 
13 | ```bash
14 | pnpm --filter docs run generate-cli-docs [output_directory]
15 | ```
16 | 
17 | ### How it works
18 | 
19 | 1. Loads the CLI program from the `cli` package.
20 | 2. Walks through top-level commands and their subcommands.
21 | 3. Generates an `.mdx` file for each top-level command with structured reference content.
22 | 
23 | ### Notes
24 | 
25 | - When running inside a GitHub Action, this script comments on the PR with the Markdown content.
26 | - When running outside of a GitHub action, the script writes one `.mdx` file per top-level command to the provided directory.
27 | 
28 | ## generate-config-docs
29 | 
30 | This script generates reference documentation for the `i18n.json` file.
31 | 
32 | ### Usage
33 | 
34 | ```bash
35 | pnpm --filter docs run generate-config-docs [output_file_path]
36 | ```
37 | 
38 | ### How it works
39 | 
40 | 1. Converts the Zod schema into a JSON Schema.
41 | 2. Walks through all properties on the schema.
42 | 3. Generates a Markdown file with the complete property reference.
43 | 
```

--------------------------------------------------------------------------------
/integrations/directus/README.md:
--------------------------------------------------------------------------------

```markdown
  1 | # Lingo.dev Integration for Directus
  2 | 
  3 | This is the official Lingo.dev integration for [Directus](https://directus.io), a headless CMS, enabling automated AI-powered localization within your Directus workflow.
  4 | 
  5 | ## Overview
  6 | 
  7 | This integration adds a Lingo.dev operation to Directus CMS that allows you to automatically translate content across 80+ languages using Lingo.dev's AI localization engine.
  8 | 
  9 | ## Configuration
 10 | 
 11 | 1. Install Lingo.dev Extension in your Directus project
 12 | 2. Create a new Flow in Directus with Lingo.dev Extension
 13 | 3. Run the Flow to localize content
 14 | 
 15 | ## 1. Set up Lingo.dev Extension
 16 | 
 17 | This section is based on the [Directus documentation for installing extensions via the npm registry](https://docs.directus.io/extensions/installing-extensions.html#installing-via-the-npm-registry).
 18 | 
 19 | ### Modify `docker-compose.yml`
 20 | 
 21 | Open the `docker-compose.yml` file of your project and replace the `image` option with a `build` section:
 22 | 
 23 | - remove the `image` option:
 24 | 
 25 | ```yaml
 26 | image: directus/directus:11.x.y
 27 | ```
 28 | 
 29 | - add the `build` section:
 30 | 
 31 | ```yaml
 32 | build:
 33 |   context: ./
 34 | ```
 35 | 
 36 | This allows you to build a customized Docker Image with the added extensions.
 37 | 
 38 | ### Create a `Dockerfile`
 39 | 
 40 | At the root of your project, create a `Dockerfile` if one doesn't already exist and add the following:
 41 | 
 42 | ```Dockerfile
 43 | FROM directus/directus:11.x.y
 44 | 
 45 | USER root
 46 | RUN corepack enable
 47 | USER node
 48 | 
 49 | RUN pnpm install @replexica/integration-directus
 50 | ```
 51 | 
 52 | ### Build the Docker Image
 53 | 
 54 | Build your Docker image:
 55 | 
 56 | ```bash
 57 | docker compose build
 58 | ```
 59 | 
 60 | ### Start the Docker Container
 61 | 
 62 | Start your Docker container:
 63 | 
 64 | ```bash
 65 | docker compose up
 66 | ```
 67 | 
 68 | On startup, Directus will automatically load any extension installed in the previous steps.
 69 | 
 70 | ## 2. Create a New Flow
 71 | 
 72 | 1. Navigate to the Flows section in Directus CMS.
 73 | 2. Create a new Flow
 74 | 
 75 | ![Create Flow](https://nlugbbdqxnqwhydszieg.supabase.co/storage/v1/object/public/replexica-integration-directus/create-flow.png)
 76 | 
 77 | 3. Select a Manual trigger, check collections to apply to, and Save.
 78 | 
 79 | ![Select Trigger](https://nlugbbdqxnqwhydszieg.supabase.co/storage/v1/object/public/replexica-integration-directus/create-new-flow-trigger.png)
 80 | 
 81 | 4. Add Confirmation dialog with Target Languages and Save.
 82 | 
 83 | ![Add Confirmation Dialog](https://nlugbbdqxnqwhydszieg.supabase.co/storage/v1/object/public/replexica-integration-directus/confirmation-dialog.png)
 84 | 
 85 | 5. Click '+' to add a new operation and select Lingo.dev Integration for Directus.
 86 | 
 87 | ![Add Operation](https://nlugbbdqxnqwhydszieg.supabase.co/storage/v1/object/public/replexica-integration-directus/replexica-operation.png)
 88 | 
 89 | 6. Configure the operation with the required parameters.
 90 | 
 91 | ![Configure Operation](https://nlugbbdqxnqwhydszieg.supabase.co/storage/v1/object/public/replexica-integration-directus/replexica-operation-settings.png)
 92 | 
 93 | 7. Save the Flow.
 94 | 
 95 | ## 3. Run the Flow
 96 | 
 97 | Go to Content and run the Flow on the collection to localize your content.
 98 | 
 99 | ![Run Flow](https://nlugbbdqxnqwhydszieg.supabase.co/storage/v1/object/public/replexica-integration-directus/run-flow.png)
100 | 
101 | ## Results
102 | 
103 | The Flow will automatically translate the content in the selected collection.
104 | 
105 | ![Flow Results](https://nlugbbdqxnqwhydszieg.supabase.co/storage/v1/object/public/replexica-integration-directus/flow-results.png)
106 | 
107 | ## Lingo.dev Extension Inputs
108 | 
109 | The integration provides a Directus operation that accepts the following parameters:
110 | 
111 | - `item_id`: The ID of the item to translate
112 | - `collection`: The collection containing the content
113 | - `translation_table`: The table storing translations
114 | - `language_table`: The table containing supported languages
115 | - `replexica_api_key`: Your Lingo.dev API key
116 | - `source_language`: Source language code (defaults to 'en-US')
117 | - `target_languages`: Array of target language codes (example: ['fr-FR', 'de-DE'])
118 | 
119 | ## Development
120 | 
121 | To run the integration locally:
122 | 
123 | ```bash
124 | # Clone the repo
125 | git clone https://github.com/lingodotdev/lingo.dev
126 | 
127 | # Install dependencies
128 | cd integrations/directus
129 | pnpm install
130 | 
131 | # Run dev server
132 | pnpm dev
133 | 
134 | # Build
135 | pnpm build
136 | 
137 | # Run tests
138 | pnpm test
139 | ```
140 | 
141 | The integration can be tested using the included Docker setup:
142 | 
143 | ```bash
144 | docker-compose up
145 | ```
146 | 
147 | This will start Directus at [http://localhost:8055](http://localhost:8055).
148 | 
149 | ## License
150 | 
151 | [Apache-2.0](./LICENSE)
152 | 
153 | ## More Information
154 | 
155 | - [Lingo.dev Documentation](https://lingo.dev)
156 | - [Directus Extensions Guide](https://docs.directus.io/extensions/operations)
157 | - [GitHub Repository](https://github.com/lingodotdev/lingo.dev)
158 | 
159 | ## Support
160 | 
161 | For questions and support:
162 | 
163 | - [Lingo.dev Discord](https://lingo.dev/go/discord)
164 | - Email: <[email protected]>
165 | 
```

--------------------------------------------------------------------------------
/packages/locales/README.md:
--------------------------------------------------------------------------------

```markdown
  1 | # @lingo.dev/locales
  2 | 
  3 | A JavaScript package that helps developers work with locale codes (like "en-US" or "zh-Hans-CN") and get country/language names in different languages.
  4 | 
  5 | ## Features
  6 | 
  7 | - **Locale Parsing**: Break apart locale strings into language, script, and region components
  8 | - **Validation**: Check if locale codes are properly formatted and use real ISO codes
  9 | - **Name Resolution**: Get localized names for countries, languages, and scripts in 200+ languages
 10 | - **Small Bundle Size**: Core package is ~12KB with on-demand data loading
 11 | - **Full TypeScript Support**: Complete type definitions included
 12 | 
 13 | ## Installation
 14 | 
 15 | ```bash
 16 | npm install @lingo.dev/locales
 17 | ```
 18 | 
 19 | ## Usage
 20 | 
 21 | ### Locale Parsing
 22 | 
 23 | ```typescript
 24 | import {
 25 |   parseLocale,
 26 |   getLanguageCode,
 27 |   getScriptCode,
 28 |   getRegionCode,
 29 | } from "@lingo.dev/locales";
 30 | 
 31 | // Parse complete locale
 32 | parseLocale("en-US"); // { language: "en", region: "US" }
 33 | parseLocale("zh-Hans-CN"); // { language: "zh", script: "Hans", region: "CN" }
 34 | parseLocale("sr-Cyrl-RS"); // { language: "sr", script: "Cyrl", region: "RS" }
 35 | 
 36 | // Extract individual components
 37 | getLanguageCode("en-US"); // "en"
 38 | getScriptCode("zh-Hans-CN"); // "Hans"
 39 | getRegionCode("en-US"); // "US"
 40 | ```
 41 | 
 42 | ### Validation
 43 | 
 44 | ```typescript
 45 | import {
 46 |   isValidLocale,
 47 |   isValidLanguageCode,
 48 |   isValidScriptCode,
 49 |   isValidRegionCode,
 50 | } from "@lingo.dev/locales";
 51 | 
 52 | // Validate complete locales
 53 | isValidLocale("en-US"); // true
 54 | isValidLocale("en-FAKE"); // false
 55 | isValidLocale("xyz-US"); // false
 56 | 
 57 | // Validate individual components
 58 | isValidLanguageCode("en"); // true
 59 | isValidLanguageCode("xyz"); // false
 60 | isValidScriptCode("Hans"); // true
 61 | isValidScriptCode("Fake"); // false
 62 | isValidRegionCode("US"); // true
 63 | isValidRegionCode("ZZ"); // false
 64 | ```
 65 | 
 66 | ### Name Resolution (Async)
 67 | 
 68 | ```typescript
 69 | import {
 70 |   getCountryName,
 71 |   getLanguageName,
 72 |   getScriptName,
 73 | } from "@lingo.dev/locales";
 74 | 
 75 | // Get country names in different languages
 76 | await getCountryName("US"); // "United States"
 77 | await getCountryName("US", "es"); // "Estados Unidos"
 78 | await getCountryName("CN", "fr"); // "Chine"
 79 | 
 80 | // Get language names in different languages
 81 | await getLanguageName("en"); // "English"
 82 | await getLanguageName("en", "es"); // "inglés"
 83 | await getLanguageName("zh", "fr"); // "chinois"
 84 | 
 85 | // Get script names in different languages
 86 | await getScriptName("Hans"); // "Simplified Han"
 87 | await getScriptName("Hans", "es"); // "han simplificado"
 88 | await getScriptName("Latn", "zh"); // "拉丁文"
 89 | ```
 90 | 
 91 | ## API Reference
 92 | 
 93 | ### Parsing Functions
 94 | 
 95 | #### `parseLocale(locale: string): LocaleComponents`
 96 | 
 97 | Breaks apart a locale string into its components.
 98 | 
 99 | **Parameters:**
100 | 
101 | - `locale` (string): The locale string to parse
102 | 
103 | **Returns:** `LocaleComponents` object with `language`, `script`, and `region` properties
104 | 
105 | **Examples:**
106 | 
107 | ```typescript
108 | parseLocale("en-US"); // { language: "en", region: "US" }
109 | parseLocale("zh-Hans-CN"); // { language: "zh", script: "Hans", region: "CN" }
110 | parseLocale("es"); // { language: "es" }
111 | ```
112 | 
113 | #### `getLanguageCode(locale: string): string`
114 | 
115 | Extracts just the language part from a locale string.
116 | 
117 | #### `getScriptCode(locale: string): string | null`
118 | 
119 | Extracts the script part from a locale string.
120 | 
121 | #### `getRegionCode(locale: string): string | null`
122 | 
123 | Extracts the region/country part from a locale string.
124 | 
125 | ### Validation Functions
126 | 
127 | #### `isValidLocale(locale: string): boolean`
128 | 
129 | Checks if a locale string is properly formatted and uses real codes.
130 | 
131 | #### `isValidLanguageCode(code: string): boolean`
132 | 
133 | Checks if a language code is valid (ISO 639-1).
134 | 
135 | #### `isValidScriptCode(code: string): boolean`
136 | 
137 | Checks if a script code is valid (ISO 15924).
138 | 
139 | #### `isValidRegionCode(code: string): boolean`
140 | 
141 | Checks if a region code is valid (ISO 3166-1 alpha-2 or UN M.49).
142 | 
143 | ### Name Resolution Functions
144 | 
145 | #### `getCountryName(countryCode: string, displayLanguage = "en"): Promise<string>`
146 | 
147 | Gets a country name in the specified language.
148 | 
149 | **Parameters:**
150 | 
151 | - `countryCode` (string): The country code (e.g., "US", "CN")
152 | - `displayLanguage` (string, optional): The language to display the name in (default: "en")
153 | 
154 | **Returns:** Promise<string> - The localized country name
155 | 
156 | #### `getLanguageName(languageCode: string, displayLanguage = "en"): Promise<string>`
157 | 
158 | Gets a language name in the specified language.
159 | 
160 | #### `getScriptName(scriptCode: string, displayLanguage = "en"): Promise<string>`
161 | 
162 | Gets a script name in the specified language.
163 | 
164 | ## Supported Formats
165 | 
166 | The package supports both hyphen (`-`) and underscore (`_`) delimiters:
167 | 
168 | - `en-US` or `en_US` → `{ language: "en", region: "US" }`
169 | - `zh-Hans-CN` or `zh_Hans_CN` → `{ language: "zh", script: "Hans", region: "CN" }`
170 | 
171 | ## Data Sources
172 | 
173 | - **Locale parsing**: Uses regex-based parsing with ISO standard validation
174 | - **Name resolution**: Uses Unicode CLDR (Common Locale Data Repository) data
175 | - **Validation**: Uses official ISO 639-1, ISO 15924, and ISO 3166-1 standards
176 | 
177 | ## Performance
178 | 
179 | - **Bundle size**: Core package is ~12KB (ESM) / ~14KB (CJS)
180 | - **Runtime data**: Loaded on-demand from GitHub raw URLs
181 | - **Caching**: In-memory cache to avoid repeated network requests
182 | - **Fallback**: Graceful degradation to English when language data is unavailable
183 | 
184 | ## Error Handling
185 | 
186 | All functions include comprehensive error handling:
187 | 
188 | ```typescript
189 | try {
190 |   parseLocale("invalid");
191 | } catch (error) {
192 |   console.log(error.message); // "Invalid locale format: invalid"
193 | }
194 | 
195 | try {
196 |   await getCountryName("XX");
197 | } catch (error) {
198 |   console.log(error.message); // "Country code "XX" not found"
199 | }
200 | ```
201 | 
202 | ## TypeScript Support
203 | 
204 | Full TypeScript support with comprehensive type definitions:
205 | 
206 | ```typescript
207 | interface LocaleComponents {
208 |   language: string;
209 |   script?: string;
210 |   region?: string;
211 | }
212 | 
213 | type LocaleDelimiter = "-" | "_";
214 | 
215 | interface ParseResult {
216 |   components: LocaleComponents;
217 |   delimiter: LocaleDelimiter | null;
218 |   isValid: boolean;
219 |   error?: string;
220 | }
221 | ```
222 | 
223 | ## License
224 | 
225 | Apache 2.0
226 | 
```

--------------------------------------------------------------------------------
/packages/cli/README.md:
--------------------------------------------------------------------------------

```markdown
  1 | <p align="center">
  2 |   <a href="https://lingo.dev">
  3 |     <img src="https://raw.githubusercontent.com/lingodotdev/lingo.dev/main/content/banner.compiler.png" width="100%" alt="Lingo.dev" />
  4 |   </a>
  5 | </p>
  6 | 
  7 | <p align="center">
  8 |   <strong>⚡ Lingo.dev - open-source, AI-powered i18n toolkit for instant localization with LLMs.</strong>
  9 | </p>
 10 | 
 11 | <br />
 12 | 
 13 | <p align="center">
 14 |   <a href="https://lingo.dev/compiler">Lingo.dev Compiler</a> •
 15 |   <a href="https://lingo.dev/cli">Lingo.dev CLI</a> •
 16 |   <a href="https://lingo.dev/ci">Lingo.dev CI/CD</a> •
 17 |   <a href="https://lingo.dev/sdk">Lingo.dev SDK</a>
 18 | </p>
 19 | 
 20 | <p align="center">
 21 |   <a href="https://github.com/lingodotdev/lingo.dev/actions/workflows/release.yml">
 22 |     <img src="https://github.com/lingodotdev/lingo.dev/actions/workflows/release.yml/badge.svg" alt="Release" />
 23 |   </a>
 24 |   <a href="https://github.com/lingodotdev/lingo.dev/blob/main/LICENSE.md">
 25 |     <img src="https://img.shields.io/github/license/lingodotdev/lingo.dev" alt="License" />
 26 |   </a>
 27 |   <a href="https://github.com/lingodotdev/lingo.dev/commits/main">
 28 |     <img src="https://img.shields.io/github/last-commit/lingodotdev/lingo.dev" alt="Last Commit" />
 29 |   </a>
 30 |   <a href="https://lingo.dev/en">
 31 |     <img src="https://img.shields.io/badge/Product%20Hunt-%231%20DevTool%20of%20the%20Month-orange?logo=producthunt&style=flat-square" alt="Product Hunt #1 DevTool of the Month" />
 32 |   </a>
 33 |   <a href="https://lingo.dev/en">
 34 |     <img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Week-orange?logo=producthunt&style=flat-square" alt="Product Hunt #1 DevTool of the Week" />
 35 |   </a>
 36 |   <a href="https://lingo.dev/en">
 37 |     <img src="https://img.shields.io/badge/Product%20Hunt-%232%20Product%20of%20the%20Day-orange?logo=producthunt&style=flat-square" alt="Product Hunt #2 Product of the Day" />
 38 |   </a>
 39 |   <a href="https://lingo.dev/en">
 40 |     <img src="https://img.shields.io/badge/GitHub-Trending-blue?logo=github&style=flat-square" alt="Github trending" />
 41 |   </a>
 42 | </p>
 43 | 
 44 | ---
 45 | 
 46 | ## Meet the Compiler 🆕
 47 | 
 48 | **Lingo.dev Compiler** is a free, open-source compiler middleware, designed to make any React app multilingual at build time without requiring any changes to the existing React components.
 49 | 
 50 | Install once:
 51 | 
 52 | ```bash
 53 | npm install lingo.dev
 54 | ```
 55 | 
 56 | Enable in your build config:
 57 | 
 58 | ```js
 59 | import lingoCompiler from "lingo.dev/compiler";
 60 | 
 61 | const existingNextConfig = {};
 62 | 
 63 | export default lingoCompiler.next({
 64 |   sourceLocale: "en",
 65 |   targetLocales: ["es", "fr"],
 66 | })(existingNextConfig);
 67 | ```
 68 | 
 69 | Run `next build` and watch Spanish and French bundles pop out ✨
 70 | 
 71 | [Read the docs →](https://lingo.dev/compiler) for the full guide, and [Join our Discord](https://lingo.dev/go/discord) to get help with your setup.
 72 | 
 73 | ---
 74 | 
 75 | ### What's inside this repo?
 76 | 
 77 | | Tool         | TL;DR                                                                          | Docs                                    |
 78 | | ------------ | ------------------------------------------------------------------------------ | --------------------------------------- |
 79 | | **Compiler** | Build-time React localization                                                  | [/compiler](https://lingo.dev/compiler) |
 80 | | **CLI**      | One-command localization for web and mobile apps, JSON, YAML, markdown, + more | [/cli](https://lingo.dev/cli)           |
 81 | | **CI/CD**    | Auto-commit translations on every push + create pull requests if needed        | [/ci](https://lingo.dev/ci)             |
 82 | | **SDK**      | Realtime translation for user-generated content                                | [/sdk](https://lingo.dev/sdk)           |
 83 | 
 84 | Below are the quick hits for each 👇
 85 | 
 86 | ---
 87 | 
 88 | ### ⚡️ Lingo.dev CLI
 89 | 
 90 | Translate code & content straight from your terminal.
 91 | 
 92 | ```bash
 93 | npx lingo.dev@latest run
 94 | ```
 95 | 
 96 | It fingerprints every string, caches results, and only re-translates what changed.
 97 | 
 98 | [Follow the docs →](https://lingo.dev/cli) to learn how to set it up.
 99 | 
100 | ---
101 | 
102 | ### 🔄 Lingo.dev CI/CD
103 | 
104 | Ship perfect translations automatically.
105 | 
106 | ```yaml
107 | # .github/workflows/i18n.yml
108 | name: Lingo.dev i18n
109 | on: [push]
110 | 
111 | jobs:
112 |   i18n:
113 |     runs-on: ubuntu-latest
114 |     steps:
115 |       - uses: actions/checkout@v4
116 |       - uses: lingodotdev/lingo.dev@main
117 |         with:
118 |           api-key: ${{ secrets.LINGODOTDEV_API_KEY }}
119 | ```
120 | 
121 | Keeps your repo green and your product multilingual without the manual steps.
122 | 
123 | [Read the docs →](https://lingo.dev/ci)
124 | 
125 | ---
126 | 
127 | ### 🧩 Lingo.dev SDK
128 | 
129 | Instant per-request translation for dynamic content.
130 | 
131 | ```ts
132 | import { LingoDotDevEngine } from "lingo.dev/sdk";
133 | 
134 | const lingoDotDev = new LingoDotDevEngine({
135 |   apiKey: "your-api-key-here",
136 | });
137 | 
138 | const content = {
139 |   greeting: "Hello",
140 |   farewell: "Goodbye",
141 |   message: "Welcome to our platform",
142 | };
143 | 
144 | const translated = await lingoDotDev.localizeObject(content, {
145 |   sourceLocale: "en",
146 |   targetLocale: "es",
147 | });
148 | // Returns: { greeting: "Hola", farewell: "Adiós", message: "Bienvenido a nuestra plataforma" }
149 | ```
150 | 
151 | Perfect for chat, user comments, and other real-time flows.
152 | 
153 | [Read the docs →](https://lingo.dev/sdk)
154 | 
155 | ---
156 | 
157 | ## 🤝 Community
158 | 
159 | We're community-driven and love contributions!
160 | 
161 | - Got an idea? [Open an issue](https://github.com/lingodotdev/lingo.dev/issues)
162 | - Want to fix something? [Send a PR](https://github.com/lingodotdev/lingo.dev/pulls)
163 | - Need help? [Join our Discord](https://lingo.dev/go/discord)
164 | 
165 | ## ⭐ Star History
166 | 
167 | If you like what we're doing, give us a ⭐ and help us reach 4,000 stars! 🌟
168 | 
169 | [![Star History Chart](https://api.star-history.com/svg?repos=lingodotdev/lingo.dev&type=Date)](https://www.star-history.com/#lingodotdev/lingo.dev&Date)
170 | 
171 | ## 🌐 Readme in other languages
172 | 
173 | [English](https://github.com/lingodotdev/lingo.dev) • [中文](/readme/zh-Hans.md) • [日本語](/readme/ja.md) • [한국어](/readme/ko.md) • [Español](/readme/es.md) • [Français](/readme/fr.md) • [Русский](/readme/ru.md) • [Українська](/readme/uk-UA.md) • [Deutsch](/readme/de.md) • [Italiano](/readme/it.md) • [العربية](/readme/ar.md) • [עברית](/readme/he.md) • [हिन्दी](/readme/hi.md) • [বাংলা](/readme/bn.md) • [فارسی](/readme/fa.md)
174 | 
175 | Don't see your language? Add it to [`i18n.json`](./i18n.json) and open a PR!
176 | 
```

--------------------------------------------------------------------------------
/CLAUDE.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Extremely important instructions for Claude
 2 | 
 3 | ## FYI
 4 | 
 5 | - We're in a pnpm + turbo monorepo
 6 | 
 7 | ## Tools
 8 | 
 9 | - Must use `pnpm` as package manager
10 | 
11 | ## Testing
12 | 
13 | - When you add tests - make sure they pass
```

--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------

```markdown
  1 | # Contributor Covenant Code of Conduct
  2 | 
  3 | ## Our Pledge
  4 | 
  5 | We as members, contributors, and leaders pledge to make participation in our
  6 | community a harassment-free experience for everyone, regardless of age, body
  7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
  8 | identity and expression, level of experience, education, socio-economic status,
  9 | nationality, personal appearance, race, religion, or sexual identity
 10 | and orientation.
 11 | 
 12 | We pledge to act and interact in ways that contribute to an open, welcoming,
 13 | diverse, inclusive, and healthy community.
 14 | 
 15 | ## Our Standards
 16 | 
 17 | Examples of behavior that contributes to a positive environment for our
 18 | community include:
 19 | 
 20 | - Demonstrating empathy and kindness toward other people
 21 | - Being respectful of differing opinions, viewpoints, and experiences
 22 | - Giving and gracefully accepting constructive feedback
 23 | - Accepting responsibility and apologizing to those affected by our mistakes,
 24 |   and learning from the experience
 25 | - Focusing on what is best not just for us as individuals, but for the
 26 |   overall community
 27 | 
 28 | Examples of unacceptable behavior include:
 29 | 
 30 | - The use of sexualized language or imagery, and sexual attention or
 31 |   advances of any kind
 32 | - Trolling, insulting or derogatory comments, and personal or political attacks
 33 | - Public or private harassment
 34 | - Publishing others' private information, such as a physical or email
 35 |   address, without their explicit permission
 36 | - Other conduct which could reasonably be considered inappropriate in a
 37 |   professional setting
 38 | 
 39 | ## Enforcement Responsibilities
 40 | 
 41 | Community leaders are responsible for clarifying and enforcing our standards of
 42 | acceptable behavior and will take appropriate and fair corrective action in
 43 | response to any behavior that they deem inappropriate, threatening, offensive,
 44 | or harmful.
 45 | 
 46 | Community leaders have the right and responsibility to remove, edit, or reject
 47 | comments, commits, code, wiki edits, issues, and other contributions that are
 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
 49 | decisions when appropriate.
 50 | 
 51 | ## Scope
 52 | 
 53 | This Code of Conduct applies within all community spaces, and also applies when
 54 | an individual is officially representing the community in public spaces.
 55 | Examples of representing our community include using an official e-mail address,
 56 | posting via an official social media account, or acting as an appointed
 57 | representative at an online or offline event.
 58 | 
 59 | ## Enforcement
 60 | 
 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
 62 | reported to the community leaders responsible for enforcement at
 63 | [email protected].
 64 | All complaints will be reviewed and investigated promptly and fairly.
 65 | 
 66 | All community leaders are obligated to respect the privacy and security of the
 67 | reporter of any incident.
 68 | 
 69 | ## Enforcement Guidelines
 70 | 
 71 | Community leaders will follow these Community Impact Guidelines in determining
 72 | the consequences for any action they deem in violation of this Code of Conduct:
 73 | 
 74 | ### 1. Correction
 75 | 
 76 | **Community Impact**: Use of inappropriate language or other behavior deemed
 77 | unprofessional or unwelcome in the community.
 78 | 
 79 | **Consequence**: A private, written warning from community leaders, providing
 80 | clarity around the nature of the violation and an explanation of why the
 81 | behavior was inappropriate. A public apology may be requested.
 82 | 
 83 | ### 2. Warning
 84 | 
 85 | **Community Impact**: A violation through a single incident or series
 86 | of actions.
 87 | 
 88 | **Consequence**: A warning with consequences for continued behavior. No
 89 | interaction with the people involved, including unsolicited interaction with
 90 | those enforcing the Code of Conduct, for a specified period of time. This
 91 | includes avoiding interactions in community spaces as well as external channels
 92 | like social media. Violating these terms may lead to a temporary or
 93 | permanent ban.
 94 | 
 95 | ### 3. Temporary Ban
 96 | 
 97 | **Community Impact**: A serious violation of community standards, including
 98 | sustained inappropriate behavior.
 99 | 
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 | 
106 | ### 4. Permanent Ban
107 | 
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 | 
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 | 
115 | ## Attribution
116 | 
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 | 
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 | 
124 | [homepage]: https://www.contributor-covenant.org
125 | 
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 | 
```

--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
  1 | # CONTRIBUTING.md
  2 | 
  3 | Thank you for contributing to Lingo.dev! We're an exciting open source project and we love having you contribute!
  4 | 
  5 | Here are some resources and guidance to help you get started:
  6 | 
  7 | 1. [Getting Started](#getting-started)
  8 | 2. [Issues](#issues)
  9 | 3. [Pull Requests](#pull-requests)
 10 | 4. [Release Process](#release-process)
 11 | 
 12 | ## Getting Started
 13 | 
 14 | Here's how to get the project running locally:
 15 | 
 16 | ### Prerequisites
 17 | 
 18 | - **Node.js**: Make sure you have Node.js version 18 or higher installed.
 19 | - **pnpm**: You can install using this command `npm install -g pnpm` or by following [this guide](https://pnpm.io/installation)
 20 | - **AI API Key**:
 21 |   Currently, Groq, Google, and Mistral are supported.
 22 |   - **GROQ API Key**: You can get one by signing up at [Groq](https://console.groq.com/)
 23 |   - **GOOGLE API Key**: You can get one in the [Google AI Studio](https://aistudio.google.com/apikey)
 24 |   - **MISTRAL API Key**: You can get one by signing up at [Mistral AI](https://console.mistral.ai)
 25 | 
 26 | ### Setup
 27 | 
 28 | To set up the project, clone the repository and install the dependencies:
 29 | 
 30 | ```bash
 31 | git clone https://github.com/lingodotdev/lingo.dev
 32 | cd lingo.dev
 33 | pnpm install
 34 | ```
 35 | 
 36 | Next, configure an AI API key. You can use either a Lingo.dev API key or one of the supported LLM model providers.
 37 | 
 38 | Please refer to our docs on how to set this up: https://lingo.dev/en/cli/quick-start#step-2-authentication
 39 | 
 40 | _Note:_ When loading LLM API keys (both Lingo.dev and other LLM model providers like Groq or Mistral), the Lingo.dev Compiler checks the following sources in order of priority:
 41 | 
 42 | 1. Environment variables (via `process.env`)
 43 | 2. Environment files (`.env`, `.env.local`, `.env.development`)
 44 | 3. Lingo.dev configuration
 45 | 
 46 | Next, you can run the project using the following commands:
 47 | 
 48 | ```bash
 49 | # start the build process
 50 | pnpm turbo build
 51 | 
 52 | # in terminal window 1 - watch for CLI code changes
 53 | cd packages/cli
 54 | pnpm run dev
 55 | 
 56 | # in terminal window 2 - test the CLI
 57 | cd packages/cli
 58 | pnpm lingo.dev --help # this command will use the current CLI code + demo config from ./packages/cli/i18n.json
 59 | ```
 60 | 
 61 | Feel free to ask questions on our [Discord server](https://lingo.dev/go/discord)!
 62 | 
 63 | ## Adding a New LLM Provider
 64 | 
 65 | Want to add support for a new LLM provider to Lingo.dev? Here's a checklist to help you get started:
 66 | 
 67 | 1. **Add Your Dependency**
 68 | 
 69 |    - Install the relevant SDK/package for your provider in the necessary `package.json` (usually `cli` and/or `compiler`). Lingo.dev uses the [AI SDK](https://ai-sdk.dev) and its [providers](https://ai-sdk.dev/providers/ai-sdk-providers), so check first to make sure the AI SDK supports your provider.
 70 | 
 71 | 2. **Update the Config Schema**
 72 | 
 73 |    - Edit [`packages/spec/src/config.ts`](./packages/spec/src/config.ts) and update the list of allowed provider `id` values to include your new provider.
 74 | 
 75 | 3. **Provider Details**
 76 | 
 77 |    - Add your provider to [`packages/compiler/src/lib/lcp/api/provider-details.ts`](./packages/compiler/src/lib/lcp/api/provider-details.ts) with name, env var, config key, API docs, and signup link.
 78 | 
 79 | 4. **API Key Handling**
 80 | 
 81 |    - Update [`packages/compiler/src/utils/llm-api-key.ts`](./packages/compiler/src/utils/llm-api-key.ts) to add functions for getting the API key from environment/config.
 82 | 
 83 | 5. **CLI and Compiler Logic**
 84 | 
 85 |    - Update the CLI (e.g., [`packages/cli/src/cli/localizer/explicit.ts`](./packages/cli/src/cli/localizer/explicit.ts), [`packages/cli/src/cli/processor/index.ts`](./packages/cli/src/cli/processor/index.ts)) to support your provider.
 86 |    - Update the compiler's translation logic to instantiate your provider's client (see [`packages/compiler/src/lib/lcp/api/index.ts`](./packages/compiler/src/lib/lcp/api/index.ts)).
 87 | 
 88 | 6. **Error Handling**
 89 | 
 90 |    - Ensure user-facing error messages are updated to mention your provider where relevant (API key checks, troubleshooting, etc).
 91 | 
 92 | 7. **Test and Document**
 93 |    - Add or update tests to cover your provider.
 94 |    - Update documentation and this contributing guide as needed.
 95 | 
 96 | **Tip:**
 97 | Look at how existing providers like "groq", "google", and "mistral" are implemented for reference. Consistency helps us maintain quality and predictability!
 98 | 
 99 | ## Issues
100 | 
101 | If you find a bug, please create an Issue and we'll triage it.
102 | 
103 | - Please search [existing Issues](https://github.com/lingodotdev/lingo.dev/issues) before creating a new one
104 | - Please include a clear description of the problem along with steps to reproduce it. Exact steps with screenshots and URLs really help here
105 | - Before starting work on an issue, please comment on it and wait for it to be assigned to you. This prevents multiple people from working on the same issue simultaneously
106 | - Let's discuss implementation details in the issue comments or Discord before starting work, to ensure alignment between contributors and the Lingo.dev team
107 | 
108 | ## Pull Requests
109 | 
110 | We love your Pull Requests! However, we maintain extremely high standards for code quality and design. We are looking for elegant, 12/10, beautiful code and deeply weighted system design decisions.
111 | 
112 | ### Our Standards
113 | 
114 | - **Surgical PRs**: Pull requests must be surgical and extremely single-purposed. One clear objective per PR.
115 | - **Elegant Code**: We expect beautifully crafted, elegant code that demonstrates mastery of the language and patterns.
116 | - **Deep Design Thinking**: System design decisions must be deeply considered and well-reasoned.
117 | - **Comprehensive Testing**: Must include tests that surgically test both positive and negative paths of the code.
118 | - **Uncompromising Quality**: We prefer fewer, higher-quality contributions over numerous mediocre ones.
119 | 
120 | A couple of things to keep in mind before you submit:
121 | 
122 | ### Before you open a pull request
123 | 
124 | - GitHub Issue
125 |   - Make sure the fix or feature is sufficiently documented and discussed in advance in an existing [GitHub Issue](https://github.com/lingodotdev/lingo.dev/issues)
126 |   - If there are no related issues, **we strongly suggest you [create a new Issue](https://github.com/lingodotdev/lingo.dev/issues/new)** and discuss your feature or proposal with the Lingo.dev team
127 |   - If there is a Discord thread already, please summarize it in a GitHub Issue. This helps to keep everyone in the loop, including open-source contributors and Lingo.dev team members not part of the original conversation. It also serves as documentation for future decisions.
128 | - README update
129 |   - If applicable, please add a section with the CLI commands introduced in your PR (what their purpose is and how to use them)
130 |   - It is not necessary to update the README file for every change, oftentimes a comprehensive description in the Issue or PR description is enough
131 | - Tests
132 |   - Your changes should include unit tests for the main code paths, to make sure nothing breaks
133 | - Changeset
134 |   - Add a [changeset](https://github.com/changesets/changesets) for your feature or fix (run `pnpm new` from the repo root)
135 | - PR checks
136 |   - Make sure all checks pass
137 |   - You can run the checks locally in repo root:
138 |     ```sh
139 |     pnpm install --frozen-lockfile
140 |     pnpm format:check
141 |     pnpm turbo build --force
142 |     pnpm turbo test --force
143 |     pnpm changeset status --since origin/main
144 |     ```
145 |     ...or let GitHub run it in the PR for you.
146 | 
147 | ### Opening a pull request
148 | 
149 | - GitHub Issue
150 |   - Make sure to link your PR to the existing Issue(s)
151 |   - We may not be able to accept new features without existing Issues
152 |   - This does not apply to smaller fixes with sufficient description in the PR
153 | - Existing PRs
154 |   - Make sure someone else hasn't already created a PR fixing the same issue.
155 | - PR title
156 |   - The title should be [a valid Conventional Commit title](https://github.com/amannn/action-semantic-pull-request?tab=readme-ov-file#action-semantic-pull-request)
157 |   - Should start with `feat:`, `fix:`, `chore:`, etc.
158 | - PR description
159 |   - Should contain sufficient description of your PR (unless the linked Issue already does)
160 |   - _💡 Tip:_ Oftentimes less is more. Try to write in your own words; real humans are reviewing your PR.
161 | - Demo video
162 |   - For larger features we would really appreciate a quick screen recording showing it in action
163 |   - It helps make the review process faster
164 |   - You can use [open-source Cap](https://github.com/CapSoftware/Cap), [QuickTime on Mac](https://support.apple.com/guide/quicktime-player/record-your-screen-qtp97b08e666/mac), or any other software you prefer
165 | 
166 | ### Review Process
167 | 
168 | - We will always try to accept the first viable PR that resolves the Issue
169 | - Please discuss implementation approach beforehand to avoid having PRs rejected
170 | - Please actively discuss with the Lingo.dev team in the PR and related Issue(s)
171 | 
172 | #### Automated Code Review
173 | 
174 | We use Claude Code to provide automated code reviews on all pull requests. This helps ensure:
175 | 
176 | - Code quality and maintainability
177 | - Security best practices
178 | - Performance considerations
179 | - Proper test coverage
180 | - Documentation completeness
181 | 
182 | The automated review will post comments on your PR with suggestions and feedback. While these are helpful guidelines, human reviewers will make the final decisions. If Claude Code identifies critical security issues, please address them promptly.
183 | 
184 | ---
185 | 
186 | Thank you!
187 | 
```

--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------

```markdown
  1 |                                  Apache License
  2 |                            Version 2.0, January 2004
  3 |                         http://www.apache.org/licenses/
  4 | 
  5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  6 | 
  7 | 1.  Definitions.
  8 | 
  9 |     "License" shall mean the terms and conditions for use, reproduction,
 10 |     and distribution as defined by Sections 1 through 9 of this document.
 11 | 
 12 |     "Licensor" shall mean the copyright owner or entity authorized by
 13 |     the copyright owner that is granting the License.
 14 | 
 15 |     "Legal Entity" shall mean the union of the acting entity and all
 16 |     other entities that control, are controlled by, or are under common
 17 |     control with that entity. For the purposes of this definition,
 18 |     "control" means (i) the power, direct or indirect, to cause the
 19 |     direction or management of such entity, whether by contract or
 20 |     otherwise, or (ii) ownership of fifty percent (50%) or more of the
 21 |     outstanding shares, or (iii) beneficial ownership of such entity.
 22 | 
 23 |     "You" (or "Your") shall mean an individual or Legal Entity
 24 |     exercising permissions granted by this License.
 25 | 
 26 |     "Source" form shall mean the preferred form for making modifications,
 27 |     including but not limited to software source code, documentation
 28 |     source, and configuration files.
 29 | 
 30 |     "Object" form shall mean any form resulting from mechanical
 31 |     transformation or translation of a Source form, including but
 32 |     not limited to compiled object code, generated documentation,
 33 |     and conversions to other media types.
 34 | 
 35 |     "Work" shall mean the work of authorship, whether in Source or
 36 |     Object form, made available under the License, as indicated by a
 37 |     copyright notice that is included in or attached to the work
 38 |     (an example is provided in the Appendix below).
 39 | 
 40 |     "Derivative Works" shall mean any work, whether in Source or Object
 41 |     form, that is based on (or derived from) the Work and for which the
 42 |     editorial revisions, annotations, elaborations, or other modifications
 43 |     represent, as a whole, an original work of authorship. For the purposes
 44 |     of this License, Derivative Works shall not include works that remain
 45 |     separable from, or merely link (or bind by name) to the interfaces of,
 46 |     the Work and Derivative Works thereof.
 47 | 
 48 |     "Contribution" shall mean any work of authorship, including
 49 |     the original version of the Work and any modifications or additions
 50 |     to that Work or Derivative Works thereof, that is intentionally
 51 |     submitted to Licensor for inclusion in the Work by the copyright owner
 52 |     or by an individual or Legal Entity authorized to submit on behalf of
 53 |     the copyright owner. For the purposes of this definition, "submitted"
 54 |     means any form of electronic, verbal, or written communication sent
 55 |     to the Licensor or its representatives, including but not limited to
 56 |     communication on electronic mailing lists, source code control systems,
 57 |     and issue tracking systems that are managed by, or on behalf of, the
 58 |     Licensor for the purpose of discussing and improving the Work, but
 59 |     excluding communication that is conspicuously marked or otherwise
 60 |     designated in writing by the copyright owner as "Not a Contribution."
 61 | 
 62 |     "Contributor" shall mean Licensor and any individual or Legal Entity
 63 |     on behalf of whom a Contribution has been received by Licensor and
 64 |     subsequently incorporated within the Work.
 65 | 
 66 | 2.  Grant of Copyright License. Subject to the terms and conditions of
 67 |     this License, each Contributor hereby grants to You a perpetual,
 68 |     worldwide, non-exclusive, no-charge, royalty-free, irrevocable
 69 |     copyright license to reproduce, prepare Derivative Works of,
 70 |     publicly display, publicly perform, sublicense, and distribute the
 71 |     Work and such Derivative Works in Source or Object form.
 72 | 
 73 | 3.  Grant of Patent License. Subject to the terms and conditions of
 74 |     this License, each Contributor hereby grants to You a perpetual,
 75 |     worldwide, non-exclusive, no-charge, royalty-free, irrevocable
 76 |     (except as stated in this section) patent license to make, have made,
 77 |     use, offer to sell, sell, import, and otherwise transfer the Work,
 78 |     where such license applies only to those patent claims licensable
 79 |     by such Contributor that are necessarily infringed by their
 80 |     Contribution(s) alone or by combination of their Contribution(s)
 81 |     with the Work to which such Contribution(s) was submitted. If You
 82 |     institute patent litigation against any entity (including a
 83 |     cross-claim or counterclaim in a lawsuit) alleging that the Work
 84 |     or a Contribution incorporated within the Work constitutes direct
 85 |     or contributory patent infringement, then any patent licenses
 86 |     granted to You under this License for that Work shall terminate
 87 |     as of the date such litigation is filed.
 88 | 
 89 | 4.  Redistribution. You may reproduce and distribute copies of the
 90 |     Work or Derivative Works thereof in any medium, with or without
 91 |     modifications, and in Source or Object form, provided that You
 92 |     meet the following conditions:
 93 | 
 94 |     (a) You must give any other recipients of the Work or
 95 |     Derivative Works a copy of this License; and
 96 | 
 97 |     (b) You must cause any modified files to carry prominent notices
 98 |     stating that You changed the files; and
 99 | 
100 |     (c) You must retain, in the Source form of any Derivative Works
101 |     that You distribute, all copyright, patent, trademark, and
102 |     attribution notices from the Source form of the Work,
103 |     excluding those notices that do not pertain to any part of
104 |     the Derivative Works; and
105 | 
106 |     (d) If the Work includes a "NOTICE" text file as part of its
107 |     distribution, then any Derivative Works that You distribute must
108 |     include a readable copy of the attribution notices contained
109 |     within such NOTICE file, excluding those notices that do not
110 |     pertain to any part of the Derivative Works, in at least one
111 |     of the following places: within a NOTICE text file distributed
112 |     as part of the Derivative Works; within the Source form or
113 |     documentation, if provided along with the Derivative Works; or,
114 |     within a display generated by the Derivative Works, if and
115 |     wherever such third-party notices normally appear. The contents
116 |     of the NOTICE file are for informational purposes only and
117 |     do not modify the License. You may add Your own attribution
118 |     notices within Derivative Works that You distribute, alongside
119 |     or as an addendum to the NOTICE text from the Work, provided
120 |     that such additional attribution notices cannot be construed
121 |     as modifying the License.
122 | 
123 |     You may add Your own copyright statement to Your modifications and
124 |     may provide additional or different license terms and conditions
125 |     for use, reproduction, or distribution of Your modifications, or
126 |     for any such Derivative Works as a whole, provided Your use,
127 |     reproduction, and distribution of the Work otherwise complies with
128 |     the conditions stated in this License.
129 | 
130 | 5.  Submission of Contributions. Unless You explicitly state otherwise,
131 |     any Contribution intentionally submitted for inclusion in the Work
132 |     by You to the Licensor shall be under the terms and conditions of
133 |     this License, without any additional terms or conditions.
134 |     Notwithstanding the above, nothing herein shall supersede or modify
135 |     the terms of any separate license agreement you may have executed
136 |     with Licensor regarding such Contributions.
137 | 
138 | 6.  Trademarks. This License does not grant permission to use the trade
139 |     names, trademarks, service marks, or product names of the Licensor,
140 |     except as required for reasonable and customary use in describing the
141 |     origin of the Work and reproducing the content of the NOTICE file.
142 | 
143 | 7.  Disclaimer of Warranty. Unless required by applicable law or
144 |     agreed to in writing, Licensor provides the Work (and each
145 |     Contributor provides its Contributions) on an "AS IS" BASIS,
146 |     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 |     implied, including, without limitation, any warranties or conditions
148 |     of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 |     PARTICULAR PURPOSE. You are solely responsible for determining the
150 |     appropriateness of using or redistributing the Work and assume any
151 |     risks associated with Your exercise of permissions under this License.
152 | 
153 | 8.  Limitation of Liability. In no event and under no legal theory,
154 |     whether in tort (including negligence), contract, or otherwise,
155 |     unless required by applicable law (such as deliberate and grossly
156 |     negligent acts) or agreed to in writing, shall any Contributor be
157 |     liable to You for damages, including any direct, indirect, special,
158 |     incidental, or consequential damages of any character arising as a
159 |     result of this License or out of the use or inability to use the
160 |     Work (including but not limited to damages for loss of goodwill,
161 |     work stoppage, computer failure or malfunction, or any and all
162 |     other commercial damages or losses), even if such Contributor
163 |     has been advised of the possibility of such damages.
164 | 
165 | 9.  Accepting Warranty or Additional Liability. While redistributing
166 |     the Work or Derivative Works thereof, You may choose to offer,
167 |     and charge a fee for, acceptance of support, warranty, indemnity,
168 |     or other liability obligations and/or rights consistent with this
169 |     License. However, in accepting such obligations, You may act only
170 |     on Your own behalf and on Your sole responsibility, not on behalf
171 |     of any other Contributor, and only if You agree to indemnify,
172 |     defend, and hold each Contributor harmless for any liability
173 |     incurred by, or claims asserted against, such Contributor by reason
174 |     of your accepting any such warranty or additional liability.
175 | 
176 | END OF TERMS AND CONDITIONS
177 | 
178 | APPENDIX: How to apply the Apache License to your work.
179 | 
180 |       To apply the Apache License to your work, attach the following
181 |       boilerplate notice, with the fields enclosed by brackets "[]"
182 |       replaced with your own identifying information. (Don't include
183 |       the brackets!)  The text should be enclosed in the appropriate
184 |       comment syntax for the file format. We also recommend that a
185 |       file or class name and description of purpose be included on the
186 |       same "printed page" as the copyright notice for easier
187 |       identification within third-party archives.
188 | 
189 | Copyright 2024 Lingo.dev
190 | 
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 | 
195 |        http://www.apache.org/licenses/LICENSE-2.0
196 | 
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 | 
```

--------------------------------------------------------------------------------
/packages/react/src/test/setup.ts:
--------------------------------------------------------------------------------

```typescript
1 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/yaml-root-key/es/example.yml:
--------------------------------------------------------------------------------

```yaml
1 | es: {}
```

--------------------------------------------------------------------------------
/readme/en.md:
--------------------------------------------------------------------------------

```markdown
1 | ../packages/cli/README.md
```

--------------------------------------------------------------------------------
/packages/react/src/react-router/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | export * from "./loader";
2 | 
```

--------------------------------------------------------------------------------
/legacy/sdk/index.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | export * from "lingo.dev/sdk";
2 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/src/vite-env.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | /// <reference types="vite/client" />
2 | 
```

--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------

```javascript
1 | export default { extends: ["@commitlint/config-conventional"] };
2 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/eslint.config.js:
--------------------------------------------------------------------------------

```javascript
1 | import { configApp } from '@adonisjs/eslint-config'
2 | export default configApp()
3 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/inertia/css/app.css:
--------------------------------------------------------------------------------

```css
 1 | * {
 2 |   margin: 0;
 3 |   padding: 0;
 4 | }
 5 | 
 6 | html,
 7 | body {
 8 |   height: 100%;
 9 |   width: 100%;
10 | }
11 | 
```

--------------------------------------------------------------------------------
/packages/spec/src/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | export * from "./locales";
2 | export * from "./formats";
3 | export * from "./config";
4 | 
```

--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "recommendations": ["esbenp.prettier-vscode", "bradlc.vscode-tailwindcss"]
3 | }
4 | 
```

--------------------------------------------------------------------------------
/demo/next-app/postcss.config.mjs:
--------------------------------------------------------------------------------

```
1 | const config = {
2 |   plugins: ["@tailwindcss/postcss"],
3 | };
4 | 
5 | export default config;
6 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/utils/md5.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { MD5 } from "object-hash";
2 | 
3 | export function md5(input: any) {
4 |   return MD5(input);
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/cli/bin/cli.mjs:
--------------------------------------------------------------------------------

```
1 | #!/usr/bin/env node
2 | 
3 | import CLI from "../build/cli.mjs";
4 | 
5 | await CLI.parseAsync(process.argv);
6 | 
```

--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------

```yaml
1 | version: 2
2 | 
3 | updates:
4 |   - package-ecosystem: "npm"
5 |     directory: "/"
6 |     schedule:
7 |       interval: "weekly"
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/sdk/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_sdk";
3 | export * from "@lingo.dev/_sdk";
4 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "files": [],
3 |   "references": [
4 |     { "path": "./tsconfig.app.json" },
5 |     { "path": "./tsconfig.node.json" }
6 |   ]
7 | }
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/spec/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_spec";
3 | export * from "@lingo.dev/_spec";
4 | 
```

--------------------------------------------------------------------------------
/packages/cli/types/xliff.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | declare module "xliff" {
2 |   export function xliff2js(data: string): any;
3 |   export function js2xliff(data: any): string;
4 | }
5 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/react/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_react";
3 | export * from "@lingo.dev/_react";
4 | 
```

--------------------------------------------------------------------------------
/packages/cli/types/vtt.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | declare module "node-webvtt" {
2 |   export function parse(data: string): any;
3 |   export function compile(data: any): string;
4 | }
5 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/locale-codes/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_locales";
3 | export * from "@lingo.dev/_locales";
4 | 
```

--------------------------------------------------------------------------------
/packages/react/src/core/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | export * from "./component";
2 | export * from "./const";
3 | export * from "./attribute-component";
4 | export * from "./get-dictionary";
5 | 
```

--------------------------------------------------------------------------------
/demo/next-app/public/vercel.svg:
--------------------------------------------------------------------------------

```
1 | <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
```

--------------------------------------------------------------------------------
/integrations/directus/tsconfig.test.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "extends": "./tsconfig.json",
3 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
4 |   "compilerOptions": {
5 |     "noEmit": true
6 |   }
7 | }
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/tsconfig.test.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "extends": "./tsconfig.json",
3 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
4 |   "compilerOptions": {
5 |     "noEmit": true
6 |   }
7 | }
8 | 
```

--------------------------------------------------------------------------------
/packages/sdk/tsconfig.test.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "extends": "./tsconfig.json",
3 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
4 |   "compilerOptions": {
5 |     "noEmit": true
6 |   }
7 | }
8 | 
```

--------------------------------------------------------------------------------
/packages/spec/tsconfig.test.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "extends": "./tsconfig.json",
3 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
4 |   "compilerOptions": {
5 |     "noEmit": true
6 |   }
7 | }
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/react/rsc.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_react/rsc";
3 | export * from "@lingo.dev/_react/rsc";
4 | 
```

--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------

```yaml
1 | packages:
2 |   - "./packages/*"
3 |   - "./demo/*"
4 |   - "./integrations/*"
5 |   - "./legacy/*"
6 |   - "./action"
7 |   - "./php/*"
8 |   - "./scripts/*"
9 | 
```

--------------------------------------------------------------------------------
/demo/next-app/src/components/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | export { HeroTitle } from "./hero-title";
2 | export { HeroSubtitle } from "./hero-subtitle";
3 | export { HeroActions } from "./hero-actions";
4 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/react/client.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_react/client";
3 | export * from "@lingo.dev/_react/client";
4 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/compiler/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_compiler";
3 | export { default } from "@lingo.dev/_compiler";
4 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/jsx-attribute.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { createCodeMutation } from "./_base";
2 | 
3 | export const jsxAttributeMutation = createCodeMutation((payload) => {
4 |   return payload;
5 | });
6 | 
```

--------------------------------------------------------------------------------
/integrations/directus/src/index.spec.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { describe, it, expect } from "vitest";
2 | 
3 | describe("Test suite", () => {
4 |   it("should pass", () => {
5 |     expect(1).toBe(1);
6 |   });
7 | });
8 | 
```

--------------------------------------------------------------------------------
/packages/spec/src/index.spec.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { describe, it, expect } from "vitest";
2 | 
3 | describe("Test suite", () => {
4 |   it("should pass", () => {
5 |     expect(1).toBe(1);
6 |   });
7 | });
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { defineConfig } from "vitest/config";
2 | 
3 | export default defineConfig({
4 |   test: {
5 |     setupFiles: ["./tests/mock-storage.ts"],
6 |   },
7 | });
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/index.spec.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { describe, it, expect } from "vitest";
2 | 
3 | describe("lingo.dev", () => {
4 |   it("should work", () => {
5 |     expect(true).toBe(true);
6 |   });
7 | });
8 | 
```

--------------------------------------------------------------------------------
/packages/react/src/rsc/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | export * from "./loader";
2 | export * from "./component";
3 | export * from "./provider";
4 | export * from "./utils";
5 | export * from "./attribute-component";
6 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/react/react-router.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Re-export everything but with type checking
2 | export type * from "@lingo.dev/_react/react-router";
3 | export * from "@lingo.dev/_react/react-router";
4 | 
```

--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "editor.formatOnSave": true,
3 |   "editor.defaultFormatter": "esbenp.prettier-vscode",
4 |   "editor.codeActionsOnSave": {
5 |     "source.fixAll": "always"
6 |   }
7 | }
8 | 
```

--------------------------------------------------------------------------------
/integrations/directus/Dockerfile:
--------------------------------------------------------------------------------

```dockerfile
 1 | FROM directus/directus:11
 2 | 
 3 | USER root
 4 | 
 5 | RUN npm install -g pnpm@latest
 6 | 
 7 | USER node
 8 | 
 9 | # Install the integration
10 | RUN pnpm install @replexica/integration-directus
11 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/constants.ts:
--------------------------------------------------------------------------------

```typescript
 1 | export const colors = {
 2 |   orange: "#ff6600",
 3 |   green: "#6ae300",
 4 |   blue: "#0090ff",
 5 |   yellow: "#ffcc00",
 6 |   grey: "#808080",
 7 |   red: "#ff0000",
 8 |   white: "#ffffff",
 9 | };
10 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/po/_types.ts:
--------------------------------------------------------------------------------

```typescript
1 | export type PoTranslationEntry = {
2 |   id: string;
3 |   value: string;
4 |   pluralValue?: string;
5 |   context?: string;
6 |   metadata?: Record<string, string>;
7 |   flags?: string[];
8 | };
9 | 
```

--------------------------------------------------------------------------------
/demo/next-app/src/components/hero-title.tsx:
--------------------------------------------------------------------------------

```typescript
1 | export function HeroTitle() {
2 |   return (
3 |     <h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold text-gray-900 mb-6 leading-tight">
4 |       Lingo.dev
5 |     </h1>
6 |   );
7 | }
8 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/src/components/test.tsx:
--------------------------------------------------------------------------------

```typescript
1 | export const TestComponent = () => {
2 |   return (
3 |     <div>
4 |       <h1>Testing Component</h1>
5 |       <p>This is a component intended for testing purposes.</p>
6 |     </div>
7 |   );
8 | };
9 | 
```

--------------------------------------------------------------------------------
/packages/compiler/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "vitest/config";
 2 | 
 3 | export default defineConfig({
 4 |   test: {
 5 |     environment: "jsdom",
 6 |     globals: true,
 7 |     include: ["./src/**/*.spec.ts*"],
 8 |   },
 9 | });
10 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/app/routes.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { type RouteConfig, index, route } from "@react-router/dev/routes";
2 | 
3 | export default [
4 |   index("routes/home.tsx"),
5 |   route("test", "./routes/test.tsx"),
6 | ] satisfies RouteConfig;
7 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "extends": "@adonisjs/tsconfig/tsconfig.app.json",
3 |   "compilerOptions": {
4 |     "rootDir": "./",
5 |     "outDir": "./build"
6 |   },
7 |   "exclude": ["./inertia/**/*", "node_modules", "build"]
8 | }
9 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/react-router.config.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { Config } from "@react-router/dev/config";
2 | 
3 | export default {
4 |   // Config options...
5 |   // Server-side render by default, to enable SPA mode set this to `false`
6 |   ssr: true,
7 | } satisfies Config;
8 | 
```

--------------------------------------------------------------------------------
/packages/react/src/client/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | export * from "./loader";
2 | export * from "./context";
3 | export * from "./provider";
4 | export * from "./component";
5 | export * from "./locale-switcher";
6 | export * from "./attribute-component";
7 | export * from "./locale";
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/txt/en/example.txt:
--------------------------------------------------------------------------------

```
1 | This is the first line of text content
2 | This is the second line with different content
3 | This line contains special characters: !@#$%^&*()
4 | 
5 | This is line five after an empty line above
6 | Thank you for choosing our service
```

--------------------------------------------------------------------------------
/demo/adonisjs/inertia/pages/errors/not_found.tsx:
--------------------------------------------------------------------------------

```typescript
 1 | export default function NotFound() {
 2 |   return (
 3 |     <>
 4 |       <div className="container">
 5 |         <div className="title">Page not found</div>
 6 | 
 7 |         <span>This page does not exist.</span>
 8 |       </div>
 9 |     </>
10 |   )
11 | }
12 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/inertia/pages/errors/server_error.tsx:
--------------------------------------------------------------------------------

```typescript
 1 | export default function ServerError(props: { error: any }) {
 2 |   return (
 3 |     <>
 4 |       <div className="container">
 5 |         <div className="title">Server Error</div>
 6 | 
 7 |         <span>{props.error.message}</span>
 8 |       </div>
 9 |     </>
10 |   )
11 | }
12 | 
```

--------------------------------------------------------------------------------
/packages/react/src/core/const.ts:
--------------------------------------------------------------------------------

```typescript
 1 | /**
 2 |  * The name of the cookie that stores the current locale.
 3 |  */
 4 | export const LOCALE_COOKIE_NAME = "lingo-locale";
 5 | 
 6 | /**
 7 |  * The name of the header that stores the current locale.
 8 |  */
 9 | export const LOCALE_HEADER_NAME = "x-lingo-locale";
10 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/csv/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "csv": {
11 |       "include": [
12 |         "./example.csv"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/demo/adonisjs/inertia/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "extends": "@adonisjs/tsconfig/tsconfig.client.json",
 3 |   "compilerOptions": {
 4 |     "baseUrl": ".",
 5 |     "module": "ESNext",
 6 |     "jsx": "react-jsx",
 7 |     "paths": {
 8 |       "~/*": ["./*"]
 9 |     }
10 |   },
11 |   "include": ["./**/*.ts", "./**/*.tsx"]
12 | }
13 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/utils/module-params.ts:
--------------------------------------------------------------------------------

```typescript
1 | export function parseParametrizedModuleId(rawId: string) {
2 |   const moduleUri = new URL(rawId, "module://");
3 |   return {
4 |     id: moduleUri.pathname.replace(/^\//, ""),
5 |     params: Object.fromEntries(moduleUri.searchParams.entries()),
6 |   };
7 | }
8 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/vue-json/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "vue-json": {
11 |       "include": [
12 |         "./example.vue"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/txt/es/example.txt:
--------------------------------------------------------------------------------

```
1 | Esta es la primera línea de contenido de texto
2 | Esta es la segunda línea con contenido diferente
3 | Esta línea contiene caracteres especiales: !@#$%^&*()
4 | 
5 | Esta es la línea cinco después de una línea vacía arriba
6 | Gracias por elegir nuestro servicio
```

--------------------------------------------------------------------------------
/packages/cli/demo/po/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "po": {
11 |       "include": [
12 |         "./[locale]/example.po"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | } 
```

--------------------------------------------------------------------------------
/packages/cli/demo/ejs/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "ejs": {
11 |       "include": [
12 |         "./[locale]/example.ejs"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/php/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "php": {
11 |       "include": [
12 |         "./[locale]/example.php"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/srt/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "srt": {
11 |       "include": [
12 |         "./[locale]/example.srt"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/txt/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "txt": {
11 |       "include": [
12 |         "./[locale]/example.txt"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/vtt/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "vtt": {
11 |       "include": [
12 |         "./[locale]/example.vtt"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/xml/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "xml": {
11 |       "include": [
12 |         "./[locale]/example.xml"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------

```markdown
 1 | ### What
 2 | 
 3 | [//]: # "Brief description of the new feature / a bug. Expected vs actual, if relevant."
 4 | 
 5 | ### Why
 6 | 
 7 | [//]: # "Explain why this is needed"
 8 | 
 9 | ### How
10 | 
11 | [//]: # "Solution proposals, ideas, etc. Overview of how the feature could be implemented"
12 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/html/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "html": {
11 |       "include": [
12 |         "./[locale]/example.html"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/android/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "android": {
11 |       "include": [
12 |         "./[locale]/example.xml"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/flutter/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "flutter": {
11 |       "include": [
12 |         "./[locale]/example.arb"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/markdown/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "markdown": {
11 |       "include": [
12 |         "./[locale]/example.md"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/xliff/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "xliff": {
11 |       "include": [
12 |         "./[locale]/example.xliff"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/json-dictionary/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "json-dictionary": {
11 |       "include": [
12 |         "./example.json"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
18 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/jsonc/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "jsonc": {
11 |       "include": [
12 |         "./[locale]/example.jsonc"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
18 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/markdoc/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "markdoc": {
11 |       "include": [
12 |         "./[locale]/example.markdoc"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/xcode-xcstrings/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "xcode-xcstrings": {
11 |       "include": [
12 |         "./example.xcstrings"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/yaml-root-key/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "yaml-root-key": {
11 |       "include": [
12 |         "./[locale]/example.yml"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
18 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/xcode-xcstrings-v2/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "xcode-xcstrings-v2": {
11 |       "include": [
12 |         "./example.xcstrings"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/properties/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "properties": {
11 |       "include": [
12 |         "./[locale]/example.properties"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/xcode-strings/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "xcode-strings": {
11 |       "include": [
12 |         "./[locale]/example.strings"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/xcode-stringsdict/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "xcode-stringsdict": {
11 |       "include": [
12 |         "./[locale]/example.stringsdict"
13 |       ]
14 |     }
15 |   },
16 |   "$schema": "https://lingo.dev/schema/i18n.json"
17 | }
```

--------------------------------------------------------------------------------
/packages/react/src/client/context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | "use client";
 2 | 
 3 | import { createContext, useContext } from "react";
 4 | 
 5 | export type LingoContextType = {
 6 |   dictionary: any;
 7 | };
 8 | 
 9 | export const LingoContext = createContext<LingoContextType>({
10 |   dictionary: {},
11 | });
12 | 
13 | export function useLingo() {
14 |   return useContext(LingoContext);
15 | }
16 | 
```

--------------------------------------------------------------------------------
/packages/react/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "vitest/config";
 2 | import react from "@vitejs/plugin-react";
 3 | 
 4 | export default defineConfig({
 5 |   test: {
 6 |     environment: "jsdom",
 7 |     globals: true,
 8 |     setupFiles: ["./src/test/setup.ts"],
 9 |     include: ["./src/**/*.spec.ts*"],
10 |   },
11 |   plugins: [react()],
12 | });
13 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/yaml/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "yaml": {
11 |       "include": [
12 |         "./[locale]/example.yml"
13 |       ],
14 |       "lockedKeys": ["locked_key_1"]
15 |     }
16 |   },
17 |   "$schema": "https://lingo.dev/schema/i18n.json"
18 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/json/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "json": {
11 |       "include": [
12 |         "./[locale]/example.json"
13 |       ],
14 |       "lockedKeys": ["locked_key_1"]
15 |     }
16 |   },
17 |   "$schema": "https://lingo.dev/schema/i18n.json"
18 | }
```

--------------------------------------------------------------------------------
/packages/cli/demo/json5/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "json5": {
11 |       "include": [
12 |         "./[locale]/example.json5"
13 |       ],
14 |       "lockedKeys": ["locked_key_1"]
15 |     }
16 |   },
17 |   "$schema": "https://lingo.dev/schema/i18n.json"
18 | }
```

--------------------------------------------------------------------------------
/packages/compiler/src/_const.ts:
--------------------------------------------------------------------------------

```typescript
1 | export const ModuleId = {
2 |   ReactClient: ["lingo.dev/react/client", "lingo.dev/react-client"],
3 |   ReactRSC: ["lingo.dev/react/rsc", "lingo.dev/react-rsc"],
4 |   ReactRouter: ["lingo.dev/react/react-router", "lingo.dev/react-router"],
5 | };
6 | 
7 | export const LCP_DICTIONARY_FILE_NAME = "dictionary.js";
8 | 
```

--------------------------------------------------------------------------------
/.changeset/config.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
 3 |   "changelog": ["@changesets/changelog-github", { "repo": "lingodotdev/lingo.dev" }],
 4 |   "commit": false,
 5 |   "fixed": [],
 6 |   "linked": [],
 7 |   "access": "public",
 8 |   "baseBranch": "main",
 9 |   "updateInternalDependencies": "patch"
10 | }
11 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/app/app.css:
--------------------------------------------------------------------------------

```css
 1 | @import "tailwindcss";
 2 | 
 3 | @theme {
 4 |   --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif,
 5 |     "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
 6 | }
 7 | 
 8 | html,
 9 | body {
10 |   @apply bg-white dark:bg-gray-950;
11 | 
12 |   @media (prefers-color-scheme: dark) {
13 |     color-scheme: dark;
14 |   }
15 | }
16 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/passthrough.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { ILoader } from "./_types";
 2 | import { createLoader } from "./_utils";
 3 | 
 4 | export default function createPassThroughLoader(
 5 |   state: any,
 6 | ): ILoader<void, string> {
 7 |   return createLoader({
 8 |     pull: async () => state.data,
 9 |     push: async (locale, data) => {
10 |       state.data = data;
11 |     },
12 |   });
13 | }
14 | 
```

--------------------------------------------------------------------------------
/turbo.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "$schema": "https://turbo.build/schema.json",
 3 |   "tasks": {
 4 |     "build": {
 5 |       "dependsOn": ["typecheck", "^build"]
 6 |     },
 7 |     "typecheck": {
 8 |       "dependsOn": ["^build"]
 9 |     },
10 |     "test": {
11 |       "dependsOn": ["^build"]
12 |     },
13 |     "deploy": {
14 |       "dependsOn": ["build", "test", "^deploy"]
15 |     }
16 |   }
17 | }
18 | 
```

--------------------------------------------------------------------------------
/packages/sdk/tsup.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "tsup";
 2 | 
 3 | export default defineConfig({
 4 |   clean: true,
 5 |   target: "esnext",
 6 |   entry: ["src/index.ts"],
 7 |   outDir: "build",
 8 |   format: ["cjs", "esm"],
 9 |   dts: true,
10 |   cjsInterop: true,
11 |   splitting: true,
12 |   outExtension: (ctx) => ({
13 |     js: ctx.format === "cjs" ? ".cjs" : ".mjs",
14 |   }),
15 | });
16 | 
```

--------------------------------------------------------------------------------
/packages/locales/tsup.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "tsup";
 2 | 
 3 | export default defineConfig({
 4 |   clean: true,
 5 |   target: "esnext",
 6 |   entry: ["src/index.ts"],
 7 |   outDir: "build",
 8 |   format: ["cjs", "esm"],
 9 |   dts: true,
10 |   cjsInterop: true,
11 |   splitting: false,
12 |   outExtension: (ctx) => ({
13 |     js: ctx.format === "cjs" ? ".cjs" : ".mjs",
14 |   }),
15 | });
16 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/app/routes/home.tsx:
--------------------------------------------------------------------------------

```typescript
 1 | import type { Route } from "./+types/home";
 2 | import { Welcome } from "../welcome/welcome";
 3 | 
 4 | export function meta({}: Route.MetaArgs) {
 5 |   return [
 6 |     { title: "New React Router App" },
 7 |     { name: "description", content: "Welcome to React Router!" },
 8 |   ];
 9 | }
10 | 
11 | export default function Home() {
12 |   return <Welcome />;
13 | }
14 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/properties/en/example.properties:
--------------------------------------------------------------------------------

```
 1 | app.title=MyApp
 2 | app.description=A simple demo application
 3 | 
 4 | user.greeting=Hello, world!
 5 | user.farewell=Thanks for using MyApp
 6 | 
 7 | error.message=Something went wrong
 8 | error.notFound=Page not found
 9 | 
10 | database.host=localhost
11 | database.port=5432
12 | 
13 | notification.success=Changes saved!
14 | notification.warning=Please check your input
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/mdx2/_utils.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { Root, RootContent } from "mdast";
 2 | 
 3 | export function traverseMdast(
 4 |   ast: Root | RootContent,
 5 |   visitor: (node: Root | RootContent) => void,
 6 | ) {
 7 |   visitor(ast);
 8 |   if ("children" in ast && Array.isArray(ast.children)) {
 9 |     for (const child of ast.children) {
10 |       traverseMdast(child, visitor);
11 |     }
12 |   }
13 | }
14 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/i18n-directive.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { createCodeMutation } from "./_base";
 2 | import { hasI18nDirective } from "./utils";
 3 | 
 4 | const i18nDirectiveMutation = createCodeMutation((payload) => {
 5 |   if (!payload.params.useDirective || hasI18nDirective(payload.ast)) {
 6 |     return payload;
 7 |   } else {
 8 |     return null;
 9 |   }
10 | });
11 | 
12 | export default i18nDirectiveMutation;
13 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/start/routes.ts:
--------------------------------------------------------------------------------

```typescript
 1 | /*
 2 | |--------------------------------------------------------------------------
 3 | | Routes file
 4 | |--------------------------------------------------------------------------
 5 | |
 6 | | The routes file is used for defining the HTTP routes.
 7 | |
 8 | */
 9 | 
10 | import router from '@adonisjs/core/services/router'
11 | router.on('/').renderInertia('home')
12 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/mdx/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "mdx": {
11 |       "include": [
12 |         "./[locale]/example.mdx"
13 |       ],
14 |       "lockedKeys": ["locked_key_1"],
15 |       "lockedPatterns": ["pattern_1"]
16 |     }
17 |   },
18 |   "$schema": "https://lingo.dev/schema/i18n.json"
19 | }
```

--------------------------------------------------------------------------------
/legacy/sdk/index.js:
--------------------------------------------------------------------------------

```javascript
 1 | console.warn(
 2 |   "\x1b[33m%s\x1b[0m",
 3 |   `
 4 | ⚠️  WARNING: NEW PACKAGE AVAILABLE ⚠️
 5 | =======================================
 6 | This SDK version is deprecated.
 7 | Please use lingo.dev instead:
 8 | 
 9 | npm install lingo.dev
10 | 
11 | Visit https://lingo.dev for more information.
12 | =======================================
13 | `,
14 | );
15 | 
16 | export * from "lingo.dev/sdk";
17 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/run_i18n.sh:
--------------------------------------------------------------------------------

```bash
 1 | #!/usr/bin/env bash
 2 | set -euo pipefail
 3 | 
 4 | pnpm install
 5 | 
 6 | pnpm --filter lingo.dev run build
 7 | 
 8 | root_dir=$(git rev-parse --show-toplevel)
 9 | cli="$root_dir/packages/cli/bin/cli.mjs"
10 | demo_root="$root_dir/packages/cli/demo"
11 | 
12 | for demo in "$demo_root"/*/; do
13 |   printf '\n%s\n' "${demo%/}"
14 |   (
15 |     cd "$demo"
16 |     node "$cli" i18n "$@"
17 |   )
18 |  done
19 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/typescript/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "es"
 7 |     ]
 8 |   },
 9 |   "buckets": {
10 |     "typescript": {
11 |       "include": [
12 |         "./[locale]/example.ts"
13 |       ],
14 |       "lockedKeys": ["locked_key_1"],
15 |       "ignoredKeys": ["ignored_key_1"]
16 |     }
17 |   },
18 |   "$schema": "https://lingo.dev/schema/i18n.json"
19 | } 
```

--------------------------------------------------------------------------------
/packages/cli/demo/properties/es/example.properties:
--------------------------------------------------------------------------------

```
 1 | app.title=MyApp
 2 | app.description=Una aplicación de demostración simple
 3 | user.greeting=¡Hola, mundo!
 4 | user.farewell=Gracias por usar MyApp
 5 | error.message=Algo salió mal
 6 | error.notFound=Página no encontrada
 7 | database.host=localhost
 8 | database.port=5432
 9 | notification.success=¡Cambios guardados!
10 | notification.warning=Por favor, revisa tu entrada
```

--------------------------------------------------------------------------------
/packages/compiler/src/utils/env.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import fs from "fs";
 2 | 
 3 | /**
 4 |  * Checks if the compiler is running in CI or Docker environment.
 5 |  * Returns true if either:
 6 |  * - CI environment variable is set
 7 |  * - /.dockerenv file exists (indicating Docker environment)
 8 |  */
 9 | export function isRunningInCIOrDocker(): boolean {
10 |   return Boolean(process.env.CI) || fs.existsSync("/.dockerenv");
11 | }
12 | 
```

--------------------------------------------------------------------------------
/demo/next-app/next.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { NextConfig } from "next";
 2 | import lingoCompiler from "lingo.dev/compiler";
 3 | 
 4 | const nextConfig: NextConfig = {
 5 |   /* config options here */
 6 | };
 7 | 
 8 | export default lingoCompiler.next({
 9 |   sourceLocale: "en",
10 |   targetLocales: ["es", "ja", "fr", "ru", "de", "zh", "ar", "ko"],
11 |   models: "lingo.dev",
12 |   useDirective: true,
13 | })(nextConfig);
14 | 
```

--------------------------------------------------------------------------------
/integrations/directus/tsup.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "tsup";
 2 | 
 3 | export default defineConfig({
 4 |   clean: true,
 5 |   target: "esnext",
 6 |   entry: ["src/api.ts", "src/app.ts"],
 7 |   outDir: "build",
 8 |   format: ["cjs", "esm"],
 9 |   cjsInterop: true,
10 |   splitting: true,
11 |   external: ["@replexica/sdk"],
12 |   outExtension: (ctx) => ({
13 |     js: ctx.format === "cjs" ? ".cjs" : ".mjs",
14 |   }),
15 | });
16 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/xcode-strings/types.ts:
--------------------------------------------------------------------------------

```typescript
 1 | export enum TokenType {
 2 |   COMMENT_SINGLE = "COMMENT_SINGLE",
 3 |   COMMENT_MULTI = "COMMENT_MULTI",
 4 |   STRING = "STRING",
 5 |   EQUALS = "EQUALS",
 6 |   SEMICOLON = "SEMICOLON",
 7 |   EOF = "EOF",
 8 | }
 9 | 
10 | export interface Token {
11 |   type: TokenType;
12 |   value: string;
13 |   line: number;
14 |   column: number;
15 | }
16 | 
17 | export interface Position {
18 |   line: number;
19 |   column: number;
20 | }
21 | 
```

--------------------------------------------------------------------------------
/packages/compiler/tsup.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "tsup";
 2 | 
 3 | export default defineConfig({
 4 |   clean: true,
 5 |   target: "esnext",
 6 |   entry: ["src/index.ts", "src/lingo-turbopack-loader.ts"],
 7 |   outDir: "build",
 8 |   format: ["cjs", "esm"],
 9 |   dts: true,
10 |   cjsInterop: true,
11 |   splitting: true,
12 |   outExtension: (ctx) => ({
13 |     js: ctx.format === "cjs" ? ".cjs" : ".mjs",
14 |   }),
15 | });
16 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/yaml-root-key/en/example.yml:
--------------------------------------------------------------------------------

```yaml
 1 | es:
 2 |   navigation:
 3 |     home: "Inicio"
 4 |     about: "Sobre nosotros"
 5 |     contact: "Contacto"
 6 |     services: "Servicios"
 7 |   forms:
 8 |     title: "Formulario de contacto"
 9 |     name_label: "Su nombre"
10 |     email_label: "Dirección de correo electrónico"
11 |     message_label: "Mensaje"
12 |     submit_button: "Enviar mensaje"
13 |     success_message: "¡Gracias por su mensaje!"
```

--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "name": "lingodotdev/lingo.dev",
 3 |   "description": "Lingo.dev Monorepo",
 4 |   "type": "project",
 5 |   "license": "MIT",
 6 |   "repositories": [
 7 |     {
 8 |       "type": "path",
 9 |       "url": "php/sdk",
10 |       "options": {
11 |         "symlink": false
12 |       }
13 |     }
14 |   ],
15 |   "require": {
16 |     "lingodotdev/sdk": "*"
17 |   },
18 |   "minimum-stability": "dev",
19 |   "prefer-stable": true
20 | }
21 | 
```

--------------------------------------------------------------------------------
/demo/next-app/src/components/hero-subtitle.tsx:
--------------------------------------------------------------------------------

```typescript
 1 | "use server";
 2 | "use i18n";
 3 | 
 4 | export async function HeroSubtitle() {
 5 |   return (
 6 |     <p className="text-lg sm:text-xl text-gray-600 mb-10 max-w-xl mx-auto leading-relaxed">
 7 |       Localize your React app in every language in minutes.
 8 |       <br />
 9 |       Scale to millions from day one
10 |       <sup title="supports many popular frameworks">*</sup>.
11 |     </p>
12 |   );
13 | }
14 | 
```

--------------------------------------------------------------------------------
/.github/workflows/pr-lint.yml:
--------------------------------------------------------------------------------

```yaml
 1 | name: Lint PR
 2 | 
 3 | on:
 4 |   pull_request:
 5 |     types:
 6 |       - opened
 7 |       - edited
 8 |       - synchronize
 9 | 
10 | jobs:
11 |   main:
12 |     name: Validate PR title
13 |     runs-on: ubuntu-latest
14 |     permissions:
15 |       contents: read
16 |       pull-requests: read
17 |     steps:
18 |       - uses: amannn/action-semantic-pull-request@v5
19 |         env:
20 |           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/index.html:
--------------------------------------------------------------------------------

```html
 1 | <!doctype html>
 2 | <html lang="en">
 3 |   <head>
 4 |     <meta charset="UTF-8" />
 5 |     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
 6 |     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 7 |     <title>Vite + React + TS</title>
 8 |   </head>
 9 |   <body>
10 |     <div id="root"></div>
11 |     <script type="module" src="/src/main.tsx"></script>
12 |   </body>
13 | </html>
14 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/csv/example.csv:
--------------------------------------------------------------------------------

```
1 | KEY,en,es
2 | welcome_message,Welcome to our application,Bienvenido a nuestra aplicación
3 | button_save,Save,Guardar
4 | error_invalid_email,Please enter a valid email address,"Por favor, introduce una dirección de correo electrónico válida"
5 | product_name,Premium Widget,Widget Premium
6 | empty_row_key,,
7 | whitespace_only,   ,
8 | new_feature,This is a new feature,Esta es una nueva función
```

--------------------------------------------------------------------------------
/demo/next-app/src/app/globals.css:
--------------------------------------------------------------------------------

```css
 1 | @import "tailwindcss";
 2 | 
 3 | :root {
 4 |   --background: #ffffff;
 5 |   --foreground: #171717;
 6 | }
 7 | 
 8 | @theme inline {
 9 |   --color-background: var(--background);
10 |   --color-foreground: var(--foreground);
11 |   --font-sans: var(--font-geist-sans);
12 |   --font-mono: var(--font-geist-mono);
13 | }
14 | 
15 | @media (prefers-color-scheme: dark) {
16 |   :root {
17 |     --background: #0a0a0a;
18 |     --foreground: #ededed;
19 |   }
20 | }
21 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/lib/lcp/api/provider-details.spec.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { describe, it, expect } from "vitest";
 2 | import { providerDetails } from "./provider-details";
 3 | 
 4 | describe("provider-details", () => {
 5 |   it("should provide data for all supported providers", () => {
 6 |     expect(Object.keys(providerDetails)).toEqual([
 7 |       "groq",
 8 |       "google",
 9 |       "openrouter",
10 |       "ollama",
11 |       "mistral",
12 |       "lingo.dev",
13 |     ]);
14 |   });
15 | });
16 | 
```

--------------------------------------------------------------------------------
/demo/next-app/public/window.svg:
--------------------------------------------------------------------------------

```
1 | <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
```

--------------------------------------------------------------------------------
/scripts/docs/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "vitest/config";
 2 | 
 3 | export default defineConfig({
 4 |   test: {
 5 |     globals: true,
 6 |     environment: "node",
 7 |     include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
 8 |     exclude: ["node_modules", "build"],
 9 |     coverage: {
10 |       reporter: ["text", "html", "lcov"],
11 |       exclude: ["node_modules/", "build/", "**/*.d.ts", "**/*.config.*"],
12 |     },
13 |   },
14 | });
15 | 
```

--------------------------------------------------------------------------------
/demo/next-app/public/file.svg:
--------------------------------------------------------------------------------

```
1 | <svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
```

--------------------------------------------------------------------------------
/demo/next-app/eslint.config.mjs:
--------------------------------------------------------------------------------

```
 1 | import { dirname } from "path";
 2 | import { fileURLToPath } from "url";
 3 | import { FlatCompat } from "@eslint/eslintrc";
 4 | 
 5 | const __filename = fileURLToPath(import.meta.url);
 6 | const __dirname = dirname(__filename);
 7 | 
 8 | const compat = new FlatCompat({
 9 |   baseDirectory: __dirname,
10 | });
11 | 
12 | const eslintConfig = [
13 |   ...compat.extends("next/core-web-vitals", "next/typescript"),
14 | ];
15 | 
16 | export default eslintConfig;
17 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/mdx2/_types.ts:
--------------------------------------------------------------------------------

```typescript
 1 | export interface RawMdx {
 2 |   frontmatter: Record<string, any>;
 3 |   content: string;
 4 | }
 5 | 
 6 | export interface PlaceholderedMdx extends RawMdx {
 7 |   codePlaceholders: Record<string, string>;
 8 | }
 9 | 
10 | export interface SectionedMdx {
11 |   frontmatter: Record<string, any>;
12 |   sections: Record<string, string>;
13 | }
14 | 
15 | export type LocalizableMdxDocument = {
16 |   meta: Record<string, any>;
17 |   content: Record<string, string>;
18 | };
19 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/cmd/config/index.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { Command } from "interactive-commander";
 2 | 
 3 | import setCmd from "./set";
 4 | import unsetCmd from "./unset";
 5 | import getCmd from "./get";
 6 | 
 7 | export default new Command()
 8 |   .command("config")
 9 |   .description(
10 |     "Manage CLI settings (authentication, API keys) stored in ~/.lingodotdevrc",
11 |   )
12 |   .helpOption("-h, --help", "Show help")
13 |   .addCommand(setCmd)
14 |   .addCommand(unsetCmd)
15 |   .addCommand(getCmd);
16 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/utils/rc.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import os from "os";
 2 | import path from "path";
 3 | import fs from "fs";
 4 | import Ini from "ini";
 5 | 
 6 | export function getRc() {
 7 |   const settingsFile = ".lingodotdevrc";
 8 |   const homedir = os.homedir();
 9 |   const settingsFilePath = path.join(homedir, settingsFile);
10 |   const content = fs.existsSync(settingsFilePath)
11 |     ? fs.readFileSync(settingsFilePath, "utf-8")
12 |     : "";
13 |   const data = Ini.parse(content);
14 |   return data;
15 | }
16 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/config/static.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from '@adonisjs/static'
 2 | 
 3 | /**
 4 |  * Configuration options to tweak the static files middleware.
 5 |  * The complete set of options are documented on the
 6 |  * official documentation website.
 7 |  *
 8 |  * https://docs.adonisjs.com/guides/static-assets
 9 |  */
10 | const staticServerConfig = defineConfig({
11 |   enabled: true,
12 |   etag: true,
13 |   lastModified: true,
14 |   dotFiles: 'ignore',
15 | })
16 | 
17 | export default staticServerConfig
18 | 
```

--------------------------------------------------------------------------------
/demo/next-app/src/app/page.tsx:
--------------------------------------------------------------------------------

```typescript
 1 | /*
 2 | "use client";
 3 | "use server";
 4 | 
 5 | "use i18n";
 6 | */
 7 | 
 8 | import { HeroTitle, HeroSubtitle, HeroActions } from "../components";
 9 | 
10 | export default function Home() {
11 |   return (
12 |     <div className="min-h-screen bg-white flex items-center justify-center px-4 sm:px-6 lg:px-8">
13 |       <div className="max-w-2xl mx-auto text-center">
14 |         <HeroTitle />
15 |         <HeroSubtitle />
16 |         <HeroActions />
17 |       </div>
18 |     </div>
19 |   );
20 | }
21 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/cmd/run/_const.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import chalk from "chalk";
 2 | import { ListrDefaultRendererLogLevels } from "listr2";
 3 | import { colors } from "../../constants";
 4 | 
 5 | export const commonTaskRendererOptions = {
 6 |   color: {
 7 |     [ListrDefaultRendererLogLevels.COMPLETED]: (msg?: string) =>
 8 |       msg ? chalk.hex(colors.green)(msg) : chalk.hex(colors.green)(""),
 9 |   },
10 |   icon: {
11 |     [ListrDefaultRendererLogLevels.COMPLETED]: chalk.hex(colors.green)("✓"),
12 |   },
13 | };
14 | 
```

--------------------------------------------------------------------------------
/packages/spec/tsup.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "tsup";
 2 | import buildJsonSchema from "./src/json-schema";
 3 | 
 4 | export default defineConfig({
 5 |   clean: true,
 6 |   target: "esnext",
 7 |   entry: ["src/index.ts"],
 8 |   outDir: "build",
 9 |   format: ["cjs", "esm"],
10 |   dts: true,
11 |   cjsInterop: true,
12 |   splitting: true,
13 |   outExtension: (ctx) => ({
14 |     js: ctx.format === "cjs" ? ".cjs" : ".mjs",
15 |   }),
16 |   onSuccess: async () => {
17 |     buildJsonSchema();
18 |   },
19 | });
20 | 
```

--------------------------------------------------------------------------------
/i18n.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "version": "1.10",
 3 |   "locale": {
 4 |     "source": "en",
 5 |     "targets": [
 6 |       "ru",
 7 |       "he",
 8 |       "fr",
 9 |       "es",
10 |       "de",
11 |       "zh-Hans",
12 |       "ko",
13 |       "ja",
14 |       "it",
15 |       "ar",
16 |       "hi",
17 |       "pt-BR",
18 |       "uk-UA",
19 |       "bn",
20 |       "fa",
21 |       "pl",
22 |       "tr"
23 |     ]
24 |   },
25 |   "buckets": {
26 |     "mdx": {
27 |       "include": ["readme/[locale].md"]
28 |     }
29 |   },
30 |   "$schema": "https://lingo.dev/schema/i18n.json"
31 | }
32 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/localizer/index.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { I18nConfig } from "@lingo.dev/_spec";
 2 | 
 3 | import createLingoDotDevLocalizer from "./lingodotdev";
 4 | import createExplicitLocalizer from "./explicit";
 5 | import { ILocalizer } from "./_types";
 6 | 
 7 | export default function createLocalizer(
 8 |   provider: I18nConfig["provider"],
 9 |   apiKey?: string,
10 | ): ILocalizer {
11 |   if (!provider) {
12 |     return createLingoDotDevLocalizer(apiKey);
13 |   } else {
14 |     return createExplicitLocalizer(provider);
15 |   }
16 | }
17 | 
```

--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------

```dockerfile
 1 | FROM node:20.12.2-alpine
 2 | 
 3 | # Run the Node.js / TypeScript application
 4 | ENTRYPOINT ["sh", "-c", "npx lingo.dev@latest ci \
 5 |   --api-key \"$LINGODOTDEV_API_KEY\" \
 6 |   --pull-request \"$LINGODOTDEV_PULL_REQUEST\" \
 7 |   --commit-message \"$LINGODOTDEV_COMMIT_MESSAGE\" \
 8 |   --pull-request-title \"$LINGODOTDEV_PULL_REQUEST_TITLE\" \
 9 |   --working-directory \"$LINGODOTDEV_WORKING_DIRECTORY\" \
10 |   --process-own-commits \"$LINGODOTDEV_PROCESS_OWN_COMMITS\""]
11 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/src/main.tsx:
--------------------------------------------------------------------------------

```typescript
 1 | import { StrictMode } from "react";
 2 | import { createRoot } from "react-dom/client";
 3 | import "./index.css";
 4 | import App from "./App.tsx";
 5 | 
 6 | // Compiler: add import
 7 | import { LingoProviderWrapper, loadDictionary } from "lingo.dev/react/client";
 8 | 
 9 | createRoot(document.getElementById("root")!).render(
10 |   <StrictMode>
11 |     <LingoProviderWrapper loadDictionary={(locale) => loadDictionary(locale)}>
12 |       <App />
13 |     </LingoProviderWrapper>
14 |   </StrictMode>,
15 | );
16 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/cmd/run/_utils.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { CmdRunContext } from "./_types";
 2 | 
 3 | /**
 4 |  * Determines the authentication ID for tracking purposes
 5 |  */
 6 | export async function determineAuthId(
 7 |   ctx: CmdRunContext,
 8 | ): Promise<string | null> {
 9 |   const isByokMode = !!ctx.config?.provider;
10 | 
11 |   if (isByokMode) {
12 |     return null;
13 |   } else {
14 |     try {
15 |       const authStatus = await ctx.localizer?.checkAuth();
16 |       return authStatus?.username || null;
17 |     } catch {
18 |       return null;
19 |     }
20 |   }
21 | }
22 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/config/cors.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from '@adonisjs/cors'
 2 | 
 3 | /**
 4 |  * Configuration options to tweak the CORS policy. The following
 5 |  * options are documented on the official documentation website.
 6 |  *
 7 |  * https://docs.adonisjs.com/guides/security/cors
 8 |  */
 9 | const corsConfig = defineConfig({
10 |   enabled: true,
11 |   origin: [],
12 |   methods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE'],
13 |   headers: true,
14 |   exposeHeaders: [],
15 |   credentials: true,
16 |   maxAge: 90,
17 | })
18 | 
19 | export default corsConfig
20 | 
```

--------------------------------------------------------------------------------
/integrations/directus/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "strict": true,
 4 |     "esModuleInterop": true,
 5 |     "resolveJsonModule": true,
 6 |     "allowSyntheticDefaultImports": true,
 7 |     "skipLibCheck": true,
 8 |     "skipDefaultLibCheck": true,
 9 |     "jsx": "react-jsx",
10 |     "moduleResolution": "Bundler",
11 |     "module": "ESNext",
12 |     "target": "ESNext",
13 |     "rootDir": "src",
14 |     "outDir": "build"
15 |   },
16 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
17 |   "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
18 | }
19 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/processor/_base.ts:
--------------------------------------------------------------------------------

```typescript
 1 | export type LocalizerInput = {
 2 |   sourceLocale: string;
 3 |   sourceData: Record<string, any>;
 4 |   processableData: Record<string, any>;
 5 |   targetLocale: string;
 6 |   targetData: Record<string, any>;
 7 | };
 8 | 
 9 | export type LocalizerProgressFn = (
10 |   progress: number,
11 |   sourceChunk: Record<string, string>,
12 |   processedChunk: Record<string, string>,
13 | ) => void;
14 | 
15 | export type LocalizerFn = (
16 |   input: LocalizerInput,
17 |   onProgress: LocalizerProgressFn,
18 | ) => Promise<Record<string, any>>;
19 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/cmd/ci/platforms/index.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { BitbucketPlatformKit } from "./bitbucket";
 2 | import { GitHubPlatformKit } from "./github";
 3 | import { GitlabPlatformKit } from "./gitlab";
 4 | 
 5 | export const getPlatformKit = () => {
 6 |   if (process.env.BITBUCKET_PIPELINE_UUID) {
 7 |     return new BitbucketPlatformKit();
 8 |   }
 9 | 
10 |   if (process.env.GITHUB_ACTION) {
11 |     return new GitHubPlatformKit();
12 |   }
13 | 
14 |   if (process.env.GITLAB_CI) {
15 |     return new GitlabPlatformKit();
16 |   }
17 | 
18 |   throw new Error("This platform is not supported");
19 | };
20 | 
```

--------------------------------------------------------------------------------
/packages/locales/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "rootDir": "src",
 4 |     "outDir": "build",
 5 |     "declaration": true,
 6 |     "declarationMap": true,
 7 |     "sourceMap": true,
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "resolveJsonModule": true,
11 |     "allowSyntheticDefaultImports": true,
12 |     "skipLibCheck": true,
13 |     "moduleResolution": "Bundler",
14 |     "module": "ESNext",
15 |     "target": "ESNext",
16 |     "allowUnreachableCode": true
17 |   },
18 |   "include": ["src/**/*.ts"],
19 |   "exclude": ["src/**/*.spec.ts"]
20 | }
21 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/utils/create-locale-import-map.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import * as t from "@babel/types";
 2 | 
 3 | export function createLocaleImportMap(
 4 |   allLocales: string[],
 5 |   dictionaryPath: string,
 6 | ): t.ObjectExpression {
 7 |   return t.objectExpression(
 8 |     allLocales.map((locale) =>
 9 |       t.objectProperty(
10 |         t.stringLiteral(locale),
11 |         t.arrowFunctionExpression(
12 |           [],
13 |           t.callExpression(t.identifier("import"), [
14 |             t.stringLiteral(`${dictionaryPath}?locale=${locale}`),
15 |           ]),
16 |         ),
17 |       ),
18 |     ),
19 |   );
20 | }
21 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/json5.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import JSON5 from "json5";
 2 | import { ILoader } from "./_types";
 3 | import { createLoader } from "./_utils";
 4 | 
 5 | export default function createJson5Loader(): ILoader<
 6 |   string,
 7 |   Record<string, any>
 8 | > {
 9 |   return createLoader({
10 |     pull: async (locale, input) => {
11 |       const json5String = input || "{}";
12 |       return JSON5.parse(json5String);
13 |     },
14 |     push: async (locale, data) => {
15 |       const serializedData = JSON5.stringify(data, null, 2);
16 |       return serializedData;
17 |     },
18 |   });
19 | }
20 | 
```

--------------------------------------------------------------------------------
/packages/spec/src/json-schema.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import fs from "fs";
 2 | import path from "path";
 3 | import { fileURLToPath } from "url";
 4 | import { zodToJsonSchema } from "zod-to-json-schema";
 5 | import { LATEST_CONFIG_DEFINITION } from "./config";
 6 | 
 7 | export default function buildJsonSchema() {
 8 |   const configSchema = zodToJsonSchema(LATEST_CONFIG_DEFINITION.schema);
 9 |   const currentDir = path.dirname(fileURLToPath(import.meta.url));
10 |   fs.writeFileSync(
11 |     `${currentDir}/../build/i18n.schema.json`,
12 |     JSON.stringify(configSchema, null, 2),
13 |   );
14 | }
15 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/plutil-json-loader.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { formatPlutilStyle } from "../utils/plutil-formatter";
 2 | import { ILoader } from "./_types";
 3 | import { createLoader } from "./_utils";
 4 | 
 5 | export default function createPlutilJsonTextLoader(): ILoader<string, string> {
 6 |   return createLoader({
 7 |     async pull(locale, data) {
 8 |       return data;
 9 |     },
10 |     async push(locale, data, originalInput) {
11 |       const jsonData = JSON.parse(data);
12 |       const result = formatPlutilStyle(jsonData, originalInput || "");
13 | 
14 |       return result;
15 |     },
16 |   });
17 | }
18 | 
```

--------------------------------------------------------------------------------
/demo/adonisjs/config/hash.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig, drivers } from '@adonisjs/core/hash'
 2 | 
 3 | const hashConfig = defineConfig({
 4 |   default: 'scrypt',
 5 | 
 6 |   list: {
 7 |     scrypt: drivers.scrypt({
 8 |       cost: 16384,
 9 |       blockSize: 8,
10 |       parallelization: 1,
11 |       maxMemory: 33554432,
12 |     }),
13 |   },
14 | })
15 | 
16 | export default hashConfig
17 | 
18 | /**
19 |  * Inferring types for the list of hashers you have configured
20 |  * in your application.
21 |  */
22 | declare module '@adonisjs/core/types' {
23 |   export interface HashersList extends InferHashers<typeof hashConfig> {}
24 | }
25 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/loaders/root-key.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { ILoader } from "./_types";
 2 | import { createLoader } from "./_utils";
 3 | 
 4 | export default function createRootKeyLoader(
 5 |   replaceAll = false,
 6 | ): ILoader<Record<string, any>, Record<string, any>> {
 7 |   return createLoader({
 8 |     async pull(locale, input) {
 9 |       const result = input[locale];
10 |       return result;
11 |     },
12 |     async push(locale, data, originalInput) {
13 |       const result = {
14 |         ...(replaceAll ? {} : originalInput),
15 |         [locale]: data,
16 |       };
17 |       return result;
18 |     },
19 |   });
20 | }
21 | 
```

--------------------------------------------------------------------------------
/integrations/directus/docker-compose.yml:
--------------------------------------------------------------------------------

```yaml
 1 | version: "3"
 2 | services:
 3 |   directus:
 4 |     build:
 5 |       context: ./
 6 |     ports:
 7 |       - 8055:8055
 8 |     volumes:
 9 |       - ./.directus/database:/directus/database
10 |       - ./.directus/uploads:/directus/uploads
11 |       - ./:/directus/extensions/lingo.dev-directus-extension
12 |     environment:
13 |       SECRET: "replace-with-secure-random-value"
14 |       ADMIN_EMAIL: "[email protected]"
15 |       ADMIN_PASSWORD: "d1r3ctu5"
16 |       DB_CLIENT: "sqlite3"
17 |       DB_FILENAME: "/directus/database/data.db"
18 |       WEBSOCKETS_ENABLED: "true"
19 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/jsx-root-flag.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import traverse from "@babel/traverse";
 2 | import { createCodeMutation } from "./_base";
 3 | import { getJsxRoots } from "./utils";
 4 | import * as t from "@babel/types";
 5 | 
 6 | const jsxRootFlagMutation = createCodeMutation((payload) => {
 7 |   const jsxRoots = getJsxRoots(payload.ast);
 8 | 
 9 |   for (const jsxElementPath of jsxRoots) {
10 |     jsxElementPath.node.openingElement.attributes.push(
11 |       t.jsxAttribute(t.jsxIdentifier("data-jsx-root"), null),
12 |     );
13 |   }
14 | 
15 |   return {
16 |     ...payload,
17 |   };
18 | });
19 | 
20 | export default jsxRootFlagMutation;
21 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/vite.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { reactRouter } from "@react-router/dev/vite";
 2 | import tailwindcss from "@tailwindcss/vite";
 3 | import { defineConfig } from "vite";
 4 | import tsconfigPaths from "vite-tsconfig-paths";
 5 | 
 6 | // Compiler: import
 7 | import lingoCompiler from "lingo.dev/compiler";
 8 | 
 9 | export default defineConfig(({ isSsrBuild }) =>
10 |   lingoCompiler.vite({
11 |     sourceRoot: "app",
12 |     targetLocales: ["es", "fr", "de"],
13 |     useDirective: false,
14 |     models: "lingo.dev",
15 |   })({
16 |     plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
17 |   }),
18 | );
19 | 
```

--------------------------------------------------------------------------------
/packages/spec/src/formats.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import Z from "zod";
 2 | 
 3 | export const bucketTypes = [
 4 |   "android",
 5 |   "csv",
 6 |   "ejs",
 7 |   "flutter",
 8 |   "html",
 9 |   "json",
10 |   "json5",
11 |   "jsonc",
12 |   "markdown",
13 |   "markdoc",
14 |   "mdx",
15 |   "xcode-strings",
16 |   "xcode-stringsdict",
17 |   "xcode-xcstrings",
18 |   "xcode-xcstrings-v2",
19 |   "yaml",
20 |   "yaml-root-key",
21 |   "properties",
22 |   "po",
23 |   "xliff",
24 |   "xml",
25 |   "srt",
26 |   "dato",
27 |   "compiler",
28 |   "vtt",
29 |   "php",
30 |   "po",
31 |   "vue-json",
32 |   "typescript",
33 |   "txt",
34 |   "json-dictionary",
35 | ] as const;
36 | 
37 | export const bucketTypeSchema = Z.enum(bucketTypes);
38 | 
```

--------------------------------------------------------------------------------
/demo/vite-project/vite.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineConfig } from "vite";
 2 | import react from "@vitejs/plugin-react-swc";
 3 | 
 4 | // Compiler: add import
 5 | import lingoCompiler from "lingo.dev/compiler";
 6 | 
 7 | const viteConfig = {
 8 |   plugins: [react()],
 9 | };
10 | 
11 | // https://vite.dev/config/
12 | export default defineConfig(() =>
13 |   // Compiler: add lingoCompiler.vite
14 |   lingoCompiler.vite({
15 |     sourceRoot: "src",
16 |     targetLocales: ["es", "fr", "ru", "de", "ja", "zh", "ar", "ko"],
17 |     models: "lingo.dev",
18 |   })(viteConfig),
19 | );
20 | // export default defineConfig({
21 | //   plugins: [react()],
22 | // })
23 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/typescript/en/example.ts:
--------------------------------------------------------------------------------

```typescript
 1 | const messages = {
 2 |   navigation: {
 3 |     home: "Home",
 4 |     about: "About Us",
 5 |     contact: "Contact Us",
 6 |     services: "Our Services"
 7 |   },
 8 | 
 9 |   forms: {
10 |     title: "Contact Form",
11 |     nameLabel: "Your Name",
12 |     emailLabel: "Email Address",
13 |     messageLabel: "Your Message",
14 |     submitButton: "Send Message",
15 |     successMessage: "Thank you for your message!",
16 |     locked_key_1: "This value is locked and should not be changed",
17 |     ignored_key_1: "This value is ignored and should not be processed"
18 |   },
19 | };
20 | 
21 | export default messages;
22 | 
```

--------------------------------------------------------------------------------
/scripts/docs/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "rootDir": "src",
 4 |     "outDir": "build",
 5 |     "declaration": true,
 6 |     "declarationMap": true,
 7 |     "sourceMap": true,
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "resolveJsonModule": true,
11 |     "allowSyntheticDefaultImports": true,
12 |     "skipLibCheck": true,
13 |     "moduleResolution": "Bundler",
14 |     "module": "ESNext",
15 |     "target": "ESNext",
16 |     "allowUnreachableCode": true,
17 |     "types": ["node"]
18 |   },
19 |   "include": ["src/**/*.ts", "src/**/*.tsx", "vitest.config.ts"],
20 |   "exclude": ["build/**/*"]
21 | }
22 | 
```

--------------------------------------------------------------------------------
/packages/compiler/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "rootDir": "src",
 4 |     "outDir": "build",
 5 |     "declaration": true,
 6 |     "declarationMap": true,
 7 |     "sourceMap": true,
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "resolveJsonModule": true,
11 |     "allowSyntheticDefaultImports": true,
12 |     "skipLibCheck": true,
13 |     "jsx": "react-jsx",
14 |     "moduleResolution": "Bundler",
15 |     "module": "ESNext",
16 |     "target": "ESNext",
17 |     "allowUnreachableCode": true
18 |   },
19 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
20 |   "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
21 | }
22 | 
```

--------------------------------------------------------------------------------
/packages/sdk/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "rootDir": "src",
 4 |     "outDir": "build",
 5 |     "declaration": true,
 6 |     "declarationMap": true,
 7 |     "sourceMap": true,
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "resolveJsonModule": true,
11 |     "allowSyntheticDefaultImports": true,
12 |     "skipLibCheck": true,
13 |     "jsx": "react-jsx",
14 |     "moduleResolution": "Bundler",
15 |     "module": "ESNext",
16 |     "target": "ESNext",
17 |     "allowUnreachableCode": true
18 |   },
19 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
20 |   "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
21 | }
22 | 
```

--------------------------------------------------------------------------------
/packages/spec/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "rootDir": "src",
 4 |     "outDir": "build",
 5 |     "declaration": true,
 6 |     "declarationMap": true,
 7 |     "sourceMap": true,
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "resolveJsonModule": true,
11 |     "allowSyntheticDefaultImports": true,
12 |     "skipLibCheck": true,
13 |     "jsx": "react-jsx",
14 |     "moduleResolution": "Bundler",
15 |     "module": "ESNext",
16 |     "target": "ESNext",
17 |     "allowUnreachableCode": true
18 |   },
19 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
20 |   "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
21 | }
22 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/utils/hash.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { NodePath } from "@babel/traverse";
 2 | import * as t from "@babel/types";
 3 | import { MD5 } from "object-hash";
 4 | 
 5 | export function getJsxElementHash(nodePath: NodePath<t.Node>) {
 6 |   if (!nodePath.node) {
 7 |     return "";
 8 |   }
 9 | 
10 |   const content = (nodePath.node as any).children
11 |     .map((child: any) => child.value)
12 |     .join("");
13 | 
14 |   const result = MD5(content);
15 |   return result;
16 | }
17 | 
18 | export function getJsxAttributeValueHash(attributeValue: string) {
19 |   if (!attributeValue) {
20 |     return "";
21 |   }
22 |   const result = MD5(attributeValue);
23 |   return result;
24 | }
25 | 
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/cmd/show/index.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { Command } from "interactive-commander";
 2 | import _ from "lodash";
 3 | import configCmd from "./config";
 4 | import localeCmd from "./locale";
 5 | import filesCmd from "./files";
 6 | import lockedKeysCmd from "./locked-keys";
 7 | import ignoredKeysCmd from "./ignored-keys";
 8 | 
 9 | export default new Command()
10 |   .command("show")
11 |   .description("Display configuration, locales, and file paths")
12 |   .helpOption("-h, --help", "Show help")
13 |   .addCommand(configCmd)
14 |   .addCommand(localeCmd)
15 |   .addCommand(filesCmd)
16 |   .addCommand(lockedKeysCmd)
17 |   .addCommand(ignoredKeysCmd);
18 | 
```

--------------------------------------------------------------------------------
/packages/cli/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "rootDir": "src",
 4 |     "outDir": "build",
 5 |     "declaration": true,
 6 |     "declarationMap": true,
 7 |     "sourceMap": true,
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "resolveJsonModule": true,
11 |     "allowSyntheticDefaultImports": true,
12 |     "skipLibCheck": true,
13 |     "jsx": "react-jsx",
14 |     "moduleResolution": "Bundler",
15 |     "module": "ESNext",
16 |     "target": "ESNext",
17 |     "allowUnreachableCode": true
18 |   },
19 |   "include": ["src/**/*.ts", "src/**/*.tsx", "types"],
20 |   "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
21 | }
22 | 
```

--------------------------------------------------------------------------------
/packages/locales/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @lingo.dev/\_locales
 2 | 
 3 | ## 0.1.0
 4 | 
 5 | ### Minor Changes
 6 | 
 7 | - [#1124](https://github.com/lingodotdev/lingo.dev/pull/1124) [`40fa69d`](https://github.com/lingodotdev/lingo.dev/commit/40fa69d9525a18c5861b6cce33262968c511ce5a) Thanks [@leen-neel](https://github.com/leen-neel)! - Implemented locales package from #1080
 8 | 
 9 |   - Added new `@lingo.dev/_locales` package for locale management
10 |   - Includes locale name parsing and validation utilities
11 |   - Provides integration helpers for various frameworks
12 |   - Supports locale code normalization and fallback handling
13 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/yaml/es/example.yml:
--------------------------------------------------------------------------------

```yaml
 1 | title: "MyApp"
 2 | description: "¡Hola, mundo!"
 3 | welcome_message: "Bienvenido a MyApp"
 4 | user_profile:
 5 |   display_name: "Juan Pérez"
 6 |   bio: "Desarrollador de software"
 7 | navigation_items:
 8 |   - "Inicio"
 9 |   - "Acerca de"
10 |   - "Contacto"
11 | product:
12 |   name: "MyWidget"
13 |   tagline: "El mejor widget de todos"
14 |   features:
15 |     - "Fácil de usar"
16 |     - "Rápido y confiable"
17 | settings:
18 |   max_users: 100
19 |   enabled: true
20 |   timeout: 30.5
21 | complex_structure:
22 |   level_one:
23 |     level_two:
24 |       message: "Texto anidado profundo"
25 | locked_key_1: "This value is locked and should not be changed"
```

--------------------------------------------------------------------------------
/packages/cli/demo/typescript/es/example.ts:
--------------------------------------------------------------------------------

```typescript
 1 | const messages = {
 2 |   navigation: {
 3 |     home: "Inicio",
 4 |     about: "Sobre nosotros",
 5 |     contact: "Contacto",
 6 |     services: "Nuestros servicios",
 7 |   },
 8 |   forms: {
 9 |     title: "Formulario de contacto",
10 |     nameLabel: "Tu nombre",
11 |     emailLabel: "Dirección de correo electrónico",
12 |     messageLabel: "Tu mensaje",
13 |     submitButton: "Enviar mensaje",
14 |     successMessage: "¡Gracias por tu mensaje!",
15 |     locked_key_1: "This value is locked and should not be changed",
16 |     ignored_key_1: "This value is ignored and should not be processed",
17 |   },
18 | };
19 | export default messages;
```

--------------------------------------------------------------------------------
/packages/locales/src/index.ts:
--------------------------------------------------------------------------------

```typescript
 1 | // Export types
 2 | export type { LocaleComponents, LocaleDelimiter, ParseResult } from "./types";
 3 | 
 4 | // Export constants
 5 | export { LOCALE_REGEX } from "./constants";
 6 | 
 7 | // Export parsing functions
 8 | export {
 9 |   parseLocale,
10 |   parseLocaleWithDetails,
11 |   getLanguageCode,
12 |   getScriptCode,
13 |   getRegionCode,
14 | } from "./parser";
15 | 
16 | // Export validation functions
17 | export {
18 |   isValidLocale,
19 |   isValidLanguageCode,
20 |   isValidScriptCode,
21 |   isValidRegionCode,
22 | } from "./validation";
23 | 
24 | // Export async name resolution functions
25 | export { getCountryName, getLanguageName, getScriptName } from "./names";
26 | 
```

--------------------------------------------------------------------------------
/packages/compiler/src/jsx-scope-flag.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { createCodeMutation } from "./_base";
 2 | import * as t from "@babel/types";
 3 | import { getAstKey } from "./utils/ast-key";
 4 | import { getJsxScopes } from "./utils/jsx-scope";
 5 | 
 6 | const jsxScopeFlagMutation = createCodeMutation((payload) => {
 7 |   const jsxScopes = getJsxScopes(payload.ast);
 8 | 
 9 |   for (const jsxScope of jsxScopes) {
10 |     jsxScope.node.openingElement.attributes.push(
11 |       t.jsxAttribute(
12 |         t.jsxIdentifier("data-jsx-scope"),
13 |         t.stringLiteral(getAstKey(jsxScope)),
14 |       ),
15 |     );
16 |   }
17 | 
18 |   return {
19 |     ...payload,
20 |   };
21 | });
22 | 
23 | export default jsxScopeFlagMutation;
24 | 
```

--------------------------------------------------------------------------------
/packages/react/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "rootDir": "src",
 4 |     "outDir": "build",
 5 |     "declaration": true,
 6 |     "declarationMap": true,
 7 |     "sourceMap": true,
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "resolveJsonModule": true,
11 |     "allowSyntheticDefaultImports": true,
12 |     "skipLibCheck": true,
13 |     "jsx": "react-jsx",
14 |     "jsxImportSource": "react",
15 |     "moduleResolution": "Bundler",
16 |     "module": "ESNext",
17 |     "target": "ESNext",
18 |     "types": ["vitest/globals", "@testing-library/react"],
19 |     "allowUnreachableCode": true
20 |   },
21 |   "include": ["src/**/*.ts", "src/**/*.tsx"],
22 |   "exclude": []
23 | }
24 | 
```

--------------------------------------------------------------------------------
/demo/react-router-app/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "include": [
 3 |     "**/*",
 4 |     "**/.server/**/*",
 5 |     "**/.client/**/*",
 6 |     ".react-router/types/**/*"
 7 |   ],
 8 |   "compilerOptions": {
 9 |     "lib": ["DOM", "DOM.Iterable", "ES2022"],
10 |     "types": ["node", "vite/client"],
11 |     "target": "ES2022",
12 |     "module": "ES2022",
13 |     "moduleResolution": "bundler",
14 |     "jsx": "react-jsx",
15 |     "rootDirs": [".", "./.react-router/types"],
16 |     "baseUrl": ".",
17 |     "paths": {
18 |       "~/*": ["./app/*"]
19 |     },
20 |     "esModuleInterop": true,
21 |     "verbatimModuleSyntax": true,
22 |     "noEmit": true,
23 |     "resolveJsonModule": true,
24 |     "skipLibCheck": true,
25 |     "strict": true
26 |   }
27 | }
28 | 
```

--------------------------------------------------------------------------------
/packages/cli/demo/yaml/en/example.yml:
--------------------------------------------------------------------------------

```yaml
 1 | title: "MyApp"
 2 | description: Hello, world!
 3 | welcome_message: 'Welcome to MyApp'
 4 | 
 5 | user_profile:
 6 |   display_name: "John Doe"
 7 |   bio: Software developer
 8 |   
 9 | navigation_items:
10 |   - "Home"
11 |   - "About"
12 |   - "Contact"
13 | 
14 | product:
15 |   name: "MyWidget"
16 |   tagline: The best widget ever
17 |   features:
18 |     - "Easy to use"
19 |     - "Fast and reliable"
20 | 
21 | settings:
22 |   max_users: 100
23 |   enabled: true
24 |   timeout: 30.5
25 | 
26 | complex_structure:
27 |   level_one:
28 |     level_two:
29 |       message: "Deep nested text"
30 | locked_key_1: "This value is locked and should not be changed"
31 | ignored_key_1: "This value is ignored and should not appear in target locales"
```

--------------------------------------------------------------------------------
/packages/cli/src/cli/utils/exp-backoff.ts:
--------------------------------------------------------------------------------

```typescript
 1 | export function withExponentialBackoff<T, Args extends any[]>(
 2 |   fn: (...args: Args) => Promise<T>,
 3 |   maxAttempts: number = 3,
 4 |   baseDelay: number = 1000,
 5 | ): (...args: Args) => Promise<T> {
 6 |   return async (...args: Args): Promise<T> => {
 7 |     for (let attempt = 0; attempt < maxAttempts; attempt++) {
 8 |       try {
 9 |         return await fn(...args);
10 |       } catch (error) {
11 |         if (attempt === maxAttempts - 1) throw error;
12 | 
13 |         const delay = baseDelay * Math.pow(2, attempt);
14 |         await new Promise((resolve) => setTimeout(resolve, delay));
15 |       }
16 |     }
17 |     throw new Error("Unreachable code");
18 |   };
19 | }
20 | 
```
Page 1/20FirstPrevNextLast