Skip to content

Commit 9104242

Browse files
authored
🐛 fix: fix changelog locale not showing English (lobehub#5607)
1 parent 789da45 commit 9104242

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/services/changelog/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class ChangelogService {
7676
try {
7777
const post = await this.getIndexItemById(id);
7878

79-
const filename = options?.locale === 'en-US' ? `${id}.mdx` : `${id}.zh-CN.mdx`;
79+
const filename = options?.locale?.startsWith('zh') ? `${id}.zh-CN.mdx` : `${id}.mdx`;
8080
const url = this.genUrl(urlJoin(this.config.docsPath, filename));
8181

8282
const response = await fetch(url);

0 commit comments

Comments
 (0)