File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export const serverUrl = "__SERVER_URL__" ;
22export const cacheDir = "__CACHE_DIR__" ;
3- export const sourceLocale = "__SOURCE_LOCALE__" ;
Original file line number Diff line number Diff line change 11import type { LoaderConfig } from "../types" ;
22import { logger } from "../utils/logger" ;
3- import { withTimeout , DEFAULT_TIMEOUTS } from "../utils/timeout" ;
3+ import { DEFAULT_TIMEOUTS , withTimeout } from "../utils/timeout" ;
44import { startOrGetTranslationServerHono } from "../translation-server/translation-server-hono" ;
55
66let 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}
Original file line number Diff line number Diff 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 } ,
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import type { ReactNode } from "react";
1414import { logger } from "../../utils/logger" ;
1515// Keep this import full for replacement during build.
1616import { 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 ) ;
Original file line number Diff line number Diff 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/**
Original file line number Diff line number Diff line change 11export const serverUrl = "__SERVER_URL__" ;
22export const cacheDir = "__CACHE_DIR__" ;
3- export const sourceLocale = "__SOURCE_LOCALE__" ;
You can’t perform that action at this time.
0 commit comments