@saltcorn/cli 1.1.4-beta.2 → 1.1.4-beta.5
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 +49 -49
- package/npm-shrinkwrap.json +256 -256
- package/oclif.manifest.json +1 -1
- package/package.json +8 -8
- package/src/commands/dev/translate.js +3 -20
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@saltcorn/cli",
|
|
3
3
|
"description": "Command-line interface for Saltcorn, open-source no-code platform",
|
|
4
4
|
"homepage": "https://saltcorn.com",
|
|
5
|
-
"version": "1.1.4-beta.
|
|
5
|
+
"version": "1.1.4-beta.5",
|
|
6
6
|
"author": "Tom Nielsen @glutamate",
|
|
7
7
|
"bin": {
|
|
8
8
|
"saltcorn": "./bin/saltcorn"
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4.2.4",
|
|
13
13
|
"@oclif/plugin-plugins": "^5.4.26",
|
|
14
|
-
"@saltcorn/admin-models": "1.1.4-beta.
|
|
15
|
-
"@saltcorn/common-code": "1.1.4-beta.
|
|
16
|
-
"@saltcorn/data": "1.1.4-beta.
|
|
17
|
-
"@saltcorn/mobile-app": "1.1.4-beta.
|
|
18
|
-
"@saltcorn/mobile-builder": "1.1.4-beta.
|
|
19
|
-
"@saltcorn/plugins-loader": "1.1.4-beta.
|
|
20
|
-
"@saltcorn/server": "1.1.4-beta.
|
|
14
|
+
"@saltcorn/admin-models": "1.1.4-beta.5",
|
|
15
|
+
"@saltcorn/common-code": "1.1.4-beta.5",
|
|
16
|
+
"@saltcorn/data": "1.1.4-beta.5",
|
|
17
|
+
"@saltcorn/mobile-app": "1.1.4-beta.5",
|
|
18
|
+
"@saltcorn/mobile-builder": "1.1.4-beta.5",
|
|
19
|
+
"@saltcorn/plugins-loader": "1.1.4-beta.5",
|
|
20
|
+
"@saltcorn/server": "1.1.4-beta.5",
|
|
21
21
|
"contractis": "^0.1.0",
|
|
22
22
|
"dateformat": "^4.6.3",
|
|
23
23
|
"inquirer": "^12.3.3",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
const { Command, Flags, Args } = require("@oclif/core");
|
|
6
6
|
const { maybe_as_tenant, init_some_tenants } = require("../../common");
|
|
7
7
|
const { getState, features } = require("@saltcorn/data/db/state");
|
|
8
|
+
const { translate } = require("@saltcorn/data/translate");
|
|
8
9
|
const path = require("path");
|
|
9
10
|
const fs = require("fs");
|
|
10
11
|
|
|
@@ -51,10 +52,7 @@ class TranslateCommand extends Command {
|
|
|
51
52
|
continue;
|
|
52
53
|
}
|
|
53
54
|
process.stdout.write(`Translating ${key} to: `);
|
|
54
|
-
const answer = await
|
|
55
|
-
systemPrompt: systemPrompt(args.locale),
|
|
56
|
-
temperature: 0,
|
|
57
|
-
});
|
|
55
|
+
const answer = await translate(key, args.locale);
|
|
58
56
|
console.log(answer);
|
|
59
57
|
locale[key] = answer;
|
|
60
58
|
count += 1;
|
|
@@ -82,23 +80,8 @@ class TranslateCommand extends Command {
|
|
|
82
80
|
}
|
|
83
81
|
|
|
84
82
|
// prompt explain: tables, users, tenants
|
|
85
|
-
const languageNames = new Intl.DisplayNames(["en"], {
|
|
86
|
-
type: "language",
|
|
87
|
-
});
|
|
88
|
-
const skipKeys = ["HTTP", "Plugins"];
|
|
89
83
|
|
|
90
|
-
const
|
|
91
|
-
locale,
|
|
92
|
-
) => `You are purely a translation assistant. Translate
|
|
93
|
-
the entered text into ${languageNames.of(locale)} without any additional information.
|
|
94
|
-
the translation is in the domain of database user interface/ application development software. the term Table referes to
|
|
95
|
-
the database table, the row is a row in the database table, media is the type of media file,
|
|
96
|
-
the user is the user account in the system, with each user having a role that defines permissions, and as the system is
|
|
97
|
-
multi-tenant the term tenant refers an instance of the application for a particular purpose.
|
|
98
|
-
2FA is two factor authentication, building refers to building software applications. A view is a
|
|
99
|
-
representation of the database content on the screen for the user, and actions are user-defined ways of
|
|
100
|
-
manipulating data or files. The system is modular, and an extension is known as a Module. Use technical language.
|
|
101
|
-
Translate anything the user enters to ${languageNames.of(locale)}.`;
|
|
84
|
+
const skipKeys = ["HTTP", "Plugins"];
|
|
102
85
|
|
|
103
86
|
TranslateCommand.args = {
|
|
104
87
|
locale: Args.string({
|