Skip to content

Commit c8a52b7

Browse files
authored
Revert "refactor: replace i18n HTTP requests with build-time bundling (#22422)" (#22496)
This reverts commit 163c7ff.
1 parent fe4946a commit c8a52b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+87
-175
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
filters: |
3535
has-files-requiring-all-checks:
36-
- "!(**.md|.github/CODEOWNERS|docs/**|help/**|packages/lib/server/locales/**/common.json)"
36+
- "!(**.md|.github/CODEOWNERS|docs/**|help/**|apps/web/public/static/locales/**/common.json)"
3737
- name: Get Latest Commit SHA
3838
id: get_sha
3939
run: |

apps/api/v2/next-i18next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const i18nConfig = require("@calcom/config/next-i18next.config");
55
/** @type {import("next-i18next").UserConfig} */
66
const config = {
77
...i18nConfig,
8-
localePath: path.resolve("../../packages/lib/server/locales"),
8+
localePath: path.resolve("../../web/public/static/locales"),
99
};
1010

1111
module.exports = config;

apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/embed/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const ServerPage = async ({ params, searchParams }: ServerPageProps) => {
3232

3333
const eventLocale = props.eventData?.interfaceLanguage;
3434
const ns = "common";
35-
let translations: Record<string, string> = {};
35+
let translations;
3636
if (eventLocale) {
3737
const ns = "common";
3838
translations = await loadTranslations(eventLocale, ns);

apps/web/app/(booking-page-wrapper)/org/[orgSlug]/[user]/[type]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const ServerPage = async ({ params, searchParams }: PageProps) => {
6868

6969
const eventLocale = props.eventData?.interfaceLanguage;
7070
const ns = "common";
71-
let translations: Record<string, string> = {};
71+
let translations;
7272
if (eventLocale) {
7373
const ns = "common";
7474
translations = await loadTranslations(eventLocale, ns);

apps/web/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require("dotenv").config({ path: "../../.env" });
2-
const englishTranslation = require("../../packages/lib/server/locales/en/common.json");
2+
const englishTranslation = require("./public/static/locales/en/common.json");
33
const { withAxiom } = require("next-axiom");
44
const { version } = require("./package.json");
55
const {

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type-check": "tsc --pretty --noEmit",
1616
"type-check:ci": "tsc-absolute --pretty --noEmit",
1717
"sentry:release": "NODE_OPTIONS='--max-old-space-size=6144' node scripts/create-sentry-release.js",
18-
"copy-static": "node scripts/copy-app-store-static.js && node scripts/copy-locales-static.js",
18+
"copy-static": "node scripts/copy-app-store-static.js",
1919
"build": "yarn copy-static && next build && yarn sentry:release",
2020
"start": "next start",
2121
"lint": "eslint . --ignore-path .gitignore",

apps/web/playwright/lib/localize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { loadJSON } from "./loadJSON";
22

33
// Provide an standalone localize utility not managed by next-i18n
44
export async function localize(locale: string) {
5-
const localeModule = `../../../../packages/lib/server/locales/${locale}/common.json`;
5+
const localeModule = `../../public/static/locales/${locale}/common.json`;
66
const localeMap = loadJSON(localeModule);
77
return (message: string) => {
88
if (message in localeMap) return localeMap[message];

packages/lib/server/locales/ar/common.json renamed to apps/web/public/static/locales/ar/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3360,4 +3360,4 @@
33603360
"license_key_saved": "تم حفظ مفتاح الترخيص بنجاح",
33613361
"timezone_mismatch_tooltip": "أنت تشاهد التقرير بناءً على المنطقة الزمنية لملفك الشخصي ({{userTimezone}})، بينما متصفحك مضبوط على المنطقة الزمنية ({{browserTimezone}})",
33623362
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ أضف السلاسل الجديدة أعلاه هنا ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
3363-
}
3363+
}

packages/lib/server/locales/az/common.json renamed to apps/web/public/static/locales/az/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3360,4 +3360,4 @@
33603360
"license_key_saved": "Lisenziya açarı uğurla saxlanıldı",
33613361
"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",
33623362
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Yeni sətirləri bura əlavə edin ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
3363-
}
3363+
}

packages/lib/server/locales/bg/common.json renamed to apps/web/public/static/locales/bg/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3360,4 +3360,4 @@
33603360
"license_key_saved": "Лицензионният ключ е успешно записан",
33613361
"timezone_mismatch_tooltip": "Преглеждате отчета според часовата зона на вашия профил ({{userTimezone}}), докато браузърът ви е настроен на часова зона ({{browserTimezone}})",
33623362
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Добавете новите си низове над този ред ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
3363-
}
3363+
}

0 commit comments

Comments
 (0)