diff --git a/dist/buildinfo.json b/dist/buildinfo.json index 40567e20..735a9a5e 100644 --- a/dist/buildinfo.json +++ b/dist/buildinfo.json @@ -1 +1 @@ -{"sha": "d38184f", "timestamp": 1697784536} +{"sha": "50e577b", "timestamp": 1697784701} diff --git a/dist/index.js b/dist/index.js index f2c24e6f..3593caa4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -41,9 +41,9 @@ var Environment = class { // 检查更新的分支 UPDATE_BRANCH = "master"; // 当前版本 - BUILD_TIMESTAMP = 1697784536; + BUILD_TIMESTAMP = 1697784701; // 当前版本 commit id - BUILD_VERSION = "d38184f"; + BUILD_VERSION = "50e577b"; I18N = null; LANGUAGE = "zh-cn"; // 使用流模式 @@ -120,6 +120,7 @@ function initEnv(env, i18n2) { } } { + ENV.I18N = i18n2((ENV.LANGUAGE || "cn").toLowerCase()); if (env.TELEGRAM_TOKEN && !ENV.TELEGRAM_AVAILABLE_TOKENS.includes(env.TELEGRAM_TOKEN)) { if (env.BOT_NAME && ENV.TELEGRAM_AVAILABLE_TOKENS.length === ENV.TELEGRAM_BOT_NAME.length) { ENV.TELEGRAM_BOT_NAME.push(env.BOT_NAME); @@ -133,7 +134,6 @@ function initEnv(env, i18n2) { ENV.SYSTEM_INIT_MESSAGE = ENV.I18N?.env?.system_init_message || "You are a helpful assistant"; } } - ENV.I18N = i18n2((ENV.LANGUAGE || "cn").toLowerCase()); console.log(ENV); } diff --git a/dist/timestamp b/dist/timestamp index 509c1461..b31acd4d 100644 --- a/dist/timestamp +++ b/dist/timestamp @@ -1 +1 @@ -1697784536 +1697784701 diff --git a/src/env.js b/src/env.js index 98585580..e5c7a026 100644 --- a/src/env.js +++ b/src/env.js @@ -149,7 +149,9 @@ export function initEnv(env, i18n) { } } { - // 兼容性代码 兼容旧版本 + ENV.I18N = i18n((ENV.LANGUAGE || 'cn').toLowerCase()); + + // TELEGRAM_TOKEN 兼容旧版 if (env.TELEGRAM_TOKEN && !ENV.TELEGRAM_AVAILABLE_TOKENS.includes(env.TELEGRAM_TOKEN)) { if (env.BOT_NAME && ENV.TELEGRAM_AVAILABLE_TOKENS.length === ENV.TELEGRAM_BOT_NAME.length) { ENV.TELEGRAM_BOT_NAME.push(env.BOT_NAME); @@ -167,6 +169,5 @@ export function initEnv(env, i18n) { ENV.SYSTEM_INIT_MESSAGE = ENV.I18N?.env?.system_init_message || 'You are a helpful assistant'; } } - ENV.I18N = i18n((ENV.LANGUAGE || 'cn').toLowerCase()); console.log(ENV); }