diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-03-12 19:03:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 00:03:07 +0100 |
commit | e762a14c0ab235c337b3cddbef1eaf72b26faf58 (patch) | |
tree | b5484900a8d4d76605b506075e1df0bfae360e78 /lib | |
parent | f432db7b9f54501269c6377faf85b1b4b1424239 (diff) |
Enable Rubocop Performance/DeleteSuffix (#24077)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/repo.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/repo.rake b/lib/tasks/repo.rake index 5d1b4f754..888337b4f 100644 --- a/lib/tasks/repo.rake +++ b/lib/tasks/repo.rake @@ -91,8 +91,8 @@ namespace :repo do missing_json_files = I18n.available_locales.reject { |locale| Rails.root.join('app', 'javascript', 'mastodon', 'locales', "#{locale}.json").exist? } locales_in_files = Dir[Rails.root.join('config', 'locales', '*.yml')].map do |path| - file_name = File.basename(path) - file_name.gsub(/\A(doorkeeper|devise|activerecord|simple_form)\./, '').gsub(/\.yml\z/, '').to_sym + file_name = File.basename(path, '.yml') + file_name.gsub(/\A(doorkeeper|devise|activerecord|simple_form)\./, '').to_sym end.uniq.compact missing_available_locales = locales_in_files - I18n.available_locales |