@crowdin/app-project-module 1.13.2 → 1.14.0
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/out/index.js +2 -0
- package/out/modules/chat/index.d.ts +6 -0
- package/out/modules/chat/index.js +21 -0
- package/out/modules/integration/util/defaults.js +6 -0
- package/out/modules/manifest.js +7 -0
- package/out/static/ui/form.bundle.js +606 -266
- package/out/static/ui/form.bundle.js.map +1 -1
- package/out/types.d.ts +6 -0
- package/package.json +2 -2
package/out/index.js
CHANGED
|
@@ -94,6 +94,7 @@ const editorRightPanelApp = __importStar(require("./modules/editor-right-panel")
|
|
|
94
94
|
const externalQaCheck = __importStar(require("./modules/external-qa-check"));
|
|
95
95
|
const fileProcessingApps = __importStar(require("./modules/file-processing"));
|
|
96
96
|
const integrationApp = __importStar(require("./modules/integration"));
|
|
97
|
+
const chatApp = __importStar(require("./modules/chat"));
|
|
97
98
|
const modalApp = __importStar(require("./modules/modal"));
|
|
98
99
|
const organizationMenuApp = __importStar(require("./modules/organization-menu"));
|
|
99
100
|
const organizationSettingsMenuApp = __importStar(require("./modules/organization-settings-menu"));
|
|
@@ -222,6 +223,7 @@ function addCrowdinEndpoints(app, clientConfig) {
|
|
|
222
223
|
projectToolsApp.register({ config, app });
|
|
223
224
|
projectReportsApp.register({ config, app });
|
|
224
225
|
modalApp.register({ config, app });
|
|
226
|
+
chatApp.register({ config, app });
|
|
225
227
|
contextMenuApp.register({ config, app });
|
|
226
228
|
//other apps only work in authorized context
|
|
227
229
|
if (!(0, util_1.isAuthorizedConfig)(config)) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.register = register;
|
|
7
|
+
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
|
+
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
|
+
const util_1 = require("../../util");
|
|
10
|
+
function register({ config, app }) {
|
|
11
|
+
const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
|
|
12
|
+
if (!config.chat) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
config.chat.forEach((chat, index) => {
|
|
16
|
+
if ((chat === null || chat === void 0 ? void 0 : chat.uiPath) || (chat === null || chat === void 0 ? void 0 : chat.formSchema)) {
|
|
17
|
+
const moduleKey = chat.key || `${config.identifier}-chat-${index}`;
|
|
18
|
+
app.use(`/chat-${moduleKey}`, (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: moduleKey }), (0, render_ui_module_1.default)(chat, config));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -255,6 +255,7 @@ function applyIntegrationModuleDefaults(config, integration) {
|
|
|
255
255
|
key: 'new-crowdin-files',
|
|
256
256
|
label: 'Automatically sync new translations from Crowdin',
|
|
257
257
|
type: 'checkbox',
|
|
258
|
+
helpText: 'Automatically include newly added Crowdin files and folders in Auto Sync.',
|
|
258
259
|
dependencySettings: JSON.stringify([{ '#schedule-settings': { type: '!equal', value: ['0'] } }]),
|
|
259
260
|
category: types_1.DefaultCategory.SYNC,
|
|
260
261
|
position: 1,
|
|
@@ -265,6 +266,7 @@ function applyIntegrationModuleDefaults(config, integration) {
|
|
|
265
266
|
key: 'new-integration-files',
|
|
266
267
|
label: `Automatically sync new content from ${config.name}`,
|
|
267
268
|
type: 'checkbox',
|
|
269
|
+
helpText: `Automatically include new ${config.name} files and folders in Auto Sync as soon as they appear.`,
|
|
268
270
|
dependencySettings: JSON.stringify([{ '#schedule-settings': { type: '!equal', value: ['0'] } }]),
|
|
269
271
|
category: types_1.DefaultCategory.SYNC,
|
|
270
272
|
position: 2,
|
|
@@ -279,18 +281,21 @@ function applyIntegrationModuleDefaults(config, integration) {
|
|
|
279
281
|
key: 'importEqSuggestions',
|
|
280
282
|
label: 'Add translations that are the same as the source text',
|
|
281
283
|
type: 'checkbox',
|
|
284
|
+
helpText: 'Upload translations that match the source text. Useful when the source and target are intentionally identical, for example brand names, numbers, or code snippets.',
|
|
282
285
|
category: types_1.DefaultCategory.SYNC,
|
|
283
286
|
position: 4,
|
|
284
287
|
}, {
|
|
285
288
|
key: 'autoApproveImported',
|
|
286
289
|
label: 'Mark added translations as Approved in Crowdin',
|
|
287
290
|
type: 'checkbox',
|
|
291
|
+
helpText: 'Mark uploaded translations as Approved in Crowdin, bypassing proofreading. Leave off if your workflow requires a reviewer to approve translations manually.',
|
|
288
292
|
category: types_1.DefaultCategory.SYNC,
|
|
289
293
|
position: 5,
|
|
290
294
|
}, {
|
|
291
295
|
key: 'translateHidden',
|
|
292
296
|
label: 'Add translations for hidden source strings in Crowdin',
|
|
293
297
|
type: 'checkbox',
|
|
298
|
+
helpText: 'Also upload translations for source strings marked as hidden in Crowdin. Hidden strings are excluded from the translator workflow but can still receive translations from your integration.',
|
|
294
299
|
category: types_1.DefaultCategory.SYNC,
|
|
295
300
|
position: 6,
|
|
296
301
|
});
|
|
@@ -300,6 +305,7 @@ function applyIntegrationModuleDefaults(config, integration) {
|
|
|
300
305
|
label: 'Files export settings',
|
|
301
306
|
type: 'select',
|
|
302
307
|
defaultValue: '0',
|
|
308
|
+
helpText: 'Decides which Crowdin files are exported on each sync. "Export all" includes every file; "Export translated only" skips files with no translations; "Export approved only" requires translations to be approved by a proofreader.',
|
|
303
309
|
dependencySettings: JSON.stringify([{ '#schedule-settings': { type: '!equal', value: ['0'] } }]),
|
|
304
310
|
category: types_1.DefaultCategory.SYNC,
|
|
305
311
|
position: 7,
|
package/out/modules/manifest.js
CHANGED
|
@@ -432,6 +432,13 @@ function handle(config) {
|
|
|
432
432
|
}
|
|
433
433
|
modules['modal'] = modals;
|
|
434
434
|
}
|
|
435
|
+
if (config.chat) {
|
|
436
|
+
const chats = config.chat.map((chat, i) => {
|
|
437
|
+
const moduleKey = chat.key || `${config.identifier}-chat-${i}`;
|
|
438
|
+
return Object.assign({ key: moduleKey, name: chat.name || config.name, url: chat.url || `/chat-${moduleKey}/` + (chat.fileName || 'index.html') }, (!!chat.environments && { environments: normalizeEnvironments(chat.environments) }));
|
|
439
|
+
});
|
|
440
|
+
modules['chat'] = chats;
|
|
441
|
+
}
|
|
435
442
|
if (config.contextMenu) {
|
|
436
443
|
let contextMenus = [];
|
|
437
444
|
if (Array.isArray(config.contextMenu)) {
|