Skip to content

Commit 4ce19c7

Browse files
committed
inject translated stringts
1 parent 2c5f15c commit 4ce19c7

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

src/ui/language/translations.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { filter } from "lodash";
2+
13
const translations = {
24
en: {
35
home: {
@@ -212,6 +214,13 @@ const translations = {
212214
probableNotEligible: "Probable ineligibility",
213215
notEnoughData: "Not enough data for assessment",
214216
beta: "Some benefits are still in beta, meaning they are not fully tested and may contain errors."
217+
},
218+
filter: {
219+
title: "Filter",
220+
benefitCategories: "Benefit category",
221+
administrativeLevels: "Administrative level",
222+
providingAgencies: "Providing agency",
223+
associatedLaws: "Associated law",
215224
}
216225
},
217226
profile: {
@@ -498,6 +507,13 @@ const translations = {
498507
probableNotEligible: "Wahrscheinlich besteht kein Anspruch",
499508
notEnoughData: "Nicht genügend Angaben für eine Einschätzung",
500509
beta: "Eininge Leistungen sind noch in der Beta-Phase, d.h. sie sind noch nicht vollständig getestet und können Fehler enthalten."
510+
},
511+
filter: {
512+
title: "Filter",
513+
benefitCategories: "Leistungskategorie",
514+
administrativeLevels: "Verwaltungsebene",
515+
providingAgencies: "Zuständige Behörde",
516+
associatedLaws: "Zugehöriges Gesetz",
501517
}
502518
},
503519
profile: {

src/ui/screens/eligibilty-overview/EligibilityOverviewScreen.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const EligibilityOverviewScreen = ({
2222
<VBox sx={{ gap: { xs: 4, md: 8 } }} >
2323
<EligibilityOverviewHeader iconPaths={iconPaths} />
2424
<VBox sx={{ gap: { xs: 2, md: 4 } }}>
25-
<EligibilityOverviewFilter
25+
<EligibilityOverviewFilter
26+
t={t}
2627
filterOptions={filterOptions}
2728
filters={filters}
2829
onChangeFilters={onChangeFilters}

src/ui/screens/eligibilty-overview/components/EligibilityOverviewFilter.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const FILTER_KEYS = [
1919
{ key: 'associatedLaws', label: 'Associated Law' },
2020
]
2121

22-
const EligibilityOverviewFilter = ({ filterOptions, filters, onChangeFilters }) => {
22+
const EligibilityOverviewFilter = ({ t, filterOptions, filters, onChangeFilters }) => {
2323
const handleChange = (key) => (event) => {
2424
onChangeFilters(prev => ({
2525
...prev,
@@ -48,19 +48,19 @@ const EligibilityOverviewFilter = ({ filterOptions, filters, onChangeFilters })
4848
>
4949
<VBox sx={{ gap: 2 }}>
5050
<Typography variant="h4" sx={{ color: 'blue.main', fontWeight: '400' }}>
51-
Filter
51+
{t('app.browseAll.filter.title')}
5252
</Typography>
53-
<HBox sx={{ flex: 1, justifyContent: 'space-between', gap: 4, flexWrap: 'wrap' }}>
53+
<HBox sx={{ gap: 4, flexWrap: 'wrap' }}>
5454
{FILTER_KEYS.map(({ key, label }) => (
5555
<FormControl key={key} size="small" sx={{ minWidth: 200 }}>
56-
<InputLabel id={`${key}-label`}>{label}</InputLabel>
56+
<InputLabel id={`${key}-label`}>{t(`app.browseAll.filter.${key}`)}</InputLabel>
5757
<Select
5858
labelId={`${key}-label`}
5959
multiple
6060
value={filters[key]}
6161
onChange={handleChange(key)}
6262
label={label}
63-
renderValue={() => label}
63+
renderValue={() => t(`app.browseAll.filter.${key}`)}
6464
>
6565
{filterOptions[key].map(item => (
6666
<MenuItem key={item.id} value={item.id}>

0 commit comments

Comments
 (0)