@_linked/translation 0.9.4 → 0.10.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.
Files changed (45) hide show
  1. package/README.md +30 -0
  2. package/lib/esm/shape-key-copies.d.ts +62 -0
  3. package/lib/esm/shape-key-copies.js +156 -0
  4. package/lib/esm/shape-key-copies.js.map +1 -0
  5. package/package.json +2 -3
  6. package/src/archive.ts +0 -914
  7. package/src/authorization.ts +0 -56
  8. package/src/backend.ts +0 -2
  9. package/src/cdn-loader.ts +0 -264
  10. package/src/checks.ts +0 -413
  11. package/src/compile.ts +0 -168
  12. package/src/core/messages.ts +0 -139
  13. package/src/data/translation.ttl +0 -489
  14. package/src/discovery.ts +0 -594
  15. package/src/exchange.ts +0 -437
  16. package/src/export.ts +0 -138
  17. package/src/formats/csv.ts +0 -467
  18. package/src/formats/json.ts +0 -596
  19. package/src/formats/xliff.ts +0 -733
  20. package/src/import.ts +0 -648
  21. package/src/index.ts +0 -201
  22. package/src/key-sync-node.ts +0 -269
  23. package/src/key-sync.ts +0 -208
  24. package/src/key-version.ts +0 -207
  25. package/src/languages.ts +0 -102
  26. package/src/linked-discovery.ts +0 -385
  27. package/src/message-format.ts +0 -214
  28. package/src/mt.ts +0 -253
  29. package/src/ontologies/translation.register.ts +0 -17
  30. package/src/ontologies/translation.ts +0 -239
  31. package/src/package.ts +0 -14
  32. package/src/react.tsx +0 -378
  33. package/src/records.ts +0 -181
  34. package/src/release.ts +0 -754
  35. package/src/shape-catalog.ts +0 -198
  36. package/src/shapes/GlossaryTerm.ts +0 -61
  37. package/src/shapes/TranslationInventoryOrigin.ts +0 -131
  38. package/src/shapes/TranslationKey.ts +0 -183
  39. package/src/shapes/TranslationKeyVersion.ts +0 -77
  40. package/src/shapes/TranslationLanguage.ts +0 -51
  41. package/src/shapes/TranslationProvider.ts +0 -1927
  42. package/src/shapes/TranslationRelease.ts +0 -114
  43. package/src/shapes/TranslationRevision.ts +0 -105
  44. package/src/shapes/TranslationUnit.ts +0 -72
  45. package/src/shapes/index.ts +0 -13
