Closed sigmike closed 6 years ago
:+1: for option 1.
can you provide examples how to use it?
/ _button.html.slim
= t(".hello")
/ Instead of
/ = t("button_component.hello")
/ button.de.yml
de:
button_component:
hello: "Halo"
But it's only after we apply your changes in #18. We can already do that with the current key's naming.
With this change the locale prefix becomes longer. It's good because it prevents conflicts but it makes the prefix even longer, so more painful to use.
I think we should :
translate
(andt
) to make keys starting with a dot look into the component locales (like rails does)<locale>.components.admin.button.admin_button
(to match the partial path).I think 1. is better because the hierarchy is simpler and if you refactor your component by moving things into partial you don't have to change your keys.