diff --git a/src/components/profile/rules-editor-viewer.tsx b/src/components/profile/rules-editor-viewer.tsx index 8f2aa845..a2f009b1 100644 --- a/src/components/profile/rules-editor-viewer.tsx +++ b/src/components/profile/rules-editor-viewer.tsx @@ -462,10 +462,12 @@ export const RulesEditorViewer = (props: Props) => { const validateRule = () => { if ((ruleType.required ?? true) && !ruleContent) { - throw new Error(t("Rule Condition Required")); + throw new Error( + t("components.ruleEditor.form.validation.conditionRequired"), + ); } if (ruleType.validator && !ruleType.validator(ruleContent)) { - throw new Error(t("Invalid Rule")); + throw new Error(t("components.ruleEditor.form.validation.invalidRule")); } const condition = (ruleType.required ?? true) ? ruleContent : ""; @@ -490,7 +492,7 @@ export const RulesEditorViewer = (props: Props) => { { - {t("Edit Rules")} + {t("components.ruleEditor.title")} @@ -631,7 +646,7 @@ export const RulesEditorViewer = (props: Props) => { } }} > - {t("Append Rule")} + {t("components.ruleEditor.form.actions.appendRule")} diff --git a/src/components/rule/provider-button.tsx b/src/components/rule/provider-button.tsx index 04098a48..8e2d3cb1 100644 --- a/src/components/rule/provider-button.tsx +++ b/src/components/rule/provider-button.tsx @@ -141,7 +141,7 @@ export const ProviderButton = () => { startIcon={} onClick={() => setOpen(true)} > - {t("Rule Provider")} + {t("pages.rules.provider.trigger")} @@ -151,7 +151,9 @@ export const ProviderButton = () => { justifyContent="space-between" alignItems="center" > - {t("Rule Providers")} + + {t("pages.rules.provider.dialogTitle")} +