Skip to content

Commit

Permalink
i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
shivankacker committed Aug 23, 2024
1 parent 217f2ca commit 3468970
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Components/Common/FacilitySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import AutoCompleteAsync from "../Form/AutoCompleteAsync";
import { FacilityModel } from "../Facility/models";
import request from "../../Utils/request/request";
import routes from "../../Redux/api";
import { t } from "i18next";

interface FacilitySelectProps {
name: string;
Expand Down Expand Up @@ -69,7 +70,10 @@ export const FacilitySelect = (props: FacilitySelectProps) => {
});

if (allowNone)
return [{ name: "None", id: "NONE" }, ...(data?.results || [])];
return [
{ name: t("no_home_facility"), id: "NONE" },
...(data?.results || []),
];

return data?.results;
},
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Users/UserFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default function UserFilter(props: any) {
}
selected={
filterState.home_facility === "NONE"
? { name: "None", id: "NONE" }
? { name: t("no_home_facility"), id: "NONE" }
: filterState.home_facility_ref
}
errors=""
Expand Down
1 change: 1 addition & 0 deletions src/Locale/en/Users.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"add_new_user": "Add New User",
"no_users_found": "No Users Found",
"home_facility": "Home Facility",
"no_home_facility" : "No home facility assigned",
"clear_home_facility": "Clear Home Facility",
"linked_facilities": "Linked Facilities",
"no_linked_facilities": "No Linked Facilities",
Expand Down

0 comments on commit 3468970

Please sign in to comment.