Skip to content

Commit d6324b3

Browse files
committed
fix: remove unused sourceLocale
1 parent c0811dd commit d6324b3

6 files changed

Lines changed: 3 additions & 15 deletions

File tree

cmp/compiler/src/dev-config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export const serverUrl = "__SERVER_URL__";
22
export const cacheDir = "__CACHE_DIR__";
3-
export const sourceLocale = "__SOURCE_LOCALE__";

cmp/compiler/src/plugin/dev-server-loader.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { LoaderConfig } from "../types";
22
import { logger } from "../utils/logger";
3-
import { withTimeout, DEFAULT_TIMEOUTS } from "../utils/timeout";
3+
import { DEFAULT_TIMEOUTS, withTimeout } from "../utils/timeout";
44
import { startOrGetTranslationServerHono } from "../translation-server/translation-server-hono";
55

66
let serverPromise: ReturnType<typeof startOrGetTranslationServerHono> | null =
@@ -43,7 +43,6 @@ export default async function devServerLoader(
4343
null,
4444
source
4545
.replace("__SERVER_URL__", server?.url || "http://127.0.0.1:60000")
46-
.replace("__CACHE_DIR__", config.cacheDir)
47-
.replace("__SOURCE_LOCALE__", config.sourceLocale),
46+
.replace("__CACHE_DIR__", config.cacheDir),
4847
);
4948
}

cmp/compiler/src/plugin/unplugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ export const lingoUnplugin = createUnplugin<LingoPluginOptions>(
9191
const cacheDir = getCacheDir(config);
9292

9393
return `export const serverUrl = ${JSON.stringify(serverUrl)};
94-
export const cacheDir = ${JSON.stringify(cacheDir)};
95-
export const sourceLocale = ${JSON.stringify(config.sourceLocale)};`;
94+
export const cacheDir = ${JSON.stringify(cacheDir)};`;
9695
}
9796
return null;
9897
},

cmp/compiler/src/react/server-only/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import type { ReactNode } from "react";
1414
import { logger } from "../../utils/logger";
1515
// Keep this import full for replacement during build.
1616
import { localeResolver } from "@lingo.dev/_compiler/config";
17-
import { sourceLocale } from "@lingo.dev/_compiler/dev-config";
1817

1918
/**
2019
* Get server-side translations function
@@ -59,7 +58,6 @@ export async function getServerTranslations(options: {
5958
locale,
6059
options.hashes ?? [],
6160
{
62-
sourceLocale,
6361
basePath: options.basePath,
6462
},
6563
);

cmp/compiler/src/react/server-only/translations.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ export interface TranslationFetchConfig {
2222
* Base path for translation files (default: process.cwd())
2323
*/
2424
basePath?: string;
25-
26-
/**
27-
* Source locale (default: 'en')
28-
* If the requested locale matches source, returns empty dictionary
29-
*/
30-
sourceLocale?: string;
3125
}
3226

3327
/**
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export const serverUrl = "__SERVER_URL__";
22
export const cacheDir = "__CACHE_DIR__";
3-
export const sourceLocale = "__SOURCE_LOCALE__";

0 commit comments

Comments
 (0)