Skip to content

Enable getting an i18n error message with key#17

Open
ivanxuu wants to merge 1 commit intobithavoc:masterfrom
ivanxuu:get_i18n_error_message
Open

Enable getting an i18n error message with key#17
ivanxuu wants to merge 1 commit intobithavoc:masterfrom
ivanxuu:get_i18n_error_message

Conversation

@ivanxuu
Copy link
Copy Markdown

@ivanxuu ivanxuu commented Feb 18, 2016

PROBLEM: Currently the message has to be included in the same
declaration with:

  multilang :title, :required => 2,
    message: 'Insuficientes traducciones'

It would be better to have a default error key in the translations file.

SOLUTION: Add I18n key by default. The developer will need to add
something like this to his translations file.

  errors:
    messages:
      insufficient-translations:
        one: 'We need at least one tranlation.'
        other: 'We need at least %{count} tranlations.'

PROBLEM: Currently the message has to be included in the same
declaration with:

  multilang :title, :required => 2,
    message: 'Insuficientes traducciones'

It would be better to have a default error key in the translations file.

SOLUTION: Add I18n key by default. The developer will need to add
something like this to his translations file.

  errors:
    messages:
      insufficient-translations:
        one: 'We need at least one tranlation.'
        other: 'We need at least %{count} tranlations.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant