@drone1/alt 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +4 -4
- package/src/lib/consts.js +2 -2
- package/src/main.mjs +1 -1
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|

|
|
14
14
|
[](https://opensource.org/licenses/MIT)
|
|
15
15
|
|
|
16
|
+

|
|
17
|
+
|
|
16
18
|
<!--ts-->
|
|
17
19
|
* [AI Localization Tool](#ai-localization-tool)
|
|
18
20
|
* [Features](#features)
|
|
@@ -178,7 +180,7 @@ Commands:
|
|
|
178
180
|
Environment variables:
|
|
179
181
|
ANTHROPIC_API_KEY Your Anthropic API key
|
|
180
182
|
OPENAI_API_KEY Your OpenAI API key
|
|
181
|
-
ALT_LANGUAGE
|
|
183
|
+
ALT_LANGUAGE BCP47 language tag used for display
|
|
182
184
|
|
|
183
185
|
---
|
|
184
186
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@drone1/alt",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.1",
|
|
5
5
|
"description": "An AI-powered localization tool",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"bin": {
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"localization",
|
|
21
|
-
"i18n",
|
|
22
21
|
"translation",
|
|
23
22
|
"cli",
|
|
24
23
|
"ai",
|
|
24
|
+
"anthropic",
|
|
25
25
|
"claude",
|
|
26
|
+
"chatgpt",
|
|
26
27
|
"openai",
|
|
27
28
|
"gemini",
|
|
28
|
-
"google"
|
|
29
|
-
"anthropic"
|
|
29
|
+
"google"
|
|
30
30
|
],
|
|
31
31
|
"author": "drone1",
|
|
32
32
|
"license": "MIT",
|
package/src/lib/consts.js
CHANGED
|
@@ -14,10 +14,10 @@ export const ENV_VARS = [
|
|
|
14
14
|
{ name: 'ANTHROPIC_API_KEY', description: 'Your Anthropic API key' },
|
|
15
15
|
{ name: 'OPENAI_API_KEY', description: 'Your OpenAI API key' },
|
|
16
16
|
{ name: 'GOOGLE_API_KEY', description: 'Your Google Gemini API key' },
|
|
17
|
-
{ name: 'ALT_LANGUAGE', description: '
|
|
17
|
+
{ name: 'ALT_LANGUAGE', description: 'BCP47 language tag used for display' }
|
|
18
18
|
]
|
|
19
19
|
|
|
20
|
-
export const LOCALIZATION_SRC_DIR =
|
|
20
|
+
export const LOCALIZATION_SRC_DIR = 'localization'
|
|
21
21
|
export const DEFAULT_CACHE_FILENAME = '.localization.cache.json'
|
|
22
22
|
export const DEFAULT_CONFIG_FILENAME = 'config.json'
|
|
23
23
|
export const OVERLOADED_BACKOFF_INTERVAL_MS = 30 * 1000
|
package/src/main.mjs
CHANGED
|
@@ -39,7 +39,7 @@ export async function run() {
|
|
|
39
39
|
appState.lang = await initLocalizer({
|
|
40
40
|
defaultAppLanguage: LANGTAG_DEFAULT,
|
|
41
41
|
appLanguage: process.env?.ALT_LANGUAGE,
|
|
42
|
-
srcDir: path.resolve(__dirname, LOCALIZATION_SRC_DIR),
|
|
42
|
+
srcDir: path.resolve(__dirname, '..', LOCALIZATION_SRC_DIR),
|
|
43
43
|
log
|
|
44
44
|
})
|
|
45
45
|
|