Skip to content

Suggestion: use default "distance_in_words" translations #34

@everton

Description

@everton

I saw the nice touch you put on adding the "datetime.distance_in_words.short.*" translations to present the time in a more concise format, but this leads to a problem if the application uses locales different than :en: instead of the time, the translation missing message will be presented.

To circumvent this, the application will need to have :en as a default fallback (which may not be the preferred behavior for some apps) or the devs will be required to replicate your formats on their own translation files.

I think the best solution would be to just use the default and generally accepted "datetime.distance_in_words".

Another alternative is to force the :en locale using an around_action in the ErrorsController (I think this is acceptable, since my point is not that the errors' reports should not be in English). I'm using this approach in a fork and I can provide this as a pull request if you feel it is preferrable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions