summaryrefslogtreecommitdiff
path: root/lib/tasks/gettext.rake
blob: 0aa21a4bd13ba077244c4917db4f7b80bef238ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "gettext_i18n_rails/tasks"

namespace :gettext do
  # Customize list of translatable files
  # See: https://github.com/grosser/gettext_i18n_rails#customizing-list-of-translatable-files
  def files_to_translate
    folders = %W(app lib config #{locale_path}).join(',')
    exts = %w(rb erb haml slim rhtml js jsx vue coffee handlebars hbs mustache).join(',')

    Dir.glob(
      "{#{folders}}/**/*.{#{exts}}"
    )
  end
end