@parhelia/localization 0.1.11576 → 0.1.11577
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 +33 -33
- package/dist/LocalizeItemDialog.d.ts.map +1 -1
- package/dist/LocalizeItemDialog.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# @parhelia/localization
|
|
2
|
-
|
|
3
|
-
Localization and translation features for Parhelia visual editor.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @parhelia/localization
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import { LocalizeItemDialog, TranslationSidebar } from '@parhelia/localization';
|
|
15
|
-
import '@parhelia/localization/styles.css';
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Features
|
|
19
|
-
|
|
20
|
-
- Translation wizard
|
|
21
|
-
- Localization setup
|
|
22
|
-
- Translation center
|
|
23
|
-
- Multi-language content management
|
|
24
|
-
- Version creation for localized content
|
|
25
|
-
|
|
26
|
-
## License
|
|
27
|
-
|
|
28
|
-
See LICENSE file for details.
|
|
29
|
-
|
|
30
|
-
## Documentation
|
|
31
|
-
|
|
32
|
-
For complete documentation, visit [https://parhelia.ai](https://parhelia.ai)
|
|
33
|
-
|
|
1
|
+
# @parhelia/localization
|
|
2
|
+
|
|
3
|
+
Localization and translation features for Parhelia visual editor.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @parhelia/localization
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { LocalizeItemDialog, TranslationSidebar } from '@parhelia/localization';
|
|
15
|
+
import '@parhelia/localization/styles.css';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- Translation wizard
|
|
21
|
+
- Localization setup
|
|
22
|
+
- Translation center
|
|
23
|
+
- Multi-language content management
|
|
24
|
+
- Version creation for localized content
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
See LICENSE file for details.
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
For complete documentation, visit [https://parhelia.ai](https://parhelia.ai)
|
|
33
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizeItemDialog.d.ts","sourceRoot":"","sources":["../src/LocalizeItemDialog.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAExB,MAAM,eAAe,CAAC;AAqBvB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,GAAG,WAAW,CAAC,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"LocalizeItemDialog.d.ts","sourceRoot":"","sources":["../src/LocalizeItemDialog.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAExB,MAAM,eAAe,CAAC;AAqBvB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,GAAG,WAAW,CAAC,uBAAuB,CAAC,2CA6atE"}
|
|
@@ -181,6 +181,12 @@ export function LocalizeItemDialog(props) {
|
|
|
181
181
|
const serviceCustomDataKey = newData.serviceCustomData
|
|
182
182
|
? JSON.stringify(Array.from(newData.serviceCustomData.entries()))
|
|
183
183
|
: null;
|
|
184
|
+
// Serialize metadata for comparison (supports both string and object formats)
|
|
185
|
+
const metadataKey = newData.metadata
|
|
186
|
+
? (typeof newData.metadata === 'string'
|
|
187
|
+
? newData.metadata
|
|
188
|
+
: JSON.stringify(newData.metadata))
|
|
189
|
+
: null;
|
|
184
190
|
const dataKey = JSON.stringify({
|
|
185
191
|
translationProvider: newData.translationProvider,
|
|
186
192
|
targetLanguages: [...newData.targetLanguages].sort(),
|
|
@@ -188,6 +194,7 @@ export function LocalizeItemDialog(props) {
|
|
|
188
194
|
discoveredItemsCount: newData.discoveredItems?.length || 0,
|
|
189
195
|
itemsCount: newData.items?.length || 0,
|
|
190
196
|
serviceCustomData: serviceCustomDataKey,
|
|
197
|
+
metadata: metadataKey,
|
|
191
198
|
});
|
|
192
199
|
// Skip if data hasn't actually changed
|
|
193
200
|
if (lastSetWizardDataRef.current === dataKey) {
|