package/src/records.ts DELETED
@@ -1,181 +0,0 @@
1
- /** Review lifecycle shared by the portable runtime and authoring clients. */
2
- export type TranslationState =
3
- | 'untranslated'
4
- | 'machine'
5
- | 'reviewed'
6
- | 'stale';
7
-
8
- /** Plain RPC-safe value for one language. Never contains a live Shape. */
9
- export interface TranslationUnitRecord {
10
- language: string;
11
- text: string;
12
- state: TranslationState;
13
- /** Machine-provider provenance for the current value (`tm` for memory). */
14
- origin?: string;
15
- updatedAt?: string;
16
- keyVersionId?: string;
17
- }
18
-
19
- /** Plain immutable source/argument-contract record for Studio and RPC. */
20
- export interface TranslationKeyVersionRecord {
21
- id: string;
22
- versionId: string;
23
- sourceLanguage: string;
24
- sourceText: string;
25
- format: 'simple' | 'icu';
26
- argumentSignature: string;
27
- contractHash: string;
28
- sourceHash: string;
29
- supersedes?: string;
30
- createdAt?: string;
31
- createdBy?: string;
32
- }
33
-
34
- export type TranslationReleaseChannel = 'preview' | 'production';
35
- export type TranslationReleaseStatus =
36
- | 'draft'
37
- | 'published'
38
- | 'superseded'
39
- | 'retired';
40
-
41
- /** Plain graph metadata for a schema-v2 translation release. */
42
- export interface TranslationReleaseRecord {
43
- id: string;
44
- releaseId: string;
45
- appId: string;
46
- branchId: string;
47
- buildId?: string;
48
- channel: TranslationReleaseChannel;
49
- status: TranslationReleaseStatus;
50
- contractSetHash: string;
51
- manifestHash: string;
52
- hotfixSequence: number;
53
- qualitySummary?: string;
54
- createdAt: string;
55
- publishedAt?: string;
56
- supportedUntil?: string;
57
- supersedes?: string;
58
- }
59
-
60
- /** Lifecycle of one authored value (Plan 017 AD-P). */
61
- export type TranslationRevisionStatus =
62
- | 'applied' // a direct edit, recorded as history
63
- | 'proposed' // awaiting a reviewer (human author)
64
- | 'suggested' // awaiting a reviewer (machine author)
65
- | 'accepted'
66
- | 'rejected'
67
- | 'superseded';
68
-
69
- /** Plain RPC-safe view of one revision (history entry / pending value). */
70
- export interface TranslationRevisionRecord {
71
- id: string;
72
- key: string;
73
- language: string;
74
- text: string;
75
- status: TranslationRevisionStatus;
76
- author?: string;
77
- authorKind: 'human' | 'machine';
78
- mtProvider?: string;
79
- basedOnText?: string;
80
- note?: string;
81
- createdAt?: string;
82
- decidedAt?: string;
83
- decidedBy?: string;
84
- keyVersionId?: string;
85
- /** Current unit diverged after this proposal was authored. */
86
- conflicted?: boolean;
87
- currentText?: string;
88
- }
89
-
90
- export interface TranslationProposalDecision {
91
- revision: TranslationRevisionRecord;
92
- unit?: TranslationUnitRecord;
93
- }
94
-
95
- export type TranslationMemoryMatchKind = 'exact' | 'carry-forward';
96
-
97
- /**
98
- * One reviewed unit that can seed the current key version. Exact source
99
- * matches may pretranslate as machine/TM; changed source text is an explicit
100
- * same-key carry-forward review.
101
- */
102
- export interface TranslationMemoryMatchRecord {
103
- unitId: string;
104
- key: string;
105
- language: string;
106
- text: string;
107
- keyVersionId: string;
108
- sourceText: string;
109
- sourceHash: string;
110
- contractHash: string;
111
- kind: TranslationMemoryMatchKind;
112
- updatedAt?: string;
113
- }
114
-
115
- /** Searchable reviewed unit exposed by the explicit Translation Memory browser. */
116
- export interface TranslationMemoryRecord {
117
- unitId: string;
118
- key: string;
119
- language: string;
120
- text: string;
121
- keyVersionId: string;
122
- sourceText: string;
123
- sourceHash: string;
124
- contractHash: string;
125
- updatedAt?: string;
126
- }
127
-
128
- export interface TranslationMemoryPretranslateCandidate {
129
- key: string;
130
- language: string;
131
- unitId: string;
132
- sourceKey: string;
133
- text: string;
134
- }
135
-
136
- export interface TranslationMemoryPretranslateReport {
137
- language: string;
138
- eligible: number;
139
- translated: number;
140
- candidates: TranslationMemoryPretranslateCandidate[];
141
- }
142
-
143
- /** Termbase entry behavior (Plan 017 B2-1). */
144
- export type GlossaryTermType = 'prefer' | 'require' | 'keep' | 'forbid';
145
-
146
- /** Plain RPC-safe termbase entry (steers MT + checks; Plan 014 AD-L / 017 B2). */
147
- export interface GlossaryTermRecord {
148
- id: string;
149
- term: string;
150
- /** prefer = translate as `translation`; keep = do-not-translate; forbid = never use. */
151
- termType: GlossaryTermType;
152
- /** Preferred translation (prefer entries). */
153
- translation?: string;
154
- /** Replacement wording (forbid entries — alternative-spelling policing). */
155
- useInstead?: string;
156
- /** Target language this applies to; empty = all languages. */
157
- language?: string;
158
- /** Exact-casing match (proper nouns / all-caps styling). */
159
- caseSensitive?: boolean;
160
- description?: string;
161
- }
162
-
163
- /** Plain RPC-safe editor/runtime view of a key and its language values. */
164
- export interface TranslationEntryRecord {
165
- key: string;
166
- namespace: string;
167
- sourceText: string;
168
- description?: string;
169
- kind: 'ui' | 'content';
170
- format: 'simple' | 'icu';
171
- /** Optional semantic organization for translations supplied with LINKED shapes. */
172
- ofShape?: string;
173
- ofProperty?: string;
174
- ofResource?: string;
175
- fromPackage?: string;
176
- /** Explicit app wording for a shape/property/resource/package declaration (AD-N). */
177
- overridden?: boolean;
178
- currentVersion?: TranslationKeyVersionRecord;
179
- versions?: TranslationKeyVersionRecord[];
180
- units: Record<string, TranslationUnitRecord>;
181
- }