vim-rails
vim-rails copied to clipboard
Allow to jump to exact key in i18n locale file
It would be nice if I could jump directly to the key in the locale file with :Elocale or a similar command when hovering inside a t().
So for example (* indicating cursor position):
I18n.t("admin.actions.toggle_lock.fla*sh.unlocked")
should jump to one of these locations
admin:
actions:
toggle_lock:
flash:* # if we want to support jumping to the section
unlocked: *"User unlocked successfully." # if we want to just jump to the location of the full key
locked: "User locked successfully."
This would be a very cool addition!
It would be nice if it would be possible to detect namespaced translations too.
Such as croms.en.yml
Possibly duplicate:
- https://github.com/tpope/vim-rails/issues/114
- https://github.com/tpope/vim-rails/issues/113
I also think that it would be very useful to jump to human attribute name:
User.human_attribute_name(:use*name),
en:
activerecord:
attributes:
user:
username: *"Username (used for login)"