Locale lower case match

This commit is contained in:
xmflsct 2023-03-14 01:39:54 +01:00
parent 4e620f8987
commit f78693eee8
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ const TimelineCard: React.FC = () => {
if (!status || !status.card) return null
const { i18n } = useTranslation()
if (status.card.url.includes('://neodb.social/') && i18n.language === 'zh-hans') {
if (status.card.url.includes('://neodb.social/') && i18n.language.toLowerCase() === 'zh-hans') {
return <CardNeodb card={status.card} />
}

View File

@ -59,7 +59,7 @@ const SettingsApp: React.FC = () => {
// @ts-ignore
LOCALES[
Platform.OS === 'ios'
? Localization.locale.replace(new RegExp(/.*-.*(-.*)/, 'i'), '')
? Localization.locale.replace(new RegExp(/.*-.*(-.*)/, 'i'), '').toLowerCase()
: i18n.language.toLowerCase()
]
}