ajv-validator / ajv-validator/ajv-i18n

Translate property names

Aberta
#92 1 comentário 1 reação 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
JavaScript
Estrelas
180
Forks
91
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

I generate JSON schemas based on thy applications metadata (Entity, Properties, Validation-Rules) etc. and then use ajv-i18n to get translated (german) messages out of AJV that get rendered into the otherwise translated UI.

This works great except that I don't see a way to translate the property names. I get messages like:

sollte das erforderliche Attribut firstName enthalten

The word "firstName" is English and should be "Vorname". I have this text already on hand when generating the JSON schema and even when validating.

How can I feed in my custom property name or let's better say "Property Caption" into the messages?

Btw: From PoV there are two things: a) propertyName (technical, internal) and b) propertyCaption (the thing to show to the user/message).

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.