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

Make the timeago.js strings translatable #1974

Closed
briri opened this issue Oct 30, 2018 · 0 comments
Closed

Make the timeago.js strings translatable #1974

briri opened this issue Oct 30, 2018 · 0 comments
Assignees
Labels
effort-small less than 1/2 day of dev time infrastructure

Comments

@briri
Copy link
Contributor

briri commented Oct 30, 2018

The timeago.js file currently only exists in the lib/assets/javascripts/locale/en_GB directory and contains a lot of hard-coded strings that are not being handled properly for other locales.

There may be ways to handle it by adding a translated version to the other language directories in lib/assets/javascripts/locale and then updating lib/assets/javascripts/utils/timeagoFactory.js to grab the current locale and import the appropriate file.

A more convenient approach though might be to place those hardcoded strings into the views/layouts/application.html.erb JSON section that gets fed into lib/assets/javascripts/constants.js so that they're picked up and added to the app.pot file and handled like our other translations.

@briri briri added infrastructure effort-small less than 1/2 day of dev time labels Oct 30, 2018
@briri briri self-assigned this Jun 30, 2020
@briri briri closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-small less than 1/2 day of dev time infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant