Type not being translated while using ajv-i18n

35 views Asked by At

I want to translate the errors of my schema automatically using ajv-i18n. However the error is not translated completely (the type is displayed as "number" (english) instead of "nĂºmero" (spanish)). This is the code Im using (you can check the DEMO):

import RjsfCoreForm from "@rjsf/core";
import { customizeValidator } from "@rjsf/validator-ajv8";
import spanishLocalizer from "ajv-i18n/localize/es";

const validator = customizeValidator({}, spanishLocalizer);

export default function App() {
  return (
    <div className="App">
      <RjsfCoreForm schema={schema} validator={validator} />
    </div>
  );
}

The result containing the untranslated word "number":

enter image description here

0

There are 0 answers