@antelopejs/dms-lang 0.0.7 → 0.1.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 +12 -6
- package/dist/pages/actions.d.ts +7 -0
- package/dist/pages/actions.js +15 -0
- package/dist/pages/actions.js.map +1 -0
- package/dist/pages/component-action.d.ts +2 -0
- package/dist/pages/component-action.js +10 -0
- package/dist/pages/component-action.js.map +1 -0
- package/dist/pages/header-actions.d.ts +9 -0
- package/dist/pages/header-actions.js +146 -0
- package/dist/pages/header-actions.js.map +1 -0
- package/dist/pages/index.d.ts +6 -0
- package/dist/pages/index.js +6 -0
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/language.d.ts +10 -0
- package/dist/pages/language.js +89 -0
- package/dist/pages/language.js.map +1 -0
- package/dist/pages/languages-table.d.ts +2 -0
- package/dist/pages/languages-table.js +120 -0
- package/dist/pages/languages-table.js.map +1 -0
- package/dist/pages/module.d.ts +7 -1
- package/dist/pages/module.js +28 -2
- package/dist/pages/module.js.map +1 -1
- package/dist/pages/overview.d.ts +2 -1
- package/dist/pages/overview.js +83 -8
- package/dist/pages/overview.js.map +1 -1
- package/dist/pages/page-actions.d.ts +6 -0
- package/dist/pages/page-actions.js +10 -0
- package/dist/pages/page-actions.js.map +1 -0
- package/dist/pages/quick-actions.d.ts +1 -0
- package/dist/pages/quick-actions.js +56 -0
- package/dist/pages/quick-actions.js.map +1 -0
- package/dist/pages/translations.d.ts +7 -1
- package/dist/pages/translations.js +47 -10
- package/dist/pages/translations.js.map +1 -1
- package/dist/pages/workspace-guard.d.ts +1 -0
- package/dist/pages/workspace-guard.js +35 -0
- package/dist/pages/workspace-guard.js.map +1 -0
- package/dist/pages/workspace.d.ts +18 -0
- package/dist/pages/workspace.js +162 -0
- package/dist/pages/workspace.js.map +1 -0
- package/dist/pages/workspaces.d.ts +14 -0
- package/dist/pages/workspaces.js +88 -0
- package/dist/pages/workspaces.js.map +1 -0
- package/dist/routes/publicLocales.d.ts +3 -2
- package/dist/routes/publicLocales.js +39 -18
- package/dist/routes/publicLocales.js.map +1 -1
- package/dist/routes/translations.d.ts +59 -63
- package/dist/routes/translations.js +400 -119
- package/dist/routes/translations.js.map +1 -1
- package/dist/utils/announce.d.ts +9 -0
- package/dist/utils/announce.js +29 -0
- package/dist/utils/announce.js.map +1 -0
- package/dist/utils/blocks.d.ts +8 -0
- package/dist/utils/blocks.js +213 -0
- package/dist/utils/blocks.js.map +1 -0
- package/dist/utils/body.d.ts +1 -0
- package/dist/utils/body.js +21 -0
- package/dist/utils/body.js.map +1 -0
- package/dist/utils/cache.d.ts +3 -0
- package/dist/utils/cache.js +32 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/catalog.d.ts +7 -0
- package/dist/utils/catalog.js +62 -0
- package/dist/utils/catalog.js.map +1 -0
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +10 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/coverage.d.ts +2 -0
- package/dist/utils/coverage.js +11 -0
- package/dist/utils/coverage.js.map +1 -0
- package/dist/utils/dialogs.d.ts +7 -0
- package/dist/utils/dialogs.js +103 -0
- package/dist/utils/dialogs.js.map +1 -0
- package/dist/utils/errors.d.ts +40 -0
- package/dist/utils/errors.js +60 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/export.d.ts +17 -0
- package/dist/utils/export.js +129 -0
- package/dist/utils/export.js.map +1 -0
- package/dist/utils/json.d.ts +10 -1
- package/dist/utils/json.js +127 -19
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/key-stores.d.ts +3 -0
- package/dist/utils/key-stores.js +24 -0
- package/dist/utils/key-stores.js.map +1 -0
- package/dist/utils/keys.d.ts +23 -0
- package/dist/utils/keys.js +252 -0
- package/dist/utils/keys.js.map +1 -0
- package/dist/utils/languages.d.ts +27 -0
- package/dist/utils/languages.js +121 -0
- package/dist/utils/languages.js.map +1 -0
- package/dist/utils/locale-codes.d.ts +5 -0
- package/dist/utils/locale-codes.js +56 -0
- package/dist/utils/locale-codes.js.map +1 -0
- package/dist/utils/locale-discovery.d.ts +1 -0
- package/dist/utils/locale-discovery.js +19 -1
- package/dist/utils/locale-discovery.js.map +1 -1
- package/dist/utils/message-check.d.ts +1 -0
- package/dist/utils/message-check.js +93 -0
- package/dist/utils/message-check.js.map +1 -0
- package/dist/utils/message-syntax.d.ts +6 -0
- package/dist/utils/message-syntax.js +38 -0
- package/dist/utils/message-syntax.js.map +1 -0
- package/dist/utils/namespaces.d.ts +12 -0
- package/dist/utils/namespaces.js +52 -0
- package/dist/utils/namespaces.js.map +1 -0
- package/dist/utils/notices.d.ts +4 -0
- package/dist/utils/notices.js +60 -0
- package/dist/utils/notices.js.map +1 -0
- package/dist/utils/own.d.ts +2 -3
- package/dist/utils/own.js +17 -57
- package/dist/utils/own.js.map +1 -1
- package/dist/utils/public-url.d.ts +8 -0
- package/dist/utils/public-url.js +87 -0
- package/dist/utils/public-url.js.map +1 -0
- package/dist/utils/registry.d.ts +3 -1
- package/dist/utils/registry.js +26 -10
- package/dist/utils/registry.js.map +1 -1
- package/dist/utils/resolve.d.ts +18 -15
- package/dist/utils/resolve.js +98 -151
- package/dist/utils/resolve.js.map +1 -1
- package/dist/utils/review.d.ts +5 -0
- package/dist/utils/review.js +64 -0
- package/dist/utils/review.js.map +1 -0
- package/dist/utils/snippets.d.ts +7 -0
- package/dist/utils/snippets.js +129 -0
- package/dist/utils/snippets.js.map +1 -0
- package/dist/utils/summary.d.ts +23 -0
- package/dist/utils/summary.js +65 -0
- package/dist/utils/summary.js.map +1 -0
- package/dist/utils/tree.d.ts +2 -17
- package/dist/utils/tree.js +21 -126
- package/dist/utils/tree.js.map +1 -1
- package/dist/utils/workspaces.d.ts +45 -15
- package/dist/utils/workspaces.js +256 -164
- package/dist/utils/workspaces.js.map +1 -1
- package/dist/validation/key.schema.d.ts +71 -0
- package/dist/validation/key.schema.js +67 -0
- package/dist/validation/key.schema.js.map +1 -0
- package/dist/validation/query.schema.d.ts +17 -0
- package/dist/validation/query.schema.js +44 -0
- package/dist/validation/query.schema.js.map +1 -0
- package/dist/validation/validate.d.ts +2 -0
- package/dist/validation/validate.js +24 -0
- package/dist/validation/validate.js.map +1 -0
- package/dist/validation/workspace.schema.d.ts +145 -0
- package/dist/validation/workspace.schema.js +83 -0
- package/dist/validation/workspace.schema.js.map +1 -0
- package/frontend-vue/app/build/components/KeyAddModal.vue +340 -0
- package/frontend-vue/app/build/components/KeyEditorDrawer.vue +951 -0
- package/frontend-vue/app/build/components/KeyRenameModal.vue +172 -0
- package/frontend-vue/app/build/components/LanguageAddModal.vue +199 -0
- package/frontend-vue/app/build/components/LanguagePicker.vue +233 -0
- package/frontend-vue/app/build/components/LocaleTile.vue +52 -0
- package/frontend-vue/app/build/components/PlaceholderText.vue +42 -0
- package/frontend-vue/app/build/components/ShortcutKbds.vue +22 -0
- package/frontend-vue/app/build/components/WorkspaceCreateModal.vue +193 -0
- package/frontend-vue/app/build/components/WorkspaceRenameModal.vue +107 -0
- package/frontend-vue/app/build/components/form/FormFieldRow.vue +70 -0
- package/frontend-vue/app/build/components/form/FormRows.vue +25 -0
- package/frontend-vue/app/build/components/form/WorkspaceDetailsFields.vue +44 -0
- package/frontend-vue/app/build/components/matrix/MatrixCell.vue +488 -0
- package/frontend-vue/app/build/components/matrix/MatrixColumns.vue +177 -0
- package/frontend-vue/app/build/components/matrix/MatrixGroupHeader.vue +57 -0
- package/frontend-vue/app/build/components/matrix/MatrixKeyCell.vue +83 -0
- package/frontend-vue/app/build/components/matrix/MatrixToolbar.vue +167 -0
- package/frontend-vue/app/build/components/queue/QueueActions.vue +60 -0
- package/frontend-vue/app/build/components/queue/QueueDone.vue +185 -0
- package/frontend-vue/app/build/components/queue/QueueEditor.vue +374 -0
- package/frontend-vue/app/build/components/queue/QueueHeader.vue +162 -0
- package/frontend-vue/app/build/components/queue/QueueUpNext.vue +61 -0
- package/frontend-vue/app/build/composables/useCellEditor.ts +324 -0
- package/frontend-vue/app/build/composables/useCellMoves.ts +155 -0
- package/frontend-vue/app/build/composables/useCellSaves.ts +339 -0
- package/frontend-vue/app/build/composables/useKeyPanel.ts +284 -0
- package/frontend-vue/app/build/composables/useKeySaves.ts +280 -0
- package/frontend-vue/app/build/composables/useMatrixFilters.ts +213 -0
- package/frontend-vue/app/build/composables/useMatrixRows.ts +104 -0
- package/frontend-vue/app/build/composables/useMatrixView.ts +181 -0
- package/frontend-vue/app/build/composables/useQueueContext.ts +31 -0
- package/frontend-vue/app/build/composables/useQueueEditing.ts +53 -0
- package/frontend-vue/app/build/composables/useQueueOrphans.ts +54 -0
- package/frontend-vue/app/build/composables/useQueueSave.ts +290 -0
- package/frontend-vue/app/build/composables/useQueueShortcuts.ts +106 -0
- package/frontend-vue/app/build/composables/useQueueToasts.ts +99 -0
- package/frontend-vue/app/components/LanguageNamespaces.vue +77 -0
- package/frontend-vue/app/components/NamespaceCoverage.vue +222 -0
- package/frontend-vue/app/components/TranslationMatrix.vue +809 -0
- package/frontend-vue/app/components/TranslationQueue.vue +212 -0
- package/frontend-vue/app/components/WorkspaceDangerZone.vue +81 -0
- package/frontend-vue/app/components/WorkspaceGeneral.vue +232 -0
- package/frontend-vue/app/components/WorkspaceList.vue +454 -0
- package/frontend-vue/app/components/WorkspaceScope.vue +384 -0
- package/frontend-vue/app/composables/translation/useFirstRun.ts +8 -0
- package/frontend-vue/app/composables/translation/useI18nWorkspaces.ts +221 -133
- package/frontend-vue/app/composables/translation/useKeyActions.ts +224 -0
- package/frontend-vue/app/composables/translation/useLangFormat.ts +10 -0
- package/frontend-vue/app/composables/translation/useLangLinks.ts +80 -0
- package/frontend-vue/app/composables/translation/useLanguageActions.ts +159 -0
- package/frontend-vue/app/composables/translation/useLanguageQueue.ts +232 -0
- package/frontend-vue/app/composables/translation/useLocaleNames.ts +166 -0
- package/frontend-vue/app/composables/translation/useMutationToast.ts +51 -17
- package/frontend-vue/app/composables/translation/useQueueDrafts.ts +115 -0
- package/frontend-vue/app/composables/translation/useQueueSession.ts +182 -0
- package/frontend-vue/app/composables/translation/useServedConfirm.ts +152 -0
- package/frontend-vue/app/composables/translation/useWorkspaceActions.ts +259 -0
- package/frontend-vue/app/composables/translation/useWorkspaceContext.ts +46 -15
- package/frontend-vue/app/composables/translation/useWorkspaceFlat.ts +322 -70
- package/frontend-vue/app/composables/translation/useWorkspaceNameCheck.ts +55 -0
- package/frontend-vue/app/composables/translation/useWorkspaceRoute.ts +129 -0
- package/frontend-vue/app/config/shortcuts-registry.ts +72 -0
- package/frontend-vue/app/types/lang.ts +130 -0
- package/frontend-vue/app/utils/boundedCache.ts +22 -0
- package/frontend-vue/app/utils/download.ts +16 -0
- package/frontend-vue/app/utils/keySaveErrors.ts +61 -0
- package/frontend-vue/app/utils/keySaves.ts +108 -0
- package/frontend-vue/app/utils/languages.ts +272 -0
- package/frontend-vue/app/utils/matrixExport.ts +47 -0
- package/frontend-vue/app/utils/queueDrafts.ts +115 -0
- package/frontend-vue/app/utils/queuePass.ts +145 -0
- package/frontend-vue/app/utils/queueView.ts +22 -0
- package/frontend-vue/app/utils/shortcuts.ts +75 -0
- package/frontend-vue/app/utils/translations.ts +756 -0
- package/frontend-vue/app/utils/workspaceBackup.ts +119 -0
- package/frontend-vue/app/utils/workspaces.ts +45 -0
- package/frontend-vue/dms.frontend.build.ts +5 -0
- package/frontend-vue/dms.frontend.ts +9 -20
- package/frontend-vue/i18n/locales/lang-en-GB.json +792 -69
- package/frontend-vue/i18n/locales/lang-fr-FR.json +792 -69
- package/frontend-vue/package.json +8 -6
- package/package.json +11 -8
- package/dist/utils/mutations.d.ts +0 -3
- package/dist/utils/mutations.js +0 -35
- package/dist/utils/mutations.js.map +0 -1
- package/frontend-vue/app/build/components/pages/lang/TranslationMatrix.vue +0 -284
- package/frontend-vue/app/components/LanguageAddModal.vue +0 -78
- package/frontend-vue/app/components/WorkspaceEndpoint.vue +0 -29
- package/frontend-vue/app/components/WorkspaceSelector.vue +0 -180
- package/frontend-vue/app/components/WorkspaceStatus.vue +0 -24
- package/frontend-vue/app/composables/translation/useLanguageCatalog.ts +0 -90
- package/frontend-vue/app/composables/translation/useLocaleMeta.ts +0 -18
- package/frontend-vue/app/composables/translation/useTranslationProgress.ts +0 -73
- package/frontend-vue/app/custom-pages/lang/overview.vue +0 -397
- package/frontend-vue/app/custom-pages/lang/translations.vue +0 -498
- package/frontend-vue/app/plugins/workspace-sidebar-widget.ts +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../src/pages/workspaces.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kEAAwE;AACxE,0EAAsE;AACtE,oEAAuE;AACvE,yDAA8E;AAC9E,yDAAmD;AACnD,qDAAsD;AACtD,qCAA8E;AAC9E,kDAAsD;AAEtD,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,KAAK,GAAG,GAAG,4BAAgB,aAAa,CAAC;AAC/C,MAAM,KAAK,GAAG,4BAA4B,CAAC;AAE9B,QAAA,sBAAsB,GAAG;IACpC,MAAM,EAAE,QAAQ;CACR,CAAC;AAGE,QAAA,aAAa,GAAG,IAAA,wBAAe,EAAC,sBAAsB,CAAC;KACjE,IAAI,CAAC;IACJ,IAAI,EAAE,GAAG,KAAK,OAAO;IACrB,WAAW,EAAE,GAAG,KAAK,mBAAmB;IACxC,IAAI,EAAE,YAAY;CACnB,CAAC;KACD,MAAM,CAAC,8BAAsB,CAAC,MAAM,EAAE;IACrC,KAAK,EAAE,GAAG,KAAK,SAAS;IACxB,WAAW,EAAE,GAAG,KAAK,qBAAqB;IAC1C,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAGE,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,IAAA,qBAAc,EAC1D,OAAO,EACP;IACE,WAAW,EAAE,4BAA4B;IACzC,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAE,uBAAc;IACtB,QAAQ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C;AAED,IAAA,2BAAkB,EAAC,uBAAc,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { HTTPResult } from "@antelopejs/interface-api";
|
|
1
|
+
import { HTTPResult, type RequestContext } from "@antelopejs/interface-api";
|
|
2
2
|
declare const PublicLocalesController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
3
3
|
export declare class PublicLocalesController extends PublicLocalesController_base {
|
|
4
|
-
|
|
4
|
+
preflight(): HTTPResult;
|
|
5
|
+
locale(context: RequestContext, workspace: string, rawLocale: string): Record<string, unknown> | HTTPResult;
|
|
5
6
|
}
|
|
6
7
|
export {};
|
|
@@ -14,33 +14,54 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.PublicLocalesController = void 0;
|
|
16
16
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
+
const constants_1 = require("../utils/constants");
|
|
18
|
+
const errors_1 = require("../utils/errors");
|
|
17
19
|
const workspaces_1 = require("../utils/workspaces");
|
|
18
20
|
const JSON_SUFFIX_RE = /\.json$/i;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
const ANY_ORIGIN = "*";
|
|
22
|
+
const ALLOWED_METHODS = "GET,HEAD,OPTIONS";
|
|
23
|
+
const PREFLIGHT_MAX_AGE = "86400";
|
|
24
|
+
const CACHE_POLICY = "no-cache";
|
|
25
|
+
const BEFORE_API_CORS = (interface_api_1.HandlerPriority.HIGHEST - 1);
|
|
26
|
+
function openToAnyOrigin(response) {
|
|
27
|
+
response.removeHeader("Access-Control-Allow-Credentials");
|
|
28
|
+
response.removeHeader("Vary");
|
|
29
|
+
response.addHeader("Access-Control-Allow-Origin", ANY_ORIGIN);
|
|
30
|
+
}
|
|
31
|
+
class PublicLocalesController extends (0, interface_api_1.Controller)(constants_1.PUBLIC_PATH) {
|
|
32
|
+
preflight() {
|
|
33
|
+
const response = new interface_api_1.HTTPResult(204, null);
|
|
34
|
+
openToAnyOrigin(response);
|
|
35
|
+
response.addHeader("Access-Control-Allow-Methods", ALLOWED_METHODS);
|
|
36
|
+
response.addHeader("Access-Control-Allow-Headers", ANY_ORIGIN);
|
|
37
|
+
response.addHeader("Access-Control-Max-Age", PREFLIGHT_MAX_AGE);
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
locale(context, workspace, rawLocale) {
|
|
41
|
+
openToAnyOrigin(context.response);
|
|
42
|
+
context.response.addHeader("Cache-Control", CACHE_POLICY);
|
|
21
43
|
const locale = rawLocale.replace(JSON_SUFFIX_RE, "");
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
messages = null;
|
|
28
|
-
}
|
|
29
|
-
if (messages === null) {
|
|
30
|
-
return new interface_api_1.HTTPResult(404, {
|
|
31
|
-
error: `No such locale: ${workspace}/${locale}`,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return messages;
|
|
44
|
+
const served = (0, workspaces_1.readWorkspaceLocale)(workspace, locale);
|
|
45
|
+
if (served === null)
|
|
46
|
+
return (0, errors_1.errorResult)("unknown_locale", { workspace, locale });
|
|
47
|
+
context.response.addHeader("Content-Language", served.code);
|
|
48
|
+
return served.messages;
|
|
35
49
|
}
|
|
36
50
|
}
|
|
37
51
|
exports.PublicLocalesController = PublicLocalesController;
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, interface_api_1.Prefix)("options", "/:workspace/:locale", BEFORE_API_CORS),
|
|
54
|
+
__metadata("design:type", Function),
|
|
55
|
+
__metadata("design:paramtypes", []),
|
|
56
|
+
__metadata("design:returntype", void 0)
|
|
57
|
+
], PublicLocalesController.prototype, "preflight", null);
|
|
38
58
|
__decorate([
|
|
39
59
|
(0, interface_api_1.Get)("/:workspace/:locale"),
|
|
40
|
-
__param(0, (0, interface_api_1.
|
|
41
|
-
__param(1, (0, interface_api_1.Parameter)("
|
|
60
|
+
__param(0, (0, interface_api_1.Context)()),
|
|
61
|
+
__param(1, (0, interface_api_1.Parameter)("workspace", "param")),
|
|
62
|
+
__param(2, (0, interface_api_1.Parameter)("locale", "param")),
|
|
42
63
|
__metadata("design:type", Function),
|
|
43
|
-
__metadata("design:paramtypes", [String, String]),
|
|
64
|
+
__metadata("design:paramtypes", [Object, String, String]),
|
|
44
65
|
__metadata("design:returntype", void 0)
|
|
45
66
|
], PublicLocalesController.prototype, "locale", null);
|
|
46
67
|
//# sourceMappingURL=publicLocales.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicLocales.js","sourceRoot":"","sources":["../../src/routes/publicLocales.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"publicLocales.js","sourceRoot":"","sources":["../../src/routes/publicLocales.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DASmC;AACnC,kDAAiD;AACjD,4CAA8C;AAC9C,oDAA0D;AAE1D,MAAM,cAAc,GAAG,UAAU,CAAC;AAClC,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAC3C,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAClC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,MAAM,eAAe,GAAG,CAAC,+BAAe,CAAC,OAAO,GAAG,CAAC,CAAoB,CAAC;AAGzE,SAAS,eAAe,CAAC,QAAoB;IAC3C,QAAQ,CAAC,YAAY,CAAC,kCAAkC,CAAC,CAAC;IAC1D,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,6BAA6B,EAAE,UAAU,CAAC,CAAC;AAChE,CAAC;AAGD,MAAa,uBAAwB,SAAQ,IAAA,0BAAU,EAAC,uBAAW,CAAC;IAElE,SAAS;QACP,MAAM,QAAQ,GAAG,IAAI,0BAAU,CAAC,GAAG,EAAE,IAAI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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
|
+
import { type FlatCounts, type FlatRow } from "../utils/resolve";
|
|
3
|
+
import { type AddedLocale, type WorkspaceSummary } from "../utils/workspaces";
|
|
4
|
+
interface KeyResult {
|
|
5
|
+
row?: FlatRow;
|
|
6
|
+
counts: FlatCounts;
|
|
5
7
|
}
|
|
6
|
-
interface
|
|
7
|
-
|
|
8
|
-
newId: string;
|
|
8
|
+
interface DefaultLocaleResult {
|
|
9
|
+
defaultLocale: string;
|
|
9
10
|
}
|
|
10
|
-
interface
|
|
11
|
-
|
|
11
|
+
interface PermissionIds {
|
|
12
|
+
editTranslations: string | undefined;
|
|
13
|
+
manageKeys: string | undefined;
|
|
14
|
+
manageLanguages: string | undefined;
|
|
15
|
+
createWorkspace: string | undefined;
|
|
16
|
+
renameWorkspace: string | undefined;
|
|
17
|
+
deleteWorkspace: string | undefined;
|
|
18
|
+
editWorkspace: string | undefined;
|
|
12
19
|
}
|
|
13
|
-
interface
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
interface LocaleDeleteBody {
|
|
20
|
-
workspace: string;
|
|
21
|
-
code: string;
|
|
22
|
-
}
|
|
23
|
-
interface LocaleDefaultBody {
|
|
24
|
-
workspace: string;
|
|
25
|
-
code: string;
|
|
26
|
-
}
|
|
27
|
-
interface KeyUpsertBody {
|
|
28
|
-
workspace: string;
|
|
29
|
-
path: string;
|
|
30
|
-
values?: Record<string, unknown>;
|
|
31
|
-
defaultLocale?: string;
|
|
32
|
-
}
|
|
33
|
-
interface KeyRenameBody {
|
|
34
|
-
workspace: string;
|
|
35
|
-
path: string;
|
|
36
|
-
newPath: string;
|
|
37
|
-
}
|
|
38
|
-
interface KeyDeleteBody {
|
|
39
|
-
workspace: string;
|
|
40
|
-
path: string;
|
|
20
|
+
interface ListedWorkspace extends WorkspaceSummary {
|
|
21
|
+
publicUrl?: string;
|
|
22
|
+
totalKeys: number;
|
|
23
|
+
baseMissing: number;
|
|
24
|
+
translatedStrings: number;
|
|
41
25
|
}
|
|
42
26
|
declare const TranslationsController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
43
27
|
export declare class TranslationsController extends TranslationsController_base {
|
|
44
|
-
workspaces(): {
|
|
28
|
+
workspaces(): Promise<{
|
|
29
|
+
editable: boolean;
|
|
30
|
+
publicBaseUrl: string;
|
|
31
|
+
permissions: PermissionIds;
|
|
32
|
+
workspaces: ListedWorkspace[];
|
|
33
|
+
}>;
|
|
34
|
+
summary(): Promise<{
|
|
45
35
|
editable: boolean;
|
|
46
|
-
workspaces:
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
36
|
+
workspaces: import("../utils/summary").WorkspaceStats[];
|
|
37
|
+
}>;
|
|
38
|
+
kpis(workspace?: string): import("../utils/blocks").BlockItems<import("@antelopejs/interface-dms/base").StatGroupItem>;
|
|
39
|
+
about(workspace?: string): import("../utils/blocks").BlockItems<import("@antelopejs/interface-dms/base").KeyValueListItem>;
|
|
40
|
+
notice(workspace?: string, page?: string): import("@antelopejs/interface-dms/base").BannerContent;
|
|
41
|
+
localeStats(workspace?: string, locale?: string): import("../utils/blocks").BlockItems<import("@antelopejs/interface-dms/base").StatGroupItem>;
|
|
42
|
+
languages(workspace?: string): import("../utils/languages").LanguageRows;
|
|
43
|
+
languageRemovalConfirm(workspace: string, code: string): Promise<import("@antelopejs/interface-dms/base").ConfirmDialogSerialized>;
|
|
44
|
+
languageBaseConfirm(workspace: string, code: string): import("../utils/dialogs").BaseConfirm;
|
|
45
|
+
makeBaseLanguage(actor: User, session: string | undefined, workspace: string, code: string): DefaultLocaleResult;
|
|
46
|
+
removeLanguage(actor: User, session: string | undefined, workspace: string, code: string): void;
|
|
47
|
+
endpoint(workspace?: string): Promise<import("../utils/blocks").BlockItems<import("@antelopejs/interface-dms/base").KeyValueListItem>>;
|
|
48
|
+
snippet(workspace?: string, kind?: string): Promise<import("../utils/snippets").Snippet>;
|
|
49
|
+
export(workspace?: string, locale?: string): Record<string, unknown>;
|
|
50
|
+
backup(workspace?: string): import("../utils/export").WorkspaceBackup;
|
|
51
|
+
flat(workspace?: string): import("../utils/resolve").FlatResult;
|
|
52
|
+
row(workspace?: string, key?: string): KeyResult;
|
|
53
|
+
namespaces(workspace?: string): import("../utils/namespaces").NamespaceCoverage;
|
|
54
|
+
workspace(workspace?: string): WorkspaceSummary;
|
|
55
|
+
createWorkspace(actor: User, session: string | undefined, body: unknown): WorkspaceSummary;
|
|
56
|
+
updateWorkspace(actor: User, session: string | undefined, body: unknown): WorkspaceSummary;
|
|
57
|
+
renameWorkspace(actor: User, session: string | undefined, body: unknown): WorkspaceSummary;
|
|
58
|
+
deleteWorkspace(actor: User, session: string | undefined, body: unknown): void;
|
|
59
|
+
importWorkspace(actor: User, session: string | undefined, body: unknown): WorkspaceSummary;
|
|
60
|
+
addLocale(actor: User, session: string | undefined, body: unknown): AddedLocale;
|
|
61
|
+
createKey(actor: User, session: string | undefined, body: unknown): KeyResult;
|
|
62
|
+
updateKey(actor: User, session: string | undefined, body: unknown): KeyResult;
|
|
63
|
+
removeOverride(actor: User, session: string | undefined, body: unknown): KeyResult;
|
|
64
|
+
markReviewed(actor: User, session: string | undefined, body: unknown): KeyResult;
|
|
65
|
+
renameKey(actor: User, session: string | undefined, body: unknown): KeyResult;
|
|
66
|
+
deleteKey(actor: User, session: string | undefined, body: unknown): KeyResult;
|
|
71
67
|
}
|
|
72
68
|
export {};
|