@okta/odyssey-react-mui 1.13.3 → 1.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okta/odyssey-react-mui",
3
- "version": "1.13.3",
3
+ "version": "1.13.4",
4
4
  "description": "React MUI components for Odyssey, Okta's design system",
5
5
  "author": "Okta, Inc.",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  "@mui/system": "^5.14.9",
52
52
  "@mui/utils": "^5.11.2",
53
53
  "@mui/x-date-pickers": "^5.0.15",
54
- "@okta/odyssey-design-tokens": "1.13.3",
54
+ "@okta/odyssey-design-tokens": "1.13.4",
55
55
  "date-fns": "^2.30.0",
56
56
  "i18next": "^23.5.1",
57
57
  "material-react-table": "^2.0.2",
@@ -63,5 +63,5 @@
63
63
  "react": ">=17 <19",
64
64
  "react-dom": ">=17 <19"
65
65
  },
66
- "gitHead": "e3fba02f71f76a8a2de99931b8febc2fbc15ffb8"
66
+ "gitHead": "819c629fca285cc984dc6cbdbf9f7d8fe6d6d08f"
67
67
  }
package/src/i18n.ts CHANGED
@@ -47,7 +47,7 @@ export const defaultLNG = "en";
47
47
  export const defaultNS = "translations";
48
48
 
49
49
  // Note: This is type "string" to allow translation overrides from other languages
50
- export type I18nResources = Record<string, typeof en>;
50
+ export type I18nResources = Record<string, Partial<typeof en>>;
51
51
  export const resources: I18nResources = {
52
52
  cs,
53
53
  da,
@@ -24,6 +24,7 @@ import {
24
24
  SwitchProps as MuiSwitchProps,
25
25
  FormControlLabel,
26
26
  } from "@mui/material";
27
+ import { useTranslation } from "react-i18next";
27
28
 
28
29
  import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext";
29
30
  import { Box } from "../Box";
@@ -81,6 +82,7 @@ const SwitchLabel = ({
81
82
  label,
82
83
  }: SwitchLabelProps) => {
83
84
  const odysseyDesignTokens = useOdysseyDesignTokens();
85
+ const { t } = useTranslation();
84
86
 
85
87
  return (
86
88
  <>
@@ -115,7 +117,7 @@ const SwitchLabel = ({
115
117
  transitionDuration: odysseyDesignTokens.TransitionDurationMain,
116
118
  }}
117
119
  >
118
- {checked ? "Active" : "Inactive"}
120
+ {checked ? t("switch.active") : t("switch.inactive")}
119
121
  </Box>
120
122
  </Box>
121
123
  {hint && <FieldHint id={hintId} text={hint} />}
@@ -10,6 +10,8 @@ severity.error = error
10
10
  severity.info = info
11
11
  severity.success = success
12
12
  severity.warning = warning
13
+ switch.active = Active
14
+ switch.inactive = Inactive
13
15
  table.error = Error loading data.
14
16
  table.fetchedrows.text = Fetched {{totalRows}} row
15
17
  table.fetchedrows.text_plural = Fetched {{totalRows}} total rows
@@ -1 +1 @@
1
- export const translation = {"breadcrumbs.home.text":"Home","breadcrumbs.label.text":"Breadcrumbs","close.text":"close","fielderror.screenreader.text":"Error","fieldlabel.optional.text":"Optional","fieldlabel.required.text":"Required","passwordfield.icon.label.show":"Show password","passwordfield.icon.label.hide":"Hide password","severity.error":"error","severity.info":"info","severity.success":"success","severity.warning":"warning","table.error":"Error loading data.","table.fetchedrows.text":"Fetched {{totalRows}} row","table.fetchedrows.text_plural":"Fetched {{totalRows}} total rows","table.rows.text":"{{totalRows}} row","table.rows.text_plural":"{{totalRows}} rows"};
1
+ export const translation = {"breadcrumbs.home.text":"Home","breadcrumbs.label.text":"Breadcrumbs","close.text":"close","fielderror.screenreader.text":"Error","fieldlabel.optional.text":"Optional","fieldlabel.required.text":"Required","passwordfield.icon.label.show":"Show password","passwordfield.icon.label.hide":"Hide password","severity.error":"error","severity.info":"info","severity.success":"success","severity.warning":"warning","switch.active":"Active","switch.inactive":"Inactive","table.error":"Error loading data.","table.fetchedrows.text":"Fetched {{totalRows}} row","table.fetchedrows.text_plural":"Fetched {{totalRows}} total rows","table.rows.text":"{{totalRows}} row","table.rows.text_plural":"{{totalRows}} rows"};