Skip to content

Commit

Permalink
fix: 修复 k8s 环境下无法加载翻译文件的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron3S committed Jul 10, 2024
1 parent 2847de8 commit f53e126
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ class JsonMessageSource extends AbstractMessageSource {


public JsonMessageSource(@Value("${i18n.endpoint}") String endpoint) {
this.endpoint = endpoint;
// 首先从环境变量中读取 core 的地址

String coreHost = System.getenv("CORE_HOST");

if (!coreHost.isEmpty()) {
this.endpoint = coreHost;
} else {
this.endpoint = endpoint;
}

var languages = new String[]{
"en", "ja", "zh", "zh_hant"
Expand Down

0 comments on commit f53e126

Please sign in to comment.