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

use ActionView::Helpers::DateHelper for crack_time_display #42

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

Conversation

finchi
Copy link

@finchi finchi commented Jun 11, 2021

Since crack_time_display gets passed as a I18n variable, it would be nice if it would be already translated with distance_of_time_in_words. Else it doesn't make sense to use it with other languages

@formigarafa
Copy link
Contributor

@finchi This is a problem of the wrapped js library in one of the dependencies.
The "good" part is that it is very stable so might be possible to make a parser to extract those strings form it and make them translatable, the bad part is it may be overly complicated compared to update the js library.
Then, the worst part is that the original library (https://github.com/dropbox/zxcvbn) does not change since 2017 and it seems very unlikely to change.
Also, maybe the gem this repo depend on is a bit too generic to assume distance_time_in_words would be available.
But maybe if you sketch a little better what is your use-case and how this could be useful then maybe someone could try to help.

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.

2 participants