Skip to content

Releases: glebm/i18n-tasks

v0.9.16

21 Jul 22:48

Choose a tag to compare

Improves handling of interpolations in translate-missing when multiple interpolations are present.

v0.9.15

02 May 02:20

Choose a tag to compare

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

02 May 02:19

Choose a tag to compare

  • AST scanner: support nested t calls in ruby files. #c61f4e00

  • Exclude *.swf and *.flv files by default. #233

v0.9.13

29 Mar 11:08

Choose a tag to compare

This release replaces a GPL-licensed dependency, Term::ANSIColor, with the MIT-licensed Rainbow gem.

Thanks to @ypresto for discovering and fixing the issue.

v0.9.12

29 Mar 11:03

Choose a tag to compare

This is a minor bugfix release.

  • Do not warn about "adding children to leaf" for keys found in source. #228
  • Fix an issue with nested keys with the scope argument in views. #224

v0.9.11

29 Mar 11:03

Choose a tag to compare

This is a minor bugfix release.

  • Fixes another issue with the scope argument in views. #224

v0.9.10

31 Jan 19:32

Choose a tag to compare

  • Fixes parenthesized t() calls with a scope argument in views.
    #224
  • Fixes the i18n-tasks irb task.
    #222

v0.9.9

19 Jan 08:42

Choose a tag to compare

This release fixes an issue with dynamic scope arguments in views.

This affects calls like the following:

<%= t('key', scope: dynamic) %>

Previously, i18n-tasks would incorrectly parse it as key. Now, such calls are ignored.

#213

v0.9.8: mv, rm, and tree-mv

27 Dec 13:40

Choose a tag to compare

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 account

Move a node:

$ i18n-tasks mv user_alerts user.alerts

Move the children one level up:

$ i18n-tasks mv 'alerts.{:}' '\1'

Merge-move multiple nodes:

$ i18n-tasks mv '{user,profile}' account

Merge (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

v0.9.7

27 Dec 03:51

Choose a tag to compare

This is a minor bugfix release.

  • Fixes add-missing command ignoring its locales argument.
    #205
  • Always require PatternMapper so that it doesn't need requiring in the config.
    #204
  • If internal_locale is set to a locale that's not available, reset it to en and print a warning.
    #202