Skip to content

Commit

Permalink
Update config
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 23, 2024
1 parent cb0060d commit a16086e
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 32 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ developer-friendly experience.

- Automatically identifies new, modified, or removed translation keys in your
codebase using Git diff
- Handles multiple file formats (.json, .ts, .md) with precise parsing and
- Handles multiple file formats (.json, .ts) with precise parsing and
file-specific updates

### 🌍 AI-Powered Translation
Expand All @@ -47,7 +47,11 @@ developer-friendly experience.
- Supports more than 100 languages with natural and consistent results
- Ensures that translations align with the tone and intent of your original text

## Made with ❤️ from Midday
### 🪝 Hooks

- Supports hooks to format the content with Biome or Prettier

## Made with 🤍 from Midday

Languine was made from the implementation in [Midday](https://midday.ai), we
have now extracted it into a standalone CLI tool.
Expand Down
15 changes: 15 additions & 0 deletions examples/i18next/languine.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default {
version: "1.0.0",
locale: {
source: "en",
targets: ["sv"]
},
files: {
json: {
include: ["locales/[locale].json"]
}
},
openai: {
model: "gpt-4-turbo"
}
}
15 changes: 0 additions & 15 deletions examples/i18next/languine.json

This file was deleted.

9 changes: 9 additions & 0 deletions examples/i18next/locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"key": "This is a wonderful day!",
"nested": {
"key": "How are you?"
},
"interpolated": "Have a nice day, {{name}}!",
"pluralKey_one": "This is a nice example.",
"pluralKey_other": "This are nice examples."
}
9 changes: 9 additions & 0 deletions examples/i18next/locales/sv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"key": "Det är en underbar dag!",
"nested": {
"key": "Hur mår du?"
},
"interpolated": "Ha en trevlig dag, {{name}}!",
"pluralKey_one": "Det här är ett fint exempel.",
"pluralKey_other": "Det här är fina exempel."
}
1 change: 1 addition & 0 deletions examples/lingui/languine.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default {
model: "gpt-4-turbo",
},
hooks: {
// Optional: Format the content with Biome
afterTranslate: ({ content, filePath }) => {
const formatted = biome.formatContent(content.toString(), {
filePath,
Expand Down
15 changes: 15 additions & 0 deletions examples/next-international/languine.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default {
version: "1.0.0",
locale: {
source: "en",
targets: ["fr"],
},
files: {
ts: {
include: ["locales/[locale].ts"],
},
},
openai: {
model: "gpt-4-turbo",
},
};
15 changes: 0 additions & 15 deletions examples/next-international/languine.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/next-international/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export default {
"missing.translation.in.fr": "This should work",
"cows#one": "A cow",
"cows#other": "{count} cows",
"hello.world": "Hello World",
} as const;

0 comments on commit a16086e

Please sign in to comment.