Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable getting an i18n error message with key #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivanxuu
Copy link

@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