This commit is contained in:
2025-06-15 13:54:39 +09:00
parent 600d16e032
commit 49d0cb6ef5

View File

@@ -119,7 +119,7 @@ class ControllerPlugin extends BaseControllerPlugin {
if (this.controller.config.get('ClusterChatSync.use_libretranslate')) { if (this.controller.config.get('ClusterChatSync.use_libretranslate')) {
this.translator = new LibreTranslateAPI(this.controller.config.get('ClusterChatSync.libretranslate_url'), this.controller.config.get('ClusterChatSync.libretranslate_key'), this.logger); this.translator = new LibreTranslateAPI(this.controller.config.get('ClusterChatSync.libretranslate_url'), this.controller.config.get('ClusterChatSync.libretranslate_key'), this.logger);
await this.translator.init(); await this.translator.init();
this.translator_language = this.controller.config.get('ClusterChatSync.libretranslate_language').trim().split(/\s+/); this.translator_language = this.controller.config.get('ClusterChatSync.libretranslate_language').trim().split(/\s+/) || ['zh-Hant', 'en'];
} }
} }