Releases: glebm/i18n-tasks
Releases · glebm/i18n-tasks
v0.9.16
v0.9.15
Adds new configuration options to the built-in scanners to enable support for non-standard messages and receivers.
For example, to support the it gem:
# lib/i18n_tasks_it.rb
# The "it" gem support for i18n-tasks
I18n::Tasks.add_scanner(
'::I18n::Tasks::Scanners::RubyAstScanner',
receiver_messages: [nil, AST::Node.new(:const, [nil, :It])].product(%i[it]),
only: %w[*.rb]
)
I18n::Tasks.add_scanner(
'::I18n::Tasks::Scanners::PatternWithScopeScanner',
translate_call: /(?<=^|[^\w'\-.]|[^\w'\-]It\.|It\.)it/,
exclude: %w[*.rb]
)# config/i18n-tasks.yml.erb
<% require './lib/i18n_tasks_it' %>v0.9.14
v0.9.13
v0.9.12
v0.9.11
v0.9.10
v0.9.9
v0.9.8: mv, rm, and tree-mv
This release adds the mv command for renaming/moving the keys.
#116
Move / rename / merge keys
i18n-tasks mv <pattern> <target> is a versatile task to move or delete keys matching the given pattern.
All nodes (leafs or subtrees) matching <pattern> are merged together and moved to <target>.
Rename a node (leaf or subtree):
$ i18n-tasks mv user accountMove a node:
$ i18n-tasks mv user_alerts user.alertsMove the children one level up:
$ i18n-tasks mv 'alerts.{:}' '\1'Merge-move multiple nodes:
$ i18n-tasks mv '{user,profile}' accountMerge (non-leaf) nodes into parent:
$ i18n-tasks mv '{pages}.{a,b}' '\1'Delete keys
Delete the keys by using the rm task:
$ i18n-tasks rm 'user.{old_profile,old_title}' another_key