Exclude "local source" for language detection for sources language filter

The local source is always shown, and therefore its language ("other") should only be shown in the language filter in case an actual source is installed that supports is of "other" language.
This commit is contained in:
schroda
2026-01-25 03:51:13 +01:00
parent e63a51e060
commit eace67e464
4 changed files with 29 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ import { GroupedVirtuoso } from 'react-virtuoso';
import ListItemAvatar from '@mui/material/ListItemAvatar';
import { useLingui } from '@lingui/react/macro';
import Checkbox from '@mui/material/Checkbox';
import Box from '@mui/material/Box';
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
import { translateExtensionLanguage } from '@/features/extension/Extensions.utils.ts';
import { languageSortComparator, toUniqueLanguageCodes } from '@/base/utils/Languages.ts';
@@ -139,6 +140,7 @@ export const SourceLanguageSelect = ({
<Dialog fullWidth maxWidth="xs" open={open} onClose={handleCancel}>
<DialogTitle>{t`Allowed Languages`}</DialogTitle>
<DialogContent dividers sx={{ padding: 0 }}>
{!languages.length && <Box sx={{ p: 1 }}>{t`No sources installed`}</Box>}
<GroupedVirtuoso
style={{
height: languagesSortedBySelectState.length * 54,