Translates a JSON Schema by replacing title and description properties with translated values
when translations exist in the provided i18next functions.
Uses the same traversal logic as extractTranslationKeysFromSchema to ensure consistency
between translation key generation and consumption.
Parameters
schema: JSONSchema7
The JSON Schema to translate
t: TFunction
i18next translation function
exists: ExistsFunction
i18next exists function to check if translation keys exist
Returns JSONSchema7
A new JSON Schema with translated titles and descriptions
Translates a JSON Schema by replacing title and description properties with translated values when translations exist in the provided i18next functions.
Uses the same traversal logic as extractTranslationKeysFromSchema to ensure consistency between translation key generation and consumption.