Feat/portuguese support (#2075)
This commit is contained in:
parent
21ade71bad
commit
c17baef172
78 changed files with 2849 additions and 376 deletions
|
|
@ -13,6 +13,8 @@ import type { AppDetailResponse } from '@/models/app'
|
|||
import type { Language } from '@/types/app'
|
||||
import EmojiPicker from '@/app/components/base/emoji-picker'
|
||||
|
||||
import { languages } from '@/utils/language'
|
||||
|
||||
export type ISettingsModalProps = {
|
||||
appInfo: AppDetailResponse
|
||||
isShow: boolean
|
||||
|
|
@ -32,11 +34,6 @@ export type ConfigParams = {
|
|||
icon_background: string
|
||||
}
|
||||
|
||||
const LANGUAGE_MAP: Record<Language, string> = {
|
||||
'en-US': 'English(United States)',
|
||||
'zh-Hans': '简体中文',
|
||||
}
|
||||
|
||||
const prefixSettings = 'appOverview.overview.appInfo.settings'
|
||||
|
||||
const SettingsModal: FC<ISettingsModalProps> = ({
|
||||
|
|
@ -125,7 +122,7 @@ const SettingsModal: FC<ISettingsModalProps> = ({
|
|||
/>
|
||||
<div className={`mt-6 mb-2 font-medium ${s.settingTitle} text-gray-900 `}>{t(`${prefixSettings}.language`)}</div>
|
||||
<SimpleSelect
|
||||
items={Object.keys(LANGUAGE_MAP).map(lang => ({ name: LANGUAGE_MAP[lang as Language], value: lang }))}
|
||||
items={languages}
|
||||
defaultValue={language}
|
||||
onSelect={item => setLanguage(item.value as Language)}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue