@dev.smartpricing/message-composer-layer 4.2.5 → 4.2.7-maizzle.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/app/components/Email/Editor/Blocks/ButtonBlock.vue +2 -2
- package/app/components/Email/Editor/Blocks/DiscountCodeBlock.vue +5 -4
- package/app/components/Email/Editor/Blocks/DividerBlock.vue +0 -1
- package/app/components/Email/Editor/Blocks/FooterBlock.vue +1 -1
- package/app/components/Email/Editor/Blocks/GridBlock.vue +6 -10
- package/app/components/Email/Editor/Blocks/HeadingBlock.vue +1 -1
- package/app/components/Email/Editor/Blocks/IndexBlock.vue +14 -3
- package/app/components/Email/Editor/Blocks/ParagraphBlock.vue +1 -1
- package/app/components/Email/Editor/Blocks/UnsubscribeLinkBlock.vue +1 -1
- package/app/components/Email/InlinePreview.vue +3 -1
- package/app/components/Email/Preview.vue +3 -4
- package/app/components/Email/SendTestEmailModal.vue +13 -1
- package/app/composables/useEmailRenderer.ts +23 -0
- package/i18n/locales/de.ts +660 -686
- package/i18n/locales/en.ts +659 -685
- package/i18n/locales/es.ts +664 -690
- package/i18n/locales/fr.ts +667 -693
- package/i18n/locales/it.ts +661 -687
- package/package.json +7 -3
- package/i18n/check-translations.ts +0 -56
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev.smartpricing/message-composer-layer",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.7-maizzle.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"vue-router": "^5.0.7",
|
|
37
37
|
"vue3-emoji-picker": "^1.1.8",
|
|
38
38
|
"zod": "^4.4.3",
|
|
39
|
-
"@dev.smartpricing/message-composer-utils": "4.2.
|
|
39
|
+
"@dev.smartpricing/message-composer-utils": "4.2.7-maizzle.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@nuxt/eslint": "^1.15.2",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@playwright/test": "^1.60.0",
|
|
45
45
|
"dotenv": "^17.4.2",
|
|
46
46
|
"nuxt-ui-layer": "git+ssh://git@github.com:smartpricing/smartness-nuxt-ui#v1.7.2",
|
|
47
|
+
"tsx": "^4.19.4",
|
|
47
48
|
"vue-tsc": "^3.2.9"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
@@ -58,6 +59,9 @@
|
|
|
58
59
|
"test:e2e": "playwright test",
|
|
59
60
|
"test:e2e:debug": "playwright test --debug",
|
|
60
61
|
"test:e2e:ui": "playwright test --ui",
|
|
61
|
-
"cleanup": "nuxt cleanup && rm -rf node_modules pnpm-lock.yaml"
|
|
62
|
+
"cleanup": "nuxt cleanup && rm -rf node_modules pnpm-lock.yaml",
|
|
63
|
+
"translations:check": "tsx scripts/check-locales.ts",
|
|
64
|
+
"translations:pull": "tsx scripts/translation-import.ts",
|
|
65
|
+
"translations:push": "tsx scripts/translation-export.ts"
|
|
62
66
|
}
|
|
63
67
|
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks for missing/extra translation keys across locale files.
|
|
3
|
-
* Uses en.ts as source of truth.
|
|
4
|
-
*
|
|
5
|
-
* pnpm -C apps/frontend exec tsx i18n/check-translations.ts
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import en from './locales/en'
|
|
9
|
-
import de from './locales/de'
|
|
10
|
-
import es from './locales/es'
|
|
11
|
-
import fr from './locales/fr'
|
|
12
|
-
import it from './locales/it'
|
|
13
|
-
|
|
14
|
-
type NestedObject = Record<string, unknown>
|
|
15
|
-
|
|
16
|
-
function flattenKeys(obj: NestedObject, prefix = ''): string[] {
|
|
17
|
-
return Object.entries(obj).flatMap(([key, value]) => {
|
|
18
|
-
const path = prefix ? `${prefix}.${key}` : key
|
|
19
|
-
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
20
|
-
return flattenKeys(value as NestedObject, path)
|
|
21
|
-
}
|
|
22
|
-
return [path]
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const locales: Record<string, NestedObject> = { de, es, fr, it }
|
|
27
|
-
const sourceKeys = new Set(flattenKeys(en as unknown as NestedObject))
|
|
28
|
-
|
|
29
|
-
let hasErrors = false
|
|
30
|
-
|
|
31
|
-
for (const [name, locale] of Object.entries(locales)) {
|
|
32
|
-
const localeKeys = new Set(flattenKeys(locale as unknown as NestedObject))
|
|
33
|
-
|
|
34
|
-
const missing = [...sourceKeys].filter((k) => !localeKeys.has(k))
|
|
35
|
-
const extra = [...localeKeys].filter((k) => !sourceKeys.has(k))
|
|
36
|
-
|
|
37
|
-
if (missing.length || extra.length) {
|
|
38
|
-
hasErrors = true
|
|
39
|
-
console.log(`\n--- ${name.toUpperCase()} ---`)
|
|
40
|
-
if (missing.length) {
|
|
41
|
-
console.log(` Missing (${missing.length}):`)
|
|
42
|
-
missing.forEach((k) => console.log(` - ${k}`))
|
|
43
|
-
}
|
|
44
|
-
if (extra.length) {
|
|
45
|
-
console.log(` Extra (${extra.length}):`)
|
|
46
|
-
extra.forEach((k) => console.log(` + ${k}`))
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (hasErrors) {
|
|
52
|
-
console.log('\n')
|
|
53
|
-
process.exit(1)
|
|
54
|
-
} else {
|
|
55
|
-
console.log('All translations are in sync with en.ts')
|
|
56
|
-
}
|