Skip to content

Scheduling infrastructure for absolutely everyone.

Revert "refactor: replace i18n HTTP requests with build-time bundling (#22422)" (#22496)

Benny Jooc8a52b78e1ad
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index f2befa4c32d..b7dc3afd9c8 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -33,7 +33,7 @@ jobs:
with:
filters: |
has-files-requiring-all-checks:
- - "!(**.md|.github/CODEOWNERS|docs/**|help/**|packages/lib/server/locales/**/common.json)"
+ - "!(**.md|.github/CODEOWNERS|docs/**|help/**|apps/web/public/static/locales/**/common.json)"
- name: Get Latest Commit SHA
id: get_sha
run: |
diff --git a/apps/api/v2/next-i18next.config.js b/apps/api/v2/next-i18next.config.js
index ee9d17e313e..a07cf209817 100644
--- a/apps/api/v2/next-i18next.config.js
+++ b/apps/api/v2/next-i18next.config.js
@@ -5,7 +5,7 @@ const i18nConfig = require("@calcom/config/next-i18next.config");
/** @type {import("next-i18next").UserConfig} */
const config = {
...i18nConfig,
- localePath: path.resolve("../../packages/lib/server/locales"),
+ localePath: path.resolve("../../web/public/static/locales"),
};
module.exports = config;
diff --git a/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/embed/page.tsx b/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/embed/page.tsx
index 37c80e8c4cb..2f58711984f 100644
--- a/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/embed/page.tsx
+++ b/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/embed/page.tsx
@@ -32,7 +32,7 @@ const ServerPage = async ({ params, searchParams }: ServerPageProps) => {
const eventLocale = props.eventData?.interfaceLanguage;
const ns = "common";
- let translations: Record<string, string> = {};
+ let translations;
if (eventLocale) {
const ns = "common";
translations = await loadTranslations(eventLocale, ns);
diff --git a/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/page.tsx b/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/page.tsx
index 8aa98742a6a..9f8fa8a7dc8 100644
--- a/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/page.tsx
+++ b/apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/page.tsx
@@ -68,7 +68,7 @@ const ServerPage = async ({ params, searchParams }: PageProps) => {
const eventLocale = props.eventData?.interfaceLanguage;
const ns = "common";
- let translations: Record<string, string> = {};
+ let translations;
if (eventLocale) {
const ns = "common";
translations = await loadTranslations(eventLocale, ns);
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index 7167a90c64c..255c1c2a2bd 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -1,5 +1,5 @@
require("dotenv").config({ path: "../../.env" });
-const englishTranslation = require("../../packages/lib/server/locales/en/common.json");
+const englishTranslation = require("./public/static/locales/en/common.json");
const { withAxiom } = require("next-axiom");
const { version } = require("./package.json");
const {
diff --git a/apps/web/package.json b/apps/web/package.json
index fde8357a634..291ffeb17cc 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -15,7 +15,7 @@
"type-check": "tsc --pretty --noEmit",
"type-check:ci": "tsc-absolute --pretty --noEmit",
"sentry:release": "NODE_OPTIONS='--max-old-space-size=6144' node scripts/create-sentry-release.js",
- "copy-static": "node scripts/copy-app-store-static.js && node scripts/copy-locales-static.js",
+ "copy-static": "node scripts/copy-app-store-static.js",
"build": "yarn copy-static && next build && yarn sentry:release",
"start": "next start",
"lint": "eslint . --ignore-path .gitignore",
diff --git a/apps/web/playwright/lib/localize.ts b/apps/web/playwright/lib/localize.ts
index 7b6feccb7b7..2afc3d46d3e 100644
--- a/apps/web/playwright/lib/localize.ts
+++ b/apps/web/playwright/lib/localize.ts
@@ -2,7 +2,7 @@ import { loadJSON } from "./loadJSON";
// Provide an standalone localize utility not managed by next-i18n
export async function localize(locale: string) {
- const localeModule = `../../../../packages/lib/server/locales/${locale}/common.json`;
+ const localeModule = `../../public/static/locales/${locale}/common.json`;
const localeMap = loadJSON(localeModule);
return (message: string) => {
if (message in localeMap) return localeMap[message];
diff --git a/packages/lib/server/locales/ar/common.json b/apps/web/public/static/locales/ar/common.json
similarity index 99%
rename from packages/lib/server/locales/ar/common.json
rename to apps/web/public/static/locales/ar/common.json
index c6f63fd5b8b..850cf5da880 100644
--- a/packages/lib/server/locales/ar/common.json
+++ b/apps/web/public/static/locales/ar/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "تم حفظ مفتاح الترخيص بنجاح",
"timezone_mismatch_tooltip": "أنت تشاهد التقرير بناءً على المنطقة الزمنية لملفك الشخصي ({{userTimezone}})، بينما متصفحك مضبوط على المنطقة الزمنية ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ أضف السلاسل الجديدة أعلاه هنا ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/az/common.json b/apps/web/public/static/locales/az/common.json
similarity index 99%
rename from packages/lib/server/locales/az/common.json
rename to apps/web/public/static/locales/az/common.json
index d6fc7538f7b..c9f1edd35ca 100644
--- a/packages/lib/server/locales/az/common.json
+++ b/apps/web/public/static/locales/az/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Lisenziya açarı uğurla saxlanıldı",
"timezone_mismatch_tooltip": "Siz hesabatı profil saat qurşağınıza ({{userTimezone}}) əsasən görürsünüz, brauzeriniz isə başqa saat qurşağına ({{browserTimezone}}) təyin edilib",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Yeni sətirləri bura əlavə edin ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/bg/common.json b/apps/web/public/static/locales/bg/common.json
similarity index 99%
rename from packages/lib/server/locales/bg/common.json
rename to apps/web/public/static/locales/bg/common.json
index 9cfbf24b24c..fee0aa5aabf 100644
--- a/packages/lib/server/locales/bg/common.json
+++ b/apps/web/public/static/locales/bg/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Лицензионният ключ е успешно записан",
"timezone_mismatch_tooltip": "Преглеждате отчета според часовата зона на вашия профил ({{userTimezone}}), докато браузърът ви е настроен на часова зона ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Добавете новите си низове над този ред ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/bn/common.json b/apps/web/public/static/locales/bn/common.json
similarity index 99%
rename from packages/lib/server/locales/bn/common.json
rename to apps/web/public/static/locales/bn/common.json
index 2a65c9f8705..55ffe062eae 100644
--- a/packages/lib/server/locales/bn/common.json
+++ b/apps/web/public/static/locales/bn/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "লাইসেন্স কী সফলভাবে সংরক্ষিত হয়েছে",
"timezone_mismatch_tooltip": "আপনি আপনার প্রোফাইল টাইমজোন ({{userTimezone}}) অনুসারে রিপোর্ট দেখছেন, যখন আপনার ব্রাউজার টাইমজোন ({{browserTimezone}}) এ সেট করা আছে",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑ুষান্ত"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/ca/common.json b/apps/web/public/static/locales/ca/common.json
similarity index 99%
rename from packages/lib/server/locales/ca/common.json
rename to apps/web/public/static/locales/ca/common.json
index 9aac0ea9b31..e738abbc017 100644
--- a/packages/lib/server/locales/ca/common.json
+++ b/apps/web/public/static/locales/ca/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Clau de llicència desada correctament",
"timezone_mismatch_tooltip": "Esteu veient l'informe basat en la zona horària del vostre perfil ({{userTimezone}}), mentre que el vostre navegador està configurat a la zona horària ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Afegiu les vostres noves cadenes a dalt ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/cs/common.json b/apps/web/public/static/locales/cs/common.json
similarity index 99%
rename from packages/lib/server/locales/cs/common.json
rename to apps/web/public/static/locales/cs/common.json
index b07cdbf64d9..80b5beafa80 100644
--- a/packages/lib/server/locales/cs/common.json
+++ b/apps/web/public/static/locales/cs/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Licenční klíč byl úspěšně uložen",
"timezone_mismatch_tooltip": "Prohlížíte si report na základě časového pásma vašeho profilu ({{userTimezone}}), zatímco váš prohlížeč je nastaven na časové pásmo ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Přidejte své nové řetězce nahoru ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/da/common.json b/apps/web/public/static/locales/da/common.json
similarity index 99%
rename from packages/lib/server/locales/da/common.json
rename to apps/web/public/static/locales/da/common.json
index c55288fd540..684aec1b743 100644
--- a/packages/lib/server/locales/da/common.json
+++ b/apps/web/public/static/locales/da/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Licensnøgle blev gemt med succes",
"timezone_mismatch_tooltip": "Du ser rapporten baseret på din profils tidszone ({{userTimezone}}), mens din browser er indstillet til tidszonen ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Tilføj dine nye strenge ovenfor her ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/de/common.json b/apps/web/public/static/locales/de/common.json
similarity index 100%
rename from packages/lib/server/locales/de/common.json
rename to apps/web/public/static/locales/de/common.json
diff --git a/packages/lib/server/locales/el/common.json b/apps/web/public/static/locales/el/common.json
similarity index 99%
rename from packages/lib/server/locales/el/common.json
rename to apps/web/public/static/locales/el/common.json
index d01137a658e..6ee4dabb5b8 100644
--- a/packages/lib/server/locales/el/common.json
+++ b/apps/web/public/static/locales/el/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Το κλειδί άδειας αποθηκεύτηκε με επιτυχία",
"timezone_mismatch_tooltip": "Βλέπετε την αναφορά με βάση τη ζώνη ώρας του προφίλ σας ({{userTimezone}}), ενώ ο περιηγητής σας είναι ρυθμισμένος στη ζώνη ώρας ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Προσθέστε τις νέες συμβολοσειρές σας πάνω από εδώ ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/en/common.json b/apps/web/public/static/locales/en/common.json
similarity index 99%
rename from packages/lib/server/locales/en/common.json
rename to apps/web/public/static/locales/en/common.json
index 547c8139bbf..9bf63dd2a77 100644
--- a/packages/lib/server/locales/en/common.json
+++ b/apps/web/public/static/locales/en/common.json
@@ -284,7 +284,7 @@
"guests": "Guests",
"guest": "Guest",
"web_conferencing_details_to_follow": "Web conferencing details to follow in the confirmation email.",
- "confirmation": "Confirmation",
+ "confirmation":"Confirmation",
"what_booker_should_provide": "What your booker should provide to receive confirmations",
"404_the_user": "The username",
"username": "Username",
diff --git a/packages/lib/server/locales/es-419/common.json b/apps/web/public/static/locales/es-419/common.json
similarity index 99%
rename from packages/lib/server/locales/es-419/common.json
rename to apps/web/public/static/locales/es-419/common.json
index fcb4d020f2c..e5b5c1d22af 100644
--- a/packages/lib/server/locales/es-419/common.json
+++ b/apps/web/public/static/locales/es-419/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Clave de licencia guardada correctamente",
"timezone_mismatch_tooltip": "Estás viendo el informe basado en la zona horaria de tu perfil ({{userTimezone}}), mientras que tu navegador está configurado en la zona horaria ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Agrega tus nuevas cadenas arriba de esta línea ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/es/common.json b/apps/web/public/static/locales/es/common.json
similarity index 99%
rename from packages/lib/server/locales/es/common.json
rename to apps/web/public/static/locales/es/common.json
index cd7932fddfa..2eac870db33 100644
--- a/packages/lib/server/locales/es/common.json
+++ b/apps/web/public/static/locales/es/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Clave de licencia guardada correctamente",
"timezone_mismatch_tooltip": "Estás viendo el informe basado en la zona horaria de tu perfil ({{userTimezone}}), mientras que tu navegador está configurado en la zona horaria ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Agregue sus nuevas cadenas arriba ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/et/common.json b/apps/web/public/static/locales/et/common.json
similarity index 99%
rename from packages/lib/server/locales/et/common.json
rename to apps/web/public/static/locales/et/common.json
index 852e3860ac1..e5dda8ff207 100644
--- a/packages/lib/server/locales/et/common.json
+++ b/apps/web/public/static/locales/et/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Litsentsivõti salvestati edukalt",
"timezone_mismatch_tooltip": "Te vaatate aruannet oma profiili ajavööndi ({{userTimezone}}) alusel, samal ajal kui teie brauser on seadistatud ajavööndisse ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/eu/common.json b/apps/web/public/static/locales/eu/common.json
similarity index 99%
rename from packages/lib/server/locales/eu/common.json
rename to apps/web/public/static/locales/eu/common.json
index 6df084944fe..58daf56d042 100644
--- a/packages/lib/server/locales/eu/common.json
+++ b/apps/web/public/static/locales/eu/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Lizentzia gakoa ondo gorde da",
"timezone_mismatch_tooltip": "Txostena zure profileko ordu-zonaren arabera ikusten ari zara ({{userTimezone}}), zure nabigatzailea ordu-zona honetan ezarrita dagoen bitartean ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Gehitu zure kate berriak honen gainean ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/fi/common.json b/apps/web/public/static/locales/fi/common.json
similarity index 99%
rename from packages/lib/server/locales/fi/common.json
rename to apps/web/public/static/locales/fi/common.json
index 1a3c507ab54..6c8b62b2c8a 100644
--- a/packages/lib/server/locales/fi/common.json
+++ b/apps/web/public/static/locales/fi/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Lisenssiavain tallennettu onnistuneesti",
"timezone_mismatch_tooltip": "Tarkastelet raporttia profiilisi aikavyöhykkeen ({{userTimezone}}) mukaan, kun taas selaimesi on asetettu aikavyöhykkeelle ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Lisää uudet merkkijonot tämän yläpuolelle ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/fr/common.json b/apps/web/public/static/locales/fr/common.json
similarity index 100%
rename from packages/lib/server/locales/fr/common.json
rename to apps/web/public/static/locales/fr/common.json
diff --git a/packages/lib/server/locales/he/common.json b/apps/web/public/static/locales/he/common.json
similarity index 99%
rename from packages/lib/server/locales/he/common.json
rename to apps/web/public/static/locales/he/common.json
index ce584a2fa5b..fa9b173bbed 100644
--- a/packages/lib/server/locales/he/common.json
+++ b/apps/web/public/static/locales/he/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "מפתח הרישיון נשמר בהצלחה",
"timezone_mismatch_tooltip": "אתה צופה בדוח על בסיס אזור הזמן של הפרופיל שלך ({{userTimezone}}), בעוד שהדפדפן שלך מוגדר לאזור זמן ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/hr/common.json b/apps/web/public/static/locales/hr/common.json
similarity index 99%
rename from packages/lib/server/locales/hr/common.json
rename to apps/web/public/static/locales/hr/common.json
index 314c86c4605..67d00d7aa4e 100644
--- a/packages/lib/server/locales/hr/common.json
+++ b/apps/web/public/static/locales/hr/common.json
@@ -453,4 +453,4 @@
"reschedule_cta_short": "Zakažite ponovno ovdje.",
"you_and_conjunction": "Vi &",
"email_survey_triggered_by_workflow": "Ova anketa je pokrenuta Workflow-om u Calu."
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/hu/common.json b/apps/web/public/static/locales/hu/common.json
similarity index 99%
rename from packages/lib/server/locales/hu/common.json
rename to apps/web/public/static/locales/hu/common.json
index be05318d9bb..e123be8d149 100644
--- a/packages/lib/server/locales/hu/common.json
+++ b/apps/web/public/static/locales/hu/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "A licenckulcs sikeresen mentve",
"timezone_mismatch_tooltip": "A jelentést az Ön profiljában beállított időzóna ({{userTimezone}}) alapján tekinti meg, míg a böngészője a következő időzónára van állítva: {{browserTimezone}}",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Adja hozzá az új karakterláncokat fent ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/id/common.json b/apps/web/public/static/locales/id/common.json
similarity index 99%
rename from packages/lib/server/locales/id/common.json
rename to apps/web/public/static/locales/id/common.json
index ef2e7058b33..d40bcb3d457 100644
--- a/packages/lib/server/locales/id/common.json
+++ b/apps/web/public/static/locales/id/common.json
@@ -166,4 +166,4 @@
"reschedule_cta_short": "Jadwal ulang di sini.",
"you_and_conjunction": "Anda &",
"email_survey_triggered_by_workflow": "Survei ini dipicu oleh Workflow di Cal."
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/it/common.json b/apps/web/public/static/locales/it/common.json
similarity index 99%
rename from packages/lib/server/locales/it/common.json
rename to apps/web/public/static/locales/it/common.json
index f986b61afe1..41700aaa739 100644
--- a/packages/lib/server/locales/it/common.json
+++ b/apps/web/public/static/locales/it/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Chiave di licenza salvata con successo",
"timezone_mismatch_tooltip": "Stai visualizzando il report in base al fuso orario del tuo profilo ({{userTimezone}}), mentre il tuo browser è impostato sul fuso orario ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Aggiungi le tue nuove stringhe qui sopra ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/iw/common.json b/apps/web/public/static/locales/iw/common.json
similarity index 100%
rename from packages/lib/server/locales/iw/common.json
rename to apps/web/public/static/locales/iw/common.json
diff --git a/packages/lib/server/locales/ja/common.json b/apps/web/public/static/locales/ja/common.json
similarity index 99%
rename from packages/lib/server/locales/ja/common.json
rename to apps/web/public/static/locales/ja/common.json
index c84c69c1233..0752558e216 100644
--- a/packages/lib/server/locales/ja/common.json
+++ b/apps/web/public/static/locales/ja/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "ライセンスキーが正常に保存されました",
"timezone_mismatch_tooltip": "あなたはプロフィールのタイムゾーン({{userTimezone}})に基づいてレポートを表示していますが、ブラウザのタイムゾーンは({{browserTimezone}})に設定されています",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ この上に新しい文字列を追加してください ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/km/common.json b/apps/web/public/static/locales/km/common.json
similarity index 99%
rename from packages/lib/server/locales/km/common.json
rename to apps/web/public/static/locales/km/common.json
index 2e264103cab..c6dc7e1cc82 100644
--- a/packages/lib/server/locales/km/common.json
+++ b/apps/web/public/static/locales/km/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "សោអាជ្ញាប័ណ្ណត្រូវបានរក្សាទុកដោយជោគជ័យ",
"timezone_mismatch_tooltip": "អ្នកកំពុងមើលរបាយការណ៍ដោយផ្អែកលើតំបន់ពេលវេលាប្រវត្តិរូបរបស់អ្នក ({{userTimezone}}) ខណៈពេលដែលកម្មវិធីរុករករបស់អ្នកត្រូវបានកំណត់ទៅតំបន់ពេលវេលា ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ បន្ថែមខ្សែអក្សរថ្មីរបស់អ្នកនៅខាងលើនេះ ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/ko/common.json b/apps/web/public/static/locales/ko/common.json
similarity index 99%
rename from packages/lib/server/locales/ko/common.json
rename to apps/web/public/static/locales/ko/common.json
index 09477b63cd3..638308d2eeb 100644
--- a/packages/lib/server/locales/ko/common.json
+++ b/apps/web/public/static/locales/ko/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "라이선스 키가 성공적으로 저장되었습니다",
"timezone_mismatch_tooltip": "프로필 시간대({{userTimezone}})를 기준으로 보고서를 보고 계시지만, 브라우저는 다른 시간대({{browserTimezone}})로 설정되어 있습니다",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ 여기에 새 문자열을 추가하세요 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/lv/common.json b/apps/web/public/static/locales/lv/common.json
similarity index 99%
rename from packages/lib/server/locales/lv/common.json
rename to apps/web/public/static/locales/lv/common.json
index 0081e086e30..9ff2299ca17 100644
--- a/packages/lib/server/locales/lv/common.json
+++ b/apps/web/public/static/locales/lv/common.json
@@ -162,4 +162,4 @@
"reschedule_cta_short": "Pārzīmēt šeit.",
"you_and_conjunction": "Jūs &",
"email_survey_triggered_by_workflow": "Šo aptauju aktivizēja darbplūsma Cal."
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/nl/common.json b/apps/web/public/static/locales/nl/common.json
similarity index 99%
rename from packages/lib/server/locales/nl/common.json
rename to apps/web/public/static/locales/nl/common.json
index 51a1aed027a..bea0beb4990 100644
--- a/packages/lib/server/locales/nl/common.json
+++ b/apps/web/public/static/locales/nl/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Licentiesleutel succesvol opgeslagen",
"timezone_mismatch_tooltip": "Je bekijkt het rapport op basis van je profieltijdzone ({{userTimezone}}), terwijl je browser is ingesteld op tijdzone ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Voeg uw nieuwe strings hierboven toe ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/no/common.json b/apps/web/public/static/locales/no/common.json
similarity index 99%
rename from packages/lib/server/locales/no/common.json
rename to apps/web/public/static/locales/no/common.json
index 430570a7604..8a3fdc37ebf 100644
--- a/packages/lib/server/locales/no/common.json
+++ b/apps/web/public/static/locales/no/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Lisenssnøkkel lagret",
"timezone_mismatch_tooltip": "Du ser rapporten basert på tidssonen i profilen din ({{userTimezone}}), mens nettleseren din er satt til tidssonen ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Legg til dine nye strenger over her ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/pl/common.json b/apps/web/public/static/locales/pl/common.json
similarity index 100%
rename from packages/lib/server/locales/pl/common.json
rename to apps/web/public/static/locales/pl/common.json
diff --git a/packages/lib/server/locales/pt-BR/common.json b/apps/web/public/static/locales/pt-BR/common.json
similarity index 99%
rename from packages/lib/server/locales/pt-BR/common.json
rename to apps/web/public/static/locales/pt-BR/common.json
index 817b2acab80..00a71a556df 100644
--- a/packages/lib/server/locales/pt-BR/common.json
+++ b/apps/web/public/static/locales/pt-BR/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Chave de licença salva com sucesso",
"timezone_mismatch_tooltip": "Você está visualizando o relatório com base no fuso horário do seu perfil ({{userTimezone}}), enquanto seu navegador está configurado para o fuso horário ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Adicione suas novas strings aqui em cima ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/pt/common.json b/apps/web/public/static/locales/pt/common.json
similarity index 99%
rename from packages/lib/server/locales/pt/common.json
rename to apps/web/public/static/locales/pt/common.json
index 89b491a5e84..1346421a598 100644
--- a/packages/lib/server/locales/pt/common.json
+++ b/apps/web/public/static/locales/pt/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Chave de licença salva com sucesso",
"timezone_mismatch_tooltip": "Você está visualizando o relatório com base no fuso horário do seu perfil ({{userTimezone}}), enquanto seu navegador está configurado para o fuso horário ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/ro/common.json b/apps/web/public/static/locales/ro/common.json
similarity index 99%
rename from packages/lib/server/locales/ro/common.json
rename to apps/web/public/static/locales/ro/common.json
index 690928f90e2..d5441a8c307 100644
--- a/packages/lib/server/locales/ro/common.json
+++ b/apps/web/public/static/locales/ro/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Cheia de licență a fost salvată cu succes",
"timezone_mismatch_tooltip": "Vizualizați raportul pe baza fusului orar al profilului dvs. ({{userTimezone}}), în timp ce browserul dvs. este setat pe fusul orar ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Adăugați stringurile noi deasupra acestui rând ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/ru/common.json b/apps/web/public/static/locales/ru/common.json
similarity index 99%
rename from packages/lib/server/locales/ru/common.json
rename to apps/web/public/static/locales/ru/common.json
index a91520dda12..7a2ac0fa8cb 100644
--- a/packages/lib/server/locales/ru/common.json
+++ b/apps/web/public/static/locales/ru/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Лицензионный ключ успешно сохранён",
"timezone_mismatch_tooltip": "Вы просматриваете отчёт в часовом поясе вашего профиля ({{userTimezone}}), в то время как ваш браузер настроен на часовой пояс ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Добавьте строки выше ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/sk-SK/common.json b/apps/web/public/static/locales/sk-SK/common.json
similarity index 99%
rename from packages/lib/server/locales/sk-SK/common.json
rename to apps/web/public/static/locales/sk-SK/common.json
index a6f1666ce1d..bb72c3319cc 100644
--- a/packages/lib/server/locales/sk-SK/common.json
+++ b/apps/web/public/static/locales/sk-SK/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Licenčný kľúč bol úspešne uložený",
"timezone_mismatch_tooltip": "Prezeráte si správu na základe časového pásma vášho profilu ({{userTimezone}}), zatiaľ čo váš prehliadač je nastavený na časové pásmo ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Pridajte svoje nové reťazce nad túto líniu ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/sk/common.json b/apps/web/public/static/locales/sk/common.json
similarity index 99%
rename from packages/lib/server/locales/sk/common.json
rename to apps/web/public/static/locales/sk/common.json
index 7053f4791b8..23dd604fe45 100644
--- a/packages/lib/server/locales/sk/common.json
+++ b/apps/web/public/static/locales/sk/common.json
@@ -67,4 +67,4 @@
"reschedule_cta_short": "Preplánujte tu.",
"you_and_conjunction": "Vy &",
"email_survey_triggered_by_workflow": "Tento prieskum bol spustený pracovným postupom v Cal."
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/sr/common.json b/apps/web/public/static/locales/sr/common.json
similarity index 99%
rename from packages/lib/server/locales/sr/common.json
rename to apps/web/public/static/locales/sr/common.json
index 8f548f8d55a..5518583e04b 100644
--- a/packages/lib/server/locales/sr/common.json
+++ b/apps/web/public/static/locales/sr/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Licencni ključ je uspešno sačuvan",
"timezone_mismatch_tooltip": "Gledate izveštaj na osnovu vremenske zone vašeg profila ({{userTimezone}}), dok je vaš pretraživač podešen na vremensku zonu ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Dodajte svoje nove stringove iznad ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/sv/common.json b/apps/web/public/static/locales/sv/common.json
similarity index 99%
rename from packages/lib/server/locales/sv/common.json
rename to apps/web/public/static/locales/sv/common.json
index ee792a059de..e458bc18cf2 100644
--- a/packages/lib/server/locales/sv/common.json
+++ b/apps/web/public/static/locales/sv/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Licensnyckeln sparades framgångsrikt",
"timezone_mismatch_tooltip": "Du tittar på rapporten baserat på din profiltidszon ({{userTimezone}}), medan din webbläsare är inställd på tidszonen ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/ta/common.json b/apps/web/public/static/locales/ta/common.json
similarity index 99%
rename from packages/lib/server/locales/ta/common.json
rename to apps/web/public/static/locales/ta/common.json
index 16cefd13679..9d000478117 100644
--- a/packages/lib/server/locales/ta/common.json
+++ b/apps/web/public/static/locales/ta/common.json
@@ -211,4 +211,4 @@
"reschedule_cta_short": "இங்கே மீண்டும் ஷெடியூல் செய்யவும்.",
"you_and_conjunction": "நீங்கள் &",
"email_survey_triggered_by_workflow": "இந்த ஆய்வு Cal-ல் உள்ள பணிப்பாய்வு மூலம் தூண்டப்பட்டது."
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/th/common.json b/apps/web/public/static/locales/th/common.json
similarity index 100%
rename from packages/lib/server/locales/th/common.json
rename to apps/web/public/static/locales/th/common.json
diff --git a/packages/lib/server/locales/tr/common.json b/apps/web/public/static/locales/tr/common.json
similarity index 99%
rename from packages/lib/server/locales/tr/common.json
rename to apps/web/public/static/locales/tr/common.json
index 334878937fe..8fa7d594b18 100644
--- a/packages/lib/server/locales/tr/common.json
+++ b/apps/web/public/static/locales/tr/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Lisans anahtarı başarıyla kaydedildi",
"timezone_mismatch_tooltip": "Raporu profil saat diliminize ({{userTimezone}}) göre görüntülüyorsunuz, ancak tarayıcınız ({{browserTimezone}}) saat dilimine ayarlı",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Yeni dizelerinizi yukarıya ekleyin ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/uk/common.json b/apps/web/public/static/locales/uk/common.json
similarity index 99%
rename from packages/lib/server/locales/uk/common.json
rename to apps/web/public/static/locales/uk/common.json
index b34675709df..b7b90b8bcc3 100644
--- a/packages/lib/server/locales/uk/common.json
+++ b/apps/web/public/static/locales/uk/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Ліцензійний ключ успішно збережено",
"timezone_mismatch_tooltip": "Ви переглядаєте звіт на основі часового поясу вашого профілю ({{userTimezone}}), тоді як у вашому браузері встановлено часовий пояс ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/vi/common.json b/apps/web/public/static/locales/vi/common.json
similarity index 99%
rename from packages/lib/server/locales/vi/common.json
rename to apps/web/public/static/locales/vi/common.json
index 2b1d416152c..96e3b6f4296 100644
--- a/packages/lib/server/locales/vi/common.json
+++ b/apps/web/public/static/locales/vi/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "Đã lưu khóa giấy phép thành công",
"timezone_mismatch_tooltip": "Bạn đang xem báo cáo dựa trên múi giờ hồ sơ của bạn ({{userTimezone}}), trong khi trình duyệt của bạn được đặt theo múi giờ ({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/zh-CN/common.json b/apps/web/public/static/locales/zh-CN/common.json
similarity index 99%
rename from packages/lib/server/locales/zh-CN/common.json
rename to apps/web/public/static/locales/zh-CN/common.json
index 6119c2963a3..18f53468d96 100644
--- a/packages/lib/server/locales/zh-CN/common.json
+++ b/apps/web/public/static/locales/zh-CN/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "许可证密钥已成功保存",
"timezone_mismatch_tooltip": "您正在根据您的个人资料时区({{userTimezone}})查看报告,而您的浏览器设置为时区({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ 在此上方添加您的新字符串 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/packages/lib/server/locales/zh-TW/common.json b/apps/web/public/static/locales/zh-TW/common.json
similarity index 99%
rename from packages/lib/server/locales/zh-TW/common.json
rename to apps/web/public/static/locales/zh-TW/common.json
index bda66b2ceb9..212bd870893 100644
--- a/packages/lib/server/locales/zh-TW/common.json
+++ b/apps/web/public/static/locales/zh-TW/common.json
@@ -3360,4 +3360,4 @@
"license_key_saved": "授權金鑰已成功儲存",
"timezone_mismatch_tooltip": "您正在根據您的個人資料時區({{userTimezone}})查看報告,而您的瀏覽器設置為時區({{browserTimezone}})",
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ 請在此處新增您的字串 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
-}
+}
\ No newline at end of file
diff --git a/apps/web/scripts/check-missing-translations.ts b/apps/web/scripts/check-missing-translations.ts
index 3435286f99d..d032b48085b 100644
--- a/apps/web/scripts/check-missing-translations.ts
+++ b/apps/web/scripts/check-missing-translations.ts
@@ -3,7 +3,7 @@ import { join } from "path";
const TEMPLATE_LANGUAGE = "en";
const SPECIFIC_LOCALES = process.argv.slice(2) || [];
-const LOCALES_PATH = join(__dirname, "../../../packages/lib/server/locales");
+const LOCALES_PATH = join(__dirname, "../public/static/locales");
const ALL_LOCALES = readdirSync(LOCALES_PATH);
diff --git a/apps/web/scripts/copy-locales-static.js b/apps/web/scripts/copy-locales-static.js
deleted file mode 100644
index e0cc48d3d8f..00000000000
--- a/apps/web/scripts/copy-locales-static.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const fs = require("fs");
-const path = require("path");
-const glob = require("glob");
-
-const copyLocalesStatic = () => {
- const localeFiles = glob.sync("../../packages/lib/server/locales/**/*.json", { nodir: true });
-
- localeFiles.forEach((file) => {
- const relativePath = file.replace("../../packages/lib/server/locales/", "");
-
- // Create destination directory if it doesn't exist
- const destDir = path.join(process.cwd(), "public", "static", "locales", path.dirname(relativePath));
- if (!fs.existsSync(destDir)) {
- fs.mkdirSync(destDir, { recursive: true });
- }
-
- // Copy file to destination
- const destPath = path.join(process.cwd(), "public", "static", "locales", relativePath);
- fs.copyFileSync(file, destPath);
- console.log(`Copied ${file} to ${destPath}`);
- });
-};
-
-// Run the copy function
-copyLocalesStatic();
diff --git a/i18n-unused.config.js b/i18n-unused.config.js
index 3909b124f40..4b4310e2735 100644
--- a/i18n-unused.config.js
+++ b/i18n-unused.config.js
@@ -23,7 +23,7 @@ const translationKeyRegex = /(?<!\w)(?:t\(("[^"]*")(?:,\s*\{[^}]*\})?\)|i18nKey=
/** @type {import("i18n-unused/src/types/index.ts").RunOptions} */
const config = {
// localesPath: localePath, // uncomment to run on all locales (to calculate kb savings)
- localesPath: path.join("./packages/lib/server/locales", "/en"),
+ localesPath: path.join("./apps/website", "/public/static/locales", "/en"),
srcPath: "./apps/website",
srcExtensions: ["ts", "tsx"],
translationContextSeparator: ":",
diff --git a/i18n.json b/i18n.json
index 6bb37eb02b6..dd6ef9b3b52 100644
--- a/i18n.json
+++ b/i18n.json
@@ -43,7 +43,7 @@
},
"buckets": {
"json": {
- "include": ["packages/lib/server/locales/[locale]/common.json"]
+ "include": ["apps/web/public/static/locales/[locale]/common.json"]
}
},
"$schema": "https://lingo.dev/schema/i18n.json"
diff --git a/packages/features/ee/workflows/lib/test/compareReminderBodyToTemplate.test.ts b/packages/features/ee/workflows/lib/test/compareReminderBodyToTemplate.test.ts
index 32811ddb40b..6371b00b8b0 100644
--- a/packages/features/ee/workflows/lib/test/compareReminderBodyToTemplate.test.ts
+++ b/packages/features/ee/workflows/lib/test/compareReminderBodyToTemplate.test.ts
@@ -2,9 +2,9 @@ import { createInstance } from "i18next";
import { expect, test, describe } from "vitest";
import { getTranslation } from "@calcom/lib/server/i18n";
-import en from "@calcom/lib/server/locales/en/common.json";
import { TimeFormat } from "@calcom/lib/timeFormat";
import { WorkflowActions, WorkflowTemplates } from "@calcom/prisma/enums";
+import en from "@calcom/web/public/static/locales/en/common.json";
import { getTemplateBodyForAction } from "../actionHelperFunctions";
import compareReminderBodyToTemplate from "../compareReminderBodyToTemplate";
diff --git a/packages/lib/buildCalEventFromBooking.ts b/packages/lib/buildCalEventFromBooking.ts
index fce1a033b6c..9e0cb474c68 100644
--- a/packages/lib/buildCalEventFromBooking.ts
+++ b/packages/lib/buildCalEventFromBooking.ts
@@ -1,9 +1,9 @@
import type { Prisma } from "@prisma/client";
import dayjs from "@calcom/dayjs";
-import { getTranslation } from "@calcom/lib/server/i18n";
import { parseRecurringEvent } from "./isRecurringEvent";
+import { getTranslation } from "./server/i18n";
type DestinationCalendar = {
id: number;
diff --git a/packages/lib/server/i18n.ts b/packages/lib/server/i18n.ts
index 64e905f8449..3e092b33091 100644
--- a/packages/lib/server/i18n.ts
+++ b/packages/lib/server/i18n.ts
@@ -1,6 +1,6 @@
import { createInstance } from "i18next";
-import { CALCOM_VERSION } from "@calcom/lib/constants";
+import { WEBAPP_URL } from "@calcom/lib/constants";
const translationCache = new Map<string, Record<string, string>>();
const i18nInstanceCache = new Map<string, any>();
@@ -10,25 +10,27 @@ const i18nInstanceCache = new Map<string, any>();
* Implements caching to avoid redundant network requests
* @returns {Promise<Record<string, string>>} English translations object or empty object on failure
*/
-async function loadFallbackTranslations(): Promise<Record<string, string>> {
- const cacheKey = `en-common-${CALCOM_VERSION}`;
+async function loadFallbackTranslations() {
+ const cacheKey = "en-common";
if (translationCache.has(cacheKey)) {
- return translationCache.get(cacheKey)!;
+ return translationCache.get(cacheKey);
}
try {
- const { getBundledTranslations } = await import("./translationBundler");
- const translations = getBundledTranslations("en", "common");
+ const res = await fetch(`${WEBAPP_URL}/static/locales/en/common.json`, {
+ cache: process.env.NODE_ENV === "production" ? "force-cache" : "no-store",
+ });
- if (Object.keys(translations).length === 0) {
- throw new Error("No English fallback translations found");
+ if (!res.ok) {
+ throw new Error(`Failed to fetch fallback translations: ${res.status}`);
}
+ const translations = await res.json();
translationCache.set(cacheKey, translations);
return translations;
} catch (error) {
- console.error("Could not load fallback translations:", error);
+ console.error("Could not fetch fallback translations:", error);
return {};
}
}
@@ -39,22 +41,25 @@ async function loadFallbackTranslations(): Promise<Record<string, string>> {
* @param {string} ns - The namespace for the translations
* @returns {Promise<Record<string, string>>} Translations object or fallback translations on failure
*/
-export async function loadTranslations(_locale: string, ns: string): Promise<Record<string, string>> {
+export async function loadTranslations(_locale: string, ns: string) {
const locale = _locale === "zh" ? "zh-CN" : _locale;
- const cacheKey = `${locale}-${ns}-${CALCOM_VERSION}`;
+ const cacheKey = `${locale}-${ns}`;
if (translationCache.has(cacheKey)) {
- return translationCache.get(cacheKey)!;
+ return translationCache.get(cacheKey);
}
try {
- const { getBundledTranslations } = await import("./translationBundler");
- const translations = getBundledTranslations(locale, ns);
+ const url = `${WEBAPP_URL}/static/locales/${locale}/${ns}.json`;
+ const response = await fetch(url, {
+ cache: process.env.NODE_ENV === "production" ? "force-cache" : "no-store",
+ });
- if (Object.keys(translations).length === 0) {
- throw new Error(`No translations found for ${locale}/${ns}`);
+ if (!response.ok) {
+ throw new Error(`Failed to fetch translations: ${response.status}`);
}
+ const translations = await response.json();
translationCache.set(cacheKey, translations);
return translations;
} catch (error) {
@@ -71,7 +76,7 @@ export async function loadTranslations(_locale: string, ns: string): Promise<Rec
* @returns {Promise<Function>} A translation function bound to the specified locale and namespace
*/
export const getTranslation = async (locale: string, ns: string) => {
- const cacheKey = `${locale}-${ns}-${CALCOM_VERSION}`;
+ const cacheKey = `${locale}-${ns}`;
if (i18nInstanceCache.has(cacheKey)) {
return i18nInstanceCache.get(cacheKey).getFixedT(locale, ns);
}
diff --git a/packages/lib/server/translationBundler.ts b/packages/lib/server/translationBundler.ts
deleted file mode 100644
index e5110187d41..00000000000
--- a/packages/lib/server/translationBundler.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { readFileSync } from "fs";
-import { join } from "path";
-import path from "path";
-
-import { CALCOM_VERSION } from "@calcom/lib/constants";
-
-function findMonorepoRoot(): string {
- let currentDir = process.cwd();
- while (currentDir !== path.dirname(currentDir)) {
- try {
- const packageJsonPath = path.join(currentDir, "package.json");
- const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
- if (packageJson.workspaces && packageJson.name === "calcom-monorepo") {
- return currentDir;
- }
- } catch (error) {
- // package.json doesn't exist in this directory
- // Just continue to the next directory
- }
- currentDir = path.dirname(currentDir);
- }
-
- return process.cwd();
-}
-
-const LOCALES_PATH = path.join(findMonorepoRoot(), "packages/lib/server/locales");
-
-interface LocaleCache {
- [cacheKey: string]: Record<string, string>;
-}
-
-let localeCache: LocaleCache = {};
-let cacheVersion: string | null = null;
-
-function loadTranslationForLocale(locale: string, ns: string): Record<string, string> {
- const cacheKey = `${locale}-${ns}-${CALCOM_VERSION}`;
-
- if (cacheVersion === CALCOM_VERSION && localeCache[cacheKey]) {
- return localeCache[cacheKey];
- }
-
- if (cacheVersion !== CALCOM_VERSION) {
- localeCache = {};
- cacheVersion = CALCOM_VERSION;
- }
-
- try {
- const translationPath = join(LOCALES_PATH, locale, `${ns}.json`);
- const translations = JSON.parse(readFileSync(translationPath, "utf-8"));
- localeCache[cacheKey] = translations;
- return translations;
- } catch (error) {
- console.warn(`Failed to load translations for ${locale}/${ns}:`, error);
- return {};
- }
-}
-
-export function getBundledTranslations(locale: string, ns: string): Record<string, string> {
- const normalizedLocale = locale === "zh" ? "zh-CN" : locale;
-
- const translations = loadTranslationForLocale(normalizedLocale, ns);
- if (Object.keys(translations).length > 0) {
- return translations;
- }
-
- const englishTranslations = loadTranslationForLocale("en", ns);
- return englishTranslations;
-}
diff --git a/packages/platform/atoms/cal-provider/BaseCalProvider.tsx b/packages/platform/atoms/cal-provider/BaseCalProvider.tsx
index 926c5276094..e230a4ba29b 100644
--- a/packages/platform/atoms/cal-provider/BaseCalProvider.tsx
+++ b/packages/platform/atoms/cal-provider/BaseCalProvider.tsx
@@ -3,14 +3,14 @@ import type { ReactNode } from "react";
import { useState } from "react";
import { useCallback } from "react";
-import deTranslations from "@calcom/lib/server/locales/de/common.json";
-import enTranslations from "@calcom/lib/server/locales/en/common.json";
-import esTranslations from "@calcom/lib/server/locales/es/common.json";
-import frTranslations from "@calcom/lib/server/locales/fr/common.json";
-import nlTranslations from "@calcom/lib/server/locales/nl/common.json";
-import ptBrTranslations from "@calcom/lib/server/locales/pt-BR/common.json";
import type { API_VERSIONS_ENUM } from "@calcom/platform-constants";
import { IconSprites } from "@calcom/ui/components/icon";
+import deTranslations from "@calcom/web/public/static/locales/de/common.json";
+import enTranslations from "@calcom/web/public/static/locales/en/common.json";
+import esTranslations from "@calcom/web/public/static/locales/es/common.json";
+import frTranslations from "@calcom/web/public/static/locales/fr/common.json";
+import nlTranslations from "@calcom/web/public/static/locales/nl/common.json";
+import ptBrTranslations from "@calcom/web/public/static/locales/pt-BR/common.json";
import { AtomsContext } from "../hooks/useAtomsContext";
import { useMe } from "../hooks/useMe";
diff --git a/packages/platform/atoms/cal-provider/languages.ts b/packages/platform/atoms/cal-provider/languages.ts
index 7cc07c5cecd..5828b651910 100644
--- a/packages/platform/atoms/cal-provider/languages.ts
+++ b/packages/platform/atoms/cal-provider/languages.ts
@@ -1,9 +1,9 @@
-import type deTranslations from "@calcom/lib/server/locales/de/common.json";
-import type enTranslations from "@calcom/lib/server/locales/en/common.json";
-import type esTranslations from "@calcom/lib/server/locales/es/common.json";
-import type frTranslations from "@calcom/lib/server/locales/fr/common.json";
-import type nlTranslations from "@calcom/lib/server/locales/nl/common.json";
-import type ptBrTranslations from "@calcom/lib/server/locales/pt-BR/common.json";
+import type deTranslations from "@calcom/web/public/static/locales/de/common.json";
+import type enTranslations from "@calcom/web/public/static/locales/en/common.json";
+import type esTranslations from "@calcom/web/public/static/locales/es/common.json";
+import type frTranslations from "@calcom/web/public/static/locales/fr/common.json";
+import type nlTranslations from "@calcom/web/public/static/locales/nl/common.json";
+import type ptBrTranslations from "@calcom/web/public/static/locales/pt-BR/common.json";
export type enTranslationKeys = keyof typeof enTranslations;
export type frTranslationKeys = keyof typeof frTranslations;
diff --git a/packages/platform/atoms/vite.config.ts b/packages/platform/atoms/vite.config.ts
index af84a687721..975682e09da 100644
--- a/packages/platform/atoms/vite.config.ts
+++ b/packages/platform/atoms/vite.config.ts
@@ -62,9 +62,9 @@ export default defineConfig(({ mode }) => {
"@calcom/platform-constants": path.resolve(__dirname, "../constants/index.ts"),
"@calcom/platform-types": path.resolve(__dirname, "../types/index.ts"),
"@calcom/platform-utils": path.resolve(__dirname, "../constants/index.ts"),
- "@calcom/lib/server/locales/en/common.json": path.resolve(
+ "@calcom/web/public/static/locales/en/common.json": path.resolve(
__dirname,
- "../../lib/server/locales/en/common.json"
+ "../../../apps/web/public/static/locales/en/common.json"
),
},
},