Skip to content

Commit e558a32

Browse files
committed
fix: update README with features and documentation; upgrade adminforth dependency to 2.42.0
1 parent 25622d7 commit e558a32

4 files changed

Lines changed: 46 additions & 22 deletions

File tree

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
# AdminForth i18n Plugin
22

3-
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /> <img src="https://woodpecker.devforth.io/api/badges/3848/status.svg" alt="Build Status" /> <a href="https://www.npmjs.com/package/@adminforth/i18n"> <img src="https://img.shields.io/npm/dt/@adminforth/i18n" alt="npm downloads" /></a> <a href="https://www.npmjs.com/package/@adminforth/i18n"><img src="https://img.shields.io/npm/v/@adminforth/i18n" alt="npm version" /></a> <a href="https://www.npmjs.com/package/@adminforth/i18n">
3+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /> <img src="https://woodpecker.devforth.io/api/badges/3848/status.svg" alt="Build Status" /> <a href="https://www.npmjs.com/package/@adminforth/i18n"><img src="https://img.shields.io/npm/dm/@adminforth/i18n" alt="npm downloads" /></a> <a href="https://www.npmjs.com/package/@adminforth/i18n"><img src="https://img.shields.io/npm/v/@adminforth/i18n" alt="npm version" /></a>
4+
5+
[![Ask AI](https://tluma.ai/badge)](https://tluma.ai/ask-ai/devforth/adminforth)
46

57
Allows to store all translation strings in an adminforth application in a single resource.
68

7-
## For ussage, see [AdminForth i18n Documentation](https://adminforth.dev/docs/tutorial/Plugins/i18n/)
9+
## Features
10+
11+
- Store translation strings in a single AdminForth resource.
12+
- Support multilingual admin experiences across the app.
13+
- Keep localization management inside your back office.
14+
- Centralize translation editing for faster updates.
15+
16+
## Documentation
17+
18+
Full setup and configuration guide:
19+
20+
[AdminForth i18n Documentation](https://adminforth.dev/docs/tutorial/Plugins/i18n/)
21+
22+
## About AdminForth
23+
24+
AdminForth is an open-source, agent-first admin framework for building robust admin panels and back-office applications faster.
25+
26+
## Related links
27+
28+
- [AdminForth website](https://adminforth.dev)
29+
- [npm package](https://www.npmjs.com/package/@adminforth/i18n)
30+
- [More AdminForth plugins](https://adminforth.dev/docs/tutorial/ListOfPlugins/)
31+
- [Built by DevForth](https://devforth.io)

index.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -536,19 +536,19 @@ export default class I18nPlugin extends AdminForthPlugin {
536536
const jsonSchemaRequired = strings.map(s => s.en_string);
537537
const dedupRequired = Array.from(new Set(jsonSchemaRequired));
538538
// call OpenAI
539-
const resp = await this.options.completeAdapter.complete(
540-
prompt,
541-
prompt.length * 2,
542-
{
543-
name: "translation_response",
544-
schema: {
545-
type: "object",
546-
properties: jsonSchemaProperties,
547-
required: dedupRequired,
548-
additionalProperties: false,
549-
},
550-
}
551-
);
539+
const resp = await this.options.completeAdapter.complete({
540+
content: prompt,
541+
maxTokens: prompt.length * 2,
542+
outputSchema: {
543+
name: "translation_response",
544+
schema: {
545+
type: "object",
546+
properties: jsonSchemaProperties,
547+
required: dedupRequired,
548+
additionalProperties: false,
549+
},
550+
},
551+
});
552552

553553
process.env.HEAVY_DEBUG && console.log(`🪲🔪LLM resp >> ${prompt.length}, <<${resp.content.length} :\n\n`, JSON.stringify(resp));
554554

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
"p-limit": "^7.3.0"
3939
},
4040
"peerDependencies": {
41-
"adminforth": "^2.35.0"
41+
"adminforth": "^2.42.0"
4242
},
4343
"devDependencies": {
4444
"@types/node": "^22.10.7",
45-
"adminforth": "^2.35.0",
45+
"adminforth": "^2.42.0",
4646
"i18n-iso-countries": "^7.13.0",
4747
"semantic-release": "^24.2.1",
4848
"semantic-release-slack-bot": "^4.0.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)