diff --git a/web/src/components/l10n/KeyboardSelection.jsx b/web/src/components/l10n/KeyboardSelection.jsx index 126f91c6d9..ca9e18bf67 100644 --- a/web/src/components/l10n/KeyboardSelection.jsx +++ b/web/src/components/l10n/KeyboardSelection.jsx @@ -60,6 +60,32 @@ export default function KeyboardSelection() { navigate(".."); }; + let keymapsList = filteredKeymaps.map((keymap) => { + return ( + setSelected(keymap)} + label={ + <> + + {keymap.name} + {keymap.id} + + } + value={JSON.stringify(keymap)} + defaultChecked={keymap === selected} + /> + ); + }); + + if (keymapsList.length === 0) { + keymapsList = ( + {_("None of the keymaps match the filter.")} + ); + } + return ( <> @@ -70,23 +96,7 @@ export default function KeyboardSelection() {
- {filteredKeymaps.map((keymap) => ( - setSelected(keymap)} - label={ - <> - - {keymap.name} - {keymap.id} - - } - value={JSON.stringify(keymap)} - defaultChecked={keymap === selected} - /> - ))} + {keymapsList}
diff --git a/web/src/components/l10n/LocaleSelection.jsx b/web/src/components/l10n/LocaleSelection.jsx index 998c3dc4d8..676e28e5e5 100644 --- a/web/src/components/l10n/LocaleSelection.jsx +++ b/web/src/components/l10n/LocaleSelection.jsx @@ -59,6 +59,32 @@ export default function LocaleSelection() { navigate(".."); }; + let localesList = filteredLocales.map((locale) => { + return ( + setSelected(locale)} + label={ + + {locale.name} + {locale.territory} + {locale.id} + + } + value={JSON.stringify(locale)} + checked={locale === selected} + /> + ); + }); + + if (localesList.length === 0) { + localesList = ( + {_("None of the locales match the filter.")} + ); + } + return ( <> @@ -70,23 +96,7 @@ export default function LocaleSelection() {
- {filteredLocales.map((locale) => ( - setSelected(locale)} - label={ - - {locale.name} - {locale.territory} - {locale.id} - - } - value={JSON.stringify(locale)} - checked={locale === selected} - /> - ))} + {localesList}
diff --git a/web/src/components/l10n/TimezoneSelection.jsx b/web/src/components/l10n/TimezoneSelection.jsx index 0ccca242f8..1b0fcf4b8b 100644 --- a/web/src/components/l10n/TimezoneSelection.jsx +++ b/web/src/components/l10n/TimezoneSelection.jsx @@ -90,6 +90,39 @@ export default function TimezoneSelection() { navigate(".."); }; + let timezonesList = filteredTimezones.map((timezone) => { + return ( + setSelected(timezone)} + label={ + <> + + {timezone.parts.join('-')} + {timezone.country} + + } + description={ + + {timezoneTime(timezone.id, { date }) || ""} + +
{timezone.details}
+
+ } + value={JSON.stringify(timezone)} + defaultChecked={timezone === selected} + /> + ); + }); + + if (timezonesList.length === 0) { + timezonesList = ( + {_("None of the time zones match the filter.")} + ); + } + return ( <> @@ -101,30 +134,7 @@ export default function TimezoneSelection() {
- {filteredTimezones.map((timezone) => ( - setSelected(timezone)} - label={ - <> - - {timezone.parts.join('-')} - {timezone.country} - - } - description={ - - {timezoneTime(timezone.id, { date }) || ""} - -
{timezone.details}
-
- } - value={JSON.stringify(timezone)} - defaultChecked={timezone === selected} - /> - ))} + {timezonesList}
diff --git a/web/src/components/software/SoftwarePatternsSelection.jsx b/web/src/components/software/SoftwarePatternsSelection.jsx index 4ed78afcbf..afb16ea8a5 100644 --- a/web/src/components/software/SoftwarePatternsSelection.jsx +++ b/web/src/components/software/SoftwarePatternsSelection.jsx @@ -238,8 +238,8 @@ function SoftwarePatternsSelection() {

{_("Software selection")}

setSearchValue(value)} onClear={() => setSearchValue("")}