Skip to content

Commit

Permalink
fix: tools description is missing (langgenius#8999)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola authored Oct 3, 2024
1 parent dc5839b commit 9815a09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/i18n/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ export const languages = data.languages
export const LanguagesSupported = languages.filter(item => item.supported).map(item => item.value)

export const getLanguage = (locale: string) => {
const supportedLocale = LanguagesSupported.find(lang => lang.startsWith(locale.split('-')[0]))
return (supportedLocale || LanguagesSupported[0]).replace('-', '_')
if (locale === 'zh-Hans')
return locale.replace('-', '_')

return LanguagesSupported[0].replace('-', '_')
}

export const NOTICE_I18N = {
Expand Down

0 comments on commit 9815a09

Please sign in to comment.