Skip to content

Navigation Menu

Sign in
Sign up

i18n lookup #413

Unanswered
alec-c4 asked this question in Q&A
Oct 7, 2024 · 1 comment
Discussion options

Hey!
I'd like to add packwerk to my project, but there is an issue with i18n keys lookup. Earlier I used key admin.users.edit.title, but now I need to use admin.views.admin.users.edit.title for package views, located in app/packages/admin/views/edit.html.erb. Is there any ability to use t('.title') in the package views and to lookup admin.users.edit.title in the app/packages/admin/config/locales/*.yml??

You must be logged in to vote

Replies: 1 comment

Comment options

@alec-c4 this feels like it's probably not related to packwerk since shopify/packwerk is for static analysis. How are you loading your files under app/packages? Are you using other dependencies?

One thing that stood out to me about your folder structure as unexpected is that your views subdir isn't under app, it's a sibling to where app/ would be. If you're using a mechanism for loading from app/packages sub directories that mirrors rails' zeitwerk loader, that could be a problem

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /