diff --git a/.husky/pre-commit b/.husky/pre-commit index 51573b039b..7c3821438c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -16,6 +16,6 @@ if [ -f branch.json ]; then echo "Skipping tolgee-pull: NEXT_PUBLIC_TOLGEE_API_KEY is not set" else pnpm run tolgee-pull - git add packages/lib/messages + git add apps/web/locales fi fi \ No newline at end of file diff --git a/.tolgeerc.json b/.tolgeerc.json index 40b57ad40b..e62ef020d2 100644 --- a/.tolgeerc.json +++ b/.tolgeerc.json @@ -4,33 +4,33 @@ "patterns": ["./apps/web/**/*.ts?(x)"], "projectId": 10304, "pull": { - "path": "./packages/lib/messages" + "path": "./apps/web/locales" }, "push": { "files": [ { "language": "en-US", - "path": "./packages/lib/messages/en-US.json" + "path": "./apps/web/locales/en-US.json" }, { "language": "de-DE", - "path": "./packages/lib/messages/de-DE.json" + "path": "./apps/web/locales/de-DE.json" }, { "language": "fr-FR", - "path": "./packages/lib/messages/fr-FR.json" + "path": "./apps/web/locales/fr-FR.json" }, { "language": "pt-BR", - "path": "./packages/lib/messages/pt-BR.json" + "path": "./apps/web/locales/pt-BR.json" }, { "language": "zh-Hant-TW", - "path": "./packages/lib/messages/zh-Hant-TW.json" + "path": "./apps/web/locales/zh-Hant-TW.json" }, { "language": "pt-PT", - "path": "./packages/lib/messages/pt-PT.json" + "path": "./apps/web/locales/pt-PT.json" } ], "forceMode": "OVERRIDE" diff --git a/packages/lib/messages/de-DE.json b/apps/web/locales/de-DE.json similarity index 100% rename from packages/lib/messages/de-DE.json rename to apps/web/locales/de-DE.json diff --git a/packages/lib/messages/en-US.json b/apps/web/locales/en-US.json similarity index 100% rename from packages/lib/messages/en-US.json rename to apps/web/locales/en-US.json diff --git a/packages/lib/messages/fr-FR.json b/apps/web/locales/fr-FR.json similarity index 100% rename from packages/lib/messages/fr-FR.json rename to apps/web/locales/fr-FR.json diff --git a/packages/lib/messages/pt-BR.json b/apps/web/locales/pt-BR.json similarity index 100% rename from packages/lib/messages/pt-BR.json rename to apps/web/locales/pt-BR.json diff --git a/packages/lib/messages/pt-PT.json b/apps/web/locales/pt-PT.json similarity index 100% rename from packages/lib/messages/pt-PT.json rename to apps/web/locales/pt-PT.json diff --git a/packages/lib/messages/zh-Hant-TW.json b/apps/web/locales/zh-Hant-TW.json similarity index 100% rename from packages/lib/messages/zh-Hant-TW.json rename to apps/web/locales/zh-Hant-TW.json diff --git a/package.json b/package.json index ef1783cd8e..9d0dd935b8 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "prepare": "husky install", "storybook": "turbo run storybook", "fb-migrate-dev": "pnpm --filter @formbricks/database create-migration && pnpm prisma generate", - "tolgee-pull": "BRANCH_NAME=$(node -p \"require('./branch.json').branchName\") && tolgee pull --tags \"draft:$BRANCH_NAME\" \"production\" && prettier --write ./packages/lib/messages/*.json" + "tolgee-pull": "BRANCH_NAME=$(node -p \"require('./branch.json').branchName\") && tolgee pull --tags \"draft:$BRANCH_NAME\" \"production\" && prettier --write ./apps/web/locales/*.json" }, "devDependencies": { "@azure/microsoft-playwright-testing": "1.0.0-beta.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4abadedce..f9f094af12 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -675,7 +675,7 @@ importers: version: 6.0.0(@next/eslint-plugin-next@15.3.0)(eslint@8.57.0)(prettier@3.5.3)(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) '@vitest/eslint-plugin': specifier: 1.1.42 - version: 1.1.42(@typescript-eslint/utils@8.30.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0)(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) + version: 1.1.42(@typescript-eslint/utils@8.31.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0)(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) eslint-config-next: specifier: 15.3.0 version: 15.3.0(eslint@8.57.0)(typescript@5.8.3) @@ -931,7 +931,7 @@ importers: version: link:../types '@preact/preset-vite': specifier: 2.10.1 - version: 2.10.1(@babel/core@7.26.0)(preact@10.26.5)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) + version: 2.10.1(@babel/core@7.26.10)(preact@10.26.5)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) '@testing-library/preact': specifier: 3.2.4 version: 3.2.4(preact@10.26.5) @@ -1323,6 +1323,10 @@ packages: resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} + '@babel/core@7.26.10': + resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} + engines: {node: '>=6.9.0'} + '@babel/eslint-parser@7.27.0': resolution: {integrity: sha512-dtnzmSjXfgL/HDgMcmsLSzyGbEosi4DrGWoCNfuI+W4IkVJw6izpTe7LtOdwAXnkDqw5yweboYCTkM2rQizCng==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -5707,6 +5711,10 @@ packages: resolution: {integrity: sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.31.1': + resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@7.18.0': resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5740,6 +5748,10 @@ packages: resolution: {integrity: sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.31.1': + resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@5.62.0': resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5770,6 +5782,12 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/typescript-estree@8.31.1': + resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/utils@5.62.0': resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5796,6 +5814,13 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/utils@8.31.1': + resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/visitor-keys@5.62.0': resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5812,6 +5837,10 @@ packages: resolution: {integrity: sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.31.1': + resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} @@ -14305,6 +14334,26 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/core@7.26.10': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.27.0 + '@babel/helper-compilation-targets': 7.27.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) + '@babel/helpers': 7.27.0 + '@babel/parser': 7.27.0 + '@babel/template': 7.27.0 + '@babel/traverse': 7.27.0 + '@babel/types': 7.27.0 + convert-source-map: 2.0.0 + debug: 4.4.0 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + '@babel/eslint-parser@7.27.0(@babel/core@7.26.0)(eslint@8.57.0)': dependencies: '@babel/core': 7.26.0 @@ -14391,6 +14440,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.27.0 + transitivePeerDependencies: + - supports-color + '@babel/helper-optimise-call-expression@7.25.9': dependencies: '@babel/types': 7.27.0 @@ -14630,6 +14688,11 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -14950,6 +15013,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-react-jsx-development@7.25.9(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -14971,6 +15041,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10) + '@babel/types': 7.27.0 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-react-pure-annotations@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -17044,14 +17125,14 @@ snapshots: dependencies: playwright: 1.51.1 - '@preact/preset-vite@2.10.1(@babel/core@7.26.0)(preact@10.26.5)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': + '@preact/preset-vite@2.10.1(@babel/core@7.26.10)(preact@10.26.5)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': dependencies: - '@babel/core': 7.26.0 - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-react-jsx-development': 7.25.9(@babel/core@7.26.0) + '@babel/core': 7.26.10 + '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) + '@babel/plugin-transform-react-jsx-development': 7.25.9(@babel/core@7.26.10) '@prefresh/vite': 2.4.7(preact@10.26.5)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1)) '@rollup/pluginutils': 4.2.1 - babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.26.0) + babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.26.10) debug: 4.4.0 kolorist: 1.8.0 vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) @@ -19971,6 +20052,11 @@ snapshots: '@typescript-eslint/types': 8.30.1 '@typescript-eslint/visitor-keys': 8.30.1 + '@typescript-eslint/scope-manager@8.31.1': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.0)(typescript@5.8.3)': dependencies: '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) @@ -20002,6 +20088,8 @@ snapshots: '@typescript-eslint/types@8.30.1': {} + '@typescript-eslint/types@8.31.1': {} + '@typescript-eslint/typescript-estree@5.62.0(typescript@5.8.3)': dependencies: '@typescript-eslint/types': 5.62.0 @@ -20059,6 +20147,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.0 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.0) @@ -20107,6 +20209,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.31.1(eslint@8.57.0)(typescript@5.8.3)': + dependencies: + '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.0) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + eslint: 8.57.0 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@5.62.0': dependencies: '@typescript-eslint/types': 5.62.0 @@ -20127,6 +20240,11 @@ snapshots: '@typescript-eslint/types': 8.30.1 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.31.1': + dependencies: + '@typescript-eslint/types': 8.31.1 + eslint-visitor-keys: 4.2.0 + '@ungap/structured-clone@1.3.0': {} '@unkey/api@0.33.1': @@ -20309,9 +20427,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.1.42(@typescript-eslint/utils@8.30.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0)(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': + '@vitest/eslint-plugin@1.1.42(@typescript-eslint/utils@8.31.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0)(typescript@5.8.3)(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1))': dependencies: - '@typescript-eslint/utils': 8.30.1(eslint@8.57.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@8.57.0)(typescript@5.8.3) eslint: 8.57.0 vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.1) optionalDependencies: @@ -20973,9 +21091,9 @@ snapshots: transitivePeerDependencies: - '@babel/core' - babel-plugin-transform-hook-names@1.0.2(@babel/core@7.26.0): + babel-plugin-transform-hook-names@1.0.2(@babel/core@7.26.10): dependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.26.10 babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.0): dependencies: