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

Missing file alchemy.translations #32

Closed
robinboening opened this issue May 19, 2021 · 4 comments · Fixed by #34
Closed

Missing file alchemy.translations #32

robinboening opened this issue May 19, 2021 · 4 comments · Fixed by #34

Comments

@robinboening
Copy link

robinboening commented May 19, 2021

PR AlchemyCMS/alchemy_cms#1775 added Webpacker and also removed the file app/assets/javascripts/alchemy/alchemy.translations.js.coffee from the repo which is a dependency in alchemy_i18n due to the require statement in the js files.

This results in the following error when requiring those js locale files from alchemy_i18n

couldn't find file 'alchemy/alchemy.translations' with type 'application/javascript'
@afdev82
Copy link
Contributor

afdev82 commented Jun 2, 2021

Any news on this issue? I'm getting this error too when upgrading to Alchemy v5

@afdev82
Copy link
Contributor

afdev82 commented Jun 4, 2021

I was trying to find a solution, but the problem seems deeper.
If I just remove the require then I get

Alchemy.translations is undefined

I think the gem is not ready to work with Alchemy v5, because of the changes already linked by @robinboening .
I tried to export the translations in the global Alchemy object like before and use it in the translate function of the package @alchemy_cms/admin package, but I don't know if it's the right approach:

AlchemyCMS/alchemy_cms#2114

@tvdeyen
Copy link
Member

tvdeyen commented Jun 4, 2021

The solution in #34 should work without the require since it makes sure that Alchemy.translations is defined before mutating it.

@tvdeyen
Copy link
Member

tvdeyen commented Jun 4, 2021

The solution in #34 should work without the require since it makes sure that Alchemy.translations is defined before mutating it.

Ignore me. I now see what the problem was. Thanks for fixing.

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 a pull request may close this issue.

3 participants