Skip to content

Commit

Permalink
fix locales
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsuki-Kaede committed Nov 18, 2024
1 parent 95da708 commit f17e5e9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions locales/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,11 @@ export function build() {
case 'zh-TW':
return merge(locales['en-US'], v);
default:
return merge(
locales['en-US'],
locales['ja-JP'],
locales[`${lang}-${primaries[lang]}`] ?? {},
v
);
const base = Object.keys(v).some(key =>
!locales['en-US'][key] && locales['ja-JP'][key]
) ? merge(locales['en-US'], locales['ja-JP']) : locales['en-US'];

return merge(base, v);
}
})(), a), {});
}
Expand Down

0 comments on commit f17e5e9

Please sign in to comment.